Class FieldExpressionWithParamsValidator
- java.lang.Object
-
- com.opensymphony.xwork2.validator.validators.ValidatorSupport
-
- com.opensymphony.xwork2.validator.validators.FieldValidatorSupport
-
- com.opensymphony.xwork2.validator.validators.FieldExpressionValidator
-
- org.nuiton.validator.xwork2.field.NuitonFieldExpressionValidator
-
- org.nuiton.validator.xwork2.field.FieldExpressionWithParamsValidator
-
- All Implemented Interfaces:
com.opensymphony.xwork2.validator.FieldValidator
,com.opensymphony.xwork2.validator.ShortCircuitableValidator
,com.opensymphony.xwork2.validator.Validator
public class FieldExpressionWithParamsValidator extends NuitonFieldExpressionValidator
ExtendsFieldExpressionValidator
to add some extra parameters available in theFieldExpressionValidator.getExpression()
- Since:
- 1.3
- Author:
- Tony Chemit - chemit@codelutin.com
-
-
Field Summary
Fields Modifier and Type Field Description protected String
booleanParams
protected Map<String,Boolean>
booleans
protected String
doubleParams
protected Map<String,Double>
doubles
protected static Pattern
EXTRA_BOOLEAN_PARAM_ENTRY_PATTERN
protected static Pattern
EXTRA_DOUBLE_PARAM_ENTRY_PATTERN
protected static Pattern
EXTRA_INT_PARAM_ENTRY_PATTERN
protected static Pattern
EXTRA_LONG_PARAM_ENTRY_PATTERN
protected static Pattern
EXTRA_SHORT_PARAM_ENTRY_PATTERN
protected static Pattern
EXTRA_STRING_PARAM_ENTRY_PATTERN
protected String
intParams
protected Map<String,Integer>
ints
protected String
longParams
protected Map<String,Long>
longs
protected String
shortParams
protected Map<String,Short>
shorts
protected com.opensymphony.xwork2.util.ValueStack
stack
protected String
stringParams
protected Map<String,String>
strings
-
Fields inherited from class org.nuiton.validator.xwork2.field.NuitonFieldExpressionValidator
skip
-
-
Constructor Summary
Constructors Constructor Description FieldExpressionWithParamsValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBooleanParams()
Map<String,Boolean>
getBooleans()
String
getDoubleParams()
Map<String,Double>
getDoubles()
String
getIntParams()
Map<String,Integer>
getInts()
String
getLongParams()
Map<String,Long>
getLongs()
String
getShortParams()
Map<String,Short>
getShorts()
String
getStringParams()
Map<String,String>
getStrings()
String
getValidatorType()
protected <T> Map<String,T>
initParams(Class<T> klass, String extraParams, Pattern pattern)
void
setBooleanParams(String booleanParams)
void
setDoubleParams(String doubleParams)
void
setIntParams(String intParams)
void
setLongParams(String longParams)
void
setShortParams(String shortParams)
void
setStringParams(String stringParams)
void
setValueStack(com.opensymphony.xwork2.util.ValueStack stack)
void
validate(Object object)
void
validateWhenNotSkip(Object object)
Method to be invoked when skip parameter was not evaludated totrue
.-
Methods inherited from class org.nuiton.validator.xwork2.field.NuitonFieldExpressionValidator
evaluateSkipParameter, setSkip
-
Methods inherited from class com.opensymphony.xwork2.validator.validators.FieldExpressionValidator
getExpression, setExpression
-
Methods inherited from class com.opensymphony.xwork2.validator.validators.FieldValidatorSupport
getCurrentValue, getFieldName, setFieldName, setValidatorType
-
Methods inherited from class com.opensymphony.xwork2.validator.validators.ValidatorSupport
addActionError, addFieldError, getDefaultMessage, getFieldValue, getMessage, getMessageKey, getMessageParameters, getValidatorContext, isShortCircuit, parse, setDefaultMessage, setMessageKey, setMessageParameters, setShortCircuit, setTextProviderFactory, setValidatorContext
-
-
-
-
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
-
-
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 interfacecom.opensymphony.xwork2.validator.Validator
- Overrides:
getValidatorType
in classcom.opensymphony.xwork2.validator.validators.FieldValidatorSupport
-
setValueStack
public void setValueStack(com.opensymphony.xwork2.util.ValueStack stack)
- Specified by:
setValueStack
in interfacecom.opensymphony.xwork2.validator.Validator
- Overrides:
setValueStack
in classcom.opensymphony.xwork2.validator.validators.ValidatorSupport
-
validate
public void validate(Object object) throws com.opensymphony.xwork2.validator.ValidationException
- Specified by:
validate
in interfacecom.opensymphony.xwork2.validator.Validator
- Overrides:
validate
in classNuitonFieldExpressionValidator
- 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 totrue
.- Overrides:
validateWhenNotSkip
in classNuitonFieldExpressionValidator
- Parameters:
object
- the object to be validated.- Throws:
com.opensymphony.xwork2.validator.ValidationException
- is thrown if there is validation error(s).
-
-