|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.process.filter.Filter
public abstract class Filter
An abstract base class for all process filters.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static Filter |
FALSE
Filter which represents false |
static Filter |
TRUE
Filter which represents true |
Constructor Summary | |
---|---|
Filter()
Construct a new Filter. |
Method Summary | |
---|---|
static Filter |
andFilters(Filter[] pFilters)
Returns a filter which is obtained by ANDing the filters in the given array. |
static Filter |
andFilters(Filter pFilter1,
Filter pFilter2)
Returns a filter which is obtained by ANDing the two given filters. |
Filter |
assumeFalse(Filter pFalseFilter)
Assumes that the given filter evaluates to FALSE, and tries to simplify this filter. |
Filter |
assumeTrue(Filter pTrueFilter)
Assumes that the given filter evaluates to TRUE, and tries to simplify this filter. |
Query |
createProcessInstanceQuery(QueryBuilder pSubjectQueryBuilder,
QueryBuilder pProcessInstanceQueryBuilder)
Creates a repository query which can be used to find all the individual process instances that satisfy the filter. |
Query |
createSubjectQuery(QueryBuilder pSubjectQueryBuilder)
Creates a repository query which can be used to find all the subjects that satisfy the filter. |
protected abstract Filter |
evaluate(ProcessExecutionContext pContext)
Evaluates this filter in the given process execution context. |
protected static java.util.ResourceBundle |
getResourceBundle()
Returns our resource bundle. |
java.lang.String |
getSubjectType()
If this filter has subject-related conditions any of which assume a particular subject type, returns that type. |
int |
hashCode()
Returns the hash code. |
boolean |
implies(Filter pFilter)
Returns true if this filter implies the given filter - that is, if this filter evaluates to TRUE, the given filter must also evaluate to TRUE. |
boolean |
isCacheable()
Returns true if the result of evaluating this filter should be cached, false otherwise. |
Filter |
negate()
Returns a filter which is obtained by negating this filter. |
static Filter |
orFilters(Filter[] pFilters)
Returns a filter which is obtained by ORing the filters in the given array. |
static Filter |
orFilters(Filter pFilter1,
Filter pFilter2)
Returns a filter which is obtained by ORing the two given filters. |
void |
setCacheable(boolean pCacheable)
Sets the flag indicating whether the result of evaluating this filter should be cached. |
Filter |
test(ProcessExecutionContext pContext)
Calls evaluate on this filter, and returns one of
the following values:
Filter.TRUE - if evaluate returned
Filter.TRUE
Filter.FALSE - if evaluate returned
Filter.FALSE or null
this or another, simplified, Filter
- in all other cases
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public static final Filter TRUE
public static final Filter FALSE
Constructor Detail |
---|
public Filter()
Method Detail |
---|
protected static java.util.ResourceBundle getResourceBundle()
public boolean isCacheable()
public void setCacheable(boolean pCacheable)
protected abstract Filter evaluate(ProcessExecutionContext pContext) throws ProcessException
The possible return values of this method are as follows:
Filter.TRUE
- if the filter can be fully
evaluated, and is satisfied in the given context
Filter.FALSE
- if the filter can be fully
evaluated, and is not satisfied in the given context
this
or another, simplified, Filter
- if the filter cannot be fully evaluated because of the missing
information in the context
null
- if the filter cannot be evaluated because
of a null expression encountered during evaluation (e.g., filter
refers to a subject property which evaluates to null)
ProcessException
- if there is a problem evaluating the
filter (other than information missing from the context)public Filter test(ProcessExecutionContext pContext) throws ProcessException
evaluate
on this filter, and returns one of
the following values:
Filter.TRUE
- if evaluate
returned
Filter.TRUE
Filter.FALSE
- if evaluate
returned
Filter.FALSE
or null
this
or another, simplified, Filter
- in all other cases
In other words, this method is different from
evaluate
only in that null
values are
treated instead as Filter.FALSE
.
ProcessException
- if there is a problem evaluating the
filter (other than information missing from the context)public java.lang.String getSubjectType() throws ProcessException
The default implementation returns null.
ProcessException
- if there is a problem determining
the subject typepublic Query createSubjectQuery(QueryBuilder pSubjectQueryBuilder) throws RepositoryException, ProcessException
This method will only be called on filters which have already
been evaluated (by calling evaluate
). Thus, the
only subclasses which need to override this method are those
which have conditions that contribute to the repository query
(i.e., subject-related conditions). The default implementation
throws a ProcessException.
RepositoryException
- if there is a repository problem
constructing the query
ProcessException
- if there is any other problem
creating the querypublic Query createProcessInstanceQuery(QueryBuilder pSubjectQueryBuilder, QueryBuilder pProcessInstanceQueryBuilder) throws RepositoryException, ProcessException
This method will only be called on filters which have already
been evaluated (by calling evaluate
). Thus, the
only subclasses which need to override this method are those
which have conditions that contribute to the repository query
(i.e., subject- or process instance-related conditions). The
default implementation throws a ProcessException.
RepositoryException
- if there is a repository problem
constructing the query
ProcessException
- if there is any other problem
creating the querypublic static Filter andFilters(Filter pFilter1, Filter pFilter2)
public static Filter andFilters(Filter[] pFilters)
public static Filter orFilters(Filter pFilter1, Filter pFilter2)
public static Filter orFilters(Filter[] pFilters)
public Filter negate()
public Filter assumeTrue(Filter pTrueFilter)
public Filter assumeFalse(Filter pFalseFilter)
public boolean implies(Filter pFilter)
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |