Class TeamNodeImpl
- java.lang.Object
-
- net.officefloor.compile.impl.structure.TeamNodeImpl
-
- All Implemented Interfaces:
LinkTeamNode
,Node
,TeamNode
,PropertyConfigurable
,OfficeFloorTeam
public class TeamNodeImpl extends java.lang.Object implements TeamNode
TeamNode
implementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description TeamNodeImpl(java.lang.String teamName, 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
addTypeQualification(java.lang.String qualifier, java.lang.String type)
Adds anTypeQualification
for thisOfficeFloorTeam
.void
buildTeam(OfficeFloorBuilder builder, CompileContext compileContext)
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
getOfficeFloorTeamName()
Obtains the name of thisOfficeFloorTeam
.Node
getParentNode()
TypeQualification[]
getTypeQualifications()
Obtains theTypeQualification
instances for theOfficeFloorTeam
.void
initialise(java.lang.String teamSourceClassName, TeamSource teamSource)
Initialises theTeamNode
.boolean
isInitialised()
Indicates if theNode
has been initialised.boolean
linkTeamNode(LinkTeamNode node)
Links the inputLinkTeamNode
to thisLinkTeamNode
.OfficeFloorTeamSourceType
loadOfficeFloorTeamSourceType(CompileContext compileContext)
Loads theOfficeFloorTeamSourceType
.TeamType
loadTeamType()
Loads theTeamType
for theTeamSource
.void
requestNoTeamOversight()
Requests for noTeamOversight
on thisTeam
.void
setTeamSize(int teamSize)
Specifies the size of theTeam
.boolean
sourceTeam(TeamVisitor visitor, CompileContext compileContext)
Sources theTeam
.-
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
-
TeamNodeImpl
public TeamNodeImpl(java.lang.String teamName, OfficeFloorNode officeFloor, NodeContext context)
Initiate.- Parameters:
teamName
- Name of thisOfficeFloorTeam
.officeFloor
-OfficeFloorNode
containing thisTeamNode
.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 teamSourceClassName, TeamSource teamSource)
Description copied from interface:TeamNode
Initialises theTeamNode
.- Specified by:
initialise
in interfaceTeamNode
- Parameters:
teamSourceClassName
- Class name of theTeamSource
.teamSource
- Optional instantiatedTeamSource
. May benull
.
-
sourceTeam
public boolean sourceTeam(TeamVisitor visitor, CompileContext compileContext)
Description copied from interface:TeamNode
Sources theTeam
.- Specified by:
sourceTeam
in interfaceTeamNode
- Parameters:
visitor
-TeamVisitor
.compileContext
-CompileContext
.- Returns:
true
if successfully sourced theTeam
.false
if failed to source, with issues reported to theCompilerIssues
.
-
loadTeamType
public TeamType loadTeamType()
Description copied from interface:TeamNode
Loads theTeamType
for theTeamSource
.- Specified by:
loadTeamType
in interfaceTeamNode
- Returns:
TeamType
ornull
with issues reported to theCompilerIssues
.
-
loadOfficeFloorTeamSourceType
public OfficeFloorTeamSourceType loadOfficeFloorTeamSourceType(CompileContext compileContext)
Description copied from interface:TeamNode
Loads theOfficeFloorTeamSourceType
.- Specified by:
loadOfficeFloorTeamSourceType
in interfaceTeamNode
- Parameters:
compileContext
-CompileContext
.- Returns:
OfficeFloorTeamSourceType
ornull
with issues reported to theCompilerIssues
.
-
getTypeQualifications
public TypeQualification[] getTypeQualifications()
Description copied from interface:TeamNode
Obtains theTypeQualification
instances for theOfficeFloorTeam
.- Specified by:
getTypeQualifications
in interfaceTeamNode
- Returns:
TypeQualification
instances for theOfficeFloorTeam
.
-
buildTeam
public void buildTeam(OfficeFloorBuilder builder, CompileContext compileContext)
Description copied from interface:TeamNode
- Specified by:
buildTeam
in interfaceTeamNode
- Parameters:
builder
-OfficeFloorBuilder
.compileContext
-CompileContext
.
-
getOfficeFloorTeamName
public java.lang.String getOfficeFloorTeamName()
Description copied from interface:OfficeFloorTeam
Obtains the name of thisOfficeFloorTeam
.- Specified by:
getOfficeFloorTeamName
in interfaceOfficeFloorTeam
- Returns:
- Name of this
OfficeFloorTeam
.
-
setTeamSize
public void setTeamSize(int teamSize)
Description copied from interface:OfficeFloorTeam
Specifies the size of theTeam
.- Specified by:
setTeamSize
in interfaceOfficeFloorTeam
- Parameters:
teamSize
- Size of theTeam
.
-
requestNoTeamOversight
public void requestNoTeamOversight()
Description copied from interface:OfficeFloorTeam
Requests for noTeamOversight
on thisTeam
.- Specified by:
requestNoTeamOversight
in interfaceOfficeFloorTeam
-
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
.
-
addTypeQualification
public void addTypeQualification(java.lang.String qualifier, java.lang.String type)
Description copied from interface:OfficeFloorTeam
Adds an
TypeQualification
for thisOfficeFloorTeam
.This enables distinguishing
OfficeFloorTeam
instances to enable, for example, dynamicTeam
assignment.- Specified by:
addTypeQualification
in interfaceOfficeFloorTeam
- Parameters:
qualifier
- Qualifier. May benull
if no qualification.type
- Type (typically the fully qualified type).
-
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
.
-
-