atg.workflow
Class TaskQueryOptions

java.lang.Object
  extended by atg.workflow.TaskQueryOptions

public class TaskQueryOptions
extends java.lang.Object

A bean which holds filtering and sorting criteria to be used when querying for tasks. In particular, this class is used to specify additional restrictions to be put on TaskInfos returned by all the getActiveTasks and getAllTasks methods, in both WorkflowManager and WorkflowView.

Here are some specific examples of how task information can be filtered:

By default, tasks are sorted first by the workflow process/segment names and subject ids (i.e., all the tasks which belong to a single workflow instance are grouped together), then by their order of appearance in the workflow definition. Alternative sorting criteria can be specified; for example, tasks can be sorted first by priority, then by the workflow process/segment names and subject ids.

See Also:
TaskInfo, WorkflowManager, WorkflowView

Field Summary
static java.lang.String CLASS_VERSION
           
 
Constructor Summary
TaskQueryOptions(java.util.Comparator pSorter)
          Constructs a new TaskQueryOptions object with the given sorter.
TaskQueryOptions(java.lang.String pProcessName)
          Constructs a new TaskQueryOptions object with the given process name.
TaskQueryOptions(java.lang.String pProcessName, java.util.Comparator pSorter)
          Constructs a new TaskQueryOptions object with the given process name and sorter.
TaskQueryOptions(java.lang.String pProcessName, java.lang.String pSegmentName)
          Constructs a new TaskQueryOptions object with the given process name and segment name.
TaskQueryOptions(java.lang.String pProcessName, java.lang.String pSegmentName, java.util.Comparator pSorter)
          Constructs a new TaskQueryOptions object with the given process name, segment name, and sorter.
TaskQueryOptions(java.lang.String pProcessName, java.lang.String pSegmentName, java.lang.String pTaskElementId)
          Constructs a new TaskQueryOptions object with the given process name, segment name, and task element id.
TaskQueryOptions(java.lang.String pProcessName, java.lang.String pSegmentName, java.lang.String[] pTaskElementIds)
          Constructs a new TaskQueryOptions object with the given process name, segment name, and task element ids.
TaskQueryOptions(java.lang.String pProcessName, java.lang.String pSegmentName, java.lang.String[] pTaskElementIds, java.util.Comparator pSorter)
          Constructs a new TaskQueryOptions object with the given process name, segment name, task element ids, and sorter.
TaskQueryOptions(java.lang.String pProcessName, java.lang.String pSegmentName, java.lang.String pTaskElementId, java.util.Comparator pSorter)
          Constructs a new TaskQueryOptions object with the given process name, segment name, task element id, and sorter.
 
Method Summary
 java.lang.String getProcessName()
          Returns the name of the workflow process for which task information should be returned.
 java.lang.String getSegmentName()
          Returns the name of the workflow process segment for which task information should be returned.
 java.util.Comparator getSorter()
          Returns the Comparator to use when sorting tasks.
 java.lang.String[] getTaskElementIds()
          Returns the process element ids of the task elements in the workflow for which task information should be returned.
 void setProcessName(java.lang.String pProcessName)
          Sets the name of the workflow process for which task information should be returned.
 void setSegmentName(java.lang.String pSegmentName)
          Sets the name of the workflow process segment for which task information should be returned.
 void setSorter(java.util.Comparator pSorter)
          Sets the Comparator to use when sorting tasks.
 void setTaskElementIds(java.lang.String[] pTaskElementIds)
          Sets the process element ids of the task elements in the workflow for which task information should be returned.
 java.lang.String toString()
          Returns a String representation of this TaskQueryOptions object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

TaskQueryOptions

public TaskQueryOptions(java.util.Comparator pSorter)
Constructs a new TaskQueryOptions object with the given sorter.

Parameters:
pSorter - a Comparator to be used when sorting TaskInfos

TaskQueryOptions

public TaskQueryOptions(java.lang.String pProcessName)
Constructs a new TaskQueryOptions object with the given process name.

Parameters:
pProcessName - the name of the workflow process for which task information should be returned

TaskQueryOptions

public TaskQueryOptions(java.lang.String pProcessName,
                        java.util.Comparator pSorter)
Constructs a new TaskQueryOptions object with the given process name and sorter.

Parameters:
pProcessName - the name of the workflow process for which task information should be returned
pSorter - a Comparator to be used when sorting TaskInfos

TaskQueryOptions

public TaskQueryOptions(java.lang.String pProcessName,
                        java.lang.String pSegmentName)
Constructs a new TaskQueryOptions object with the given process name and segment name.

Parameters:
pProcessName - the name of the workflow process for which task information should be returned
pSegmentName - the name of the workflow process segment for which task information should be returned

TaskQueryOptions

public TaskQueryOptions(java.lang.String pProcessName,
                        java.lang.String pSegmentName,
                        java.util.Comparator pSorter)
Constructs a new TaskQueryOptions object with the given process name, segment name, and sorter.

Parameters:
pProcessName - the name of the workflow process for which task information should be returned
pSegmentName - the name of the workflow process segment for which task information should be returned
pSorter - a Comparator to be used when sorting TaskInfos

TaskQueryOptions

public TaskQueryOptions(java.lang.String pProcessName,
                        java.lang.String pSegmentName,
                        java.lang.String pTaskElementId)
Constructs a new TaskQueryOptions object with the given process name, segment name, and task element id.

Parameters:
pProcessName - the name of the workflow process for which task information should be returned
pSegmentName - the name of the workflow process segment for which task information should be returned
pTaskElementId - the process element id of the task element for which task information should be returned

TaskQueryOptions

public TaskQueryOptions(java.lang.String pProcessName,
                        java.lang.String pSegmentName,
                        java.lang.String pTaskElementId,
                        java.util.Comparator pSorter)
Constructs a new TaskQueryOptions object with the given process name, segment name, task element id, and sorter.

Parameters:
pProcessName - the name of the workflow process for which task information should be returned
pSegmentName - the name of the workflow process segment for which task information should be returned
pTaskElementId - the process element id of the task element for which task information should be returned
pSorter - a Comparator to be used when sorting TaskInfos

TaskQueryOptions

public TaskQueryOptions(java.lang.String pProcessName,
                        java.lang.String pSegmentName,
                        java.lang.String[] pTaskElementIds)
Constructs a new TaskQueryOptions object with the given process name, segment name, and task element ids.

Parameters:
pProcessName - the name of the workflow process for which task information should be returned
pSegmentName - the name of the workflow process segment for which task information should be returned
pTaskElementIds - the process element ids of the task elements for which task information should be returned

TaskQueryOptions

public TaskQueryOptions(java.lang.String pProcessName,
                        java.lang.String pSegmentName,
                        java.lang.String[] pTaskElementIds,
                        java.util.Comparator pSorter)
Constructs a new TaskQueryOptions object with the given process name, segment name, task element ids, and sorter.

Parameters:
pProcessName - the name of the workflow process for which task information should be returned
pSegmentName - the name of the workflow process segment for which task information should be returned
pTaskElementIds - the process element ids of the task elements for which task information should be returned
pSorter - a Comparator to be used when sorting TaskInfos
Method Detail

getProcessName

public java.lang.String getProcessName()
Returns the name of the workflow process for which task information should be returned. If null, information for tasks associated with all workflows will be returned.


setProcessName

public void setProcessName(java.lang.String pProcessName)
Sets the name of the workflow process for which task information should be returned.


getSegmentName

public java.lang.String getSegmentName()
Returns the name of the workflow process segment for which task information should be returned. This property only takes effect if the processName property is not null. If null, information for tasks associated with all segments of the specified workflow will be returned.


setSegmentName

public void setSegmentName(java.lang.String pSegmentName)
Sets the name of the workflow process segment for which task information should be returned.


getTaskElementIds

public java.lang.String[] getTaskElementIds()
Returns the process element ids of the task elements in the workflow for which task information should be returned. This property only takes effect if both the processName and segmentName properties are not null. If null, information for all tasks associated with the specified workflow segment will be returned.


setTaskElementIds

public void setTaskElementIds(java.lang.String[] pTaskElementIds)
Sets the process element ids of the task elements in the workflow for which task information should be returned.


getSorter

public java.util.Comparator getSorter()
Returns the Comparator to use when sorting tasks. If null, the tasks will be returned sorted first by the workflow process and segment names, then by their order of appearance in the workflow definition.


setSorter

public void setSorter(java.util.Comparator pSorter)
Sets the Comparator to use when sorting tasks. The Comparator's equals method must be implemented to compare two TaskInfo objects.

See Also:
TaskInfo

toString

public java.lang.String toString()
Returns a String representation of this TaskQueryOptions object.

Overrides:
toString in class java.lang.Object