Class GovernanceNodeImpl
java.lang.Object
net.officefloor.compile.impl.structure.GovernanceNodeImpl
- All Implemented Interfaces:
GovernanceNode,LinkTeamNode,Node,PropertyConfigurable,OfficeGovernance,OfficeResponsibility
Implementation of the
GovernanceNode.- Author:
- Daniel Sagenschneider
-
Field Summary
Fields inherited from interface net.officefloor.compile.internal.structure.GovernanceNode
TYPE -
Constructor Summary
ConstructorsConstructorDescriptionGovernanceNodeImpl(String governanceName, OfficeNode officeNode, NodeContext context) Initiate. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(String name, String value) Adds aPropertyto configure the item.voidautoWireExtensions(AutoWirer<ManagedObjectExtensionNode> autoWirer, CompileContext compileContext) Auto wires theManagedObjectExtensionNodefor thisGovernance.voidautoWireTeam(AutoWirer<LinkTeamNode> autoWirer, CompileContext compileContext) Auto wires theTeamfor thisGovernance.voidbuildGovernance(OfficeBuilder officeBuilder, CompileContext compileContext) Builds thisGovernanceinto theOfficeBuilder.voidEnables auto-wiring theGovernerableManagedObjectinstances.Node[]Obtains the childNodeinstances.Obtains theLinkTeamNodelinked to thisLinkTeamNode.Obtains the location of theNode.Obtains the name of theNode.Obtains theNodetype.Obtains the name of thisOfficeGovernance.voidgovernManagedObject(GovernerableManagedObject managedObject) Governs theGovernerableManagedObject.voidinitialise(String governanceSourceClassName, GovernanceSource<?, ?> governanceSource) Initialises theGovernanceNode.booleanIndicates whether to auto-wireManagedObjectExtensionNodeinstances forGovernance.booleanIndicates if theNodehas been initialised.booleanlinkTeamNode(LinkTeamNode node) Links the inputLinkTeamNodeto thisLinkTeamNode.GovernanceType<?,?> loadGovernanceType(boolean isLoadingType) Loads theGovernanceTypefor thisGovernanceNode.booleansourceGovernance(CompileContext compileContext) Sources theGovernance.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, getQualifiedName
-
Constructor Details
-
GovernanceNodeImpl
Initiate.- Parameters:
governanceName- Name of thisOfficeGovernance.officeNode-OfficeNodeof theOfficecontaining thisGovernance.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.
-
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
Description copied from interface:GovernanceNodeInitialises theGovernanceNode.- Specified by:
initialisein interfaceGovernanceNode- Parameters:
governanceSourceClassName- Class name of theGovernanceSource.governanceSource- Optional instantiatedGovernanceSourceto use. May benull.
-
loadGovernanceType
Description copied from interface:GovernanceNodeLoads theGovernanceTypefor thisGovernanceNode.- Specified by:
loadGovernanceTypein interfaceGovernanceNode- Parameters:
isLoadingType- Indicates using to load type.- Returns:
GovernanceTypefor thisGovernanceNodeornullif fails to load theGovernanceType.
-
sourceGovernance
Description copied from interface:GovernanceNodeSources theGovernance.- Specified by:
sourceGovernancein interfaceGovernanceNode- Parameters:
compileContext-CompileContext.- Returns:
trueif successfully sourced. Otherwise,falsewith issues reported to theCompilerIssues.
-
isAutoWireGovernance
public boolean isAutoWireGovernance()Description copied from interface:GovernanceNodeIndicates whether to auto-wireManagedObjectExtensionNodeinstances forGovernance.- Specified by:
isAutoWireGovernancein interfaceGovernanceNode- Returns:
trueto auto-wire.
-
autoWireExtensions
public void autoWireExtensions(AutoWirer<ManagedObjectExtensionNode> autoWirer, CompileContext compileContext) Description copied from interface:GovernanceNodeAuto wires theManagedObjectExtensionNodefor thisGovernance.- Specified by:
autoWireExtensionsin interfaceGovernanceNode- Parameters:
autoWirer-AutoWirer.compileContext-CompileContext.
-
autoWireTeam
Description copied from interface:GovernanceNodeAuto wires theTeamfor thisGovernance.- Specified by:
autoWireTeamin interfaceGovernanceNode- Parameters:
autoWirer-AutoWirer.compileContext-CompileContext.
-
buildGovernance
Description copied from interface:GovernanceNodeBuilds thisGovernanceinto theOfficeBuilder.- Specified by:
buildGovernancein interfaceGovernanceNode- Parameters:
officeBuilder-OfficeBuilder.compileContext-CompileContext.
-
getOfficeGovernanceName
Description copied from interface:OfficeGovernanceObtains the name of thisOfficeGovernance.- Specified by:
getOfficeGovernanceNamein interfaceOfficeGovernance- Returns:
- Name of this
OfficeGovernance.
-
addProperty
Description copied from interface:PropertyConfigurableAdds aPropertyto configure the item.- Specified by:
addPropertyin interfacePropertyConfigurable- Parameters:
name- Name ofProperty.value- Value ofProperty.
-
governManagedObject
Description copied from interface:OfficeGovernanceGoverns theGovernerableManagedObject.- Specified by:
governManagedObjectin interfaceOfficeGovernance- Parameters:
managedObject-GovernerableManagedObjectto be governed.
-
enableAutoWireExtensions
public void enableAutoWireExtensions()Description copied from interface:OfficeGovernanceEnables auto-wiring theGovernerableManagedObjectinstances.- Specified by:
enableAutoWireExtensionsin interfaceOfficeGovernance
-
linkTeamNode
Description copied from interface:LinkTeamNodeLinks the inputLinkTeamNodeto thisLinkTeamNode.- Specified by:
linkTeamNodein interfaceLinkTeamNode- Parameters:
node-LinkTeamNodeto link to thisLinkTeamNode.- Returns:
trueif linked.
-
getLinkedTeamNode
Description copied from interface:LinkTeamNodeObtains theLinkTeamNodelinked to thisLinkTeamNode.- Specified by:
getLinkedTeamNodein interfaceLinkTeamNode- Returns:
LinkTeamNodelinked to thisLinkTeamNode.
-