org.apache.myfaces.extensions.validator.core.validation.parameter
Interface ValidationParameterExtractor

All Known Implementing Classes:
DefaultValidationParameterExtractor

public interface ValidationParameterExtractor

Allows the extraction of ValidationParameters.

Since:
x.x.3

Method Summary
 Map<Object,List<Object>> extract(Annotation annotation)
          Extracts all ValidationParameters hosted by the given annotation.
 List<Object> extract(Annotation annotation, Object key)
          Extracts all ValidationParameters for the given key which are hosted by the given annotation.
<T> List<T>
extract(Annotation annotation, Object key, Class<T> valueType)
          Extracts all ValidationParameters for the given key which are hosted by the given annotation.
<T> T
extract(Annotation annotation, Object key, Class<T> valueType, Class valueId)
          Extracts all ValidationParameters for the given key which are hosted by the given annotation.
 

Method Detail

extract

Map<Object,List<Object>> extract(Annotation annotation)
Extracts all ValidationParameters hosted by the given annotation. The wiki shows all supported styles.

Parameters:
annotation - The annotation which might contain validation-parameters
Returns:
key/value map of the found parameters

extract

List<Object> extract(Annotation annotation,
                     Object key)
Extracts all ValidationParameters for the given key which are hosted by the given annotation. The wiki shows all supported styles.

Parameters:
annotation - The annotation for which we want to extract the information.
key - Value for the ParameterKey that is used for filtering the ValidationParameters.
Returns:
list of the found parameters

extract

<T> List<T> extract(Annotation annotation,
                    Object key,
                    Class<T> valueType)
Extracts all ValidationParameters for the given key which are hosted by the given annotation. The result is filtered by the given type for the value. The wiki shows all supported styles.

Type Parameters:
T - Class type of the result which is the same as the class type of the parameter valueType.
Parameters:
annotation - The annotation which might contain validation-parameters
key - Value for the ParameterKey that is used for filtering the ValidationParameters.
valueType - ParameterValue must be assignable to this type to be added to the result.
Returns:
list of the found parameters

extract

<T> T extract(Annotation annotation,
              Object key,
              Class<T> valueType,
              Class valueId)
Extracts all ValidationParameters for the given key which are hosted by the given annotation. The result is filtered by the given type for the value and the given id to receive a specific value if there are multiple parameters of the same type. The wiki shows all supported styles.

Type Parameters:
T - Class type of the result which is the same as the class type of the parameter valueType.
Parameters:
annotation - The annotation which might contain validation-parameters
key - Value for the ParameterKey that is used for filtering the ValidationParameters.
valueType - ParameterValue must be assignable to this type to be added to the result.
valueId - marker which identifies a specific value (needed if there are multiple parameters of the same type)
Returns:
Value of the found ParameterValue.


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.