net.officefloor.compile.spi.work.source
Interface WorkTypeBuilder<W extends Work>

All Known Implementing Classes:
WorkTypeImpl

public interface WorkTypeBuilder<W extends Work>

Provides means for the WorkSource to provide a type definition of the Work.

Author:
Daniel Sagenschneider

Method Summary
<M extends Enum<M>,F extends Enum<F>>
TaskTypeBuilder<M,F>
addTaskType(String taskName, TaskFactory<? super W,M,F> taskFactory, Class<M> objectKeysClass, Class<F> flowKeysClass)
          Adds a TaskTypeBuilder to this WorkTypeBuilder definition.
 void setWorkFactory(WorkFactory<W> workFactory)
          Specifies the WorkFactory to create the Work.
 

Method Detail

setWorkFactory

void setWorkFactory(WorkFactory<W> workFactory)
Specifies the WorkFactory to create the Work.

Parameters:
workFactory - WorkFactory.

addTaskType

<M extends Enum<M>,F extends Enum<F>> TaskTypeBuilder<M,F> addTaskType(String taskName,
                                                                       TaskFactory<? super W,M,F> taskFactory,
                                                                       Class<M> objectKeysClass,
                                                                       Class<F> flowKeysClass)
Adds a TaskTypeBuilder to this WorkTypeBuilder definition.

Parameters:
taskName - Name of the Task.
taskFactory - TaskFactory to create the Task.
objectKeysClass - Enum providing the keys of the dependent Object instances required by the TaskTypeBuilder. This may be null if the TaskTypeBuilder requires no dependent Object instances or they are Indexed.
flowKeysClass - Enum providing the keys of the JobSequence instigated by the TaskTypeBuilder. This may be null if the TaskTypeBuilder does not instigate JobSequence instances or they are Indexed.
Returns:
TaskTypeBuilder to provide type definition of the added Task.


Copyright © 2005-2013. All Rights Reserved.