Class ExecutiveNodeImpl
- java.lang.Object
-
- net.officefloor.compile.impl.structure.ExecutiveNodeImpl
-
- All Implemented Interfaces:
ExecutiveNode
,Node
,PropertyConfigurable
,OfficeFloorExecutive
public class ExecutiveNodeImpl extends java.lang.Object implements ExecutiveNode
ExecutiveNode
implementation.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from interface net.officefloor.compile.internal.structure.ExecutiveNode
TYPE
-
-
Constructor Summary
Constructors Constructor Description ExecutiveNodeImpl(OfficeFloorNode officeFloor, 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
buildExecutive(OfficeFloorBuilder builder, CompileContext compileContext)
Builds theExecutive
for thisExecutiveNode
.Node[]
getChildNodes()
Obtains the childNode
instances.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.OfficeFloorExecutionStrategy
getOfficeFloorExecutionStrategy(java.lang.String executionStrategyName)
Obtains theOfficeFloorExecutionStrategy
forExecutionStrategyType
.java.lang.String
getOfficeFloorExecutiveName()
Obtains the name of thisOfficeFloorExecutive
.Node
getParentNode()
void
initialise(java.lang.String executiveSourceClassName, ExecutiveSource executiveSource)
Initialises theExecutiveNode
.boolean
isInitialised()
Indicates if theNode
has been initialised.ExecutiveType
loadExecutiveType()
Loads theExecutiveType
for theExecutiveSource
.boolean
sourceExecutive(CompileContext compileContext)
Sources theExecutive
.-
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
-
ExecutiveNodeImpl
public ExecutiveNodeImpl(OfficeFloorNode officeFloor, NodeContext context)
Initiate.- Parameters:
officeFloor
-OfficeFloorNode
containing thisExecutiveNode
.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
.
-
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.
-
getChildNodes
public Node[] getChildNodes()
Description copied from interface:Node
Obtains the childNode
instances.- Specified by:
getChildNodes
in interfaceNode
- Returns:
- Child
Node
instances.
-
initialise
public void initialise(java.lang.String executiveSourceClassName, ExecutiveSource executiveSource)
Description copied from interface:ExecutiveNode
Initialises theExecutiveNode
.- Specified by:
initialise
in interfaceExecutiveNode
- Parameters:
executiveSourceClassName
- Class name of theExecutiveSource
.executiveSource
- Optional instantiatedExecutiveSource
. May benull
.
-
loadExecutiveType
public ExecutiveType loadExecutiveType()
Description copied from interface:ExecutiveNode
Loads theExecutiveType
for theExecutiveSource
.- Specified by:
loadExecutiveType
in interfaceExecutiveNode
- Returns:
ExecutiveType
ornull
with issues reported to theCompilerIssues
.
-
sourceExecutive
public boolean sourceExecutive(CompileContext compileContext)
Description copied from interface:ExecutiveNode
Sources theExecutive
.- Specified by:
sourceExecutive
in interfaceExecutiveNode
- Parameters:
compileContext
-CompileContext
.- Returns:
true
if successfully sourced. Otherwise,false
with issues reported to theCompilerIssues
.
-
buildExecutive
public void buildExecutive(OfficeFloorBuilder builder, CompileContext compileContext)
Description copied from interface:ExecutiveNode
Builds theExecutive
for thisExecutiveNode
.- Specified by:
buildExecutive
in interfaceExecutiveNode
- Parameters:
builder
-OfficeFloorBuilder
.compileContext
-CompileContext
.
-
getOfficeFloorExecutiveName
public java.lang.String getOfficeFloorExecutiveName()
Description copied from interface:OfficeFloorExecutive
Obtains the name of thisOfficeFloorExecutive
.- Specified by:
getOfficeFloorExecutiveName
in interfaceOfficeFloorExecutive
- Returns:
- Name of this
OfficeFloorExecutive
.
-
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
.
-
getOfficeFloorExecutionStrategy
public OfficeFloorExecutionStrategy getOfficeFloorExecutionStrategy(java.lang.String executionStrategyName)
Description copied from interface:OfficeFloorExecutive
Obtains theOfficeFloorExecutionStrategy
forExecutionStrategyType
.- Specified by:
getOfficeFloorExecutionStrategy
in interfaceOfficeFloorExecutive
- Parameters:
executionStrategyName
- Name ofExecutionStrategyType
.- Returns:
OfficeFloorExecutionStrategy
.
-
-