net.officefloor.compile.impl.work
Class TaskFlowTypeImpl<F extends Enum<F>>

java.lang.Object
  extended by net.officefloor.compile.impl.work.TaskFlowTypeImpl<F>
All Implemented Interfaces:
TaskFlowTypeBuilder<F>, TaskFlowType<F>

public class TaskFlowTypeImpl<F extends Enum<F>>
extends Object
implements TaskFlowType<F>, TaskFlowTypeBuilder<F>

TaskFlowType implementation.

Author:
Daniel Sagenschneider

Constructor Summary
TaskFlowTypeImpl(int index)
          Initiate.
 
Method Summary
 Class<?> getArgumentType()
          Obtains the type of the argument passed by the Task to the JobSequence.
 String getFlowName()
          Obtains the name for the TaskFlowType.
 int getIndex()
           Obtains the index for the TaskFlowType.
 F getKey()
          Obtains the Enum key for the TaskFlowType.
 void setArgumentType(Class<?> argumentType)
           Specifies the type of the argument passed by the Task to the JobSequence.
 void setKey(F key)
          Specifies the Enum for this TaskFlowTypeBuilder.
 void setLabel(String label)
           Provides means to specify a display label for the JobSequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskFlowTypeImpl

public TaskFlowTypeImpl(int index)
Initiate.

Parameters:
index - Index of this TaskFlowType.
Method Detail

setKey

public void setKey(F key)
Description copied from interface: TaskFlowTypeBuilder
Specifies the Enum for this TaskFlowTypeBuilder. This is required to be set if F is not None or Indexed.

Specified by:
setKey in interface TaskFlowTypeBuilder<F extends Enum<F>>
Parameters:
key - Enum for this TaskFlowTypeBuilder.

setArgumentType

public void setArgumentType(Class<?> argumentType)
Description copied from interface: TaskFlowTypeBuilder

Specifies the type of the argument passed by the Task to the JobSequence.

Should there be no argument, do not call this method.

Specified by:
setArgumentType in interface TaskFlowTypeBuilder<F extends Enum<F>>

setLabel

public void setLabel(String label)
Description copied from interface: TaskFlowTypeBuilder

Provides means to specify a display label for the JobSequence.

This need not be set as is only an aid to better identify the JobSequence. If not set the TaskTypeBuilder will use the following order to get a display label:

  1. Enum key name
  2. index value

Specified by:
setLabel in interface TaskFlowTypeBuilder<F extends Enum<F>>
Parameters:
label - Display label for the JobSequence.

getFlowName

public String getFlowName()
Description copied from interface: TaskFlowType
Obtains the name for the TaskFlowType.

Specified by:
getFlowName in interface TaskFlowType<F extends Enum<F>>
Returns:
Name for the TaskFlowType.

getIndex

public int getIndex()
Description copied from interface: TaskFlowType

Obtains the index for the TaskFlowType.

Should there be an Enum then will be the Enum.ordinal() value. Otherwise will be the index that this was added.

Specified by:
getIndex in interface TaskFlowType<F extends Enum<F>>
Returns:
Index for the TaskFlowType.

getArgumentType

public Class<?> getArgumentType()
Description copied from interface: TaskFlowType
Obtains the type of the argument passed by the Task to the JobSequence.

Specified by:
getArgumentType in interface TaskFlowType<F extends Enum<F>>
Returns:
Type of argument passed to JobSequence. May be null to indicate no argument.

getKey

public F getKey()
Description copied from interface: TaskFlowType
Obtains the Enum key for the TaskFlowType.

Specified by:
getKey in interface TaskFlowType<F extends Enum<F>>
Returns:
Enum key for the TaskFlowType. May be null if no Enum for flows.


Copyright © 2005-2013. All Rights Reserved.