Class TeamNodeImpl
java.lang.Object
net.officefloor.compile.impl.structure.TeamNodeImpl
- All Implemented Interfaces:
LinkTeamNode,Node,TeamNode,PropertyConfigurable,OfficeFloorTeam
TeamNode implementation.- Author:
- Daniel Sagenschneider
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTeamNodeImpl(String teamName, OfficeFloorNode officeFloor, NodeContext context) Initiate. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(String name, String value) Adds aPropertyto configure the item.voidaddTypeQualification(String qualifier, String type) Adds anTypeQualificationfor thisOfficeFloorTeam.voidbuildTeam(OfficeFloorBuilder builder, CompileContext compileContext) Node[]Obtains the childNodeinstances.Obtains theLinkTeamNodelinked to thisLinkTeamNode.Obtains the location of theNode.Obtains the name of theNode.Obtains theNodetype.Obtains the name of thisOfficeFloorTeam.Obtains theTypeQualificationinstances for theOfficeFloorTeam.voidinitialise(String teamSourceClassName, TeamSource teamSource) Initialises theTeamNode.booleanIndicates if theNodehas been initialised.booleanlinkTeamNode(LinkTeamNode node) Links the inputLinkTeamNodeto thisLinkTeamNode.loadOfficeFloorTeamSourceType(CompileContext compileContext) Loads theOfficeFloorTeamSourceType.Loads theTeamTypefor theTeamSource.voidRequests 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, waitMethods inherited from interface net.officefloor.compile.internal.structure.Node
getQualifiedName, getQualifiedName
-
Constructor Details
-
TeamNodeImpl
Initiate.- Parameters:
teamName- Name of thisOfficeFloorTeam.officeFloor-OfficeFloorNodecontaining thisTeamNode.context-NodeContext.
-
-
Method Details
-
getNodeName
Description copied from interface:NodeObtains the name of theNode.- Specified by:
getNodeNamein interfaceNode- Returns:
- Name of the
Node.
-
getNodeType
Description copied from interface:NodeObtains theNodetype.- Specified by:
getNodeTypein interfaceNode- Returns:
Nodetype.
-
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
Description copied from interface:Node- Specified by:
getParentNodein interfaceNode- Returns:
Nodecontaining thisNode.
-
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
Description copied from interface:TeamNodeInitialises theTeamNode.- Specified by:
initialisein interfaceTeamNode- Parameters:
teamSourceClassName- Class name of theTeamSource.teamSource- Optional instantiatedTeamSource. May benull.
-
sourceTeam
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
Description copied from interface:TeamNodeLoads theTeamTypefor theTeamSource.- Specified by:
loadTeamTypein interfaceTeamNode- Returns:
TeamTypeornullwith issues reported to theCompilerIssues.
-
loadOfficeFloorTeamSourceType
Description copied from interface:TeamNodeLoads theOfficeFloorTeamSourceType.- Specified by:
loadOfficeFloorTeamSourceTypein interfaceTeamNode- Parameters:
compileContext-CompileContext.- Returns:
OfficeFloorTeamSourceTypeornullwith issues reported to theCompilerIssues.
-
getTypeQualifications
Description copied from interface:TeamNodeObtains theTypeQualificationinstances for theOfficeFloorTeam.- Specified by:
getTypeQualificationsin interfaceTeamNode- Returns:
TypeQualificationinstances for theOfficeFloorTeam.
-
buildTeam
Description copied from interface:TeamNode- Specified by:
buildTeamin interfaceTeamNode- Parameters:
builder-OfficeFloorBuilder.compileContext-CompileContext.
-
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
Description copied from interface:PropertyConfigurableAdds aPropertyto configure the item.- Specified by:
addPropertyin interfacePropertyConfigurable- Parameters:
name- Name ofProperty.value- Value ofProperty.
-
addTypeQualification
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
Description copied from interface:LinkTeamNodeLinks the inputLinkTeamNodeto thisLinkTeamNode.- Specified by:
linkTeamNodein interfaceLinkTeamNode- Parameters:
node-LinkTeamNodeto link to thisLinkTeamNode.- Returns:
trueif linked.
-
getLinkedTeamNode
Description copied from interface:LinkTeamNodeObtains theLinkTeamNodelinked to thisLinkTeamNode.- Specified by:
getLinkedTeamNodein interfaceLinkTeamNode- Returns:
LinkTeamNodelinked to thisLinkTeamNode.
-