TaskSelector Class

com.bea.wli.worklist.api
TaskSelector Class

public final class TaskSelector

    extends Object
    implements Serializable

TaskSelector is used to select tasks based on specific properties.

A value for querying can be set against interested properties. If the value is not null, it will be used to filter tasks. Null values and empty arrays (applicable in case of String and String[]) will not be used for filtering.

If multiple querying conditions are specified, only the tasks fulfilling all the conditions will be selected. This selector also allows the results to be sorted in ascending or descending order.

To search for tasks without assignees, use an Assignee object without user or group. Note that if Assignee is part of sorting criteria, only tasks with assignees will be returned.

For sorting the results, use the setSortByXXX(short order) methods. The order parameter indicates the precedence of the sort criteria as well as sorting in descending order or ascending order.

A negative order parameter will result in descending sort order, while a positive parameter will result in ascending sort order.

The absolute value of the order parameter denotes the relative precedence of the sort criteria. A smaller absolute value indicates that the criteria be sorted first.

The following example illustrates the usage:

setSortByPriority((short)1);
setSortByTaskName((short)-2);

This means that the tasks will be sorted first by priority in ascending order, followed by sorting on task names in descending order. If the same order parameter is given to multiple criteria, the relative sort order among the criteria is not guaranteed. If the order parameter given is Short.MAX_VALUE, then the criteria will not take effect at all.

Some special criteria accept wildcard characters: % stands for any sequence of characters, _ stands for any single character.
You can escape these characters using \. i.e. %a_b\%%


Hierarchy
Object
  TaskSelector
All Implemented Interfaces

Serializable

Constructor Summary

TaskSelector()

Construct a new empty task selector.
TaskSelector(String taskIds, String taskName, boolean isNamePattern, String description, boolean isDescriptionPattern, String comment, boolean isCommentPattern, String owners, String claimants, Assignee assignee, Integer minPriority, Integer maxPriority, StateType stateTypes, String parentProcessUri, boolean isParentProcessUriPattern, String parentProcessIds, String listeningProcessUri, boolean isListeningProcessUriPattern, String listeningProcessIds, Date completionDueDateBefore, Date completionDueDateAfter, Date claimDueDateBefore, Date claimDueDateAfter, Date creationDateBefore, Date creationDateAfter, Boolean canBeReassigned, Boolean canBeReturned, Boolean canBeAborted, String propertyName, String propertyValue, boolean isPropertyValuePattern)

Construct a new task selector.
TaskSelector(String taskIds, String taskName, boolean isNamePattern, String description, boolean isDescriptionPattern, String comment, boolean isCommentPattern, String owners, String claimants, Assignee assignee, Integer minPriority, Integer maxPriority, StateType stateTypes, String parentProcessUri, boolean isParentProcessUriPattern, String parentProcessIds, String listeningProcessUri, boolean isListeningProcessUriPattern, String listeningProcessIds, Date completionDueDateBefore, Date completionDueDateAfter, Date claimDueDateBefore, Date claimDueDateAfter, Date creationDateBefore, Date creationDateAfter, Boolean canBeReassigned, Boolean canBeReturned, Boolean canBeAborted, String propertyNames, String propertyValues, boolean isPropertyValuePattern)

Construct a new task selector.
 

Method Summary

public void
addProperties(String[] propertyNames, String[] propertyValues, boolean[] isPatternFlags)
public void
addProperty(String propertyName, String propertyValue, boolean isPattern)
public Assignee
getAssignee()
public Boolean
getCanBeAborted()
public Boolean
getCanBeReassigned()
public Boolean
getCanBeReturned()
public String[]
getClaimants()
public Date
getClaimDueDateAfter()
public Date
getClaimDueDateBefore()
public String
getComment()
public Date
getCompletedDateAfter()
public Date
getCompletedDateBefore()
public Date
getCompletionDueDateAfter()
public Date
getCompletionDueDateBefore()
public Date
getCreationDateAfter()
public Date
getCreationDateBefore()
public String
getDescription()
public String[]
getListeningProcessIds()
public String
getListeningProcessUri()
public Integer
getMaxPriority()
public int
getMaxTasksReturned()
public Integer
getMinPriority()
public String[]
getOwners()
public String[]
getParentProcessIds()
public String
getParentProcessUri()
public String
getPropertyName()
public String[]
getPropertyNames()
public String
getPropertyValue()
public String
getPropertyValue(String propertyName)
Get the property value for the given property.
public short
getSortByAssignee()
public short
getSortByCanBeAborted()
public short
getSortByCanBeReassigned()
public short
getSortByCanBeReturned()
public short
getSortByClaimant()
public short
getSortByClaimDueDate()
public short
getSortByComment()
public short
getSortByCompletedDate()
public short
getSortByCompletionDueDate()
public short
getSortByCreationDate()
public short
getSortByDescription()
public short
getSortByListeningProcessId()
public short
getSortByListeningProcessUri()
public short
getSortByOwner()
public short
getSortByParentProcessId()
public short
getSortByParentProcessUri()
public short
getSortByPriority()
public short
getSortByPropertyValue()
public short
getSortByStateType()
public short
getSortByTaskId()
public short
getSortByTaskName()
public StateType[]
getStateTypes()
public String[]
getTaskIds()
public String
getTaskName()
public boolean
isCommentPattern()
public boolean
isDescriptionPattern()
public boolean
isListeningProcessUriPattern()
public boolean
isParentProcessUriPattern()
public boolean
isPropertyValuePattern()
public boolean
isPropertyValuePattern(String propertyName)
To check if the property value is a pattern.
public boolean
isTaskNamePattern()
public void
setAssignee(Assignee assignee)
To search for tasks without assignees, use an Assignee object without user or group.
public void
setCanBeAborted(Boolean canBeAborted)
public void
setCanBeReassigned(Boolean canBeReassigned)
public void
setCanBeReturned(Boolean canBeReturned)
public void
setClaimants(String[] claimants)
public void
setClaimDueDateAfter(Date claimDueDateAfter)
public void
setClaimDueDateBefore(Date claimDueDateBefore)
public void
setComment(String comment, boolean isPattern)
public void
setCompletedDateAfter(Date completedDateAfter)
public void
setCompletedDateBefore(Date completedDateBefore)
public void
setCompletionDueDateAfter(Date completionDueDateAfter)
public void
setCompletionDueDateBefore(Date completionDueDateBefore)
public void
setCreationDateAfter(Date creationDateAfter)
public void
setCreationDateBefore(Date creationDateBefore)
public void
setDescription(String description, boolean isPattern)
public void
setListeningProcessIds(String[] listeningProcessIds)
public void
setListeningProcessUri(String listeningProcessUri, boolean isPattern)
public void
setMaxPriority(Integer maxPriority)
public void
setMaxTasksReturned(int count)
public void
setMinPriority(Integer minPriority)
public void
setOwners(String[] owners)
public void
setParentProcessIds(String[] parentProcessIds)
public void
setParentProcessUri(String parentProcessUri, boolean isPattern)
public void
setPropertyName(String propertyName)
public void
setPropertyNames(String[] propertyNames)
public void
setPropertyValue(String propertyName, String propertyValue, boolean isPattern)
Set the property to the new value.
public void
setPropertyValue(String propertyValue, boolean isPattern)
Set the property to the new value.
public void
setSortByAssignee(short order)
If Assignee is part of sorting criteria, only tasks with assignees will be returned.
public void
setSortByCanBeAborted(short order)
public void
setSortByCanBeReassigned(short order)
public void
setSortByCanBeReturned(short order)
public void
setSortByClaimant(short order)
public void
setSortByClaimDueDate(short order)
public void
setSortByComment(short order)
public void
setSortByCompletedDate(short order)
public void
setSortByCompletionDueDate(short order)
public void
setSortByCreationDate(short order)
public void
setSortByDescription(short order)
public void
setSortByListeningProcessId(short order)
public void
setSortByListeningProcessUri(short order)
public void
setSortByOwner(short order)
public void
setSortByParentProcessId(short order)
public void
setSortByParentProcessUri(short order)
public void
setSortByPriority(short order)
public void
setSortByPropertyValue(short order)
public void
setSortByStateType(short order)
public void
setSortByTaskId(short order)
public void
setSortByTaskName(short order)
public void
setStateTypes(StateType[] stateTypes)
For querying tasks at different states, use the static constants in the StateType class instead of using the constructor.
public void
setTaskIds(String[] taskIds)
public void
setTaskName(String taskName, boolean isPattern)
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   

