public class WorkNodeImpl extends Object implements WorkNode
WorkNode
implementation.Constructor and Description |
---|
WorkNodeImpl(String workName,
SectionNode section,
NodeContext context)
Instantiate.
|
Modifier and Type | Method and Description |
---|---|
void |
addProperty(String name,
String value)
Adds a
Property to configure the item. |
SectionTask |
addSectionTask(String taskName,
String taskTypeName)
Adds a
SectionTask . |
WorkBuilder<?> |
buildWork(OfficeBuilder builder,
TypeContext typeContext)
Builds the
Work for this SectionWork . |
String |
getLocation()
Obtains the location of the
Node . |
String |
getNodeName()
Obtains the name of the
Node . |
String |
getNodeType()
Obtains the
Node type. |
Node |
getParentNode()
|
String |
getQualifiedWorkName()
|
SectionNode |
getSectionNode()
Obtains the
SectionNode containing this WorkNode . |
String |
getSectionWorkName()
Obtains the name of this
SectionWork . |
void |
initialise(String workSourceClassName,
WorkSource<?> workSource)
Initialises the
WorkNode . |
boolean |
isInitialised()
Indicates if the
Node has been initialised. |
WorkType<?> |
loadWorkType()
|
void |
setInitialTask(SectionTask task)
Specifies the initial
SectionTask for this SectionWork . |
public WorkNodeImpl(String workName, SectionNode section, NodeContext context)
workName
- Name of this SectionWork
.section
- OfficeSection
containing this WorkNode
.context
- NodeContext
.public String getNodeName()
Node
Node
.getNodeName
in interface Node
Node
.public String getNodeType()
Node
Node
type.getNodeType
in interface Node
Node
type.public String getLocation()
Node
Node
.getLocation
in interface Node
Node
. May be null
if
Node
does not support a location.public Node getParentNode()
Node
getParentNode
in interface Node
Node
containing this Node
.public boolean isInitialised()
Node
Node
has been initialised. Node
instances should only be initialised once. Initialising the Node
twice is an issue.isInitialised
in interface Node
true
if initialised.public void initialise(String workSourceClassName, WorkSource<?> workSource)
WorkNode
WorkNode
.initialise
in interface WorkNode
workSourceClassName
- Class
name of the WorkSource
.workSource
- Optional instantiated WorkSource
. May be
null
.public String getSectionWorkName()
SectionWork
SectionWork
.getSectionWorkName
in interface SectionWork
SectionWork
.public void addProperty(String name, String value)
PropertyConfigurable
Property
to configure the item.addProperty
in interface PropertyConfigurable
name
- Name of Property
.value
- Value of Property
.public SectionTask addSectionTask(String taskName, String taskTypeName)
SectionWork
SectionTask
.addSectionTask
in interface SectionWork
taskName
- Name of the SectionTask
.taskTypeName
- Name of the TaskType
on the WorkType
.SectionTask
.public void setInitialTask(SectionTask task)
SectionWork
SectionTask
for this SectionWork
.setInitialTask
in interface SectionWork
task
- Initial SectionTask
.public SectionNode getSectionNode()
WorkNode
SectionNode
containing this WorkNode
.getSectionNode
in interface WorkNode
SectionNode
containing this WorkNode
.public String getQualifiedWorkName()
WorkNode
getQualifiedWorkName
in interface WorkNode
Work
.public WorkType<?> loadWorkType()
WorkNode
loadWorkType
in interface WorkNode
WorkType
for this WorkNode
. May be
null
if can not load the WorkType
.public WorkBuilder<?> buildWork(OfficeBuilder builder, TypeContext typeContext)
WorkNode
Work
for this SectionWork
.buildWork
in interface WorkNode
builder
- OfficeBuilder
.typeContext
- TypeContext
.WorkBuilder
to enable building the TaskNode
instances.Copyright © 2005–2016. All rights reserved.