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
ManagedObjectNode
implementation.- 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
-SectionNode
containing thisManagedObjectNode
.null
if contained in theOffice
orOfficeFloor
.containingOfficeNode
-OfficeNode
containing thisManagedObjectNode
.null
if contained in theOfficeFloor
.containingOfficeFloorNode
-OfficeFloorNode
containing thisManagedObjectNode
.context
-NodeContext
.
-
-
Method Detail
-
getNodeName
public java.lang.String getNodeName()
Description copied from interface:Node
Obtains the name of theNode
.- Specified by:
getNodeName
in interfaceNode
- Returns:
- Name of the
Node
.
-
getNodeType
public java.lang.String getNodeType()
Description copied from interface:Node
Obtains theNode
type.- Specified by:
getNodeType
in interfaceNode
- Returns:
Node
type.
-
getLocation
public java.lang.String getLocation()
Description copied from interface:Node
Obtains the location of theNode
.- Specified by:
getLocation
in interfaceNode
- Returns:
- Location of the
Node
. May benull
ifNode
does not support a location.
-
getParentNode
public Node getParentNode()
Description copied from interface:Node
- Specified by:
getParentNode
in interfaceNode
- Returns:
Node
containing thisNode
.
-
getQualifiedName
public java.lang.String getQualifiedName()
Description copied from interface:Node
Obtains the qualified name of theNode
.- Specified by:
getQualifiedName
in interfaceNode
- Returns:
- Qualified name of the
Node
.
-
getChildNodes
public Node[] getChildNodes()
Description copied from interface:Node
Obtains the childNode
instances.- Specified by:
getChildNodes
in interfaceNode
- Returns:
- Child
Node
instances.
-
isInitialised
public boolean isInitialised()
Description copied from interface:Node
Indicates if theNode
has been initialised.Node
instances should only be initialised once. Initialising theNode
twice is an issue.- Specified by:
isInitialised
in interfaceNode
- Returns:
true
if initialised.
-
initialise
public void initialise(ManagedObjectScope managedObjectScope, ManagedObjectSourceNode managedObjectSourceNode)
Description copied from interface:ManagedObjectNode
Initialises theManagedObjectNode
.- Specified by:
initialise
in interfaceManagedObjectNode
- Parameters:
managedObjectScope
-ManagedObjectScope
for theManagedObject
.managedObjectSourceNode
-ManagedObjectSourceNode
for theManagedObjectNode
.
-
getManagedObjectSourceNode
public ManagedObjectSourceNode getManagedObjectSourceNode()
Description copied from interface:ManagedObjectNode
Obtains theManagedObjectSourceNode
for thisManagedObjectNode
.- Specified by:
getManagedObjectSourceNode
in interfaceBoundManagedObjectNode
- Specified by:
getManagedObjectSourceNode
in interfaceManagedObjectNode
- Returns:
ManagedObjectSourceNode
for thisManagedObjectNode
.
-
getTypeQualifications
public TypeQualification[] getTypeQualifications(CompileContext compileContext)
Description copied from interface:ManagedObjectNode
Obtains theTypeQualification
instances for theManagedObject
.- Specified by:
getTypeQualifications
in interfaceManagedObjectNode
- Parameters:
compileContext
-CompileContext
.- Returns:
TypeQualification
instances for theManagedObject
.
-
getManagedObjectDepdendencies
public ManagedObjectDependencyNode[] getManagedObjectDepdendencies()
Description copied from interface:ManagedObjectNode
Obtains theManagedObjectDependencyNode
instances.- Specified by:
getManagedObjectDepdendencies
in interfaceManagedObjectNode
- Returns:
ManagedObjectDependencyNode
instances.
-
sourceManagedObject
public boolean sourceManagedObject(CompileContext compileContext)
Description copied from interface:ManagedObjectNode
Sources theManagedObject
.- Specified by:
sourceManagedObject
in interfaceManagedObjectNode
- Parameters:
compileContext
-CompileContext
.- Returns:
true
if successfully sourced theManagedObject
.false
if failed to source, with issues reported to theCompilerIssues
.
-
autoWireDependencies
public void autoWireDependencies(AutoWirer<LinkObjectNode> autoWirer, OfficeNode office, CompileContext compileContext)
Description copied from interface:ManagedObjectNode
Auto-wires the dependencies for theManagedObject
.- Specified by:
autoWireDependencies
in interfaceManagedObjectNode
- Parameters:
autoWirer
-AutoWirer
.office
-OfficeNode
requiring the auto-wiring.compileContext
-CompileContext
.
-
createExecutionManagedObject
public ExecutionManagedObject createExecutionManagedObject(CompileContext compileContext)
Description copied from interface:ManagedObjectNode
Creates theExecutionManagedObject
for thisManagedObjectNode
.- Specified by:
createExecutionManagedObject
in interfaceManagedObjectNode
- Parameters:
compileContext
-CompileContext
.- Returns:
ExecutionManagedObject
for thisManagedObjectNode
.
-
loadOfficeSectionManagedObjectType
public OfficeSectionManagedObjectType loadOfficeSectionManagedObjectType(CompileContext compileContext)
Description copied from interface:ManagedObjectNode
Loads theOfficeSectionManagedObjectType
.- Specified by:
loadOfficeSectionManagedObjectType
in interfaceManagedObjectNode
- Parameters:
compileContext
-CompileContext
.- Returns:
OfficeSectionManagedObjectType
ornull
with issues reported to theCompilerIssues
.
-
runExecutionExplorers
public boolean runExecutionExplorers(CompileContext compileContext)
Description copied from interface:ManagedObjectNode
Runs theExecutionObjectExplorer
instances for theManagedObject
.- Specified by:
runExecutionExplorers
in interfaceManagedObjectNode
- Parameters:
compileContext
-CompileContext
.- Returns:
true
if successfully explored execution.
-
loadDependentObjectType
public DependentObjectType loadDependentObjectType(CompileContext compileContext)
Description copied from interface:DependentObjectNode
Loads theDependentObjectType
.- Specified by:
loadDependentObjectType
in interfaceDependentObjectNode
- Parameters:
compileContext
-CompileContext
.- Returns:
DependentObjectType
ornull
with issue reported to theCompilerIssues
.
-
getBoundManagedObjectName
public java.lang.String getBoundManagedObjectName()
Description copied from interface:BoundManagedObjectNode
Obtains the name under which thisManagedObject
is made available to theOffice
.- Specified by:
getBoundManagedObjectName
in interfaceBoundManagedObjectNode
- Returns:
- Name under which this
ManagedObject
is made available to theOffice
.
-
addGovernance
public void addGovernance(GovernanceNode governance, OfficeNode office)
Description copied from interface:BoundManagedObjectNode
Adds theGovernanceNode
to provideGovernance
over thisManagedObjectNode
when used within theOffice
of theOfficeNode
.- Specified by:
addGovernance
in interfaceBoundManagedObjectNode
- Parameters:
governance
-GovernanceNode
.office
-OfficeNode
for which theGovernance
is applicable.
-
addPreLoadAdministration
public void addPreLoadAdministration(AdministrationNode preLoadAdministration, OfficeNode office)
Description copied from interface:BoundManagedObjectNode
Adds theAdministrationNode
to provide pre-loadAdministration
for thisManagedObjectNode
when used within theOffice
of theOfficeNode
.- Specified by:
addPreLoadAdministration
in interfaceBoundManagedObjectNode
- Parameters:
preLoadAdministration
- Pre-loadAdministrationNode
.office
-OfficeNode
for which the pre-loadAdministration
is applicable.
-
buildOfficeManagedObject
public void buildOfficeManagedObject(OfficeNode office, OfficeBuilder officeBuilder, OfficeBindings officeBindings, CompileContext compileContext)
Description copied from interface:BoundManagedObjectNode
Builds theManagedObject
into theOffice
.- Specified by:
buildOfficeManagedObject
in interfaceBoundManagedObjectNode
- Parameters:
office
-OfficeNode
of theOffice
that thisManagedObject
is to build itself into.officeBuilder
-OfficeBuilder
for theOffice
.officeBindings
-OfficeBindings
.compileContext
-CompileContext
.
-
buildSupplierThreadLocal
public void buildSupplierThreadLocal(OptionalThreadLocalReceiver optionalThreadLocalReceiver)
Description copied from interface:BoundManagedObjectNode
Builds theSupplierThreadLocal
from the boundManagedObject
.- Specified by:
buildSupplierThreadLocal
in interfaceBoundManagedObjectNode
- Parameters:
optionalThreadLocalReceiver
-OptionalThreadLocalReceiver
to receive theOptionalThreadLocal
.
-
addTypeQualification
public void addTypeQualification(java.lang.String qualifier, java.lang.String type)
Description copied from interface:SectionManagedObject
Adds an
TypeQualification
for thisSectionManagedObject
.This enables distinguishing
SectionManagedObject
instances to enable, for example, dynamicTeam
assignment.- Specified by:
addTypeQualification
in interfaceOfficeFloorManagedObject
- Specified by:
addTypeQualification
in interfaceOfficeManagedObject
- Specified by:
addTypeQualification
in interfaceSectionManagedObject
- Parameters:
qualifier
- Qualifier. May benull
if no qualification.type
- Type (typically the fully qualified type).
-
addPreLoadAdministration
public void addPreLoadAdministration(OfficeAdministration administration)
Description copied from interface:OfficeSectionManagedObject
Adds an
OfficeAdministration
to be done before attempting load thisManagedObject
.The order that the
OfficeAdministration
instances are added is the order they will be done.- Specified by:
addPreLoadAdministration
in interfaceOfficeManagedObject
- Specified by:
addPreLoadAdministration
in interfaceOfficeSectionManagedObject
- Parameters:
administration
-OfficeAdministration
to be done before attempting load thisManagedObject
.
-
getSectionManagedObjectName
public java.lang.String getSectionManagedObjectName()
Description copied from interface:SectionManagedObject
Obtains the name of thisSectionManagedObject
.- Specified by:
getSectionManagedObjectName
in interfaceSectionManagedObject
- Returns:
- Name of this
SectionManagedObject
.
-
getSectionManagedObjectDependency
public SectionManagedObjectDependency getSectionManagedObjectDependency(java.lang.String managedObjectDependencyName)
Description copied from interface:SectionManagedObject
Obtains theSectionManagedObjectDependency
for theManagedObjectDependencyType
.- Specified by:
getSectionManagedObjectDependency
in interfaceSectionManagedObject
- Parameters:
managedObjectDependencyName
- Name of theManagedObjectDependencyType
.- Returns:
SectionManagedObjectDependency
.
-
getOfficeSectionManagedObjectName
public java.lang.String getOfficeSectionManagedObjectName()
Description copied from interface:OfficeSectionManagedObject
Obtains the name of thisOfficeSectionManagedObject
.- Specified by:
getOfficeSectionManagedObjectName
in interfaceOfficeSectionManagedObject
- Returns:
- Name of this
OfficeSectionManagedObject
.
-
getOfficeManagedObjectName
public java.lang.String getOfficeManagedObjectName()
Description copied from interface:OfficeManagedObject
Obtains the name of theManagedObject
.- Specified by:
getOfficeManagedObjectName
in interfaceOfficeManagedObject
- Returns:
- Name of the
ManagedObject
.
-
getOfficeManagedObjectDependency
public OfficeManagedObjectDependency getOfficeManagedObjectDependency(java.lang.String managedObjectDependencyName)
Description copied from interface:OfficeManagedObject
Obtains theOfficeManagedObjectDependency
for theManagedObjectDependencyType
.- Specified by:
getOfficeManagedObjectDependency
in interfaceOfficeManagedObject
- Parameters:
managedObjectDependencyName
- Name of theManagedObjectDependencyType
.- Returns:
OfficeManagedObjectDependency
.
-
addExecutionExplorer
public void addExecutionExplorer(ExecutionObjectExplorer executionObjectExplorer)
Description copied from interface:OfficeManagedObject
Adds anExecutionObjectExplorer
for the execution tree from thisOfficeManagedObject
.- Specified by:
addExecutionExplorer
in interfaceOfficeManagedObject
- Parameters:
executionObjectExplorer
-ExecutionObjectExplorer
.
-
getOfficeFloorManagedObjectName
public java.lang.String getOfficeFloorManagedObjectName()
Description copied from interface:OfficeFloorManagedObject
Obtains the name of thisOfficeFloorManagedObject
.- Specified by:
getOfficeFloorManagedObjectName
in interfaceOfficeFloorManagedObject
- Returns:
- Name of this
OfficeFloorManagedObject
.
-
getOfficeFloorManagedObjectDependency
public OfficeFloorManagedObjectDependency getOfficeFloorManagedObjectDependency(java.lang.String managedObjectDependencyName)
Description copied from interface:OfficeFloorManagedObject
Obtains theOfficeFloorManagedObjectDependency
for theManagedObjectDependencyType
.- Specified by:
getOfficeFloorManagedObjectDependency
in interfaceOfficeFloorManagedObject
- Parameters:
managedObjectDependencyName
- Name of theManagedObjectDependencyType
.- Returns:
OfficeFloorManagedObjectDependency
.
-
getDependentManagedObjectName
public java.lang.String getDependentManagedObjectName()
Description copied from interface:DependentManagedObject
Obtains the name of thisDependentManagedObject
.- Specified by:
getDependentManagedObjectName
in interfaceDependentManagedObject
- Returns:
- Name of this
DependentManagedObject
.
-
getAdministerableManagedObjectName
public java.lang.String getAdministerableManagedObjectName()
Description copied from interface:AdministerableManagedObject
Obtains the name of thisAdministerableManagedObject
.- Specified by:
getAdministerableManagedObjectName
in interfaceAdministerableManagedObject
- Returns:
- Name of this
AdministerableManagedObject
.
-
getGovernerableManagedObjectName
public java.lang.String getGovernerableManagedObjectName()
Description copied from interface:GovernerableManagedObject
Obtains the name of thisGovernerableManagedObject
.- Specified by:
getGovernerableManagedObjectName
in interfaceGovernerableManagedObject
- Returns:
- Name of this
GovernerableManagedObject
.
-
linkObjectNode
public boolean linkObjectNode(LinkObjectNode node)
Description copied from interface:LinkObjectNode
Links the inputLinkObjectNode
to thisLinkObjectNode
.- Specified by:
linkObjectNode
in interfaceLinkObjectNode
- Parameters:
node
-LinkObjectNode
to link to thisLinkObjectNode
.- Returns:
true
if linked.
-
getLinkedObjectNode
public LinkObjectNode getLinkedObjectNode()
Description copied from interface:LinkObjectNode
Obtains theLinkObjectNode
linked to thisLinkObjectNode
.- Specified by:
getLinkedObjectNode
in interfaceLinkObjectNode
- Returns:
LinkObjectNode
linked to thisLinkObjectNode
.
-
-