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
TeamNodeimplementation.- 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 voidaddProperty(java.lang.String name, java.lang.String value)Adds aPropertyto configure the item.voidaddTypeQualification(java.lang.String qualifier, java.lang.String type)Adds anTypeQualificationfor thisOfficeFloorTeam.voidbuildTeam(OfficeFloorBuilder builder, CompileContext compileContext)Node[]getChildNodes()Obtains the childNodeinstances.LinkTeamNodegetLinkedTeamNode()Obtains theLinkTeamNodelinked to thisLinkTeamNode.java.lang.StringgetLocation()Obtains the location of theNode.java.lang.StringgetNodeName()Obtains the name of theNode.java.lang.StringgetNodeType()Obtains theNodetype.java.lang.StringgetOfficeFloorTeamName()Obtains the name of thisOfficeFloorTeam.NodegetParentNode()TypeQualification[]getTypeQualifications()Obtains theTypeQualificationinstances for theOfficeFloorTeam.voidinitialise(java.lang.String teamSourceClassName, TeamSource teamSource)Initialises theTeamNode.booleanisInitialised()Indicates if theNodehas been initialised.booleanlinkTeamNode(LinkTeamNode node)Links the inputLinkTeamNodeto thisLinkTeamNode.OfficeFloorTeamSourceTypeloadOfficeFloorTeamSourceType(CompileContext compileContext)Loads theOfficeFloorTeamSourceType.TeamTypeloadTeamType()Loads theTeamTypefor theTeamSource.voidrequestNoTeamOversight()Requests for noTeamOversighton thisTeam.voidsetTeamSize(int teamSize)Specifies the size of theTeam.booleansourceTeam(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-OfficeFloorNodecontaining thisTeamNode.context-NodeContext.
-
-
Method Detail
-
getNodeName
public java.lang.String getNodeName()
Description copied from interface:NodeObtains the name of theNode.- Specified by:
getNodeNamein interfaceNode- Returns:
- Name of the
Node.
-
getNodeType
public java.lang.String getNodeType()
Description copied from interface:NodeObtains theNodetype.- Specified by:
getNodeTypein interfaceNode- Returns:
Nodetype.
-
getLocation
public java.lang.String getLocation()
Description copied from interface:NodeObtains the location of theNode.- Specified by:
getLocationin interfaceNode- Returns:
- Location of the
Node. May benullifNodedoes not support a location.
-
getParentNode
public Node getParentNode()
Description copied from interface:Node- Specified by:
getParentNodein interfaceNode- Returns:
Nodecontaining thisNode.
-
getChildNodes
public Node[] getChildNodes()
Description copied from interface:NodeObtains the childNodeinstances.- Specified by:
getChildNodesin interfaceNode- Returns:
- Child
Nodeinstances.
-
isInitialised
public boolean isInitialised()
Description copied from interface:NodeIndicates if theNodehas been initialised.Nodeinstances should only be initialised once. Initialising theNodetwice is an issue.- Specified by:
isInitialisedin interfaceNode- Returns:
trueif initialised.
-
initialise
public void initialise(java.lang.String teamSourceClassName, TeamSource teamSource)Description copied from interface:TeamNodeInitialises theTeamNode.- Specified by:
initialisein interfaceTeamNode- Parameters:
teamSourceClassName- Class name of theTeamSource.teamSource- Optional instantiatedTeamSource. May benull.
-
sourceTeam
public boolean sourceTeam(TeamVisitor visitor, CompileContext compileContext)
Description copied from interface:TeamNodeSources theTeam.- Specified by:
sourceTeamin interfaceTeamNode- Parameters:
visitor-TeamVisitor.compileContext-CompileContext.- Returns:
trueif successfully sourced theTeam.falseif failed to source, with issues reported to theCompilerIssues.
-
loadTeamType
public TeamType loadTeamType()
Description copied from interface:TeamNodeLoads theTeamTypefor theTeamSource.- Specified by:
loadTeamTypein interfaceTeamNode- Returns:
TeamTypeornullwith issues reported to theCompilerIssues.
-
loadOfficeFloorTeamSourceType
public OfficeFloorTeamSourceType loadOfficeFloorTeamSourceType(CompileContext compileContext)
Description copied from interface:TeamNodeLoads theOfficeFloorTeamSourceType.- Specified by:
loadOfficeFloorTeamSourceTypein interfaceTeamNode- Parameters:
compileContext-CompileContext.- Returns:
OfficeFloorTeamSourceTypeornullwith issues reported to theCompilerIssues.
-
getTypeQualifications
public TypeQualification[] getTypeQualifications()
Description copied from interface:TeamNodeObtains theTypeQualificationinstances for theOfficeFloorTeam.- Specified by:
getTypeQualificationsin interfaceTeamNode- Returns:
TypeQualificationinstances for theOfficeFloorTeam.
-
buildTeam
public void buildTeam(OfficeFloorBuilder builder, CompileContext compileContext)
Description copied from interface:TeamNode- Specified by:
buildTeamin interfaceTeamNode- Parameters:
builder-OfficeFloorBuilder.compileContext-CompileContext.
-
getOfficeFloorTeamName
public java.lang.String getOfficeFloorTeamName()
Description copied from interface:OfficeFloorTeamObtains the name of thisOfficeFloorTeam.- Specified by:
getOfficeFloorTeamNamein interfaceOfficeFloorTeam- Returns:
- Name of this
OfficeFloorTeam.
-
setTeamSize
public void setTeamSize(int teamSize)
Description copied from interface:OfficeFloorTeamSpecifies the size of theTeam.- Specified by:
setTeamSizein interfaceOfficeFloorTeam- Parameters:
teamSize- Size of theTeam.
-
requestNoTeamOversight
public void requestNoTeamOversight()
Description copied from interface:OfficeFloorTeamRequests for noTeamOversighton thisTeam.- Specified by:
requestNoTeamOversightin interfaceOfficeFloorTeam
-
addProperty
public void addProperty(java.lang.String name, java.lang.String value)Description copied from interface:PropertyConfigurableAdds aPropertyto configure the item.- Specified by:
addPropertyin interfacePropertyConfigurable- Parameters:
name- Name ofProperty.value- Value ofProperty.
-
addTypeQualification
public void addTypeQualification(java.lang.String qualifier, java.lang.String type)Description copied from interface:OfficeFloorTeamAdds an
TypeQualificationfor thisOfficeFloorTeam.This enables distinguishing
OfficeFloorTeaminstances to enable, for example, dynamicTeamassignment.- Specified by:
addTypeQualificationin interfaceOfficeFloorTeam- Parameters:
qualifier- Qualifier. May benullif no qualification.type- Type (typically the fully qualified type).
-
linkTeamNode
public boolean linkTeamNode(LinkTeamNode node)
Description copied from interface:LinkTeamNodeLinks the inputLinkTeamNodeto thisLinkTeamNode.- Specified by:
linkTeamNodein interfaceLinkTeamNode- Parameters:
node-LinkTeamNodeto link to thisLinkTeamNode.- Returns:
trueif linked.
-
getLinkedTeamNode
public LinkTeamNode getLinkedTeamNode()
Description copied from interface:LinkTeamNodeObtains theLinkTeamNodelinked to thisLinkTeamNode.- Specified by:
getLinkedTeamNodein interfaceLinkTeamNode- Returns:
LinkTeamNodelinked to thisLinkTeamNode.
-
-