org.apache.myfaces.extensions.validator.core.mapper
Class AbstractCustomNameMapper<T>
java.lang.Object
org.apache.myfaces.extensions.validator.core.mapper.AbstractCustomNameMapper<T>
- All Implemented Interfaces:
- NameMapper<T>
- Direct Known Subclasses:
- CustomConfiguredAnnotationToValidationStrategyNameMapper, CustomConfiguredValidationStrategyToMetaDataTransformerNameMapper, CustomConfiguredValidationStrategyToMsgResolverNameMapper, CustomConventionAnnotationToValidationStrategyNameMapper, CustomConventionValidationStrategyToMetaDataTransformerNameMapper, CustomConventionValidationStrategyToMsgResolverNameMapper
public abstract class AbstractCustomNameMapper<T>
- extends Object
- implements NameMapper<T>
A generic implementation of a custom name mapper that can be configured using configuration. Subclasses just have
to specify the fully qualified name of the configured name mapper.
NameMappers are stateless.
- Since:
- 1.x.1
- Author:
- Gerhard Petracek
|
Method Summary |
String |
createName(T 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. |
protected abstract String |
getCustomNameMapperClassName()
Returns the fully qualified class name of the configured name mapper that must be used. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final Logger logger
AbstractCustomNameMapper
protected AbstractCustomNameMapper()
createName
public String createName(T 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.
When no name mapper is configured, the method returns null.
- Specified by:
createName in interface NameMapper<T>
- Parameters:
source - Object for which the name must be created.
- Returns:
- name of the target resource or null if the source isn't supported.
getCustomNameMapperClassName
protected abstract String getCustomNameMapperClassName()
- Returns the fully qualified class name of the configured name mapper that must be used.
- Returns:
- fully qualified class name of a custom name mapper.
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.