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
ManagedObjectNode implementation.- Author:
- Daniel Sagenschneider
-
Field Summary
Fields inherited from interface net.officefloor.compile.internal.structure.ManagedObjectNode
TYPE -
Constructor Summary
ConstructorsConstructorDescriptionManagedObjectNodeImpl(String managedObjectName, SectionNode containingSectionNode, OfficeNode containingOfficeNode, OfficeFloorNode containingOfficeFloorNode, NodeContext context) Initiate. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExecutionExplorer(ExecutionObjectExplorer executionObjectExplorer) Adds anExecutionObjectExplorerfor the execution tree from thisOfficeManagedObject.voidaddGovernance(GovernanceNode governance, OfficeNode office) Adds theGovernanceNodeto provideGovernanceover thisManagedObjectNodewhen used within theOfficeof theOfficeNode.voidaddPreLoadAdministration(AdministrationNode preLoadAdministration, OfficeNode office) Adds theAdministrationNodeto provide pre-loadAdministrationfor thisManagedObjectNodewhen used within theOfficeof theOfficeNode.voidaddPreLoadAdministration(OfficeAdministration administration) Adds anOfficeAdministrationto be done before attempting load thisManagedObject.voidaddTypeQualification(String qualifier, String type) Adds anTypeQualificationfor thisSectionManagedObject.voidautoWireDependencies(AutoWirer<LinkObjectNode> autoWirer, OfficeNode office, CompileContext compileContext) Auto-wires the dependencies for theManagedObject.booleanbuildFunctionManagedObject(String functionObjectName, ManagedFunctionBuilder<?, ?> functionBuilder, OfficeNode office, OfficeBindings officeBindings, CompileContext compileContext) Builds theManagedObjectonto theManagedFunctionNode.voidbuildOfficeManagedObject(OfficeNode office, OfficeBuilder officeBuilder, OfficeBindings officeBindings, CompileContext compileContext) Builds theManagedObjectinto theOffice.voidbuildSupplierThreadLocal(OptionalThreadLocalReceiver optionalThreadLocalReceiver) Builds theSupplierThreadLocalfrom the boundManagedObject.createExecutionManagedObject(CompileContext compileContext) Creates theExecutionManagedObjectfor thisManagedObjectNode.Obtains the name of thisAdministerableManagedObject.Obtains the name under which thisManagedObjectis made available to theOffice.Node[]Obtains the childNodeinstances.Obtains the name of thisDependentManagedObject.Obtains the name of thisGovernerableManagedObject.Obtains theLinkObjectNodelinked to thisLinkObjectNode.Obtains the location of theNode.Obtains theManagedObjectDependencyNodeinstances.Obtains theManagedObjectSourceNodefor thisManagedObjectNode.Obtains the name of theNode.Obtains theNodetype.getOfficeFloorManagedObjectDependency(String managedObjectDependencyName) Obtains theOfficeFloorManagedObjectDependencyfor theManagedObjectDependencyType.Obtains the name of thisOfficeFloorManagedObject.getOfficeManagedObjectDependency(String managedObjectDependencyName) Obtains theOfficeManagedObjectDependencyfor theManagedObjectDependencyType.Obtains the name of theManagedObject.Obtains the name of thisOfficeSectionManagedObject.Obtains the qualified name of theNode.getSectionManagedObjectDependency(String managedObjectDependencyName) Obtains theSectionManagedObjectDependencyfor theManagedObjectDependencyType.Obtains the name of thisSectionManagedObject.getTypeQualifications(CompileContext compileContext) Obtains theTypeQualificationinstances for theManagedObject.voidinitialise(ManagedObjectScope managedObjectScope, ManagedObjectSourceNode managedObjectSourceNode) Initialises theManagedObjectNode.booleanIndicates if theNodehas been initialised.booleanlinkObjectNode(LinkObjectNode node) Links the inputLinkObjectNodeto thisLinkObjectNode.loadDependentObjectType(CompileContext compileContext) Loads theDependentObjectType.loadOfficeSectionManagedObjectType(CompileContext compileContext) Loads theOfficeSectionManagedObjectType.booleanrunExecutionExplorers(CompileContext compileContext) Runs theExecutionObjectExplorerinstances for theManagedObject.booleansourceManagedObject(CompileContext compileContext) Sources theManagedObject.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.officefloor.compile.internal.structure.Node
getQualifiedName
-
Constructor Details
-
ManagedObjectNodeImpl
public ManagedObjectNodeImpl(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 Details
-
getNodeName
Description copied from interface:NodeObtains the name of theNode.- Specified by:
getNodeNamein interfaceNode- Returns:
- Name of the
Node.
-
getNodeType
Description copied from interface:NodeObtains theNodetype.- Specified by:
getNodeTypein interfaceNode- Returns:
Nodetype.
-
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
Description copied from interface:Node- Specified by:
getParentNodein interfaceNode- Returns:
Nodecontaining thisNode.
-
getQualifiedName
Description copied from interface:NodeObtains the qualified name of theNode.- Specified by:
getQualifiedNamein interfaceNode- Returns:
- Qualified name of the
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
Description copied from interface:ManagedObjectNodeObtains theManagedObjectSourceNodefor thisManagedObjectNode.- Specified by:
getManagedObjectSourceNodein interfaceBoundManagedObjectNode- Specified by:
getManagedObjectSourceNodein interfaceManagedObjectNode- Returns:
ManagedObjectSourceNodefor thisManagedObjectNode.
-
getTypeQualifications
Description copied from interface:ManagedObjectNodeObtains theTypeQualificationinstances for theManagedObject.- Specified by:
getTypeQualificationsin interfaceManagedObjectNode- Parameters:
compileContext-CompileContext.- Returns:
TypeQualificationinstances for theManagedObject.
-
getManagedObjectDepdendencies
Description copied from interface:ManagedObjectNodeObtains theManagedObjectDependencyNodeinstances.- Specified by:
getManagedObjectDepdendenciesin interfaceManagedObjectNode- Returns:
ManagedObjectDependencyNodeinstances.
-
sourceManagedObject
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
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
Description copied from interface:ManagedObjectNodeRuns theExecutionObjectExplorerinstances for theManagedObject.- Specified by:
runExecutionExplorersin interfaceManagedObjectNode- Parameters:
compileContext-CompileContext.- Returns:
trueif successfully explored execution.
-
loadDependentObjectType
Description copied from interface:DependentObjectNodeLoads theDependentObjectType.- Specified by:
loadDependentObjectTypein interfaceDependentObjectNode- Parameters:
compileContext-CompileContext.- Returns:
DependentObjectTypeornullwith issue reported to theCompilerIssues.
-
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
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
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.
-
buildFunctionManagedObject
public boolean buildFunctionManagedObject(String functionObjectName, ManagedFunctionBuilder<?, ?> functionBuilder, OfficeNode office, OfficeBindings officeBindings, CompileContext compileContext) Description copied from interface:BoundManagedObjectNodeBuilds theManagedObjectonto theManagedFunctionNode.- Specified by:
buildFunctionManagedObjectin interfaceBoundManagedObjectNode- Parameters:
functionObjectName- Name of the object on theManagedFunctionNode.functionBuilder-ManagedFunctionBuilder.office-OfficeNodeof theOfficethat thisManagedObjectis to build itself into.officeBindings-OfficeBindings.compileContext-CompileContext.- Returns:
trueif bound toManagedFunctionNode.
-
buildSupplierThreadLocal
Description copied from interface:BoundManagedObjectNodeBuilds theSupplierThreadLocalfrom the boundManagedObject.- Specified by:
buildSupplierThreadLocalin interfaceBoundManagedObjectNode- Parameters:
optionalThreadLocalReceiver-OptionalThreadLocalReceiverto receive theOptionalThreadLocal.
-
addTypeQualification
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
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
Description copied from interface:SectionManagedObjectObtains the name of thisSectionManagedObject.- Specified by:
getSectionManagedObjectNamein interfaceSectionManagedObject- Returns:
- Name of this
SectionManagedObject.
-
getSectionManagedObjectDependency
public SectionManagedObjectDependency getSectionManagedObjectDependency(String managedObjectDependencyName) Description copied from interface:SectionManagedObjectObtains theSectionManagedObjectDependencyfor theManagedObjectDependencyType.- Specified by:
getSectionManagedObjectDependencyin interfaceSectionManagedObject- Parameters:
managedObjectDependencyName- Name of theManagedObjectDependencyType.- Returns:
SectionManagedObjectDependency.
-
getOfficeSectionManagedObjectName
Description copied from interface:OfficeSectionManagedObjectObtains the name of thisOfficeSectionManagedObject.- Specified by:
getOfficeSectionManagedObjectNamein interfaceOfficeSectionManagedObject- Returns:
- Name of this
OfficeSectionManagedObject.
-
getOfficeManagedObjectName
Description copied from interface:OfficeManagedObjectObtains the name of theManagedObject.- Specified by:
getOfficeManagedObjectNamein interfaceOfficeManagedObject- Returns:
- Name of the
ManagedObject.
-
getOfficeManagedObjectDependency
public OfficeManagedObjectDependency getOfficeManagedObjectDependency(String managedObjectDependencyName) Description copied from interface:OfficeManagedObjectObtains theOfficeManagedObjectDependencyfor theManagedObjectDependencyType.- Specified by:
getOfficeManagedObjectDependencyin interfaceOfficeManagedObject- Parameters:
managedObjectDependencyName- Name of theManagedObjectDependencyType.- Returns:
OfficeManagedObjectDependency.
-
addExecutionExplorer
Description copied from interface:OfficeManagedObjectAdds anExecutionObjectExplorerfor the execution tree from thisOfficeManagedObject.- Specified by:
addExecutionExplorerin interfaceOfficeManagedObject- Parameters:
executionObjectExplorer-ExecutionObjectExplorer.
-
getOfficeFloorManagedObjectName
Description copied from interface:OfficeFloorManagedObjectObtains the name of thisOfficeFloorManagedObject.- Specified by:
getOfficeFloorManagedObjectNamein interfaceOfficeFloorManagedObject- Returns:
- Name of this
OfficeFloorManagedObject.
-
getOfficeFloorManagedObjectDependency
public OfficeFloorManagedObjectDependency getOfficeFloorManagedObjectDependency(String managedObjectDependencyName) Description copied from interface:OfficeFloorManagedObjectObtains theOfficeFloorManagedObjectDependencyfor theManagedObjectDependencyType.- Specified by:
getOfficeFloorManagedObjectDependencyin interfaceOfficeFloorManagedObject- Parameters:
managedObjectDependencyName- Name of theManagedObjectDependencyType.- Returns:
OfficeFloorManagedObjectDependency.
-
getDependentManagedObjectName
Description copied from interface:DependentManagedObjectObtains the name of thisDependentManagedObject.- Specified by:
getDependentManagedObjectNamein interfaceDependentManagedObject- Returns:
- Name of this
DependentManagedObject.
-
getAdministerableManagedObjectName
Description copied from interface:AdministerableManagedObjectObtains the name of thisAdministerableManagedObject.- Specified by:
getAdministerableManagedObjectNamein interfaceAdministerableManagedObject- Returns:
- Name of this
AdministerableManagedObject.
-
getGovernerableManagedObjectName
Description copied from interface:GovernerableManagedObjectObtains the name of thisGovernerableManagedObject.- Specified by:
getGovernerableManagedObjectNamein interfaceGovernerableManagedObject- Returns:
- Name of this
GovernerableManagedObject.
-
linkObjectNode
Description copied from interface:LinkObjectNodeLinks the inputLinkObjectNodeto thisLinkObjectNode.- Specified by:
linkObjectNodein interfaceLinkObjectNode- Parameters:
node-LinkObjectNodeto link to thisLinkObjectNode.- Returns:
trueif linked.
-
getLinkedObjectNode
Description copied from interface:LinkObjectNodeObtains theLinkObjectNodelinked to thisLinkObjectNode.- Specified by:
getLinkedObjectNodein interfaceLinkObjectNode- Returns:
LinkObjectNodelinked to thisLinkObjectNode.
-