org.jaffa.rules.fieldvalidators
Class AbstractFieldValidator

java.lang.Object
  extended byorg.jaffa.rules.fieldvalidators.AbstractFieldValidator
All Implemented Interfaces:
IFieldValidator
Direct Known Subclasses:
BooleanFieldValidator, CurrencyFieldValidator, DateOnlyFieldValidator, DateTimeFieldValidator, DecimalFieldValidator, ForeignKeyFieldValidator, GenericForeignKeyFieldValidator, InListFieldValidator, IntegerFieldValidator, MandatoryFieldValidator, StringFieldValidator

public abstract class AbstractFieldValidator
extends Object
implements IFieldValidator

This is an abstract implementation of the IFieldValidator interface.

Author:
GautamJ

Constructor Summary
AbstractFieldValidator()
           
 
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.
abstract  void validate()
          The RulesEngine will invoke this method to perform the field validation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFieldValidator

public AbstractFieldValidator()
Method Detail

validate

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

Specified by:
validate in interface IFieldValidator
Throws:
ValidationException - if any validation rule fails.
FrameworkException - if any framework error occurs.

init

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

Specified by:
init in interface IFieldValidator

cleanup

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

Specified by:
cleanup in interface IFieldValidator

getLabelToken

public String getLabelToken()
Getter for the property labelToken.

Specified by:
getLabelToken in interface IFieldValidator
Returns:
Value of property labelToken.

getUow

public UOW getUow()
Getter for the property uow.

Specified by:
getUow in interface IFieldValidator
Returns:
Value of property uow.

getValue

public Object getValue()
Getter for the property value.

Specified by:
getValue in interface IFieldValidator
Returns:
Value of property value.

setLabelToken

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

Specified by:
setLabelToken in interface IFieldValidator
Parameters:
labelToken - New value of property labelToken.

setUow

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

Specified by:
setUow in interface IFieldValidator
Parameters:
uow - New value of property uow.

setValue

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

Specified by:
setValue in interface IFieldValidator
Parameters:
value - New value of property value.


Copyright © 2002-2004 JAFFA Project.