Class GovernanceNodeImpl
- java.lang.Object
-
- net.officefloor.compile.impl.structure.GovernanceNodeImpl
-
- All Implemented Interfaces:
GovernanceNode,LinkTeamNode,Node,PropertyConfigurable,OfficeGovernance,OfficeResponsibility
public class GovernanceNodeImpl extends java.lang.Object implements GovernanceNode
Implementation of theGovernanceNode.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from interface net.officefloor.compile.internal.structure.GovernanceNode
TYPE
-
-
Constructor Summary
Constructors Constructor Description GovernanceNodeImpl(java.lang.String governanceName, OfficeNode officeNode, NodeContext context)Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperty(java.lang.String name, java.lang.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.voidenableAutoWireExtensions()Enables auto-wiring theGovernerableManagedObjectinstances.Node[]getChildNodes()Obtains the childNodeinstances.LinkTeamNodegetLinkedTeamNode()Obtains theLinkTeamNodelinked to thisLinkTeamNode.java.lang.StringgetLocation()Obtains the location of theNode.java.lang.StringgetNodeName()Obtains the name of theNode.java.lang.StringgetNodeType()Obtains theNodetype.java.lang.StringgetOfficeGovernanceName()Obtains the name of thisOfficeGovernance.NodegetParentNode()voidgovernManagedObject(GovernerableManagedObject managedObject)Governs theGovernerableManagedObject.voidinitialise(java.lang.String governanceSourceClassName, GovernanceSource<?,?> governanceSource)Initialises theGovernanceNode.booleanisAutoWireGovernance()Indicates whether to auto-wireManagedObjectExtensionNodeinstances forGovernance.booleanisInitialised()Indicates 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, wait
-
Methods inherited from interface net.officefloor.compile.internal.structure.Node
getQualifiedName, getQualifiedName
-
-
-
-
Constructor Detail
-
GovernanceNodeImpl
public GovernanceNodeImpl(java.lang.String governanceName, OfficeNode officeNode, NodeContext context)Initiate.- Parameters:
governanceName- Name of thisOfficeGovernance.officeNode-OfficeNodeof theOfficecontaining thisGovernance.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.
-
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(java.lang.String governanceSourceClassName, GovernanceSource<?,?> governanceSource)Description copied from interface:GovernanceNodeInitialises theGovernanceNode.- Specified by:
initialisein interfaceGovernanceNode- Parameters:
governanceSourceClassName- Class name of theGovernanceSource.governanceSource- Optional instantiatedGovernanceSourceto use. May benull.
-
loadGovernanceType
public GovernanceType<?,?> loadGovernanceType(boolean isLoadingType)
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
public boolean sourceGovernance(CompileContext compileContext)
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
public void autoWireTeam(AutoWirer<LinkTeamNode> autoWirer, CompileContext compileContext)
Description copied from interface:GovernanceNodeAuto wires theTeamfor thisGovernance.- Specified by:
autoWireTeamin interfaceGovernanceNode- Parameters:
autoWirer-AutoWirer.compileContext-CompileContext.
-
buildGovernance
public void buildGovernance(OfficeBuilder officeBuilder, CompileContext compileContext)
Description copied from interface:GovernanceNodeBuilds thisGovernanceinto theOfficeBuilder.- Specified by:
buildGovernancein interfaceGovernanceNode- Parameters:
officeBuilder-OfficeBuilder.compileContext-CompileContext.
-
getOfficeGovernanceName
public java.lang.String getOfficeGovernanceName()
Description copied from interface:OfficeGovernanceObtains the name of thisOfficeGovernance.- Specified by:
getOfficeGovernanceNamein interfaceOfficeGovernance- Returns:
- Name of this
OfficeGovernance.
-
addProperty
public void addProperty(java.lang.String name, java.lang.String value)Description copied from interface:PropertyConfigurableAdds aPropertyto configure the item.- Specified by:
addPropertyin interfacePropertyConfigurable- Parameters:
name- Name ofProperty.value- Value ofProperty.
-
governManagedObject
public void governManagedObject(GovernerableManagedObject managedObject)
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
public boolean linkTeamNode(LinkTeamNode node)
Description copied from interface:LinkTeamNodeLinks the inputLinkTeamNodeto thisLinkTeamNode.- Specified by:
linkTeamNodein interfaceLinkTeamNode- Parameters:
node-LinkTeamNodeto link to thisLinkTeamNode.- Returns:
trueif linked.
-
getLinkedTeamNode
public LinkTeamNode getLinkedTeamNode()
Description copied from interface:LinkTeamNodeObtains theLinkTeamNodelinked to thisLinkTeamNode.- Specified by:
getLinkedTeamNodein interfaceLinkTeamNode- Returns:
LinkTeamNodelinked to thisLinkTeamNode.
-
-