© 2004 BEA Systems, Inc.

com.bea.p13n.rules.manager
Class RuleResultClassFilter

java.lang.Object
  extended bycom.bea.p13n.rules.manager.RuleResultClassFilter
All Implemented Interfaces:
ObjectFilter, Serializable
Direct Known Subclasses:
RuleResultClassFilter

public class RuleResultClassFilter
extends Object
implements ObjectFilter, Serializable

A RuleResultClassFilter can be used to filter rule Result objects (the results of firing rules). The rule Result object contains an embedded object that is the created by the rule action. This filter checks the class type of the embedded object and, if it matches the class type of this filter, passes the embedded object through the filter .

Additionally, a rule name can be associated with this filter. If the rule name is non-null the eligible rule Result objects are also filtered by rule name.

The functionality above allows this filter to select the objects that were created by the rules engine that are of a given class type and optinally were created by a rule with a given name.

See Also:
Serialized Form

Constructor Summary
RuleResultClassFilter(String ruleName, Class targetClass)
          Constructs a RuleResultClassFilter.
RuleResultClassFilter(String ruleName, Class[] targetClassArray)
          Constructs a RuleResultClassFilter.
 
Method Summary
 Object filter(Object obj)
          Performs the filtering of objects created by the action of rule firing.
 void reset()
          This is a stateless filter and does not require reset be called.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleResultClassFilter

public RuleResultClassFilter(String ruleName,
                             Class targetClass)
Constructs a RuleResultClassFilter.


RuleResultClassFilter

public RuleResultClassFilter(String ruleName,
                             Class[] targetClassArray)
Constructs a RuleResultClassFilter.

Method Detail

filter

public Object filter(Object obj)
Performs the filtering of objects created by the action of rule firing.

Specified by:
filter in interface ObjectFilter
Parameters:
obj - the object to be filtered.
Returns:
the result of the filtering or null.

reset

public void reset()
This is a stateless filter and does not require reset be called.

Specified by:
reset in interface ObjectFilter

© 2004 BEA Systems, Inc.

Copyright © 2004 BEA Systems, Inc. All Rights Reserved