org.apache.myfaces.extensions.validator.core.storage
Class DefaultStorageManagerFactory
java.lang.Object
org.apache.myfaces.extensions.validator.core.factory.AbstractNameMapperAwareFactory<Class>
org.apache.myfaces.extensions.validator.core.storage.DefaultStorageManagerFactory
- All Implemented Interfaces:
- ClassMappingFactory<Class,StorageManager>, NameMapperAwareFactory<NameMapper<Class>>, StorageManagerHolder
public class DefaultStorageManagerFactory
- extends AbstractNameMapperAwareFactory<Class>
- implements ClassMappingFactory<Class,StorageManager>, StorageManagerHolder
default implementation for storage-manager creation and caching
- Since:
- x.x.3
- Author:
- Gerhard Petracek
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final Logger logger
DefaultStorageManagerFactory
public DefaultStorageManagerFactory()
create
public StorageManager create(Class storageType)
- Description copied from interface:
ClassMappingFactory
- Create an instance of the target type based on the source type. An example is the
DefaultMetaDataTransformerFactory that creates a metaDataTransformer for a certain ValidationStrategy.
- Specified by:
create
in interface ClassMappingFactory<Class,StorageManager>
- Parameters:
storageType
- source type to be used.
- Returns:
- target object.
getNameMapperList
protected List<NameMapper<Class>> getNameMapperList()
- Specified by:
getNameMapperList
in class AbstractNameMapperAwareFactory<Class>
setStorageManager
public void setStorageManager(Class storageType,
StorageManager storageManager,
boolean override)
- Description copied from interface:
StorageManagerHolder
- Define the storage manager for the given type.
- Specified by:
setStorageManager
in interface StorageManagerHolder
- Parameters:
storageType
- The identification for the storage manager, usually it is the storage-classstorageManager
- The storageManager to use.override
- use true to replace an existing storageManager and
false to use the manager only if there isn't an existing manager for the given type
getStorageManager
public StorageManager getStorageManager(Class type)
- Description copied from interface:
StorageManagerHolder
- Returns the storageManager for the given type.
- Specified by:
getStorageManager
in interface StorageManagerHolder
- Parameters:
type
- The identification for the storage manager, usually it is the storage-class
- Returns:
- the storageManager for the given type or null
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.