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

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

public final class ActivityStateFilter
extends Object
implements FilterCriterion

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

Field Summary
static ActivityStateFilter ALIVE
          Predefined filter matching activity instance being in states other than ActivityInstanceState.Aborted and ActivityInstanceState.Completed.
static ActivityStateFilter COMPLETED
          Predefined filter matching activity instance being in state ActivityInstanceState.Completed.
static ActivityStateFilter PENDING
          Predefined filter matching activity instance being in states ActivityInstanceState.Application, ActivityInstanceState.Interrupted, ActivityInstanceState.Suspended or ActivityInstanceState.Hibernated.
 
Constructor Summary
ActivityStateFilter(ActivityInstanceState state)
          Initializes a filter matching activity instances being in the given state.
ActivityStateFilter(ActivityInstanceState[] state)
          Initializes a filter matching activity instances being in one of the given states.
ActivityStateFilter(boolean inclusive, ActivityInstanceState state)
          Initializes a filter matching activity instances either being or not in the given state.
ActivityStateFilter(boolean inclusive, ActivityInstanceState[] state)
          Initializes a filter matching activity instances either being or not in one of the given states.
 
Method Summary
 Object accept(FilterEvaluationVisitor visitor, Object context)
          Visitor dispatch callback used for evaluating filter criteria.
 ActivityInstanceState[] getStates()
          Returns the states the filter is defined to use for matching.
 boolean isInclusive()
          Indicates if filter's state(s) are to be considered inclusive or exclusive.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALIVE

public static final ActivityStateFilter ALIVE
Predefined filter matching activity instance being in states other than ActivityInstanceState.Aborted and ActivityInstanceState.Completed.

See Also:
ActivityInstanceState.Aborted, ActivityInstanceState.Completed

PENDING

public static final ActivityStateFilter PENDING
Predefined filter matching activity instance being in states ActivityInstanceState.Application, ActivityInstanceState.Interrupted, ActivityInstanceState.Suspended or ActivityInstanceState.Hibernated.

See Also:
ActivityInstanceState.Application, ActivityInstanceState.Interrupted, ActivityInstanceState.Suspended, ActivityInstanceState.Hibernated

COMPLETED

public static final ActivityStateFilter COMPLETED
Predefined filter matching activity instance being in state ActivityInstanceState.Completed.

See Also:
ActivityInstanceState.Completed
Constructor Detail

ActivityStateFilter

public ActivityStateFilter(ActivityInstanceState state)
Initializes a filter matching activity instances being in the given state.

Parameters:
state - The state matching activity instance have to be in.
See Also:
ActivityStateFilter(boolean, ActivityInstanceState), ActivityStateFilter(ActivityInstanceState[])

ActivityStateFilter

public ActivityStateFilter(boolean inclusive,
                           ActivityInstanceState state)
Initializes a filter matching activity instances either being or not in the given state.

Parameters:
inclusive - Flag indicating if the state is considered to be inclusive or exclusive.
state - The state matching activity instance have to be in.
See Also:
ActivityStateFilter(ActivityInstanceState)

ActivityStateFilter

public ActivityStateFilter(ActivityInstanceState[] state)
Initializes a filter matching activity instances being in one of the given states.

Parameters:
state - The list of states matching activity instance have to be in.
See Also:
ActivityStateFilter(boolean, ActivityInstanceState[]), ActivityStateFilter(ActivityInstanceState)

ActivityStateFilter

public ActivityStateFilter(boolean inclusive,
                           ActivityInstanceState[] state)
Initializes a filter matching activity instances either being or not in one of the given states.

Parameters:
inclusive - Flag indicating if the state list is considered to be inclusive or exclusive.
state - The list of states matching activity instance have to be in or not.
See Also:
ActivityStateFilter(ActivityInstanceState[])
Method Detail

isInclusive

public boolean isInclusive()
Indicates if filter's state(s) are to be considered inclusive or exclusive.

Returns:
true if the filter matches activity instances being in the filter's state(s), false if the filter matches activity instances not being in the filter's state(s).
See Also:
getStates()

getStates

public ActivityInstanceState[] getStates()
Returns the states the filter is defined to use for matching.

Returns:
The list of states the filter uses for activity instance matching.
See Also:
isInclusive()

accept

public Object accept(FilterEvaluationVisitor visitor,
                     Object context)
Description copied from interface: FilterCriterion
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.


Copyright © 2017 Eclipse Stardust. All Rights Reserved.