atg.markers.scenario
Class MarkerExpressionFilter

java.lang.Object
  extended by atg.process.filter.Filter
      extended by atg.process.filter.ExpressionFilter
          extended by atg.markers.scenario.MarkerExpressionFilter
All Implemented Interfaces:
MarkerConstants
Direct Known Subclasses:
BusinessProcessExpressionFilter, ItemHasMarker, OrderHasMarker

public abstract class MarkerExpressionFilter
extends ExpressionFilter
implements MarkerConstants

This abstract class can be implemented to create a marker expression filter.

This class provides access to a configuration component of type MarkerConfiguration.

Accessor methods are provided to return the configurable property values from the configuration component. By default, each of the accessor methods returns the configured value from the MarkerConfiguration componenent. However these methods can be extended to return dynamic values.

See Also:
configure(java.lang.String, java.lang.Object), getDuplicationMode(atg.process.ProcessExecutionContext), getExtendedProperties(atg.process.ProcessExecutionContext), getMarkedItemType(atg.process.ProcessExecutionContext), getMarkerItemType(atg.process.ProcessExecutionContext), getMarkerPropertyName(atg.process.ProcessExecutionContext), MarkerConfiguration

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  MarkerConfiguration mMarkerConfiguration
          The MarkerConfiguration reference
 
Fields inherited from class atg.process.filter.Filter
FALSE, TRUE
 
Fields inherited from interface atg.markers.MarkerConstants
ALLOW_DUPLICATES, ANY_VALUE, DEFAULT_MARKER_ID_PROPERTY_NAME, DEFAULT_MARKER_ITEM_TYPE, DEFAULT_MARKER_PROPERTY_NAME, DEFAULT_MARKER_SORT_PROPERTY_NAME, MARKER_CREATIONDATE_PROPERTY_NAME, MARKER_DATA_PROPERTY_NAME, MARKER_DUPLICATIONMODE_PROPERTY_NAME, MARKER_KEY_PROPERTY_NAME, MARKER_OWNER_PROPERTY_NAME, MARKER_RESOURCE_NAME, MARKER_VALUE_PROPERTY_NAME, NO_DUPLICATES, PARAM_DATA, PARAM_DUPMODE, PARAM_EXTENDED_PROPERTIES, PARAM_ITEM, PARAM_ITEM_ID, PARAM_KEY, PARAM_MARKED_ITEM_TYPE, PARAM_MARKER_ITEM_TYPE, PARAM_MARKER_MANAGER, PARAM_MARKER_PROPERTY_NAME, PARAM_VALUE, REPLACE_DUPLICATES, sResourceBundle
 
Constructor Summary
MarkerExpressionFilter()
           
 
Method Summary
 void configure(java.lang.String pOperator, java.lang.Object pConfiguration)
          The configuration object provides the reference to the the RepositoryMarkerManager and also the default parameter values.
protected  java.lang.String getData(ProcessExecutionContext pContext)
          Returns the data parameter.
protected  java.lang.String getDuplicationMode(ProcessExecutionContext pContext)
          Returns the duplcationMode.
protected  java.util.Map getExtendedProperties(ProcessExecutionContext pContext)
          This method is called by the evaluate method to return the extendedProperties map.
protected  java.lang.String getKey(ProcessExecutionContext pContext)
          Returns the key parameter.
protected  java.lang.String getMarkedItemType(ProcessExecutionContext pContext)
          Returns the markedItemType.
protected  MarkerConfiguration getMarkerConfiguration()
           
protected  java.lang.String getMarkerItemType(ProcessExecutionContext pContext)
          Returns the markerItemType.
protected  java.lang.String getMarkerPropertyName(ProcessExecutionContext pContext)
          Returns the markerPropertyName.
protected  RepositoryMarkerManager getRepositoryMarkerManager()
          Returns the cofigured RepositoryMarkerManager.
protected  java.lang.String getValue(ProcessExecutionContext pContext)
          Returns the value parameter.
 void initialize(java.lang.String pOperator, Expression[] pOperands)
          Initializes this ExpressionFilter, given its operator and operands.
protected  void setMarkerConfiguration(java.lang.Object pConfiguration)
           
 
Methods inherited from class atg.process.filter.ExpressionFilter
equals, getOperands, getOperator, operandsEquals, setOperands, setOperator, toString
 
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


mMarkerConfiguration

protected MarkerConfiguration mMarkerConfiguration
The MarkerConfiguration reference

Constructor Detail

MarkerExpressionFilter

public MarkerExpressionFilter()
Method Detail

getMarkerConfiguration

protected MarkerConfiguration getMarkerConfiguration()

setMarkerConfiguration

protected void setMarkerConfiguration(java.lang.Object pConfiguration)
                               throws ProcessException
Throws:
ProcessException

configure

public void configure(java.lang.String pOperator,
                      java.lang.Object pConfiguration)
               throws ProcessException,
                      java.lang.UnsupportedOperationException
The configuration object provides the reference to the the RepositoryMarkerManager and also the default parameter values.

Overrides:
configure in class ExpressionFilter
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
See Also:
MarkerConfiguration

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.

Overrides:
initialize in class ExpressionFilter
Parameters:
pOperator - the filter operator names
pOperands - the operands to the filter.
Throws:
ProcessException - if the operands argument is invalid

getKey

protected java.lang.String getKey(ProcessExecutionContext pContext)
                           throws ProcessException
Returns the key parameter.

This parameter is expected to be element zero in the parameter array.

Returns:
String the key
Throws:
ProcessException

getValue

protected java.lang.String getValue(ProcessExecutionContext pContext)
                             throws ProcessException
Returns the value parameter.

This parameter is expected to be element one in the parameter array.

Returns:
String the value
Throws:
ProcessException

getData

protected java.lang.String getData(ProcessExecutionContext pContext)
                            throws ProcessException
Returns the data parameter.

This parameter is expected to be element two in the parameter array.

Returns:
String the data
Throws:
ProcessException

getMarkerPropertyName

protected java.lang.String getMarkerPropertyName(ProcessExecutionContext pContext)
Returns the markerPropertyName.

By default, the marker configuration's defaultMarkerPropertyName is returned.

Override this method to return an alternate value such as something provided as a parameter or derived dynamically based on the context.


getMarkerItemType

protected java.lang.String getMarkerItemType(ProcessExecutionContext pContext)
Returns the markerItemType.

By default, the marker configuration's defaultMarkerItemType is returned.

Override this method to return an alternate value such as something provided as a parameter or derived dynamically based on the context.


getMarkedItemType

protected java.lang.String getMarkedItemType(ProcessExecutionContext pContext)
Returns the markedItemType.

By default, the marker configuration's defaultMarkedItemType is returned.

Override this method to return an alternate value such as something provided as a parameter or derived dynamically based on the context.


getDuplicationMode

protected java.lang.String getDuplicationMode(ProcessExecutionContext pContext)
Returns the duplcationMode.

By default, the marker configuration's defaultDuplicationMode is returned.

Override this method to return an alternate value such as something provided as a parameter or derived dynamically based on the context.


getRepositoryMarkerManager

protected RepositoryMarkerManager getRepositoryMarkerManager()
Returns the cofigured RepositoryMarkerManager.


getExtendedProperties

protected java.util.Map getExtendedProperties(ProcessExecutionContext pContext)
This method is called by the evaluate method to return the extendedProperties map.

The based implementation returns null.