Package org.apache.tiles.definition.dao
Class LocaleUrlDefinitionDAO
- java.lang.Object
-
- org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO
-
- org.apache.tiles.definition.dao.LocaleUrlDefinitionDAO
-
- All Implemented Interfaces:
DefinitionDAO<java.util.Locale>
,RefreshMonitor
public class LocaleUrlDefinitionDAO extends BaseLocaleUrlDefinitionDAO
A definition DAO that usesLocale
as a customization key and loads definitions from URLs. It does not cache definitions in any way.- Since:
- 2.1.0
- Version:
- $Rev: 1297705 $ $Date: 2012-03-07 07:44:30 +1100 (Wed, 07 Mar 2012) $
-
-
Field Summary
-
Fields inherited from class org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO
applicationContext, lastModifiedDates, reader, sources
-
-
Constructor Summary
Constructors Constructor Description LocaleUrlDefinitionDAO(org.apache.tiles.request.ApplicationContext applicationContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Definition
getDefinition(java.lang.String name, java.util.Locale customizationKey)
Returns a definition, given its name and the customization key.java.util.Map<java.lang.String,Definition>
getDefinitions(java.util.Locale customizationKey)
Returns all the definitions used of a customization key.-
Methods inherited from class org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO
loadDefinitionsFromResource, refreshRequired, setReader, setSources
-
-
-
-
Method Detail
-
getDefinition
public Definition getDefinition(java.lang.String name, java.util.Locale customizationKey)
Returns a definition, given its name and the customization key.
WARNING! This method is slow! It loads all the definitions and then selects the needed one.- Parameters:
name
- The name of the definition.customizationKey
- The customization key.- Returns:
- The requested definition, if found, otherwise
null
. The inheritance of the definition must not be resolved. - Since:
- 2.1.0
-
getDefinitions
public java.util.Map<java.lang.String,Definition> getDefinitions(java.util.Locale customizationKey)
Returns all the definitions used of a customization key.- Parameters:
customizationKey
- The customization key.- Returns:
- All the definitions that are connected to the customization key. The inheritance of the definitions must not be resolved.
-
-