|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.validation.client.AbstractValidator<T>
IValidatable
- the validatable class to validatepublic abstract class AbstractValidator<T>
Wrapper for IValidator that contains utility methods for validation
Constructor Summary | |
---|---|
AbstractValidator()
|
Method Summary | ||
---|---|---|
protected java.util.ArrayList<java.lang.String> |
arrayToList(java.lang.String... inputArray)
I'm fairly certain this exists elsewhere but I want to use it in this context to be GWT safe and not rely on emulation. |
|
protected abstract java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> |
getGroupSequenceMapping(java.lang.Class<?> inputClass)
Gets the group sequence mapping from the implementing class |
|
protected boolean |
intersects(java.util.Collection<? extends java.lang.Object> collectionA,
java.util.Collection<? extends java.lang.Object> collectionB)
Returns true if and only if list A intersects list B at one or more points. |
|
abstract java.util.Set<InvalidConstraint<T>> |
performValidation(T object,
java.lang.String propertyName,
java.util.ArrayList<java.lang.String> groups,
java.util.HashSet<java.lang.String> processedGroups,
java.util.HashSet<java.lang.String> processedObjects)
Actual validation engine class that performs validation internally |
|
protected java.util.Set<InvalidConstraint<T>> |
prepareValidation(T object,
java.lang.String propertyName,
java.lang.Object inputValue,
java.util.ArrayList<java.lang.String> groups)
Group level validation performed for pre-processing of the engine. |
|
protected
|
unrollConstraint(T object,
java.lang.String property,
InvalidConstraint<X> insideConstraint)
Turns an invalid constraint at a lower level to one at the proper higher level |
|
protected
|
unrollConstraintSet(T object,
java.lang.String property,
java.util.Set<InvalidConstraint<X>> insideConstraintSet)
Uses unrollConstraint to unroll an entire set and return them as a set of invalid constraints and return them as a set of the type that corresponds to this validator. |
|
java.util.Set<InvalidConstraint<T>> |
validate(T object,
java.lang.String... groups)
validate all constraints on object |
|
protected java.util.Set<InvalidConstraint<T>> |
validateProperty(T object,
java.lang.String propertyName,
java.util.ArrayList<java.lang.String> groups)
Validate the property like the interface but accept an array list instead of an array |
|
java.util.Set<InvalidConstraint<T>> |
validateProperty(T object,
java.lang.String propertyName,
java.lang.String... groups)
validate all constraints on propertyName property of object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractValidator()
Method Detail |
---|
protected abstract java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> getGroupSequenceMapping(java.lang.Class<?> inputClass)
inputClass
-
public abstract java.util.Set<InvalidConstraint<T>> performValidation(T object, java.lang.String propertyName, java.util.ArrayList<java.lang.String> groups, java.util.HashSet<java.lang.String> processedGroups, java.util.HashSet<java.lang.String> processedObjects)
object
- propertyName
- groups
- processedGroups
- processedObjects
-
public java.util.Set<InvalidConstraint<T>> validate(T object, java.lang.String... groups)
IValidator
validate
in interface IValidator<T>
object
- object to validategroups
- group name(s) targeted for validation (default to default
)
public java.util.Set<InvalidConstraint<T>> validateProperty(T object, java.lang.String propertyName, java.lang.String... groups)
IValidator
propertyName
property of object
validateProperty
in interface IValidator<T>
object
- object to validatepropertyName
- property to validategroups
- group name(s) targeted for validation (default to default
)
protected java.util.Set<InvalidConstraint<T>> validateProperty(T object, java.lang.String propertyName, java.util.ArrayList<java.lang.String> groups)
object
- propertyName
- groups
-
protected java.util.Set<InvalidConstraint<T>> prepareValidation(T object, java.lang.String propertyName, java.lang.Object inputValue, java.util.ArrayList<java.lang.String> groups)
object
- propertyName
- groups
-
protected boolean intersects(java.util.Collection<? extends java.lang.Object> collectionA, java.util.Collection<? extends java.lang.Object> collectionB)
collectionA
- collection of values AcollectionB
- collection of values B
protected java.util.ArrayList<java.lang.String> arrayToList(java.lang.String... inputArray)
inputArray
-
protected <X> InvalidConstraint<T> unrollConstraint(T object, java.lang.String property, InvalidConstraint<X> insideConstraint)
X
-
protected <X> java.util.Set<InvalidConstraint<T>> unrollConstraintSet(T object, java.lang.String property, java.util.Set<InvalidConstraint<X>> insideConstraintSet)
X
- object
- property
- insideConstraintSet
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |