org.jaffa.rules.fieldvalidators
Interface IFieldValidator

All Known Implementing Classes:
AbstractFieldValidator

public interface IFieldValidator

This is the interface for all the FieldValidators. The RulesEngine will typically create an instance of a FieldValidator. It will then invoke the init() method, all the setters, the validate() method and finally the cleanup() method.


Method Summary
 void cleanup()
          This method will always be invoked by the RulesEngine after the validation is completed.
 String getLabelToken()
          Getter for the property labelToken.
 UOW getUow()
          Getter for the property uow.
 Object getValue()
          Getter for the property value.
 void init()
          This method is invoked by the RulesEngine before all the setters are invoked.
 void setLabelToken(String labelToken)
          Setter for property labelToken.
 void setUow(UOW uow)
          Setter for property uow.
 void setValue(Object value)
          Setter for property value.
 void validate()
          The RulesEngine will invoke this method to perform the field validation.
 

Method Detail

init

public void init()
This method is invoked by the RulesEngine before all the setters are invoked. Use this to perform some initializations.


cleanup

public void cleanup()
This method will always be invoked by the RulesEngine after the validation is completed. Use this to perform cleanup operations.


validate

public void validate()
              throws ValidationException,
                     FrameworkException
The RulesEngine will invoke this method to perform the field validation.

Throws:
ValidationException - if any validation rule fails.
FrameworkException - if any framework error occurs.

getValue

public Object getValue()
Getter for the property value.

Returns:
Value of property value.

setValue

public void setValue(Object value)
Setter for property value.

Parameters:
value - New value of property value.

getUow

public UOW getUow()
Getter for the property uow.

Returns:
Value of property uow.

setUow

public void setUow(UOW uow)
Setter for property uow.

Parameters:
uow - New value of property uow.

getLabelToken

public String getLabelToken()
Getter for the property labelToken.

Returns:
Value of property labelToken.

setLabelToken

public void setLabelToken(String labelToken)
Setter for property labelToken.

Parameters:
labelToken - New value of property labelToken.


Copyright © 2002-2004 JAFFA Project.