Constructor Detail

TaskSelector

public TaskSelector()
Construct a new empty task selector. If an empty task selector is passed to the worklist manager, it will return all the tasks in the database with no sorting applied.

TaskSelector

public TaskSelector(String[] taskIds, 
                    String taskName, 
                    boolean isNamePattern, 
                    String description, 
                    boolean isDescriptionPattern, 
                    String comment, 
                    boolean isCommentPattern, 
                    String[] owners, 
                    String[] claimants, 
                    Assignee assignee, 
                    Integer minPriority, 
                    Integer maxPriority, 
                    StateType[] stateTypes, 
                    String parentProcessUri, 
                    boolean isParentProcessUriPattern, 
                    String[] parentProcessIds, 
                    String listeningProcessUri, 
                    boolean isListeningProcessUriPattern, 
                    String[] listeningProcessIds, 
                    Date completionDueDateBefore, 
                    Date completionDueDateAfter, 
                    Date claimDueDateBefore, 
                    Date claimDueDateAfter, 
                    Date creationDateBefore, 
                    Date creationDateAfter, 
                    Boolean canBeReassigned, 
                    Boolean canBeReturned, 
                    Boolean canBeAborted, 
                    String propertyName, 
                    String propertyValue, 
                    boolean isPropertyValuePattern)
Construct a new task selector. It allows only one property value to be set.

TaskSelector

public TaskSelector(String[] taskIds, 
                    String taskName, 
                    boolean isNamePattern, 
                    String description, 
                    boolean isDescriptionPattern, 
                    String comment, 
                    boolean isCommentPattern, 
                    String[] owners, 
                    String[] claimants, 
                    Assignee assignee, 
                    Integer minPriority, 
                    Integer maxPriority, 
                    StateType[] stateTypes, 
                    String parentProcessUri, 
                    boolean isParentProcessUriPattern, 
                    String[] parentProcessIds, 
                    String listeningProcessUri, 
                    boolean isListeningProcessUriPattern, 
                    String[] listeningProcessIds, 
                    Date completionDueDateBefore, 
                    Date completionDueDateAfter, 
                    Date claimDueDateBefore, 
                    Date claimDueDateAfter, 
                    Date creationDateBefore, 
                    Date creationDateAfter, 
                    Boolean canBeReassigned, 
                    Boolean canBeReturned, 
                    Boolean canBeAborted, 
                    String[] propertyNames, 
                    String[] propertyValues, 
                    boolean[] isPropertyValuePattern)
Construct a new task selector. It allows multiple property values to be set.
 

Method Detail

addProperties(String[], String[], boolean[]) Method

public void addProperties(String[] propertyNames, 
                          String[] propertyValues, 
                          boolean[] isPatternFlags)

addProperty(String, String, boolean) Method

public void addProperty(String propertyName, 
                        String propertyValue, 
                        boolean isPattern)

getAssignee() Method

public Assignee getAssignee()

getCanBeAborted() Method

public Boolean getCanBeAborted()

getCanBeReassigned() Method

public Boolean getCanBeReassigned()

getCanBeReturned() Method

public Boolean getCanBeReturned()

getClaimants() Method

public String[] getClaimants()

getClaimDueDateAfter() Method

public Date getClaimDueDateAfter()

getClaimDueDateBefore() Method

public Date getClaimDueDateBefore()

getComment() Method

public String getComment()

getCompletedDateAfter() Method

public Date getCompletedDateAfter()

getCompletedDateBefore() Method

public Date getCompletedDateBefore()

getCompletionDueDateAfter() Method

public Date getCompletionDueDateAfter()

getCompletionDueDateBefore() Method

public Date getCompletionDueDateBefore()

getCreationDateAfter() Method

public Date getCreationDateAfter()

getCreationDateBefore() Method

public Date getCreationDateBefore()

getDescription() Method

public String getDescription()

getListeningProcessIds() Method

public String[] getListeningProcessIds()

getListeningProcessUri() Method

public String getListeningProcessUri()

getMaxPriority() Method

public Integer getMaxPriority()

getMaxTasksReturned() Method

public int getMaxTasksReturned()

getMinPriority() Method

public Integer getMinPriority()

getOwners() Method

public String[] getOwners()

getParentProcessIds() Method

public String[] getParentProcessIds()

getParentProcessUri() Method

