org.apache.myfaces.extensions.validator.core.validation.strategy.mapper
Class AnnotationToValidationStrategyBeanNameMapper

java.lang.Object
  extended by org.apache.myfaces.extensions.validator.core.validation.strategy.mapper.AbstractMetaDataToValidationStrategyNameMapper
      extended by org.apache.myfaces.extensions.validator.core.validation.strategy.mapper.AnnotationToValidationStrategyBeanNameMapper
All Implemented Interfaces:
NameMapper<String>

@InvocationOrder(value=500)
public class AnnotationToValidationStrategyBeanNameMapper
extends AbstractMetaDataToValidationStrategyNameMapper

Name Mapper which delegates the name mapping, extract the name and convert it to a bean name + prefix target: configure a validation strategy via a managed bean facility -> allows to inject other beans instead of api calls + hardcoded bean names

allowed bean scopes: the validation strategy is stateless: application/singleton the validation strategy is stateful: none/prototype don't use the session or a conversation scope

Since:
1.x.1

Field Summary
static String PREFIX_FOR_BEAN_MAPPING
           
 
Fields inherited from class org.apache.myfaces.extensions.validator.core.validation.strategy.mapper.AbstractMetaDataToValidationStrategyNameMapper
logger
 
Constructor Summary
AnnotationToValidationStrategyBeanNameMapper(NameMapper<String> nameMapper)
           
 
Method Summary
 String createName(String source)
          Returns the name of the target resource for the given source or null if the implementations isn't responsible to map the given instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX_FOR_BEAN_MAPPING

public static final String PREFIX_FOR_BEAN_MAPPING
See Also:
Constant Field Values
Constructor Detail

AnnotationToValidationStrategyBeanNameMapper

public AnnotationToValidationStrategyBeanNameMapper(NameMapper<String> nameMapper)
Method Detail

createName

public String createName(String source)
Description copied from interface: NameMapper
Returns the name of the target resource for the given source or null if the implementations isn't responsible to map the given instance.

Parameters:
source - Object for which the name must be created.
Returns:
name of the target resource or null if the source isn't supported.


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