atg.process.filter
Class ExpressionFilter

java.lang.Object
  extended by atg.process.filter.Filter
      extended by atg.process.filter.ExpressionFilter
Direct Known Subclasses:
MarkerExpressionFilter, PercentageComparisonFilter

public abstract class ExpressionFilter
extends Filter

A filter which is satisfied if applying its operator to its operands (which are Expression objects) yields true.

See Also:
Expression

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.process.filter.Filter
FALSE, TRUE
 
Constructor Summary
ExpressionFilter()
           
 
Method Summary
 void configure(java.lang.String pOperator, java.lang.Object pConfiguration)
          Configures this ExpressionFilter using the given configuration object.
 boolean equals(java.lang.Object pObject)
          Returns true if the given object is an ExpressionFilter with the same operator and operands.
 Expression[] getOperands()
          Returns the operands.
 java.lang.String getOperator()
          Returns the operator.
 void initialize(java.lang.String pOperator, Expression[] pOperands)
          Initializes this ExpressionFilter, given its operator and operands.
protected  boolean operandsEquals(ExpressionFilter pFilter)
          Returns true if the given ExpressionFilter has the same operands as this ExpressionFilter.
 void setOperands(Expression[] pOperands)
          Sets the operands.
 void setOperator(java.lang.String pOperator)
          Sets the operator.
 java.lang.String toString()
          Returns the String representation of the filter.
 
Methods inherited from class atg.process.filter.Filter
andFilters, andFilters, assumeFalse, assumeTrue, createProcessInstanceQuery, createSubjectQuery, evaluate, getResourceBundle, getSubjectType, hashCode, implies, isCacheable, negate, orFilters, orFilters, setCacheable, test
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

ExpressionFilter

public ExpressionFilter()
Method Detail

getOperator

public java.lang.String getOperator()
Returns the operator.


setOperator

public void setOperator(java.lang.String pOperator)
Sets the operator.


getOperands

public Expression[] getOperands()
Returns the operands.


setOperands

public void setOperands(Expression[] pOperands)
Sets the operands.


configure

public void configure(java.lang.String pOperator,
                      java.lang.Object pConfiguration)
               throws ProcessException,
                      java.lang.UnsupportedOperationException
Configures this ExpressionFilter using the given configuration object. The configuration object is typically a global Nucleus component which is configured with the information necessary for the filter's operation.

This operation is optional. This default implementation throws an UnsupportedOperationException.

Throws:
ProcessException - if the filter could not be configured - for example, because some of the required properties are missing from the configuration
java.lang.UnsupportedOperationException - if this filter is not configurable

initialize

public void initialize(java.lang.String pOperator,
                       Expression[] pOperands)
                throws ProcessException
Initializes this ExpressionFilter, given its operator and operands. The default implementation of this method simply sets the operator and operands properties. Subclasses may want to override this method to do any other initialization. For example, a subclass may want to impose restrictions on the number and/or type of operands for a given operator, etc.

Throws:
ProcessException - if the filter could not be initialized

equals

public boolean equals(java.lang.Object pObject)
Returns true if the given object is an ExpressionFilter with the same operator and operands.

Overrides:
equals in class java.lang.Object

operandsEquals

protected boolean operandsEquals(ExpressionFilter pFilter)
Returns true if the given ExpressionFilter has the same operands as this ExpressionFilter.


toString

public java.lang.String toString()
Returns the String representation of the filter.

Overrides:
toString in class java.lang.Object