|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.scenario.filter.Filter
public abstract class Filter
An abstract base class for all scenario filters.
Filter
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Deprecated. Class version string |
static Filter |
FALSE
Deprecated. Filter which represents false |
static Filter |
TRUE
Deprecated. Filter which represents true |
Constructor Summary | |
---|---|
Filter()
Deprecated. |
Method Summary | |
---|---|
static Filter |
andFilters(Filter[] pFilters)
Deprecated. Returns a filter which is obtained by ANDing the filters in the given array. |
static Filter |
andFilters(Filter pFilter1,
Filter pFilter2)
Deprecated. Returns a filter which is obtained by ANDing the two given filters. |
Filter |
assumeFalse(Filter pFalseFilter)
Deprecated. Assumes that the given filter evaluates to FALSE, and tries to simplify this filter. |
Filter |
assumeTrue(Filter pTrueFilter)
Deprecated. Assumes that the given filter evaluates to TRUE, and tries to simplify this filter. |
Query |
createProfileQuery(QueryBuilder pProfileQueryBuilder)
Deprecated. Creates a repository query which can be used to find all the profiles that satisfy the filter. |
Query |
createScenarioInstanceQuery(QueryBuilder pProfileQueryBuilder,
QueryBuilder pScenarioInstanceQueryBuilder)
Deprecated. Creates a repository query which can be used to find all the individual scenario instances that satisfy the filter. |
protected abstract Filter |
evaluate(ScenarioExecutionContext pContext)
Deprecated. Evaluates this filter in the given scenario execution context. |
java.lang.String |
getProfileType()
Deprecated. If this filter has profile-related conditions any of which assume a particular profile type, returns that type. |
boolean |
implies(Filter pFilter)
Deprecated. 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. |
Filter |
negate()
Deprecated. Returns a filter which is obtained by negating this filter. |
static Filter |
orFilters(Filter[] pFilters)
Deprecated. Returns a filter which is obtained by ORing the filters in the given array. |
static Filter |
orFilters(Filter pFilter1,
Filter pFilter2)
Deprecated. Returns a filter which is obtained by ORing the two given filters. |
Filter |
test(ScenarioExecutionContext pContext)
Deprecated. 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, hashCode, 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 abstract Filter evaluate(ScenarioExecutionContext pContext) throws ScenarioException
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 profile property which evaluates to null)
ScenarioException
- if there is a problem evaluating the
filter (other than information missing from the context)public Filter test(ScenarioExecutionContext pContext) throws ScenarioException
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
.
ScenarioException
- if there is a problem evaluating the
filter (other than information missing from the context)public java.lang.String getProfileType() throws ScenarioException
The default implementation returns null.
ScenarioException
- if there is a problem determining
the profile typepublic Query createProfileQuery(QueryBuilder pProfileQueryBuilder) throws RepositoryException, ScenarioException
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., profile-related conditions). The default implementation
throws a ScenarioException.
RepositoryException
- if there is a repository problem
constructing the query
ScenarioException
- if there is any other problem
creating the querypublic Query createScenarioInstanceQuery(QueryBuilder pProfileQueryBuilder, QueryBuilder pScenarioInstanceQueryBuilder) throws RepositoryException, ScenarioException
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., profile- or scenario instance-related conditions). The
default implementation throws a ScenarioException.
RepositoryException
- if there is a repository problem
constructing the query
ScenarioException
- 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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |