Class FieldExpressionWithParamsValidator

  • All Implemented Interfaces:
    com.opensymphony.xwork2.validator.FieldValidator, com.opensymphony.xwork2.validator.ShortCircuitableValidator, com.opensymphony.xwork2.validator.Validator

    public class FieldExpressionWithParamsValidator
    extends NuitonFieldExpressionValidator
    Extends FieldExpressionValidator to add some extra parameters available in the FieldExpressionValidator.getExpression()
    Since:
    1.3
    Author:
    Tony Chemit - chemit@codelutin.com
    • Field Detail

      • EXTRA_BOOLEAN_PARAM_ENTRY_PATTERN

        protected static final Pattern EXTRA_BOOLEAN_PARAM_ENTRY_PATTERN
      • EXTRA_SHORT_PARAM_ENTRY_PATTERN

        protected static final Pattern EXTRA_SHORT_PARAM_ENTRY_PATTERN
      • EXTRA_INT_PARAM_ENTRY_PATTERN

        protected static final Pattern EXTRA_INT_PARAM_ENTRY_PATTERN
      • EXTRA_LONG_PARAM_ENTRY_PATTERN

        protected static final Pattern EXTRA_LONG_PARAM_ENTRY_PATTERN
      • EXTRA_DOUBLE_PARAM_ENTRY_PATTERN

        protected static final Pattern EXTRA_DOUBLE_PARAM_ENTRY_PATTERN
      • EXTRA_STRING_PARAM_ENTRY_PATTERN

        protected static final Pattern EXTRA_STRING_PARAM_ENTRY_PATTERN
      • stack

        protected com.opensymphony.xwork2.util.ValueStack stack
      • booleanParams

        protected String booleanParams
      • shortParams

        protected String shortParams
      • intParams

        protected String intParams
      • longParams

        protected String longParams
      • doubleParams

        protected String doubleParams
      • stringParams

        protected String stringParams
    • Constructor Detail

      • FieldExpressionWithParamsValidator

        public FieldExpressionWithParamsValidator()
    • Method Detail

      • getBooleanParams

        public String getBooleanParams()
      • setBooleanParams

        public void setBooleanParams​(String booleanParams)
      • getDoubleParams

        public String getDoubleParams()
      • setDoubleParams

        public void setDoubleParams​(String doubleParams)
      • getIntParams

        public String getIntParams()
      • setIntParams

        public void setIntParams​(String intParams)
      • getLongParams

        public String getLongParams()
      • setLongParams

        public void setLongParams​(String longParams)
      • getShortParams

        public String getShortParams()
      • setShortParams

        public void setShortParams​(String shortParams)
      • getStringParams

        public String getStringParams()
      • setStringParams

        public void setStringParams​(String stringParams)
      • getValidatorType

        public String getValidatorType()
        Specified by:
        getValidatorType in interface com.opensymphony.xwork2.validator.Validator
        Overrides:
        getValidatorType in class com.opensymphony.xwork2.validator.validators.FieldValidatorSupport
      • setValueStack

        public void setValueStack​(com.opensymphony.xwork2.util.ValueStack stack)
        Specified by:
        setValueStack in interface com.opensymphony.xwork2.validator.Validator
        Overrides:
        setValueStack in class com.opensymphony.xwork2.validator.validators.ValidatorSupport
      • validate

        public void validate​(Object object)
                      throws com.opensymphony.xwork2.validator.ValidationException
        Specified by:
        validate in interface com.opensymphony.xwork2.validator.Validator
        Overrides:
        validate in class NuitonFieldExpressionValidator
        Throws:
        com.opensymphony.xwork2.validator.ValidationException
      • validateWhenNotSkip

        public void validateWhenNotSkip​(Object object)
                                 throws com.opensymphony.xwork2.validator.ValidationException
        Description copied from class: NuitonFieldExpressionValidator
        Method to be invoked when skip parameter was not evaludated to true.
        Overrides:
        validateWhenNotSkip in class NuitonFieldExpressionValidator
        Parameters:
        object - the object to be validated.
        Throws:
        com.opensymphony.xwork2.validator.ValidationException - is thrown if there is validation error(s).
      • initParams

        protected <T> Map<String,​T> initParams​(Class<T> klass,
                                                     String extraParams,
                                                     Pattern pattern)
                                              throws com.opensymphony.xwork2.validator.ValidationException
        Throws:
        com.opensymphony.xwork2.validator.ValidationException