public class LocaleDefinitionsFactory extends UnresolvingLocaleDefinitionsFactory implements Initializable
DefinitionsFactory
implementation that manages
Definitions configuration data from URLs, but resolving definition
inheritance when a definition is returned..
The Definition objects are read from the
DigesterDefinitionsReader
class unless another implementation is specified.
applicationContext, definitionDao, localeResolver
DEFINITION_DAO_INIT_PARAM, DEFINITIONS_CONFIG, LOCALE_RESOLVER_IMPL_PROPERTY, READER_IMPL_PROPERTY
Constructor and Description |
---|
LocaleDefinitionsFactory() |
Modifier and Type | Method and Description |
---|---|
protected DefinitionDAO<Locale> |
createDefaultDefinitionDAO()
Creates the default definition DAO, if it has not been specified outside.
|
protected LocaleResolver |
createDefaultLocaleResolver()
Creates the default locale resolver, if it has not been specified
outside.
|
Definition |
getDefinition(String name,
TilesRequestContext tilesContext)
Returns a Definition object that matches the given name and
Tiles context.
|
void |
init(Map<String,String> params)
Initializes the DefinitionsFactory and its subcomponents.
|
addSource, readDefinitions, setApplicationContext, setDefinitionDAO, setLocaleResolver
public void init(Map<String,String> params)
init
in interface DefinitionsFactory
init
in interface Initializable
init
in class UnresolvingLocaleDefinitionsFactory
params
- The Map of configuration properties.DefinitionsFactoryException
- if an initialization error occurs.public Definition getDefinition(String name, TilesRequestContext tilesContext)
getDefinition
in interface DefinitionsFactory
getDefinition
in class UnresolvingLocaleDefinitionsFactory
name
- The name of the Definition to return.tilesContext
- The Tiles context to use to resolve the definition.protected LocaleResolver createDefaultLocaleResolver()
protected DefinitionDAO<Locale> createDefaultDefinitionDAO()
Copyright © 2016. All rights reserved.