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 void
addProperty(java.lang.String name, java.lang.String value)
Adds aProperty
to configure the item.void
autoWireExtensions(AutoWirer<ManagedObjectExtensionNode> autoWirer, CompileContext compileContext)
Auto wires theManagedObjectExtensionNode
for thisGovernance
.void
autoWireTeam(AutoWirer<LinkTeamNode> autoWirer, CompileContext compileContext)
Auto wires theTeam
for thisGovernance
.void
buildGovernance(OfficeBuilder officeBuilder, CompileContext compileContext)
Builds thisGovernance
into theOfficeBuilder
.void
enableAutoWireExtensions()
Enables auto-wiring theGovernerableManagedObject
instances.Node[]
getChildNodes()
Obtains the childNode
instances.LinkTeamNode
getLinkedTeamNode()
Obtains theLinkTeamNode
linked to thisLinkTeamNode
.java.lang.String
getLocation()
Obtains the location of theNode
.java.lang.String
getNodeName()
Obtains the name of theNode
.java.lang.String
getNodeType()
Obtains theNode
type.java.lang.String
getOfficeGovernanceName()
Obtains the name of thisOfficeGovernance
.Node
getParentNode()
void
governManagedObject(GovernerableManagedObject managedObject)
Governs theGovernerableManagedObject
.void
initialise(java.lang.String governanceSourceClassName, GovernanceSource<?,?> governanceSource)
Initialises theGovernanceNode
.boolean
isAutoWireGovernance()
Indicates whether to auto-wireManagedObjectExtensionNode
instances forGovernance
.boolean
isInitialised()
Indicates if theNode
has been initialised.boolean
linkTeamNode(LinkTeamNode node)
Links the inputLinkTeamNode
to thisLinkTeamNode
.GovernanceType<?,?>
loadGovernanceType(boolean isLoadingType)
Loads theGovernanceType
for thisGovernanceNode
.boolean
sourceGovernance(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
-OfficeNode
of theOffice
containing thisGovernance
.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
.
-
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(java.lang.String governanceSourceClassName, GovernanceSource<?,?> governanceSource)
Description copied from interface:GovernanceNode
Initialises theGovernanceNode
.- Specified by:
initialise
in interfaceGovernanceNode
- Parameters:
governanceSourceClassName
- Class name of theGovernanceSource
.governanceSource
- Optional instantiatedGovernanceSource
to use. May benull
.
-
loadGovernanceType
public GovernanceType<?,?> loadGovernanceType(boolean isLoadingType)
Description copied from interface:GovernanceNode
Loads theGovernanceType
for thisGovernanceNode
.- Specified by:
loadGovernanceType
in interfaceGovernanceNode
- Parameters:
isLoadingType
- Indicates using to load type.- Returns:
GovernanceType
for thisGovernanceNode
ornull
if fails to load theGovernanceType
.
-
sourceGovernance
public boolean sourceGovernance(CompileContext compileContext)
Description copied from interface:GovernanceNode
Sources theGovernance
.- Specified by:
sourceGovernance
in interfaceGovernanceNode
- Parameters:
compileContext
-CompileContext
.- Returns:
true
if successfully sourced. Otherwise,false
with issues reported to theCompilerIssues
.
-
isAutoWireGovernance
public boolean isAutoWireGovernance()
Description copied from interface:GovernanceNode
Indicates whether to auto-wireManagedObjectExtensionNode
instances forGovernance
.- Specified by:
isAutoWireGovernance
in interfaceGovernanceNode
- Returns:
true
to auto-wire.
-
autoWireExtensions
public void autoWireExtensions(AutoWirer<ManagedObjectExtensionNode> autoWirer, CompileContext compileContext)
Description copied from interface:GovernanceNode
Auto wires theManagedObjectExtensionNode
for thisGovernance
.- Specified by:
autoWireExtensions
in interfaceGovernanceNode
- Parameters:
autoWirer
-AutoWirer
.compileContext
-CompileContext
.
-
autoWireTeam
public void autoWireTeam(AutoWirer<LinkTeamNode> autoWirer, CompileContext compileContext)
Description copied from interface:GovernanceNode
Auto wires theTeam
for thisGovernance
.- Specified by:
autoWireTeam
in interfaceGovernanceNode
- Parameters:
autoWirer
-AutoWirer
.compileContext
-CompileContext
.
-
buildGovernance
public void buildGovernance(OfficeBuilder officeBuilder, CompileContext compileContext)
Description copied from interface:GovernanceNode
Builds thisGovernance
into theOfficeBuilder
.- Specified by:
buildGovernance
in interfaceGovernanceNode
- Parameters:
officeBuilder
-OfficeBuilder
.compileContext
-CompileContext
.
-
getOfficeGovernanceName
public java.lang.String getOfficeGovernanceName()
Description copied from interface:OfficeGovernance
Obtains the name of thisOfficeGovernance
.- Specified by:
getOfficeGovernanceName
in interfaceOfficeGovernance
- Returns:
- Name of this
OfficeGovernance
.
-
addProperty
public void addProperty(java.lang.String name, java.lang.String value)
Description copied from interface:PropertyConfigurable
Adds aProperty
to configure the item.- Specified by:
addProperty
in interfacePropertyConfigurable
- Parameters:
name
- Name ofProperty
.value
- Value ofProperty
.
-
governManagedObject
public void governManagedObject(GovernerableManagedObject managedObject)
Description copied from interface:OfficeGovernance
Governs theGovernerableManagedObject
.- Specified by:
governManagedObject
in interfaceOfficeGovernance
- Parameters:
managedObject
-GovernerableManagedObject
to be governed.
-
enableAutoWireExtensions
public void enableAutoWireExtensions()
Description copied from interface:OfficeGovernance
Enables auto-wiring theGovernerableManagedObject
instances.- Specified by:
enableAutoWireExtensions
in interfaceOfficeGovernance
-
linkTeamNode
public boolean linkTeamNode(LinkTeamNode node)
Description copied from interface:LinkTeamNode
Links the inputLinkTeamNode
to thisLinkTeamNode
.- Specified by:
linkTeamNode
in interfaceLinkTeamNode
- Parameters:
node
-LinkTeamNode
to link to thisLinkTeamNode
.- Returns:
true
if linked.
-
getLinkedTeamNode
public LinkTeamNode getLinkedTeamNode()
Description copied from interface:LinkTeamNode
Obtains theLinkTeamNode
linked to thisLinkTeamNode
.- Specified by:
getLinkedTeamNode
in interfaceLinkTeamNode
- Returns:
LinkTeamNode
linked to thisLinkTeamNode
.
-
-