Class ManagedObjectPoolNodeImpl
- java.lang.Object
-
- net.officefloor.compile.impl.structure.ManagedObjectPoolNodeImpl
-
- All Implemented Interfaces:
LinkPoolNode
,ManagedObjectPoolNode
,Node
,PropertyConfigurable
,OfficeManagedObjectPool
,OfficeFloorManagedObjectPool
,SectionManagedObjectPool
public class ManagedObjectPoolNodeImpl extends java.lang.Object implements ManagedObjectPoolNode
ManagedObjectPoolNode
implementation.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from interface net.officefloor.compile.internal.structure.ManagedObjectPoolNode
TYPE
-
-
Constructor Summary
Constructors Constructor Description ManagedObjectPoolNodeImpl(java.lang.String managedObjectPoolName, SectionNode containingSectionNode, OfficeNode containingOfficeNode, OfficeFloorNode containingOfficeFloorNode, NodeContext context)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProperty(java.lang.String name, java.lang.String value)
================== PropertyConfigurable ====================void
buildManagedObjectPool(ManagedObjectBuilder<?> builder, ManagedObjectType<?> managedObjectType, CompileContext compileContext)
BuildsManagedObjectPool
for thisManagedObjectPoolNode
.Node[]
getChildNodes()
Obtains the childNode
instances.LinkPoolNode
getLinkedPoolNode()
Obtains theLinkPoolNode
linked to thisLinkPoolNode
.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
getOfficeFloorManagedObjectPoolName()
Obtains the name of thisOfficeFloorManagedObjectPool
.java.lang.String
getOfficeManagedObjectPoolName()
Obtains the name of thisOfficeManagedObjectPool
.Node
getParentNode()
java.lang.String
getSectionManagedObjectPoolName()
Obtains the name of thisSectionManagedObjectPool
.void
initialise(java.lang.String managedObjectPoolSourceClassName, ManagedObjectPoolSource managedObjectPoolSource)
Initialises theManagedObjectPoolNode
.boolean
isInitialised()
Indicates if theNode
has been initialised.boolean
linkPoolNode(LinkPoolNode node)
Links the inputLinkPoolNode
to thisLinkPoolNode
.ManagedObjectPoolType
loadManagedObjectPoolType(boolean isLoadingType)
Loads theManagedObjectPoolType
.boolean
sourceManagedObjectPool(CompileContext compileContext)
Sources theManagedObjectPool
.-
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
-
ManagedObjectPoolNodeImpl
public ManagedObjectPoolNodeImpl(java.lang.String managedObjectPoolName, SectionNode containingSectionNode, OfficeNode containingOfficeNode, OfficeFloorNode containingOfficeFloorNode, NodeContext context)
Instantiate.- Parameters:
managedObjectPoolName
- Name of thisManagedObjectPoolNode
.containingSectionNode
- ContainingSectionNode
.null
if contained in theOffice
orOfficeFloor
.containingOfficeNode
- ContainingOfficeNode
.null
if contained in theOfficeFloor
.containingOfficeFloorNode
- ContainingOfficeFloorNode
.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 managedObjectPoolSourceClassName, ManagedObjectPoolSource managedObjectPoolSource)
Description copied from interface:ManagedObjectPoolNode
Initialises theManagedObjectPoolNode
.- Specified by:
initialise
in interfaceManagedObjectPoolNode
- Parameters:
managedObjectPoolSourceClassName
- Class name of theManagedObjectPoolSource
.managedObjectPoolSource
- Optional instantiatedManagedObjectPoolSource
. May benull
.
-
getOfficeFloorManagedObjectPoolName
public java.lang.String getOfficeFloorManagedObjectPoolName()
Description copied from interface:OfficeFloorManagedObjectPool
Obtains the name of thisOfficeFloorManagedObjectPool
.- Specified by:
getOfficeFloorManagedObjectPoolName
in interfaceOfficeFloorManagedObjectPool
- Returns:
- Name of this
OfficeFloorManagedObjectPool
.
-
getOfficeManagedObjectPoolName
public java.lang.String getOfficeManagedObjectPoolName()
Description copied from interface:OfficeManagedObjectPool
Obtains the name of thisOfficeManagedObjectPool
.- Specified by:
getOfficeManagedObjectPoolName
in interfaceOfficeManagedObjectPool
- Returns:
- Name of this
OfficeManagedObjectPool
.
-
getSectionManagedObjectPoolName
public java.lang.String getSectionManagedObjectPoolName()
Description copied from interface:SectionManagedObjectPool
Obtains the name of thisSectionManagedObjectPool
.- Specified by:
getSectionManagedObjectPoolName
in interfaceSectionManagedObjectPool
- Returns:
- Name of this
SectionManagedObjectPool
.
-
addProperty
public void addProperty(java.lang.String name, java.lang.String value)
================== PropertyConfigurable ====================- Specified by:
addProperty
in interfacePropertyConfigurable
- Parameters:
name
- Name ofProperty
.value
- Value ofProperty
.
-
loadManagedObjectPoolType
public ManagedObjectPoolType loadManagedObjectPoolType(boolean isLoadingType)
Description copied from interface:ManagedObjectPoolNode
Loads theManagedObjectPoolType
.- Specified by:
loadManagedObjectPoolType
in interfaceManagedObjectPoolNode
- Parameters:
isLoadingType
- Indicates if using to load type.- Returns:
ManagedObjectPoolType
ornull
if issue loading with issue reported to theCompilerIssues
.
-
sourceManagedObjectPool
public boolean sourceManagedObjectPool(CompileContext compileContext)
Description copied from interface:ManagedObjectPoolNode
Sources theManagedObjectPool
.- Specified by:
sourceManagedObjectPool
in interfaceManagedObjectPoolNode
- Parameters:
compileContext
-CompileContext
.- Returns:
true
if successfully sourced. Otherwise,false
with issues reported to theCompilerIssues
.
-
buildManagedObjectPool
public void buildManagedObjectPool(ManagedObjectBuilder<?> builder, ManagedObjectType<?> managedObjectType, CompileContext compileContext)
Description copied from interface:ManagedObjectPoolNode
BuildsManagedObjectPool
for thisManagedObjectPoolNode
.- Specified by:
buildManagedObjectPool
in interfaceManagedObjectPoolNode
- Parameters:
builder
-ManagedObjectBuilder
.managedObjectType
-ManagedObjectType
of theManagedObjectSource
being pooled.compileContext
-CompileContext
.
-
linkPoolNode
public boolean linkPoolNode(LinkPoolNode node)
Description copied from interface:LinkPoolNode
Links the inputLinkPoolNode
to thisLinkPoolNode
.- Specified by:
linkPoolNode
in interfaceLinkPoolNode
- Parameters:
node
-LinkPoolNode
to link to thisLinkPoolNode
.- Returns:
true
if linked.
-
getLinkedPoolNode
public LinkPoolNode getLinkedPoolNode()
Description copied from interface:LinkPoolNode
Obtains theLinkPoolNode
linked to thisLinkPoolNode
.- Specified by:
getLinkedPoolNode
in interfaceLinkPoolNode
- Returns:
LinkPoolNode
linked to thisLinkPoolNode
.
-
-