org.slim3.struts.validator
Class S3FieldChecks

java.lang.Object
  extended by org.apache.struts.validator.FieldChecks
      extended by org.slim3.struts.validator.S3FieldChecks
All Implemented Interfaces:
Serializable

public class S3FieldChecks
extends FieldChecks

This class contains the added validations.

Since:
3.0
Author:
Satoshi Kimura, higa
See Also:
S3GenericValidator, Serialized Form

Field Summary
 
Fields inherited from class org.apache.struts.validator.FieldChecks
FIELD_TEST_EQUAL, FIELD_TEST_NOTNULL, FIELD_TEST_NULL
 
Constructor Summary
S3FieldChecks()
           
 
Method Summary
protected static String getValueAsString(Object bean, org.apache.commons.validator.Field field)
          Returns the value as string.
static boolean validateLongRange(Object bean, org.apache.commons.validator.ValidatorAction validatorAction, org.apache.commons.validator.Field field, ActionMessages errors, org.apache.commons.validator.Validator validator, HttpServletRequest request)
          Validates if a fields value is within a range.
static boolean validateMaxByteLength(Object bean, org.apache.commons.validator.ValidatorAction validatorAction, org.apache.commons.validator.Field field, ActionMessages errors, org.apache.commons.validator.Validator validator, HttpServletRequest request)
          Validates if the byte length is less than or equal to the maximum length.
static boolean validateMinByteLength(Object bean, org.apache.commons.validator.ValidatorAction validatorAction, org.apache.commons.validator.Field field, ActionMessages errors, org.apache.commons.validator.Validator validator, HttpServletRequest request)
          Validates if the byte length is greater than or equal to the minimum length.
 
Methods inherited from class org.apache.struts.validator.FieldChecks
isString, validateByte, validateCreditCard, validateDate, validateDouble, validateDoubleRange, validateEmail, validateFloat, validateFloatRange, validateInteger, validateIntRange, validateLong, validateMask, validateMaxLength, validateMinLength, validateRequired, validateRequiredIf, validateShort, validateUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

S3FieldChecks

public S3FieldChecks()
Method Detail

validateMaxByteLength

public static boolean validateMaxByteLength(Object bean,
                                            org.apache.commons.validator.ValidatorAction validatorAction,
                                            org.apache.commons.validator.Field field,
                                            ActionMessages errors,
                                            org.apache.commons.validator.Validator validator,
                                            HttpServletRequest request)
Validates if the byte length is less than or equal to the maximum length.

Parameters:
bean - JavaBeans
validatorAction - the validator action
field - the field
errors - the errors
validator - the validator
request - the request
Returns:
the validated result

validateMinByteLength

public static boolean validateMinByteLength(Object bean,
                                            org.apache.commons.validator.ValidatorAction validatorAction,
                                            org.apache.commons.validator.Field field,
                                            ActionMessages errors,
                                            org.apache.commons.validator.Validator validator,
                                            HttpServletRequest request)
Validates if the byte length is greater than or equal to the minimum length.

Parameters:
bean - JavaBeans
validatorAction - the validator action
field - the field
errors - the errors
validator - the validator
request - the request
Returns:
the validated result

validateLongRange

public static boolean validateLongRange(Object bean,
                                        org.apache.commons.validator.ValidatorAction validatorAction,
                                        org.apache.commons.validator.Field field,
                                        ActionMessages errors,
                                        org.apache.commons.validator.Validator validator,
                                        HttpServletRequest request)
Validates if a fields value is within a range.

Parameters:
bean - JavaBeans
validatorAction - the validator action
field - the field
errors - the errors
validator - the validator
request - the request
Returns:
the validated result

getValueAsString

protected static String getValueAsString(Object bean,
                                         org.apache.commons.validator.Field field)
Returns the value as string.

Parameters:
bean - JavaBeans
field - the field
Returns:
the result


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.