public String getParentProcessUri()

getPropertyName() Method

DEPRECATED Use com.bea.wli.worklist.api.TaskSelector.getPropertyNames() instead.

public String getPropertyName()

Returns

A single property name.

Related Topics

TaskSelector.getPropertyNames()


getPropertyNames() Method

public String[] getPropertyNames()

Returns

An array of property names that have been set or null if none have been set.

getPropertyValue() Method

DEPRECATED Use com.bea.wli.worklist.api.TaskSelector.getPropertyValue(java.lang.String)

public String getPropertyValue()

Returns

property value

Related Topics

TaskSelector.getPropertyValue(String)


getPropertyValue(String) Method

public String getPropertyValue(String propertyName)
Get the property value for the given property. It throws IllegalArgumentException if the property name has not previously been set.

Returns

propertyValue

getSortByAssignee() Method

public short getSortByAssignee()

getSortByCanBeAborted() Method

public short getSortByCanBeAborted()

getSortByCanBeReassigned() Method

public short getSortByCanBeReassigned()

getSortByCanBeReturned() Method

public short getSortByCanBeReturned()

getSortByClaimant() Method

public short getSortByClaimant()

getSortByClaimDueDate() Method

public short getSortByClaimDueDate()

getSortByComment() Method

public short getSortByComment()

getSortByCompletedDate() Method

public short getSortByCompletedDate()

getSortByCompletionDueDate() Method

public short getSortByCompletionDueDate()

getSortByCreationDate() Method

public short getSortByCreationDate()

getSortByDescription() Method

public short getSortByDescription()

getSortByListeningProcessId() Method

public short getSortByListeningProcessId()

getSortByListeningProcessUri() Method

public short getSortByListeningProcessUri()

getSortByOwner() Method

public short getSortByOwner()

getSortByParentProcessId() Method

public short getSortByParentProcessId()

getSortByParentProcessUri() Method

public short getSortByParentProcessUri()

getSortByPriority() Method

public short getSortByPriority()

getSortByPropertyValue() Method

public short getSortByPropertyValue()

getSortByStateType() Method

public short getSortByStateType()

getSortByTaskId() Method

public short getSortByTaskId()

getSortByTaskName() Method

public short getSortByTaskName()

getStateTypes() Method

public StateType[] getStateTypes()

getTaskIds() Method

public String[] getTaskIds()

getTaskName() Method

public String getTaskName()

isCommentPattern() Method

public boolean isCommentPattern()

isDescriptionPattern() Method

public boolean isDescriptionPattern()

isListeningProcessUriPattern() Method

public boolean isListeningProcessUriPattern()

isParentProcessUriPattern() Method

public boolean isParentProcessUriPattern()

isPropertyValuePattern() Method

DEPRECATED Use com.bea.wli.worklist.api.TaskSelector.isPropertyValuePattern(java.lang.String)

public boolean isPropertyValuePattern()

Related Topics

TaskSelector.isPropertyValuePattern(String)


isPropertyValuePattern(String) Method

public boolean isPropertyValuePattern(String propertyName)
To check if the property value is a pattern. It throws IllegalArgumentException if the property name has not previously been set.


isTaskNamePattern() Method

public boolean isTaskNamePattern()

setAssignee(Assignee) Method

public void setAssignee(Assignee assignee)
To search for tasks without assignees, use an Assignee object without user or group. Note that if Assignee is part of sorting criteria, only tasks with assignees will be returned.


setCanBeAborted(Boolean) Method

public void setCanBeAborted(Boolean canBeAborted)

setCanBeReassigned(Boolean) Method

public void setCanBeReassigned(Boolean canBeReassigned)

setCanBeReturned(Boolean) Method

public void setCanBeReturned(Boolean canBeReturned)

setClaimants(String[]) Method

public void setClaimants(String[] claimants)

setClaimDueDateAfter(Date) Method

public void setClaimDueDateAfter(Date claimDueDateAfter)

setClaimDueDateBefore(Date) Method

public void setClaimDueDateBefore(Date claimDueDateBefore)

setComment(String, boolean) Method

public void setComment(String comment, 
                       boolean isPattern)

setCompletedDateAfter(Date) Method

public void setCompletedDateAfter(Date completedDateAfter)

setCompletedDateBefore(Date) Method

public void setCompletedDateBefore(Date completedDateBefore)

setCompletionDueDateAfter(Date) Method

public void setCompletionDueDateAfter(Date completionDueDateAfter)

setCompletionDueDateBefore(Date) Method

public void setCompletionDueDateBefore(Date completionDueDateBefore)

setCreationDateAfter(Date) Method

public void setCreationDateAfter(Date creationDateAfter)

setCreationDateBefore(Date) Method

public void setCreationDateBefore(Date creationDateBefore)

setDescription(String, boolean) Method

public void setDescription(String description, 
                           boolean isPattern)

setListeningProcessIds(String[]) Method

public void setListeningProcessIds(String[] listeningProcessIds)

setListeningProcessUri(String, boolean) Method

public void setListeningProcessUri(String listeningProcessUri, 
                                   boolean isPattern)

setMaxPriority(Integer) Method

public void setMaxPriority(Integer maxPriority)

setMaxTasksReturned(int) Method

public void setMaxTasksReturned(int count)

setMinPriority(Integer) Method

public void setMinPriority(Integer minPriority)

setOwners(String[]) Method

public void setOwners(String[] owners)

setParentProcessIds(String[]) Method

public void setParentProcessIds(String[] parentProcessIds)

setParentProcessUri(String, boolean) Method

public void setParentProcessUri(String parentProcessUri, 
                                boolean isPattern)

setPropertyName(String) Method

public void setPropertyName(String propertyName)

setPropertyNames(String[]) Method

public void setPropertyNames(String[] propertyNames)

setPropertyValue(String, String, boolean) Method

public void setPropertyValue(String propertyName, 
                             String propertyValue, 
                             boolean isPattern)
Set the property to the new value. It throws IllegalArgumentException if no property name has previously been set.


setPropertyValue(String, boolean) Method

DEPRECATED Use com.bea.wli.worklist.api.TaskSelector.setPropertyValue(java.lang.String, java.lang.String, boolean)

public void setPropertyValue(String propertyValue, 
                             boolean isPattern)
Set the property to the new value. It throws IllegalArgumentException if the property name has not previously been set.

Related Topics

TaskSelector.setPropertyValue(String, String, boolean)


setSortByAssignee(short) Method

public void setSortByAssignee(short order)
If Assignee is part of sorting criteria, only tasks with assignees will be returned.


setSortByCanBeAborted(short) Method

public void setSortByCanBeAborted(short order)

setSortByCanBeReassigned(short) Method

public void setSortByCanBeReassigned(short order)

setSortByCanBeReturned(short) Method

public void setSortByCanBeReturned(short order)

setSortByClaimant(short) Method

public void setSortByClaimant(short order)

setSortByClaimDueDate(short) Method

public void setSortByClaimDueDate(short order)

setSortByComment(short) Method

public void setSortByComment(short order)

setSortByCompletedDate(short) Method

public void setSortByCompletedDate(short order)

setSortByCompletionDueDate(short) Method

public void setSortByCompletionDueDate(short order)

setSortByCreationDate(short) Method

public void setSortByCreationDate(short order)

setSortByDescription(short) Method

public void setSortByDescription(short order)

setSortByListeningProcessId(short) Method

public void setSortByListeningProcessId(short order)

setSortByListeningProcessUri(short) Method

public void setSortByListeningProcessUri(short order)

setSortByOwner(short) Method

public void setSortByOwner(short order)

setSortByParentProcessId(short) Method

public void setSortByParentProcessId(short order)

setSortByParentProcessUri(short) Method

public void setSortByParentProcessUri(short order)

setSortByPriority(short) Method

public void setSortByPriority(short order)

setSortByPropertyValue(short) Method

public void setSortByPropertyValue(short order)

setSortByStateType(short) Method

public void setSortByStateType(short order)

setSortByTaskId(short) Method

public void setSortByTaskId(short order)

setSortByTaskName(short) Method

public void setSortByTaskName(short order)

setStateTypes(StateType[]) Method

public void setStateTypes(StateType[] stateTypes)
For querying tasks at different states, use the static constants in the StateType class instead of using the constructor.

Parameters

stateTypes
an array of state types

setTaskIds(String[]) Method

public void setTaskIds(String[] taskIds)

setTaskName(String, boolean) Method

public void setTaskName(String taskName, 
                        boolean isPattern)