Rule Execution Server API

ilog.rules.engine
Class IlrPackageFilter

java.lang.Object
  extended by ilog.rules.engine.IlrPackageFilter
All Implemented Interfaces:
IlrAgendaFilter, Serializable

public class IlrPackageFilter
extends Object
implements IlrAgendaFilter, Serializable

This class implements an agenda filter that tests whether a rule belongs to a package. The test is done on the rule name. If the rule belongs to the package, it is fired. Otherwise, it is not fired.

Since:
4.0
See Also:
Serialized Form

Constructor Summary
IlrPackageFilter(String packageName)
          Creates an IlrPackageFilter using a package name.
 
Method Summary
 boolean toFire(IlrRuleInstance instance)
          Tests whether a rule instance is to be fired.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlrPackageFilter

public IlrPackageFilter(String packageName)

Creates an IlrPackageFilter using a package name. This object will filter the rule instances that belong to the specified package.

Parameters:
packageName - The package name of the rule instances to fire.
Method Detail

toFire

public boolean toFire(IlrRuleInstance instance)

Tests whether a rule instance is to be fired. The filter tests whether the rule's package name is the same as the package name of this filter.

For example, the rule name ilog.rules.bizrules.rule1 matches the package name ilog.rules.bizrules.

Specified by:
toFire in interface IlrAgendaFilter
Parameters:
instance - The rule instance to be filtered.
Returns:
true if the rule belongs to the package specified in the filter constructor, and false otherwise.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013