|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.validation.rebind.ValidationPackage
public class ValidationPackage
Rebind helper class that stores all the information about a method, field, and annotation set so that validation can either occur (as on the server) or so that validation code can be generated (as in the GWT compilation process).
Constructor Summary | |
---|---|
ValidationPackage(IConstraint<java.lang.annotation.Annotation> constraint,
java.lang.String message,
java.lang.reflect.Method method,
java.lang.reflect.Field field,
java.lang.String[] groups,
java.util.Map<java.lang.String,java.lang.String> propertyMap)
Create a validation package for the given constraint, with a message specified, for the method and field given that applies to the groups as specified, with the given property map for initilization of the constraint implementation. |
Method Summary | ||
---|---|---|
|
buildInvalidConstraint(T object)
Build an InvalidConstraint object that matches the annotation |
|
java.util.ArrayList<java.lang.String> |
getGroups()
Get the list of groups that this validation belongs in. |
|
IConstraint<java.lang.annotation.Annotation> |
getImplementingConstraint()
Get an instance of the implementing constraint |
|
java.lang.String |
getItemName()
Outward facing item name that represents the field or method to be validated |
|
java.lang.String |
getMessage()
Get the message that will be used if validation fails |
|
java.lang.reflect.Method |
getMethod()
Get the java.lang.reflect.Method that represents the
method to invoke. |
|
java.util.Map<java.lang.String,java.lang.String> |
getValidationPropertyMap()
Get the property map |
|
boolean |
isFieldBased()
Returns true if the package is for a field with a getter method. |
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ValidationPackage(IConstraint<java.lang.annotation.Annotation> constraint, java.lang.String message, java.lang.reflect.Method method, java.lang.reflect.Field field, java.lang.String[] groups, java.util.Map<java.lang.String,java.lang.String> propertyMap)
constraint
- the constraint that implements the validationmessage
- the message if the constraint fails (returns false on validation)method
- the method to invoke for validationfield
- the field that the method maps to (if applicable)groups
- the groups that the validation should be performed underpropertyMap
- the properties to be used to initialize the constraintMethod Detail |
---|
public <T> InvalidConstraint<T> buildInvalidConstraint(T object)
InvalidConstraint
object that matches the annotation
T
-
public IConstraint<java.lang.annotation.Annotation> getImplementingConstraint()
public java.util.Map<java.lang.String,java.lang.String> getValidationPropertyMap()
public boolean isFieldBased()
public java.lang.reflect.Method getMethod()
java.lang.reflect.Method
that represents the
method to invoke.
public java.lang.String getItemName()
public java.lang.String getMessage()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.ArrayList<java.lang.String> getGroups()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |