public class TaskBuilderImpl<W extends Work,D extends Enum<D>,F extends Enum<F>> extends Object implements TaskBuilder<W,D,F>, TaskConfiguration<W,D,F>
TaskBuilder
.Constructor and Description |
---|
TaskBuilderImpl(String taskName,
TaskFactory<W,D,F> taskFactory)
Initiate.
|
Modifier and Type | Method and Description |
---|---|
void |
addEscalation(Class<? extends Throwable> typeOfCause,
String taskName)
|
void |
addEscalation(Class<? extends Throwable> typeOfCause,
String workName,
String taskName)
|
void |
addGovernance(String governanceName)
|
Object |
getDifferentiator()
Obtains the differentiator for the
Task . |
TaskEscalationConfiguration[] |
getEscalations()
Obtains the
TaskEscalationConfiguration instances in escalation
order. |
TaskFlowConfiguration<F>[] |
getFlowConfiguration()
Obtains the configuration of the
JobSequence instances for this
Task . |
TaskGovernanceConfiguration[] |
getGovernanceConfiguration()
Obtains the configuration of the
Governance instances for this
Task . |
TaskNodeReference |
getNextTaskInFlow()
Obtains the reference to the next
Task within the
JobSequence . |
TaskObjectConfiguration<D>[] |
getObjectConfiguration()
|
String |
getOfficeTeamName()
|
TaskDutyConfiguration<?>[] |
getPostTaskAdministratorDutyConfiguration()
Obtains the listing of the
TaskDutyConfiguration for the
administration to be done after the Task is executed. |
TaskDutyConfiguration<?>[] |
getPreTaskAdministratorDutyConfiguration()
Obtains the listing of the
TaskDutyConfiguration for the
administration to be done before the Task is executed. |
TaskFactory<W,D,F> |
getTaskFactory()
Obtains the
TaskFactory for the Task . |
String |
getTaskName()
|
void |
linkFlow(F key,
String taskName,
FlowInstigationStrategyEnum strategy,
Class<?> argumentType)
|
void |
linkFlow(F key,
String workName,
String taskName,
FlowInstigationStrategyEnum strategy,
Class<?> argumentType)
|
void |
linkFlow(int flowIndex,
String taskName,
FlowInstigationStrategyEnum strategy,
Class<?> argumentType)
|
void |
linkFlow(int flowIndex,
String workName,
String taskName,
FlowInstigationStrategyEnum strategy,
Class<?> argumentType)
|
void |
linkManagedObject(D key,
String scopeManagedObjectName,
Class<?> objectType)
Links in a
ManagedObject to this Task . |
void |
linkManagedObject(int index,
String scopeManagedObjectName,
Class<?> objectType)
Links in a
ManagedObject to this Task . |
void |
linkParameter(D key,
Class<?> parameterType)
Links in the parameter for this
Task . |
void |
linkParameter(int index,
Class<?> parameterType)
Links in the parameter for this
Task . |
<A extends Enum<A>> |
linkPostTaskAdministration(String scopeAdministratorName,
A dutyKey)
|
void |
linkPostTaskAdministration(String scopeAdministratorName,
String dutyName)
|
<A extends Enum<A>> |
linkPreTaskAdministration(String scopeAdministratorName,
A dutyKey)
|
void |
linkPreTaskAdministration(String scopeAdministratorName,
String dutyName)
|
void |
setDifferentiator(Object differentiator)
Specifies the differentiator for this
Task . |
void |
setNextTaskInFlow(String taskName,
Class<?> argumentType)
|
void |
setNextTaskInFlow(String workName,
String taskName,
Class<?> argumentType)
|
void |
setTeam(String officeTeamName)
|
public TaskBuilderImpl(String taskName, TaskFactory<W,D,F> taskFactory)
taskName
- Name of this Task
.taskFactory
- TaskFactory
.public void setDifferentiator(Object differentiator)
TaskBuilder
Specifies the differentiator for this Task
.
This is exposed as is on the TaskManager
interface for this
Task
to allow reflective:
setDifferentiator
in interface TaskBuilder<W extends Work,D extends Enum<D>,F extends Enum<F>>
differentiator
- Differentiator.public void setTeam(String officeTeamName)
FlowNodeBuilder
public void setNextTaskInFlow(String taskName, Class<?> argumentType)
FlowNodeBuilder
setNextTaskInFlow
in interface FlowNodeBuilder<F extends Enum<F>>
taskName
- Name of the next Task
in the JobSequence
.argumentType
- Type of argument passed to the next Task
. May be
null
to indicate no argument.public void setNextTaskInFlow(String workName, String taskName, Class<?> argumentType)
FlowNodeBuilder
setNextTaskInFlow
in interface FlowNodeBuilder<F extends Enum<F>>
workName
- Name of Work
containing the Task
.taskName
- Name of the next Task
in the JobSequence
.argumentType
- Type of argument passed to the next Task
. May be
null
to indicate no argument.public void linkParameter(D key, Class<?> parameterType)
TaskBuilder
Task
.linkParameter
in interface TaskBuilder<W extends Work,D extends Enum<D>,F extends Enum<F>>
key
- Key identifying the parameter.parameterType
- Type of the parameter.public void linkParameter(int index, Class<?> parameterType)
TaskBuilder
Task
.linkParameter
in interface TaskBuilder<W extends Work,D extends Enum<D>,F extends Enum<F>>
index
- Index identifying the parameter.parameterType
- Type of the parameter.public void linkManagedObject(D key, String scopeManagedObjectName, Class<?> objectType)
TaskBuilder
ManagedObject
to this Task
.linkManagedObject
in interface TaskBuilder<W extends Work,D extends Enum<D>,F extends Enum<F>>
key
- Key identifying the ManagedObject
.scopeManagedObjectName
- Name of the ManagedObject
within the
ManagedObjectScope
.objectType
- Type required by the Task
.public void linkManagedObject(int index, String scopeManagedObjectName, Class<?> objectType)
TaskBuilder
ManagedObject
to this Task
.linkManagedObject
in interface TaskBuilder<W extends Work,D extends Enum<D>,F extends Enum<F>>
index
- Index of the ManagedObject
.scopeManagedObjectName
- Name of the ManagedObject
within the
ManagedObjectScope
.objectType
- Type required by the Task
.public void linkPreTaskAdministration(String scopeAdministratorName, String dutyName)
TaskBuilder
linkPreTaskAdministration
in interface TaskBuilder<W extends Work,D extends Enum<D>,F extends Enum<F>>
scopeAdministratorName
- Name of the Administrator
within the
AdministratorScope
.dutyName
- Name identifying the Duty
(as per
AdministratorDutyMetaData
).public <A extends Enum<A>> void linkPreTaskAdministration(String scopeAdministratorName, A dutyKey)
TaskBuilder
linkPreTaskAdministration
in interface TaskBuilder<W extends Work,D extends Enum<D>,F extends Enum<F>>
A
- Administrator
key type.scopeAdministratorName
- Name of the Administrator
within the
AdministratorScope
.dutyKey
- Key identifying the Duty
.public void linkPostTaskAdministration(String scopeAdministratorName, String dutyName)
TaskBuilder
linkPostTaskAdministration
in interface TaskBuilder<W extends Work,D extends Enum<D>,F extends Enum<F>>
scopeAdministratorName
- Name of the Administrator
within the
AdministratorScope
.dutyName
- Name identifying the Duty
(as per
AdministratorDutyMetaData
).public <A extends Enum<A>> void linkPostTaskAdministration(String scopeAdministratorName, A dutyKey)
TaskBuilder
linkPostTaskAdministration
in interface TaskBuilder<W extends Work,D extends Enum<D>,F extends Enum<F>>
A
- Administrator
key type.scopeAdministratorName
- Name of the Administrator
within the
AdministratorScope
.dutyKey
- Key identifying the Duty
.public void linkFlow(F key, String taskName, FlowInstigationStrategyEnum strategy, Class<?> argumentType)
FlowNodeBuilder
linkFlow
in interface FlowNodeBuilder<F extends Enum<F>>
key
- Key identifying the JobSequence
.taskName
- Name of Task
that resides on same Work
as this
Task
.strategy
- Strategy to instigate the JobSequence
.argumentType
- Type of argument passed to the instigated JobSequence
.
May be null
to indicate no argument.public void linkFlow(int flowIndex, String taskName, FlowInstigationStrategyEnum strategy, Class<?> argumentType)
FlowNodeBuilder
linkFlow
in interface FlowNodeBuilder<F extends Enum<F>>
flowIndex
- Index identifying the JobSequence
.taskName
- Name of Task
that resides on same Work
as this
Task
.strategy
- Strategy to instigate the JobSequence
.argumentType
- Type of argument passed to the instigated JobSequence
.
May be null
to indicate no argument.public void linkFlow(F key, String workName, String taskName, FlowInstigationStrategyEnum strategy, Class<?> argumentType)
FlowNodeBuilder
linkFlow
in interface FlowNodeBuilder<F extends Enum<F>>
key
- Key identifying the JobSequence
.workName
- Name of the Work
that the first Task
of the
JobSequence
resides on.taskName
- Name of Task
that resides on a different Work
as this Task
.strategy
- Strategy to instigate the JobSequence
.argumentType
- Type of argument passed to the instigated JobSequence
.
May be null
to indicate no argument.public void linkFlow(int flowIndex, String workName, String taskName, FlowInstigationStrategyEnum strategy, Class<?> argumentType)
FlowNodeBuilder
linkFlow
in interface FlowNodeBuilder<F extends Enum<F>>
flowIndex
- Index identifying the JobSequence
.workName
- Name of the Work
that the first Task
of the
JobSequence
resides on.taskName
- Name of Task
that resides on a different Work
as this Task
.strategy
- Strategy to instigate the JobSequence
.argumentType
- Type of argument passed to the instigated JobSequence
.
May be null
to indicate no argument.public void addEscalation(Class<? extends Throwable> typeOfCause, String taskName)
FlowNodeBuilder
Adds an EscalationFlow
to the EscalationProcedure
for the
Task
.
The order in which the EscalationFlow
instances are added is the
order in which they are checked for handling escalation. Only one
EscalationFlow
is used to handle escalation and the first one
covering the cause will be used.
addEscalation
in interface FlowNodeBuilder<F extends Enum<F>>
typeOfCause
- Type of cause handled by this EscalationFlow
.taskName
- Name of the Task
that resides on the same Work
as this Task
.FlowNodeBuilder.addEscalation(Class, String, String)
public void addEscalation(Class<? extends Throwable> typeOfCause, String workName, String taskName)
FlowNodeBuilder
addEscalation
in interface FlowNodeBuilder<F extends Enum<F>>
typeOfCause
- Type of cause handled by this EscalationFlow
.workName
- Name of the Work
that the first Task
of the
JobSequence
resides on.taskName
- Name of Task
that resides on a different Work
as this Task
.FlowNodeBuilder.addEscalation(Class, String)
public void addGovernance(String governanceName)
TaskBuilder
Adds OfficeFloor
managed Governance
to this Task
.
In other words, to execute this Task
the Governance
will
be automatically activated before the Task
is executed (or stay
active from previous Task
).
The Governance
will be:
Task
in the flow does not require the
Governance
or the ThreadState
completes.
Task
not requiring
the Governance
. Note that this does allow Governance
to
stay active should the Escalation
Task
require the
Governance
.addGovernance
in interface TaskBuilder<W extends Work,D extends Enum<D>,F extends Enum<F>>
governanceName
- Name of the Governance
.public String getTaskName()
TaskConfiguration
public TaskFactory<W,D,F> getTaskFactory()
TaskConfiguration
TaskFactory
for the Task
.getTaskFactory
in interface TaskConfiguration<W extends Work,D extends Enum<D>,F extends Enum<F>>
TaskFactory
.public Object getDifferentiator()
TaskConfiguration
Task
.public String getOfficeTeamName()
TaskConfiguration
public TaskObjectConfiguration<D>[] getObjectConfiguration()
TaskConfiguration
public TaskGovernanceConfiguration[] getGovernanceConfiguration()
TaskConfiguration
Governance
instances for this
Task
.getGovernanceConfiguration
in interface TaskConfiguration<W extends Work,D extends Enum<D>,F extends Enum<F>>
Governance
for this Task
.public TaskNodeReference getNextTaskInFlow()
TaskConfiguration
Task
within the
JobSequence
.getNextTaskInFlow
in interface TaskConfiguration<W extends Work,D extends Enum<D>,F extends Enum<F>>
Task
within the JobSequence
.public TaskFlowConfiguration<F>[] getFlowConfiguration()
TaskConfiguration
JobSequence
instances for this
Task
.getFlowConfiguration
in interface TaskConfiguration<W extends Work,D extends Enum<D>,F extends Enum<F>>
JobSequence
instances for this
Task
.public TaskDutyConfiguration<?>[] getPreTaskAdministratorDutyConfiguration()
TaskConfiguration
TaskDutyConfiguration
for the
administration to be done before the Task
is executed.getPreTaskAdministratorDutyConfiguration
in interface TaskConfiguration<W extends Work,D extends Enum<D>,F extends Enum<F>>
TaskDutyConfiguration
for the
administration to be done before the Task
is executed.public TaskDutyConfiguration<?>[] getPostTaskAdministratorDutyConfiguration()
TaskConfiguration
TaskDutyConfiguration
for the
administration to be done after the Task
is executed.getPostTaskAdministratorDutyConfiguration
in interface TaskConfiguration<W extends Work,D extends Enum<D>,F extends Enum<F>>
TaskDutyConfiguration
for the
administration to be done after the Task
is executed.public TaskEscalationConfiguration[] getEscalations()
TaskConfiguration
TaskEscalationConfiguration
instances in escalation
order. Index 0 being first, index 1 second and so forth.getEscalations
in interface TaskConfiguration<W extends Work,D extends Enum<D>,F extends Enum<F>>
TaskEscalationConfiguration
instances.Copyright © 2005–2016. All rights reserved.