|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.javalid.core.support.AnnotationSupport
public class AnnotationSupport
Supportive class for reading core annotations and performing related actions.
Changes for 1.1:
| Constructor Summary | |
|---|---|
AnnotationSupport(JvConfiguration config)
|
|
| Method Summary | |
|---|---|
java.util.List<AnnotationStorage> |
getAnnotationStorageForFields(java.lang.Object currentObject,
java.lang.String group,
java.lang.String currentPath)
|
java.util.List<AnnotationStorage> |
getAnnotationStorageForMethods(java.lang.Object currentObject,
java.lang.String group,
java.lang.String currentPath)
Returns a list containing AnnotationStorage objects. |
AnnotationStorage |
getFieldInfoPropertyDeprecated(java.lang.Object object,
java.lang.reflect.Field field,
java.lang.String group,
java.lang.String currentPath,
JvConfigurationWrapper jvConfigWrapper)
Deprecated. Temporaly introduced to allow field property validation to work, but WILL be removed in 1.2 |
AnnotationStorage |
getMethodInfo(java.lang.Object object,
java.lang.reflect.Method method,
java.lang.String group,
java.lang.String currentPath,
JvConfigurationWrapper jvConfigWrapper)
Returns AnnotationStorage instance if the method must be validated either by itself or in one of its parent classes (must have JvGroup), in all other cases returns null (so skip this method). |
ValidateDefinition |
getValidationDefinition(java.lang.Class clazz)
|
ValidateDefinition |
getValidationDefinition(java.lang.Object object)
Checks given object and returns its ValidateDefinition if found, null otherwise. |
java.util.List<ValidationMessage> |
validateAsJsfBean(ValidateDefinition definition,
java.lang.Object currentInstance,
java.lang.String currentValidationPath)
This method performs validation using a JSF bean. |
java.util.List<ValidationMessage> |
validateAsNormalBean(ValidateDefinition definition,
java.lang.Object value,
java.lang.String currentValidationPath,
CacheSupport cacheSupport)
This method performs a validation for an ordinary java-bean. |
java.util.List<ValidationMessage> |
validateAsSpringBean(ValidateDefinition definition,
java.lang.Object currentInstance,
java.lang.String currentValidationPath)
This method performs validation using a Spring bean. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationSupport(JvConfiguration config)
| Method Detail |
|---|
public ValidateDefinition getValidationDefinition(java.lang.Object object)
object - The object to check
public ValidateDefinition getValidationDefinition(java.lang.Class clazz)
public java.util.List<AnnotationStorage> getAnnotationStorageForMethods(java.lang.Object currentObject,
java.lang.String group,
java.lang.String currentPath)
currentObject - The current object to check the methods ongroup - The current groupcurrentPath - The current validation path
public java.util.List<AnnotationStorage> getAnnotationStorageForFields(java.lang.Object currentObject,
java.lang.String group,
java.lang.String currentPath)
public AnnotationStorage getMethodInfo(java.lang.Object object,
java.lang.reflect.Method method,
java.lang.String group,
java.lang.String currentPath,
JvConfigurationWrapper jvConfigWrapper)
Careful, if this method contains a super.method() with JvGroup that has exposeInSubClass set to true this method *DOES* return that JvGroup too, even if the JvGroup is not specified directly on this method. This way it's possible to define more rules in subclasses in addition to super class rules. The order in which they are returned is undefined.
object - The object this method is frommethod - The method to checkgroup - The group to checkcurrentPath - The current path of this objectjvConfigWrapper - Configuration (needed for proxy checking e.g)
public AnnotationStorage getFieldInfoPropertyDeprecated(java.lang.Object object,
java.lang.reflect.Field field,
java.lang.String group,
java.lang.String currentPath,
JvConfigurationWrapper jvConfigWrapper)
object - field - group - currentPath - jvConfigWrapper -
public java.util.List<ValidationMessage> validateAsNormalBean(ValidateDefinition definition,
java.lang.Object value,
java.lang.String currentValidationPath,
CacheSupport cacheSupport)
definition - The definition the validating bean is originally from (the definiton of the class currently being validated)value - The actual instance needing validationcurrentValidationPath - The current validation path for this objectcacheSupport - The cachesupport to use when caching beans is allowed
public java.util.List<ValidationMessage> validateAsSpringBean(ValidateDefinition definition,
java.lang.Object currentInstance,
java.lang.String currentValidationPath)
definition - The definition the validating bean is originally from (the definiton of the class currently being validated)currentInstance - The actual instance needing validation
public java.util.List<ValidationMessage> validateAsJsfBean(ValidateDefinition definition,
java.lang.Object currentInstance,
java.lang.String currentValidationPath)
definition - The definition the validating bean is originally from (the definiton of the class currently being validated)currentInstance - The actual instance needing validation
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||