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 which delegates to a custom
NameMapper
.
Subclasses just have to specify the fully qualified name of the configured
NameMapper
.
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
NameMapper that should 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
NameMapper
that should be used.
- Returns:
- fully qualified class name of a custom
NameMapper
.
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.