net.sf.eos.entity
Class CommonNameResolver
java.lang.Object
net.sf.eos.config.Configured
net.sf.eos.entity.CommonNameResolver
- All Implemented Interfaces:
- Configurable
public abstract class CommonNameResolver
- extends Configured
The common name resolver maps an ID of an entity to the common name of
the entity.
- Author:
- Sascha Kohlmann
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMMON_NAME_RESOLVER_IMPL_CONFIG_NAME
@ConfigurationKey(type=CLASSNAME,
description="Resolver remaps an entity ID to a common name (human readable).")
public static final String COMMON_NAME_RESOLVER_IMPL_CONFIG_NAME
- The configuration key name for the classname of the factory.
- See Also:
newInstance(Configuration)
,
Constant Field Values
CommonNameResolver
public CommonNameResolver()
newInstance
@FactoryMethod(key="net.sf.eos.entity.CommonNameResolver.impl")
public static final CommonNameResolver newInstance(Configuration config)
throws EosException
- Creates a new instance of a of the recognizer. If the
Configuration
contains a key
COMMON_NAME_RESOLVER_IMPL_CONFIG_NAME
a new instance of the classname in the value will instantiate.
- Parameters:
config
- the configuration
- Returns:
- a new instance
- Throws:
EosException
- if it is not possible to instantiate an instance
resolveCommonName
public String resolveCommonName(String id)
throws EosException
- Resolves the common entity name for the default locale of the platform.
- Parameters:
id
- the ID of the entity
- Returns:
- a common name or
null
if the implementation is
unable to resolve a common name.
- Throws:
EosException
- if an error occurs
resolveCommonName
public abstract String resolveCommonName(String id,
Locale locale)
throws EosException
- Resolves the common entity name for the given locale if available.
- Parameters:
id
- the ID of the entitylocale
- to get the right language of the common name.
- Returns:
- a common name or
null
if the implementation is
unable to resolve a common name.
- Throws:
EosException
- if an error occurs
Copyright © 2008. All Rights Reserved.