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

java.lang.Object
  extended by org.eclipse.stardust.engine.api.query.ActivityFilter
All Implemented Interfaces:
Serializable, FilterCriterion

public class ActivityFilter
extends Object
implements FilterCriterion

Restricts the resulting items to the ones related to a specific activity. The search can be further restricted to certain models by passing in a collection of model oids.

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

Constructor Summary
ActivityFilter(String activityID)
          Deprecated. Use forAnyProcess(String) instead.
 
Method Summary
 Object accept(FilterEvaluationVisitor visitor, Object context)
          Visitor dispatch callback used for evaluating filter criteria.
static ActivityFilter forAnyProcess(String activityID)
          Creates a filter matching the activity identified by activityID.
static ActivityFilter forAnyProcess(String activityID, Collection modelOids)
          Creates a filter matching the activity identified by activityID and present in the given models modelOids.
static FilterCriterion forProcess(String activityID, String processID)
          Creates a filter matching the activity identified by activityID within scope of process definition identified by processID.
static FilterCriterion forProcess(String activityID, String processID, boolean includingSubProcesses)
          Creates a filter matching the activity identified by activityID within scope of process definition identified by processID.
static FilterCriterion forProcess(String activityID, String processID, Collection modelOids, boolean includingSubProcesses)
          Creates a filter matching the activity identified by activityID within scope of process definition identified by processID.
 String getActivityID()
          The ID of the activity to filter for.
 Collection getModelOids()
          Gets the model oids to which the search is restricted to.
 String getProcessID()
          The ID of the process definition to filter for.
 boolean isIncludingSubProcesses()
          State whether this filter will be applied to subprocesses as well.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivityFilter

public ActivityFilter(String activityID)
Deprecated. Use forAnyProcess(String) instead.

Creates a filter matching the activity identified by activityID.

Parameters:
activityID - The ID of the activity to filter for.
Method Detail

forAnyProcess

public static ActivityFilter forAnyProcess(String activityID)
Creates a filter matching the activity identified by activityID.

Parameters:
activityID - The ID of the activity to filter for.

forAnyProcess

public static ActivityFilter forAnyProcess(String activityID,
                                           Collection modelOids)
Creates a filter matching the activity identified by activityID and present in the given models modelOids.

Parameters:
activityID - The ID of the activity to filter for.
modelOids - The IDs of the models to restrict the search to.

forProcess

public static FilterCriterion forProcess(String activityID,
                                         String processID)
Creates a filter matching the activity identified by activityID within scope of process definition identified by processID. The created filter will include subprocesses.

Parameters:
activityID - The ID of the activity to filter for. When processID is set to null then activities are filtered for the whole model, otherwise for the given process definition.
processID - The ID of the process definition to filter for. Can be null.
See Also:
forProcess(String, String, Collection, boolean)

forProcess

public static FilterCriterion forProcess(String activityID,
                                         String processID,
                                         boolean includingSubProcesses)
Creates a filter matching the activity identified by activityID within scope of process definition identified by processID.

Parameters:
activityID - The ID of the activity to filter for. When processID is set to null then activities are filtered for the whole model, otherwise for the given process definition.
processID - The ID of the process definition to filter for. Can be null.
includingSubProcesses - Flag indicating if subprocesses should be included.

forProcess

public static FilterCriterion forProcess(String activityID,
                                         String processID,
                                         Collection modelOids,
                                         boolean includingSubProcesses)
Creates a filter matching the activity identified by activityID within scope of process definition identified by processID.

Parameters:
activityID - The ID of the activity to filter for. When processID is set to null then activities are filtered for the whole model, otherwise for the given process definition.
processID - The ID of the process definition to filter for. Can be null.
includingSubProcesses - Flag indicating if subprocesses should be included.

getActivityID

public String getActivityID()
The ID of the activity to filter for.

Returns:
The activity ID.

getProcessID

public String getProcessID()
The ID of the process definition to filter for.

Returns:
The process definition ID.

isIncludingSubProcesses

public boolean isIncludingSubProcesses()
State whether this filter will be applied to subprocesses as well.

Returns:
true when subprocesses shall be filtered as well, otherwise false.

accept

public Object accept(FilterEvaluationVisitor visitor,
                     Object context)
Visitor dispatch callback used for evaluating filter criteria. Usually implemented as return visitor.visit(this, context), thus calling the appropriately overloaded visitation method.

Specified by:
accept in interface FilterCriterion
Parameters:
visitor - The visitor performing the evaluation.
context - Information used by the visitor during the visitation process.
Returns:
Visitor specific result of the visitation.

getModelOids

public Collection getModelOids()
Gets the model oids to which the search is restricted to.

Returns:
unmodifiable collection of model oids to restrict the search to or an empty collection if there is no such restriction.


Copyright © 2017 Eclipse Stardust. All Rights Reserved.