|
HDIV API 2.0.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hdiv.validator.Validation
public class Validation
Validation defined by the user in the hdiv-validation.xml for the editable data (text/textarea).
| Field Summary | |
|---|---|
protected java.util.regex.Pattern |
acceptedPattern
Regular expression that values received in the parameter must fit. |
protected java.util.regex.Pattern |
rejectedPattern
Regular expression that values received in the parameter can't fit. |
| Constructor Summary | |
|---|---|
Validation()
|
|
| Method Summary | |
|---|---|
boolean |
existComponentType()
Checks if a component type has been defined to which apply the validation this. |
boolean |
existIgnoreParameters()
Checks if there are editable parameters that must be ignored in the validation process. |
boolean |
isIgnoreParameter(java.lang.String parameter)
Checks if parameter is a parameter that must be ignored during
the validation process of the editable parameters. |
boolean |
isTheSameComponentType(java.lang.String parameterType)
Checks if the type parameterType is the same as the one defined
in the validation this. |
void |
setAcceptedPattern(java.lang.String acceptedPattern)
|
void |
setComponentType(java.lang.String componentType)
|
void |
setIgnoreParameters(java.util.List ignoreParameters)
It creates a map from the list of ignore parameters defined for a URL. |
void |
setRejectedPattern(java.lang.String rejectedPattern)
|
boolean |
validate(java.lang.String parameter,
java.lang.String[] values,
java.lang.String dataType)
Checks if the values values are valid for the editable
parameter parameter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.regex.Pattern acceptedPattern
protected java.util.regex.Pattern rejectedPattern
| Constructor Detail |
|---|
public Validation()
| Method Detail |
|---|
public void setIgnoreParameters(java.util.List ignoreParameters)
ignoreParameters - list of ignore parameterspublic boolean existIgnoreParameters()
public boolean isIgnoreParameter(java.lang.String parameter)
parameter is a parameter that must be ignored during
the validation process of the editable parameters.
parameter - parameter name
parameter doesn't need to be validated. False
otherwise.public boolean existComponentType()
this.
public boolean isTheSameComponentType(java.lang.String parameterType)
parameterType is the same as the one defined
in the validation this.
parameterType - Component type
this is the same as
parameterType.
public boolean validate(java.lang.String parameter,
java.lang.String[] values,
java.lang.String dataType)
Checks if the values values are valid for the editable
parameter parameter.
There are two types of validations:
validate in interface IValidationparameter - parameter namevalues - parameter's valuesdataType - editable data type
values are valid for the parameter
parameter.public void setComponentType(java.lang.String componentType)
componentType - The comkponent type to set.public void setAcceptedPattern(java.lang.String acceptedPattern)
acceptedPattern - The accepted pattern to set.public void setRejectedPattern(java.lang.String rejectedPattern)
rejectedPattern - The rejected pattern to set.
|
HDIV 2.0.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||