|
|||||||||
| 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:
Changes for 1.2:
| Method Summary | |
|---|---|
static AnnotationClassCache |
createCacheForClass(java.lang.Class clazz,
JvConfiguration config)
Creates a new AnnotationClassCache for given clazz. |
static java.util.List<ValueModel> |
createValueModelForCache(AnnotationClassCache classCache,
java.lang.Class clazz,
java.lang.Object currentInstance,
JvConfiguration config)
|
static ValueModel |
createValueModelForCacheSingleProperty(AnnotationClassCache classCache,
java.lang.Class clazz,
java.lang.Object currentInstance,
java.lang.Object propertyValue,
java.lang.String propertyName,
JvConfiguration config)
|
static java.util.List<ValueModel> |
createValueModelForClassLevelCache(AnnotationClassCache classCache,
java.lang.Class clazz,
java.lang.Object currentInstance)
Gathers available classlevel cache annotations for given clazz and returns them in a list. |
static java.util.List<java.lang.String> |
getClassNamesIncludingParents(java.lang.Class clazz)
Returns a list containing all classnames (including the clazz itself) up to the class that defines the @ValidateDefinition (so you get the child to parent hierarchy), if @ValidateDefinition is defined on clazz it returns a list with the clazz name only. |
static ValidateDefinition |
getValidationDefinition(java.lang.Class clazz)
|
static ValidateDefinition |
getValidationDefinition(java.lang.Object object)
Checks given object and returns its ValidateDefinition if found, null otherwise. |
static boolean |
isRecursionAllowedForGroup(JvGroup jvGroup,
java.lang.String currentGroup)
|
static boolean |
mustGroupBeApplied(JvGroup jvGroup,
java.lang.String group)
|
static boolean |
mustStopValidation(java.lang.String currentGroup,
StopValidation stopValidation)
Returns true if validation must be aborted for field/method it is currently. |
static java.util.List<ValidationMessage> |
validateAsJsfBean(ValidateDefinition definition,
java.lang.Object currentInstance,
java.lang.String currentValidationPath,
JvConfigurationWrapper config)
This method performs validation using a JSF bean. |
static java.util.List<ValidationMessage> |
validateAsNormalBean(ValidateDefinition definition,
java.lang.Object value,
java.lang.String currentValidationPath,
CacheSupport cacheSupport,
JvConfigurationWrapper config)
This method performs a validation for an ordinary java-bean. |
static java.util.List<ValidationMessage> |
validateAsSpringBean(ValidateDefinition definition,
java.lang.Object currentInstance,
java.lang.String currentValidationPath,
JvConfigurationWrapper config)
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 |
| Method Detail |
|---|
public static final ValidateDefinition getValidationDefinition(java.lang.Object object)
object - The object to check
public static final ValidateDefinition getValidationDefinition(java.lang.Class clazz)
public static final java.util.List<java.lang.String> getClassNamesIncludingParents(java.lang.Class clazz)
clazz - The class to check
public static final AnnotationClassCache createCacheForClass(java.lang.Class clazz,
JvConfiguration config)
clazz - The clazz to create a cache forconfig - The configuration
public static final java.util.List<ValueModel> createValueModelForCache(AnnotationClassCache classCache,
java.lang.Class clazz,
java.lang.Object currentInstance,
JvConfiguration config)
public static final java.util.List<ValueModel> createValueModelForClassLevelCache(AnnotationClassCache classCache,
java.lang.Class clazz,
java.lang.Object currentInstance)
classCache - The classCache to look intoclazz - The clazz it is about
public static final ValueModel createValueModelForCacheSingleProperty(AnnotationClassCache classCache,
java.lang.Class clazz,
java.lang.Object currentInstance,
java.lang.Object propertyValue,
java.lang.String propertyName,
JvConfiguration config)
public static final boolean mustGroupBeApplied(JvGroup jvGroup,
java.lang.String group)
public static final boolean isRecursionAllowedForGroup(JvGroup jvGroup,
java.lang.String currentGroup)
public static final boolean mustStopValidation(java.lang.String currentGroup,
StopValidation stopValidation)
currentGroup - The currentGroup that is under validation (specified by the user)stopValidation - The annotation which may stop the validation for the method/field
public static final java.util.List<ValidationMessage> validateAsNormalBean(ValidateDefinition definition,
java.lang.Object value,
java.lang.String currentValidationPath,
CacheSupport cacheSupport,
JvConfigurationWrapper config)
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 allowedconfig - Configuration wrapper
public static final java.util.List<ValidationMessage> validateAsSpringBean(ValidateDefinition definition,
java.lang.Object currentInstance,
java.lang.String currentValidationPath,
JvConfigurationWrapper config)
definition - The definition the validating bean is originally from (the definiton of the class currently being validated)currentInstance - The actual instance needing validationconfig - Configuration wrapper
public static final java.util.List<ValidationMessage> validateAsJsfBean(ValidateDefinition definition,
java.lang.Object currentInstance,
java.lang.String currentValidationPath,
JvConfigurationWrapper config)
definition - The definition the validating bean is originally from (the definiton of the class currently being validated)currentInstance - The actual instance needing validationconfig - Configuration wrapper
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||