|
||||||||||
| 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_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)
|
protected void |
toString(java.lang.StringBuilder builder)
Method for debugging purposes |
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, isValidateCollectionContainer, pushPropertyPath, setMessagePrefix, setOverridenMessageKey, setPropertyPath, setValidateCollectionContainer, toString, 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
| 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 modifiedprotected void toString(java.lang.StringBuilder builder)
AbstractPropertyValidator
toString in class AbstractPropertyValidatorprotected 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 | |||||||||