Package org.apache.tiles.definition
Class UnresolvingLocaleDefinitionsFactory
- java.lang.Object
-
- org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory
-
- All Implemented Interfaces:
DefinitionsFactory
- Direct Known Subclasses:
LocaleDefinitionsFactory
public class UnresolvingLocaleDefinitionsFactory extends java.lang.Object implements DefinitionsFactory
DefinitionsFactory
implementation that manages Definitions configuration data from URLs, without resolving definition inheritance when a definition is returned.The Definition objects are read from the
DigesterDefinitionsReader
class unless another implementation is specified.- Since:
- 2.2.1
- Version:
- $Rev: 891884 $ $Date: 2009-12-18 07:43:12 +1100 (Fri, 18 Dec 2009) $
-
-
Field Summary
Fields Modifier and Type Field Description protected DefinitionDAO<java.util.Locale>
definitionDao
The definition DAO that extracts the definitions from the sources.protected LocaleResolver
localeResolver
The locale resolver object.-
Fields inherited from interface org.apache.tiles.definition.DefinitionsFactory
DEFINITION_DAO_INIT_PARAM, DEFINITIONS_CONFIG, LOCALE_RESOLVER_IMPL_PROPERTY, READER_IMPL_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description UnresolvingLocaleDefinitionsFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Definition
getDefinition(java.lang.String name, org.apache.tiles.request.Request tilesContext)
Returns a Definition object that matches the given name and Tiles context.void
setDefinitionDAO(DefinitionDAO<java.util.Locale> definitionDao)
Sets the definition DAO to use.void
setLocaleResolver(LocaleResolver localeResolver)
Sets the locale resolver to use.
-
-
-
Field Detail
-
definitionDao
protected DefinitionDAO<java.util.Locale> definitionDao
The definition DAO that extracts the definitions from the sources.- Since:
- 2.2.1
-
localeResolver
protected LocaleResolver localeResolver
The locale resolver object.- Since:
- 2.2.1
-
-
Method Detail
-
setLocaleResolver
public void setLocaleResolver(LocaleResolver localeResolver)
Sets the locale resolver to use.- Parameters:
localeResolver
- The locale resolver.- Since:
- 2.2.1
-
setDefinitionDAO
public void setDefinitionDAO(DefinitionDAO<java.util.Locale> definitionDao)
Sets the definition DAO to use. It must be locale-based.- Parameters:
definitionDao
- The definition DAO.- Since:
- 2.2.1
-
getDefinition
public Definition getDefinition(java.lang.String name, org.apache.tiles.request.Request tilesContext)
Returns a Definition object that matches the given name and Tiles context.- Specified by:
getDefinition
in interfaceDefinitionsFactory
- Parameters:
name
- The name of the Definition to return.tilesContext
- The Tiles context to use to resolve the definition.- Returns:
- the Definition matching the given name or null if none is found.
-
-