Class ManagedObjectNodeImpl
- java.lang.Object
-
- net.officefloor.compile.impl.structure.ManagedObjectNodeImpl
-
- All Implemented Interfaces:
BoundManagedObjectNode,DependentObjectNode,LinkObjectNode,ManagedObjectExtensionNode,ManagedObjectNode,Node,AdministerableManagedObject,DependentManagedObject,GovernerableManagedObject,OfficeDependencyObjectNode,OfficeManagedObject,OfficeSectionManagedObject,OfficeFloorDependencyObjectNode,OfficeFloorManagedObject,SectionDependencyObjectNode,SectionManagedObject
public class ManagedObjectNodeImpl extends java.lang.Object implements ManagedObjectNode
ManagedObjectNodeimplementation.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from interface net.officefloor.compile.internal.structure.ManagedObjectNode
TYPE
-
-
Constructor Summary
Constructors Constructor Description ManagedObjectNodeImpl(java.lang.String managedObjectName, SectionNode containingSectionNode, OfficeNode containingOfficeNode, OfficeFloorNode containingOfficeFloorNode, NodeContext context)Initiate.
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.compile.internal.structure.Node
getQualifiedName
-
-
-
-
Constructor Detail
-
ManagedObjectNodeImpl
public ManagedObjectNodeImpl(java.lang.String managedObjectName, SectionNode containingSectionNode, OfficeNode containingOfficeNode, OfficeFloorNode containingOfficeFloorNode, NodeContext context)Initiate.- Parameters:
managedObjectName- Name of thisManagedObject.containingSectionNode-SectionNodecontaining thisManagedObjectNode.nullif contained in theOfficeorOfficeFloor.containingOfficeNode-OfficeNodecontaining thisManagedObjectNode.nullif contained in theOfficeFloor.containingOfficeFloorNode-OfficeFloorNodecontaining thisManagedObjectNode.context-NodeContext.
-
-
Method Detail
-
getNodeName
public java.lang.String getNodeName()
Description copied from interface:NodeObtains the name of theNode.- Specified by:
getNodeNamein interfaceNode- Returns:
- Name of the
Node.
-
getNodeType
public java.lang.String getNodeType()
Description copied from interface:NodeObtains theNodetype.- Specified by:
getNodeTypein interfaceNode- Returns:
Nodetype.
-
getLocation
public java.lang.String getLocation()
Description copied from interface:NodeObtains the location of theNode.- Specified by:
getLocationin interfaceNode- Returns:
- Location of the
Node. May benullifNodedoes not support a location.
-
getParentNode
public Node getParentNode()
Description copied from interface:Node- Specified by:
getParentNodein interfaceNode- Returns:
Nodecontaining thisNode.
-
getQualifiedName
public java.lang.String getQualifiedName()
Description copied from interface:NodeObtains the qualified name of theNode.- Specified by:
getQualifiedNamein interfaceNode- Returns:
- Qualified name of the
Node.
-
getChildNodes
public Node[] getChildNodes()
Description copied from interface:NodeObtains the childNodeinstances.- Specified by:
getChildNodesin interfaceNode- Returns:
- Child
Nodeinstances.
-
isInitialised
public boolean isInitialised()
Description copied from interface:NodeIndicates if theNodehas been initialised.Nodeinstances should only be initialised once. Initialising theNodetwice is an issue.- Specified by:
isInitialisedin interfaceNode- Returns:
trueif initialised.
-
initialise
public void initialise(ManagedObjectScope managedObjectScope, ManagedObjectSourceNode managedObjectSourceNode)
Description copied from interface:ManagedObjectNodeInitialises theManagedObjectNode.- Specified by:
initialisein interfaceManagedObjectNode- Parameters:
managedObjectScope-ManagedObjectScopefor theManagedObject.managedObjectSourceNode-ManagedObjectSourceNodefor theManagedObjectNode.
-
getManagedObjectSourceNode
public ManagedObjectSourceNode getManagedObjectSourceNode()
Description copied from interface:ManagedObjectNodeObtains theManagedObjectSourceNodefor thisManagedObjectNode.- Specified by:
getManagedObjectSourceNodein interfaceBoundManagedObjectNode- Specified by:
getManagedObjectSourceNodein interfaceManagedObjectNode- Returns:
ManagedObjectSourceNodefor thisManagedObjectNode.
-
getTypeQualifications
public TypeQualification[] getTypeQualifications(CompileContext compileContext)
Description copied from interface:ManagedObjectNodeObtains theTypeQualificationinstances for theManagedObject.- Specified by:
getTypeQualificationsin interfaceManagedObjectNode- Parameters:
compileContext-CompileContext.- Returns:
TypeQualificationinstances for theManagedObject.
-
getManagedObjectDepdendencies
public ManagedObjectDependencyNode[] getManagedObjectDepdendencies()
Description copied from interface:ManagedObjectNodeObtains theManagedObjectDependencyNodeinstances.- Specified by:
getManagedObjectDepdendenciesin interfaceManagedObjectNode- Returns:
ManagedObjectDependencyNodeinstances.
-
sourceManagedObject
public boolean sourceManagedObject(CompileContext compileContext)
Description copied from interface:ManagedObjectNodeSources theManagedObject.- Specified by:
sourceManagedObjectin interfaceManagedObjectNode- Parameters:
compileContext-CompileContext.- Returns:
trueif successfully sourced theManagedObject.falseif failed to source, with issues reported to theCompilerIssues.
-
autoWireDependencies
public void autoWireDependencies(AutoWirer<LinkObjectNode> autoWirer, OfficeNode office, CompileContext compileContext)
Description copied from interface:ManagedObjectNodeAuto-wires the dependencies for theManagedObject.- Specified by:
autoWireDependenciesin interfaceManagedObjectNode- Parameters:
autoWirer-AutoWirer.office-OfficeNoderequiring the auto-wiring.compileContext-CompileContext.
-
createExecutionManagedObject
public ExecutionManagedObject createExecutionManagedObject(CompileContext compileContext)
Description copied from interface:ManagedObjectNodeCreates theExecutionManagedObjectfor thisManagedObjectNode.- Specified by:
createExecutionManagedObjectin interfaceManagedObjectNode- Parameters:
compileContext-CompileContext.- Returns:
ExecutionManagedObjectfor thisManagedObjectNode.
-
loadOfficeSectionManagedObjectType
public OfficeSectionManagedObjectType loadOfficeSectionManagedObjectType(CompileContext compileContext)
Description copied from interface:ManagedObjectNodeLoads theOfficeSectionManagedObjectType.- Specified by:
loadOfficeSectionManagedObjectTypein interfaceManagedObjectNode- Parameters:
compileContext-CompileContext.- Returns:
OfficeSectionManagedObjectTypeornullwith issues reported to theCompilerIssues.
-
runExecutionExplorers
public boolean runExecutionExplorers(CompileContext compileContext)
Description copied from interface:ManagedObjectNodeRuns theExecutionObjectExplorerinstances for theManagedObject.- Specified by:
runExecutionExplorersin interfaceManagedObjectNode- Parameters:
compileContext-CompileContext.- Returns:
trueif successfully explored execution.
-
loadDependentObjectType
public DependentObjectType loadDependentObjectType(CompileContext compileContext)
Description copied from interface:DependentObjectNodeLoads theDependentObjectType.- Specified by:
loadDependentObjectTypein interfaceDependentObjectNode- Parameters:
compileContext-CompileContext.- Returns:
DependentObjectTypeornullwith issue reported to theCompilerIssues.
-
getBoundManagedObjectName
public java.lang.String getBoundManagedObjectName()
Description copied from interface:BoundManagedObjectNodeObtains the name under which thisManagedObjectis made available to theOffice.- Specified by:
getBoundManagedObjectNamein interfaceBoundManagedObjectNode- Returns:
- Name under which this
ManagedObjectis made available to theOffice.
-
addGovernance
public void addGovernance(GovernanceNode governance, OfficeNode office)
Description copied from interface:BoundManagedObjectNodeAdds theGovernanceNodeto provideGovernanceover thisManagedObjectNodewhen used within theOfficeof theOfficeNode.- Specified by:
addGovernancein interfaceBoundManagedObjectNode- Parameters:
governance-GovernanceNode.office-OfficeNodefor which theGovernanceis applicable.
-
addPreLoadAdministration
public void addPreLoadAdministration(AdministrationNode preLoadAdministration, OfficeNode office)
Description copied from interface:BoundManagedObjectNodeAdds theAdministrationNodeto provide pre-loadAdministrationfor thisManagedObjectNodewhen used within theOfficeof theOfficeNode.- Specified by:
addPreLoadAdministrationin interfaceBoundManagedObjectNode- Parameters:
preLoadAdministration- Pre-loadAdministrationNode.office-OfficeNodefor which the pre-loadAdministrationis applicable.
-
buildOfficeManagedObject
public void buildOfficeManagedObject(OfficeNode office, OfficeBuilder officeBuilder, OfficeBindings officeBindings, CompileContext compileContext)
Description copied from interface:BoundManagedObjectNodeBuilds theManagedObjectinto theOffice.- Specified by:
buildOfficeManagedObjectin interfaceBoundManagedObjectNode- Parameters:
office-OfficeNodeof theOfficethat thisManagedObjectis to build itself into.officeBuilder-OfficeBuilderfor theOffice.officeBindings-OfficeBindings.compileContext-CompileContext.
-
buildSupplierThreadLocal
public void buildSupplierThreadLocal(OptionalThreadLocalReceiver optionalThreadLocalReceiver)
Description copied from interface:BoundManagedObjectNodeBuilds theSupplierThreadLocalfrom the boundManagedObject.- Specified by:
buildSupplierThreadLocalin interfaceBoundManagedObjectNode- Parameters:
optionalThreadLocalReceiver-OptionalThreadLocalReceiverto receive theOptionalThreadLocal.
-
addTypeQualification
public void addTypeQualification(java.lang.String qualifier, java.lang.String type)Description copied from interface:SectionManagedObjectAdds an
TypeQualificationfor thisSectionManagedObject.This enables distinguishing
SectionManagedObjectinstances to enable, for example, dynamicTeamassignment.- Specified by:
addTypeQualificationin interfaceOfficeFloorManagedObject- Specified by:
addTypeQualificationin interfaceOfficeManagedObject- Specified by:
addTypeQualificationin interfaceSectionManagedObject- Parameters:
qualifier- Qualifier. May benullif no qualification.type- Type (typically the fully qualified type).
-
addPreLoadAdministration
public void addPreLoadAdministration(OfficeAdministration administration)
Description copied from interface:OfficeSectionManagedObjectAdds an
OfficeAdministrationto be done before attempting load thisManagedObject.The order that the
OfficeAdministrationinstances are added is the order they will be done.- Specified by:
addPreLoadAdministrationin interfaceOfficeManagedObject- Specified by:
addPreLoadAdministrationin interfaceOfficeSectionManagedObject- Parameters:
administration-OfficeAdministrationto be done before attempting load thisManagedObject.
-
getSectionManagedObjectName
public java.lang.String getSectionManagedObjectName()
Description copied from interface:SectionManagedObjectObtains the name of thisSectionManagedObject.- Specified by:
getSectionManagedObjectNamein interfaceSectionManagedObject- Returns:
- Name of this
SectionManagedObject.
-
getSectionManagedObjectDependency
public SectionManagedObjectDependency getSectionManagedObjectDependency(java.lang.String managedObjectDependencyName)
Description copied from interface:SectionManagedObjectObtains theSectionManagedObjectDependencyfor theManagedObjectDependencyType.- Specified by:
getSectionManagedObjectDependencyin interfaceSectionManagedObject- Parameters:
managedObjectDependencyName- Name of theManagedObjectDependencyType.- Returns:
SectionManagedObjectDependency.
-
getOfficeSectionManagedObjectName
public java.lang.String getOfficeSectionManagedObjectName()
Description copied from interface:OfficeSectionManagedObjectObtains the name of thisOfficeSectionManagedObject.- Specified by:
getOfficeSectionManagedObjectNamein interfaceOfficeSectionManagedObject- Returns:
- Name of this
OfficeSectionManagedObject.
-
getOfficeManagedObjectName
public java.lang.String getOfficeManagedObjectName()
Description copied from interface:OfficeManagedObjectObtains the name of theManagedObject.- Specified by:
getOfficeManagedObjectNamein interfaceOfficeManagedObject- Returns:
- Name of the
ManagedObject.
-
getOfficeManagedObjectDependency
public OfficeManagedObjectDependency getOfficeManagedObjectDependency(java.lang.String managedObjectDependencyName)
Description copied from interface:OfficeManagedObjectObtains theOfficeManagedObjectDependencyfor theManagedObjectDependencyType.- Specified by:
getOfficeManagedObjectDependencyin interfaceOfficeManagedObject- Parameters:
managedObjectDependencyName- Name of theManagedObjectDependencyType.- Returns:
OfficeManagedObjectDependency.
-
addExecutionExplorer
public void addExecutionExplorer(ExecutionObjectExplorer executionObjectExplorer)
Description copied from interface:OfficeManagedObjectAdds anExecutionObjectExplorerfor the execution tree from thisOfficeManagedObject.- Specified by:
addExecutionExplorerin interfaceOfficeManagedObject- Parameters:
executionObjectExplorer-ExecutionObjectExplorer.
-
getOfficeFloorManagedObjectName
public java.lang.String getOfficeFloorManagedObjectName()
Description copied from interface:OfficeFloorManagedObjectObtains the name of thisOfficeFloorManagedObject.- Specified by:
getOfficeFloorManagedObjectNamein interfaceOfficeFloorManagedObject- Returns:
- Name of this
OfficeFloorManagedObject.
-
getOfficeFloorManagedObjectDependency
public OfficeFloorManagedObjectDependency getOfficeFloorManagedObjectDependency(java.lang.String managedObjectDependencyName)
Description copied from interface:OfficeFloorManagedObjectObtains theOfficeFloorManagedObjectDependencyfor theManagedObjectDependencyType.- Specified by:
getOfficeFloorManagedObjectDependencyin interfaceOfficeFloorManagedObject- Parameters:
managedObjectDependencyName- Name of theManagedObjectDependencyType.- Returns:
OfficeFloorManagedObjectDependency.
-
getDependentManagedObjectName
public java.lang.String getDependentManagedObjectName()
Description copied from interface:DependentManagedObjectObtains the name of thisDependentManagedObject.- Specified by:
getDependentManagedObjectNamein interfaceDependentManagedObject- Returns:
- Name of this
DependentManagedObject.
-
getAdministerableManagedObjectName
public java.lang.String getAdministerableManagedObjectName()
Description copied from interface:AdministerableManagedObjectObtains the name of thisAdministerableManagedObject.- Specified by:
getAdministerableManagedObjectNamein interfaceAdministerableManagedObject- Returns:
- Name of this
AdministerableManagedObject.
-
getGovernerableManagedObjectName
public java.lang.String getGovernerableManagedObjectName()
Description copied from interface:GovernerableManagedObjectObtains the name of thisGovernerableManagedObject.- Specified by:
getGovernerableManagedObjectNamein interfaceGovernerableManagedObject- Returns:
- Name of this
GovernerableManagedObject.
-
linkObjectNode
public boolean linkObjectNode(LinkObjectNode node)
Description copied from interface:LinkObjectNodeLinks the inputLinkObjectNodeto thisLinkObjectNode.- Specified by:
linkObjectNodein interfaceLinkObjectNode- Parameters:
node-LinkObjectNodeto link to thisLinkObjectNode.- Returns:
trueif linked.
-
getLinkedObjectNode
public LinkObjectNode getLinkedObjectNode()
Description copied from interface:LinkObjectNodeObtains theLinkObjectNodelinked to thisLinkObjectNode.- Specified by:
getLinkedObjectNodein interfaceLinkObjectNode- Returns:
LinkObjectNodelinked to thisLinkObjectNode.
-
-