RuleResultClassFilter Class

com.bea.p13n.rules.manager
RuleResultClassFilter Class

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.


Hierarchy
Object
  RuleResultClassFilter
All Implemented Interfaces

ObjectFilter, Serializable
Direct Known Subclasses

RuleResultClassFilter

Constructor Summary

RuleResultClassFilter(String ruleName, Class targetClass)

Constructs a RuleResultClassFilter.
RuleResultClassFilter(String ruleName, Class targetClassArray)

Constructs a RuleResultClassFilter.
 

Method Summary

public Object
filter(Object obj)
Performs the filtering of objects created by the action of rule firing.
public void
reset()
This is a stateless filter and does not require reset be called.
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface com.bea.p13n.common.ObjectFilter
filter, reset
 

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(Object) Method

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

Parameters

obj
the object to be filtered.

Returns

the result of the filtering or null.

reset() Method

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