|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.loom.validator.AbstractPropertyValidator
org.loom.validator.AbstractRequiredValidator<T>
T - The java class of fields validated by this validatorpublic abstract class AbstractRequiredValidator<T>
Parent of all the RequiredValidator classes
| Field Summary | |
|---|---|
static java.lang.String |
REQUIRED_BOOLEAN_MESSAGE
required boolean message key |
static java.lang.String |
REQUIRED_COLLECTION_MESSAGE
required collection/array/map message key |
static java.lang.String |
REQUIRED_MESSAGE
required simple property message key |
| Constructor Summary | |
|---|---|
AbstractRequiredValidator()
|
|
| Method Summary | |
|---|---|
void |
decorate(FormInputTag tag)
Add attributes to the tag based on this Validator instance metadata |
protected java.lang.String |
getDefaultRequiredMessage()
|
protected abstract boolean |
isEmpty(T value)
|
protected void |
setDefaultRequiredMessage(java.lang.String defaultRequiredMessage)
|
java.lang.String |
toString()
|
void |
validate(ValidationRequest request,
java.lang.Object v)
Validates one input value and adds to errors any validation error found |
| Methods inherited from class org.loom.validator.AbstractPropertyValidator |
|---|
getMessagePrefix, getOverridenMessageKey, getPropertyPath, isBindMessages, isValidateCollectionContainer, pushPropertyPath, setBindMessages, setMessagePrefix, setOverridenMessageKey, setPropertyPath, setValidateCollectionContainer, validateCollectionContainer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String REQUIRED_MESSAGE
public static final java.lang.String REQUIRED_COLLECTION_MESSAGE
public static final java.lang.String REQUIRED_BOOLEAN_MESSAGE
| Constructor Detail |
|---|
public AbstractRequiredValidator()
| Method Detail |
|---|
public final void validate(ValidationRequest request,
java.lang.Object v)
PropertyValidator
v - the value to validateprotected abstract boolean isEmpty(T value)
public void decorate(FormInputTag tag)
AbstractPropertyValidator
decorate in interface FormInputDecoratordecorate in class AbstractPropertyValidatortag - the tag to be modifiedpublic java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.String getDefaultRequiredMessage()
protected void setDefaultRequiredMessage(java.lang.String defaultRequiredMessage)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||