org.eclipse.stardust.engine.api.query
Class WorklistQuery

java.lang.Object
  extended by org.eclipse.stardust.engine.api.query.Query
      extended by org.eclipse.stardust.engine.api.query.WorklistQuery
All Implemented Interfaces:
Serializable

public class WorklistQuery
extends Query

Query for retrieving (parts of) a user's worklist.

The retrieved worklist possibly includes contributions from:

Valid filter criteria, applying to items from all contributing worklists, are:

Version:
$Revision$
Author:
rsauer
See Also:
ActivityInstanceQuery, Serialized Form

Nested Class Summary
static class WorklistQuery.Attribute
          Worklist item attribute supporting filter operations.
static class WorklistQuery.ParticipantContribution
          Class describing participant worklist contributions.
static class WorklistQuery.UserContribution
          Class describing the user's private worklist contribution.
 
Field Summary
static WorklistQuery.Attribute ACTIVITY_INSTANCE_CRITICALITY
          The criticality of the activity instance work item.
static WorklistQuery.Attribute ACTIVITY_INSTANCE_OID
          The OID of the activity instance the worklist item represents.
static WorklistQuery.Attribute ACTIVITY_OID
          The OID of the activity the worklist item is an instance of.
static WorklistQuery.Attribute LAST_MODIFICATION_TIME
          The timestamp when the activity instance was last modified.
static WorklistQuery.Attribute PROCESS_INSTANCE_OID
          The OID of the process instance the worklist item belongs to.
static FilterableAttribute PROCESS_INSTANCE_PRIORITY
          The priority of the process instance the activity instance belongs to.
static WorklistQuery.Attribute START_TIME
          The timestamp when the activity instance was created.
 
Constructor Summary
WorklistQuery()
          Initializes a new WorklistQuery to retrieve the user's private worklist.
 
Method Summary
 Object evaluateFilter(FilterEvaluationVisitor visitor, Object context)
          Template method used for query evaluation.
static WorklistQuery findCompleteWorklist()
          Creates a query for retrieving all items from the user's private worklist plus all items from role and organization worklists the user belongs to directly or indirectly via the participant hierarchy.
static WorklistQuery findPrivateWorklist()
          Prepares a query for retrieving all items from the user's private worklist.
static WorklistQuery findPrivateWorklist(int maxSize)
          Creates a query for retrieving up to maxSize items from the user's private worklist.
 Collection<? extends WorklistQuery.ParticipantContribution> getModelParticipantContributions()
           
 WorklistQuery.UserContribution getUserContribution()
          Gets the currently configured contribution of the user's private worklist to the retrieved result.
 Collection<? extends WorklistQuery.ParticipantContribution> getUserGroupContributions()
           
 void setParticipantContribution(PerformingParticipantFilter filter)
          Configures the worklist(s) resulting from the given participant filter to be included in the result.
 void setParticipantContribution(PerformingParticipantFilter filter, SubsetPolicy subset)
          Configures the worklist(s) resulting from the given participant filter to be included in the result, restricting the size of these worklist according to the given
 void setUserContribution(boolean included)
          Configures the user's private worklist to be either included or ommitted from the result.
 void setUserContribution(SubsetPolicy subset)
          Configures the user's private worklist to be partially included in the result.
 
Methods inherited from class org.eclipse.stardust.engine.api.query.Query
getFilter, getOrderCriteria, getPolicy, orderBy, orderBy, orderBy, removePolicy, setPolicy, toString, where
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

START_TIME

public static final WorklistQuery.Attribute START_TIME
The timestamp when the activity instance was created.


LAST_MODIFICATION_TIME

public static final WorklistQuery.Attribute LAST_MODIFICATION_TIME
The timestamp when the activity instance was last modified.


ACTIVITY_OID

public static final WorklistQuery.Attribute ACTIVITY_OID
The OID of the activity the worklist item is an instance of.


ACTIVITY_INSTANCE_OID

public static final WorklistQuery.Attribute ACTIVITY_INSTANCE_OID
The OID of the activity instance the worklist item represents.


PROCESS_INSTANCE_OID

public static final WorklistQuery.Attribute PROCESS_INSTANCE_OID
The OID of the process instance the worklist item belongs to.


ACTIVITY_INSTANCE_CRITICALITY

public static final WorklistQuery.Attribute ACTIVITY_INSTANCE_CRITICALITY
The criticality of the activity instance work item.


PROCESS_INSTANCE_PRIORITY

public static final FilterableAttribute PROCESS_INSTANCE_PRIORITY
The priority of the process instance the activity instance belongs to.

See Also:
ProcessInstanceBean.getPriority()
Constructor Detail

WorklistQuery

public WorklistQuery()
Initializes a new WorklistQuery to retrieve the user's private worklist.

Method Detail

findPrivateWorklist

public static WorklistQuery findPrivateWorklist()
Prepares a query for retrieving all items from the user's private worklist.

Returns:
The readily configured query.
See Also:
findPrivateWorklist(int), findCompleteWorklist()

findPrivateWorklist

public static WorklistQuery findPrivateWorklist(int maxSize)
Creates a query for retrieving up to maxSize items from the user's private worklist.

Parameters:
maxSize - The maximum number of items to retrieve.
Returns:
The readily configured query.
See Also:
findPrivateWorklist(), findCompleteWorklist()

findCompleteWorklist

public static WorklistQuery findCompleteWorklist()
Creates a query for retrieving all items from the user's private worklist plus all items from role and organization worklists the user belongs to directly or indirectly via the participant hierarchy.

Returns:
The readily configured worklist.
See Also:
findPrivateWorklist(), PerformingParticipantFilter.ANY_FOR_USER

getUserContribution

public WorklistQuery.UserContribution getUserContribution()
Gets the currently configured contribution of the user's private worklist to the retrieved result.

Returns:
The current settings for the user's private worklist contribution.
See Also:
setUserContribution(boolean)

setUserContribution

public void setUserContribution(boolean included)
Configures the user's private worklist to be either included or ommitted from the result.

The size of the private worklist contribution will be restricted by the SubsetPolicy set via Query.setPolicy(EvaluationPolicy), if existing.

Parameters:
included - Flag indicating if the user's private worklist will be included in the result.
See Also:
setUserContribution(SubsetPolicy), setParticipantContribution(PerformingParticipantFilter)

setUserContribution

public void setUserContribution(SubsetPolicy subset)
Configures the user's private worklist to be partially included in the result.

Parameters:
subset - The specification of the subset of the user's private worklist to be included in the result.
See Also:
setUserContribution(boolean), setParticipantContribution(PerformingParticipantFilter, SubsetPolicy)

getUserGroupContributions

public Collection<? extends WorklistQuery.ParticipantContribution> getUserGroupContributions()

getModelParticipantContributions

public Collection<? extends WorklistQuery.ParticipantContribution> getModelParticipantContributions()

setParticipantContribution

public void setParticipantContribution(PerformingParticipantFilter filter)
Configures the worklist(s) resulting from the given participant filter to be included in the result.

The size of all these worklist contributions will be restricted by the SubsetPolicy set via Query.setPolicy(EvaluationPolicy), if existing.

Parameters:
filter - The filter used to specify the participants contributing their worklists to the result.

setParticipantContribution

public void setParticipantContribution(PerformingParticipantFilter filter,
                                       SubsetPolicy subset)
Configures the worklist(s) resulting from the given participant filter to be included in the result, restricting the size of these worklist according to the given

subset

.

Parameters:
filter - The filter used to determine the participants contributing their worklists to the result.
subset - The specification of the subset of each participant's worklist to be included in the result.

evaluateFilter

public Object evaluateFilter(FilterEvaluationVisitor visitor,
                             Object context)
Description copied from class: Query
Template method used for query evaluation. The most simple implementation just delegates to getFilter().accept(visitor, context).

Can be overwritten to manipulate the tree of filter criteria before evaluation.

Parameters:
visitor - The visitor used for filter evaluation.


Copyright © 2017 Eclipse Stardust. All Rights Reserved.