org.apache.beehive.netui.pageflow.validation
Class ValidatorRules

Object
  extended by FieldChecks
      extended by ValidatorRules
All Implemented Interfaces:
Serializable

public class ValidatorRules
extends FieldChecks

See Also:
Serialized Form

Field Summary
 
Fields inherited from class FieldChecks
FIELD_TEST_EQUAL, FIELD_TEST_NOTNULL, FIELD_TEST_NULL
 
Constructor Summary
ValidatorRules()
           
 
Method Summary
static boolean validateLongRange(Object bean, ValidatorAction va, Field field, ActionMessages errors, HttpServletRequest request)
          Check if a field's value is within a range ("min" and "max" Long variables on the passed-in Field).
static boolean validateValidWhen(Object bean, ValidatorAction va, Field field, ActionMessages errors, HttpServletRequest request, ServletContext servletContext)
          Check if a given expression evaluates to true.
 
Methods inherited from class FieldChecks
isString, validateByte, validateCreditCard, validateDate, validateDouble, validateDoubleRange, validateEmail, validateFloat, validateFloatRange, validateInteger, validateIntRange, validateLong, validateMask, validateMaxLength, validateMinLength, validateRange, validateRequired, validateRequiredIf, validateShort
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidatorRules

public ValidatorRules()
Method Detail

validateValidWhen

public static boolean validateValidWhen(Object bean,
                                        ValidatorAction va,
                                        Field field,
                                        ActionMessages errors,
                                        HttpServletRequest request,
                                        ServletContext servletContext)
Check if a given expression evaluates to true.

Parameters:
bean - the bean that validation is being performed on.
va - the ValidatorAction that is currently being performed.
field - the Field object associated with the current field being validated.
errors - the ActionMessages object to add errors to if any validation errors occur.
request - the current request object.
Returns:
true if the given expression evaluates to true

validateLongRange

public static boolean validateLongRange(Object bean,
                                        ValidatorAction va,
                                        Field field,
                                        ActionMessages errors,
                                        HttpServletRequest request)
Check if a field's value is within a range ("min" and "max" Long variables on the passed-in Field).

Parameters:
bean - the bean that validation is being performed on.
va - the ValidatorAction that is currently being performed.
field - the Field object associated with the current field being validated.
errors - the ActionMessages object to add errors to if any validation errors occur.
request - the current request object.
Returns:
true if in range, false otherwise.