Class OfficeObjectNodeImpl
- java.lang.Object
-
- net.officefloor.compile.impl.structure.OfficeObjectNodeImpl
-
- All Implemented Interfaces:
LinkObjectNode
,Node
,OfficeObjectNode
,AdministerableManagedObject
,DependentManagedObject
,GovernerableManagedObject
,OfficeDependencyObjectNode
,OfficeObject
,OfficeFloorDependencyRequireNode
public class OfficeObjectNodeImpl extends java.lang.Object implements OfficeObjectNode
OfficeObjectNode
implementation.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from interface net.officefloor.compile.internal.structure.OfficeObjectNode
TYPE
-
-
Constructor Summary
Constructors Constructor Description OfficeObjectNodeImpl(java.lang.String objectName, OfficeNode office, NodeContext context)
Allow adding aOfficeObject
via theOfficeArchitect
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAdministrator(AdministrationNode administrator)
Adds anAdministrationNode
for thisOfficeManagedObjectType
.void
addGovernance(GovernanceNode governance)
void
addPreLoadAdministration(OfficeAdministration administration)
Adds anOfficeAdministration
to be done before attempting load thisManagedObject
.java.lang.String
getAdministerableManagedObjectName()
Obtains the name of thisAdministerableManagedObject
.Node[]
getChildNodes()
Obtains the childNode
instances.java.lang.String
getDependentManagedObjectName()
Obtains the name of thisDependentManagedObject
.GovernanceNode[]
getGovernances()
Obtains theGovernanceNode
instances to provideGovernance
overBoundManagedObjectNode
linked to thisOfficeObjectNode
.java.lang.String
getGovernerableManagedObjectName()
Obtains the name of thisGovernerableManagedObject
.LinkObjectNode
getLinkedObjectNode()
Obtains theLinkObjectNode
linked to thisLinkObjectNode
.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
getOfficeObjectName()
Obtains the name that theOfficeSource
refers to thisObject
.java.lang.String
getOfficeObjectType()
Obtains the type of theOfficeObject
.Node
getParentNode()
AdministrationNode[]
getPreLoadAdministrations()
Obtains theAdministrationNode
instances to provide pre-loadAdministration
overBoundManagedObjectNode
linked to thisOfficeObjectNode
.java.lang.String
getTypeQualifier()
Obtains the type qualifier for theOfficeObject
.void
initialise(java.lang.String objectType)
Initialises thisOfficeManagedObjectType
.boolean
isInitialised()
Indicates if theNode
has been initialised.boolean
linkObjectNode(LinkObjectNode node)
Links the inputLinkObjectNode
to thisLinkObjectNode
.OfficeManagedObjectType
loadOfficeManagedObjectType(CompileContext compileContext)
Loads theOfficeManagedObjectType
for thisOfficeObjectNode
.void
setTypeQualifier(java.lang.String qualifier)
Specifies the type qualifier.-
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
-
OfficeObjectNodeImpl
public OfficeObjectNodeImpl(java.lang.String objectName, OfficeNode office, NodeContext context)
Allow adding aOfficeObject
via theOfficeArchitect
.- Parameters:
objectName
- Name of theOfficeObject
.office
- 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 objectType)
Description copied from interface:OfficeObjectNode
Initialises thisOfficeManagedObjectType
.- Specified by:
initialise
in interfaceOfficeObjectNode
- Parameters:
objectType
- Object type.
-
addAdministrator
public void addAdministrator(AdministrationNode administrator)
Description copied from interface:OfficeObjectNode
Adds an
AdministrationNode
for thisOfficeManagedObjectType
.This allows the
OfficeManagedObjectType
to report the extension types required to be supported by theOfficeFloorManagedObject
for theOfficeObject
.- Specified by:
addAdministrator
in interfaceOfficeObjectNode
- Parameters:
administrator
-AdministrationNode
.
-
addGovernance
public void addGovernance(GovernanceNode governance)
Description copied from interface:OfficeObjectNode
Adds a
GovernanceNode
providingGovernance
for thisOfficeObject
.This also allows the
OfficeManagedObjectType
to report the extension interfaces required to be supported by theOfficeFloorManagedObject
for theOfficeObject
.- Specified by:
addGovernance
in interfaceOfficeObjectNode
- Parameters:
governance
-GovernanceNode
.
-
getGovernances
public GovernanceNode[] getGovernances()
Description copied from interface:OfficeObjectNode
Obtains theGovernanceNode
instances to provideGovernance
overBoundManagedObjectNode
linked to thisOfficeObjectNode
.- Specified by:
getGovernances
in interfaceOfficeObjectNode
- Returns:
GovernanceNode
instances.
-
getPreLoadAdministrations
public AdministrationNode[] getPreLoadAdministrations()
Description copied from interface:OfficeObjectNode
Obtains theAdministrationNode
instances to provide pre-loadAdministration
overBoundManagedObjectNode
linked to thisOfficeObjectNode
.- Specified by:
getPreLoadAdministrations
in interfaceOfficeObjectNode
- Returns:
AdministrationNode
instances.
-
getTypeQualifier
public java.lang.String getTypeQualifier()
Description copied from interface:OfficeObjectNode
Obtains the type qualifier for theOfficeObject
.- Specified by:
getTypeQualifier
in interfaceOfficeObjectNode
- Returns:
- Type qualifier for the
OfficeObject
.
-
getOfficeObjectType
public java.lang.String getOfficeObjectType()
Description copied from interface:OfficeObjectNode
Obtains the type of theOfficeObject
.- Specified by:
getOfficeObjectType
in interfaceOfficeObjectNode
- Returns:
- Type of the
OfficeObject
.
-
loadOfficeManagedObjectType
public OfficeManagedObjectType loadOfficeManagedObjectType(CompileContext compileContext)
Description copied from interface:OfficeObjectNode
Loads theOfficeManagedObjectType
for thisOfficeObjectNode
.- Specified by:
loadOfficeManagedObjectType
in interfaceOfficeObjectNode
- Parameters:
compileContext
-CompileContext
.- Returns:
OfficeManagedObjectType
ornull
with issues reported to theCompilerIssues
.
-
getOfficeObjectName
public java.lang.String getOfficeObjectName()
Description copied from interface:OfficeObject
Obtains the name that theOfficeSource
refers to thisObject
.- Specified by:
getOfficeObjectName
in interfaceOfficeObject
- Returns:
- Name that the
OfficeSource
refers to thisObject
.
-
setTypeQualifier
public void setTypeQualifier(java.lang.String qualifier)
Description copied from interface:OfficeObject
Specifies the type qualifier.- Specified by:
setTypeQualifier
in interfaceOfficeObject
- Parameters:
qualifier
- Type qualifier.
-
addPreLoadAdministration
public void addPreLoadAdministration(OfficeAdministration administration)
Description copied from interface:OfficeObject
Adds an
OfficeAdministration
to be done before attempting load thisManagedObject
.The order that the
OfficeAdministration
instances are added is the order they will be done.- Specified by:
addPreLoadAdministration
in interfaceOfficeObject
- Parameters:
administration
-OfficeAdministration
to be done before attempting load thisManagedObject
.
-
getDependentManagedObjectName
public java.lang.String getDependentManagedObjectName()
Description copied from interface:DependentManagedObject
Obtains the name of thisDependentManagedObject
.- Specified by:
getDependentManagedObjectName
in interfaceDependentManagedObject
- Returns:
- Name of this
DependentManagedObject
.
-
getAdministerableManagedObjectName
public java.lang.String getAdministerableManagedObjectName()
Description copied from interface:AdministerableManagedObject
Obtains the name of thisAdministerableManagedObject
.- Specified by:
getAdministerableManagedObjectName
in interfaceAdministerableManagedObject
- Returns:
- Name of this
AdministerableManagedObject
.
-
getGovernerableManagedObjectName
public java.lang.String getGovernerableManagedObjectName()
Description copied from interface:GovernerableManagedObject
Obtains the name of thisGovernerableManagedObject
.- Specified by:
getGovernerableManagedObjectName
in interfaceGovernerableManagedObject
- Returns:
- Name of this
GovernerableManagedObject
.
-
linkObjectNode
public boolean linkObjectNode(LinkObjectNode node)
Description copied from interface:LinkObjectNode
Links the inputLinkObjectNode
to thisLinkObjectNode
.- Specified by:
linkObjectNode
in interfaceLinkObjectNode
- Parameters:
node
-LinkObjectNode
to link to thisLinkObjectNode
.- Returns:
true
if linked.
-
getLinkedObjectNode
public LinkObjectNode getLinkedObjectNode()
Description copied from interface:LinkObjectNode
Obtains theLinkObjectNode
linked to thisLinkObjectNode
.- Specified by:
getLinkedObjectNode
in interfaceLinkObjectNode
- Returns:
LinkObjectNode
linked to thisLinkObjectNode
.
-
-