|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.adf.web.data.tasks.validator.GenericValidator
com.esri.adf.web.data.tasks.validator.StringValidator
public class StringValidator
This class is used to define the validation rules to be enforced on a Task parameter that accepts text.
For Example, TaskParamDescriptor paramDescriptor = ...; StringValidator strValidator = new StringValidator(); strValidator.setRequired(true); strValidator.setRegExp("[A-Za-z]*"); strValidator.setTrim(true); paramDescriptor.setValidator(strValidator);
Field Summary |
---|
Fields inherited from class com.esri.adf.web.data.tasks.validator.GenericValidator |
---|
ADFDOJOTYPE |
Constructor Summary | |
---|---|
StringValidator()
|
Method Summary | |
---|---|
String |
getRegExp()
Specifies the regular expression to validate the text against. |
boolean |
isConvertToLowerCase()
Specifies whether all characters should be automatically converted to lower case. |
boolean |
isConvertToUpperCase()
Specifies whether all characters should be automatically converted to upper case. |
boolean |
isProperCase()
Specifies whether the first character in every word should be automatically converted to upper case. |
boolean |
isTrim()
Specifies whether the leading and trailing whitespace(s) should be automatically trimmed from the text. |
void |
setConvertToLowerCase(boolean convertToLowerCase)
Specifies whether all characters should be automatically converted to lower case. |
void |
setConvertToUpperCase(boolean convertToUpperCase)
Specifies whether all characters should be automatically converted to upper case. |
void |
setProperCase(boolean properCase)
Specifies whether the first character in every word should be automatically converted to upper case. |
void |
setRegExp(String regExp)
Specifies the regular expression to validate the text against. |
void |
setTrim(boolean trim)
Specifies whether the leading and trailing whitespace(s) should be automatically trimmed from the text. |
Methods inherited from class com.esri.adf.web.data.tasks.validator.GenericValidator |
---|
addValidationRule, getInvalidMessage, getPromptMessage, getValidationRules, isRequired, removeValidationRule, setInvalidMessage, setPromptMessage, setRequired |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringValidator()
Method Detail |
---|
public boolean isConvertToLowerCase()
public void setConvertToLowerCase(boolean convertToLowerCase)
convertToLowerCase
- specifies whether the characters should be converted to lower case.public boolean isConvertToUpperCase()
public void setConvertToUpperCase(boolean convertToUpperCase)
convertToUpperCase
- specifies whether the characters should be converted to upper case.public boolean isProperCase()
public void setProperCase(boolean properCase)
properCase
- specifies whether the first character in every word should be converted to upper case.public boolean isTrim()
public void setTrim(boolean trim)
trim
- specifies whether the whitespace(s) should be trimmed.public String getRegExp()
public void setRegExp(String regExp)
regExp
- the regular expression.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |