Class AdministrationNodeImpl
- java.lang.Object
-
- net.officefloor.compile.impl.structure.AdministrationNodeImpl
-
- All Implemented Interfaces:
AdministrationNode
,LinkTeamNode
,Node
,PropertyConfigurable
,OfficeAdministration
,OfficeResponsibility
public class AdministrationNodeImpl extends java.lang.Object implements AdministrationNode
AdministrationNode
implementation.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from interface net.officefloor.compile.internal.structure.AdministrationNode
TYPE
-
-
Constructor Summary
Constructors Constructor Description AdministrationNodeImpl(java.lang.String administrationName, 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
administerManagedObject(AdministerableManagedObject managedObject)
Administers theAdministerableManagedObject
.void
autoWireExtensions(AutoWirer<ManagedObjectExtensionNode> autoWirer, CompileContext compileContext)
Auto wires theManagedObjectExtensionNode
for thisAdministration
.void
autoWireTeam(AutoWirer<LinkTeamNode> autoWirer, CompileContext compileContext)
Auto wires theTeam
for thisAdministration
.void
buildPostFunctionAdministration(ManagedFunctionBuilder<?,?> functionBuilder, CompileContext compileContext)
Builds the postManagedFunction
Administration
.void
buildPreFunctionAdministration(ManagedFunctionBuilder<?,?> functionBuilder, CompileContext compileContext)
Builds the preManagedFunction
Administration
.void
buildPreLoadManagedObjectAdministration(DependencyMappingBuilder dependencyMappingBuilder, CompileContext compileContext)
Builds the pre-loadManagedObject
Administration
.void
enableAutoWireExtensions()
Enables auto-wiring theAdministerableManagedObject
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
getOfficeAdministrationName()
Obtains the name of thisOfficeAdministration
.Node
getParentNode()
void
initialise(java.lang.String administrationSourceClassName, AdministrationSource<?,?,?> administrationSource)
Initialises thisAdministrationNode
.boolean
isAutoWireAdministration()
Indicates whether to auto-wireManagedObjectExtensionNode
instances forAdministration
.boolean
isInitialised()
Indicates if theNode
has been initialised.boolean
linkTeamNode(LinkTeamNode node)
Links the inputLinkTeamNode
to thisLinkTeamNode
.AdministrationType<?,?,?>
loadAdministrationType(boolean isLoadingType)
Obtains theAdministrationType
for thisAdministrationNode
.boolean
sourceAdministration(CompileContext compileContext)
Sources theAdministration
.-
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
-
AdministrationNodeImpl
public AdministrationNodeImpl(java.lang.String administrationName, OfficeNode officeNode, NodeContext context)
Initiate.- Parameters:
administrationName
- Name of thisOfficeAdministration
.officeNode
- ParentOfficeNode
.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 administrationSourceClassName, AdministrationSource<?,?,?> administrationSource)
Description copied from interface:AdministrationNode
Initialises thisAdministrationNode
.- Specified by:
initialise
in interfaceAdministrationNode
- Parameters:
administrationSourceClassName
- Class name of theAdministrationSource
.administrationSource
- Optional instantiatedAdministrationSource
. May benull
.
-
getOfficeAdministrationName
public java.lang.String getOfficeAdministrationName()
Description copied from interface:OfficeAdministration
Obtains the name of thisOfficeAdministration
.- Specified by:
getOfficeAdministrationName
in interfaceOfficeAdministration
- Returns:
- Name of this
OfficeAdministration
.
-
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
.
-
administerManagedObject
public void administerManagedObject(AdministerableManagedObject managedObject)
Description copied from interface:OfficeAdministration
Administers theAdministerableManagedObject
.- Specified by:
administerManagedObject
in interfaceOfficeAdministration
- Parameters:
managedObject
-AdministerableManagedObject
to be administered.
-
enableAutoWireExtensions
public void enableAutoWireExtensions()
Description copied from interface:OfficeAdministration
Enables auto-wiring theAdministerableManagedObject
instances.- Specified by:
enableAutoWireExtensions
in interfaceOfficeAdministration
-
loadAdministrationType
public AdministrationType<?,?,?> loadAdministrationType(boolean isLoadingType)
Description copied from interface:AdministrationNode
Obtains the
AdministrationType
for thisAdministrationNode
.The
OfficeAdministration
must be fully populated with the necessaryProperty
instances before calling this.- Specified by:
loadAdministrationType
in interfaceAdministrationNode
- Parameters:
isLoadingType
- Indicates using to load type.- Returns:
AdministrationType
for thisAdministrationNode
.
-
sourceAdministration
public boolean sourceAdministration(CompileContext compileContext)
Description copied from interface:AdministrationNode
Sources theAdministration
.- Specified by:
sourceAdministration
in interfaceAdministrationNode
- Parameters:
compileContext
-CompileContext
.- Returns:
true
if successfully sourced. Otherwise,false
with issues reported to theCompilerIssues
.
-
isAutoWireAdministration
public boolean isAutoWireAdministration()
Description copied from interface:AdministrationNode
Indicates whether to auto-wireManagedObjectExtensionNode
instances forAdministration
.- Specified by:
isAutoWireAdministration
in interfaceAdministrationNode
- Returns:
true
to auto-wire.
-
autoWireExtensions
public void autoWireExtensions(AutoWirer<ManagedObjectExtensionNode> autoWirer, CompileContext compileContext)
Description copied from interface:AdministrationNode
Auto wires theManagedObjectExtensionNode
for thisAdministration
.- Specified by:
autoWireExtensions
in interfaceAdministrationNode
- Parameters:
autoWirer
-AutoWirer
.compileContext
-CompileContext
.
-
autoWireTeam
public void autoWireTeam(AutoWirer<LinkTeamNode> autoWirer, CompileContext compileContext)
Description copied from interface:AdministrationNode
Auto wires theTeam
for thisAdministration
.- Specified by:
autoWireTeam
in interfaceAdministrationNode
- Parameters:
autoWirer
-AutoWirer
.compileContext
-CompileContext
.
-
buildPreFunctionAdministration
public void buildPreFunctionAdministration(ManagedFunctionBuilder<?,?> functionBuilder, CompileContext compileContext)
Description copied from interface:AdministrationNode
Builds the preManagedFunction
Administration
.- Specified by:
buildPreFunctionAdministration
in interfaceAdministrationNode
- Parameters:
functionBuilder
-ManagedFunctionBuilder
.compileContext
-CompileContext
.
-
buildPostFunctionAdministration
public void buildPostFunctionAdministration(ManagedFunctionBuilder<?,?> functionBuilder, CompileContext compileContext)
Description copied from interface:AdministrationNode
Builds the postManagedFunction
Administration
.- Specified by:
buildPostFunctionAdministration
in interfaceAdministrationNode
- Parameters:
functionBuilder
-ManagedFunctionBuilder
.compileContext
-CompileContext
.
-
buildPreLoadManagedObjectAdministration
public void buildPreLoadManagedObjectAdministration(DependencyMappingBuilder dependencyMappingBuilder, CompileContext compileContext)
Description copied from interface:AdministrationNode
Builds the pre-loadManagedObject
Administration
.- Specified by:
buildPreLoadManagedObjectAdministration
in interfaceAdministrationNode
- Parameters:
dependencyMappingBuilder
-DependencyMappingBuilder
for theManagedObject
.compileContext
-CompileContext
.
-
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
.
-
-