com.jeta.open.rules
Class AbstractRule

java.lang.Object
  extended by com.jeta.open.rules.AbstractRule
All Implemented Interfaces:
JETARule
Direct Known Subclasses:
RuleGroup

public abstract class AbstractRule
extends Object
implements JETARule

This class defines a basic rule for running validations and checks at certain points in the program. It's main use is to check user input for GUI's that are shared among different databases, but require different validations based on the input.


Constructor Summary
AbstractRule()
           
 
Method Summary
 RuleResult check(Object param1)
          Helper method that forwards the call to check(Object[])
abstract  RuleResult check(Object[] params)
          Runs the rule.
 RuleResult check(Object param1, Object param2)
          Helper method that forwards the call to check(Object[])
 RuleResult check(Object param1, Object param2, Object param3)
          Helper method that forwards the call to check(Object[])
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRule

public AbstractRule()
Method Detail

check

public abstract RuleResult check(Object[] params)
Description copied from interface: JETARule
Runs the rule. If the rule succeeds, then null is returned. Otherwise an error message is returned.

Specified by:
check in interface JETARule
Parameters:
params - an array of parameters needed by this rule. The rule defines the parameters that it needs.
Returns:
null or RuleResult.SUCCESS if the rule passes. Otherwise, return a RuleResult with a failed error code and an option error message

check

public RuleResult check(Object param1)
Helper method that forwards the call to check(Object[])


check

public RuleResult check(Object param1,
                        Object param2)
Helper method that forwards the call to check(Object[])


check

public RuleResult check(Object param1,
                        Object param2,
                        Object param3)
Helper method that forwards the call to check(Object[])



Copyright © 2005-2007 Jeff Tassin & Todd Viegut. All Rights Reserved.