public class ResolvingLocaleUrlDefinitionDAO extends CachingLocaleUrlDefinitionDAO
A definitions DAO (loading URLs and using Locale as a customization key) that caches definitions that have been loaded and resolves inheritances.
It can check if the URLs change, but by default this feature is turned off.
CHECK_REFRESH_INIT_PARAMETER, checkRefresh, definitionResolver, locale2definitionMap
applicationContext, lastModifiedDates, reader, sources
Constructor and Description |
---|
ResolvingLocaleUrlDefinitionDAO(org.apache.tiles.request.ApplicationContext applicationContext) |
Modifier and Type | Method and Description |
---|---|
protected Map<String,Definition> |
copyDefinitionMap(Map<String,Definition> localeDefsMap)
Copies the definition map to be passed to a higher level of customization
key.
|
protected Definition |
getDefinitionFromResolver(String name,
Locale customizationKey)
Returns a definition from the definition resolver.
|
protected Map<String,Definition> |
loadDefinitions(Locale customizationKey)
Tries to load definitions if necessary.
|
protected Map<String,Definition> |
loadParentDefinitions(Locale parentLocale)
Loads parent definitions, i.e.
|
protected void |
resolveInheritance(Definition definition,
Map<String,Definition> definitions,
Locale locale,
Set<String> alreadyResolvedDefinitions)
Resolve locale-specific inheritance.
|
protected void |
resolveInheritances(Map<String,Definition> map,
Locale locale)
Resolve locale-specific extended instances.
|
checkAndloadDefinitions, getDefinition, getDefinitions, loadDefinitionsFromResources, loadRawDefinitionsFromResources, setCheckRefresh, setPatternDefinitionResolver
loadDefinitionsFromResource, refreshRequired, setReader, setSources
public ResolvingLocaleUrlDefinitionDAO(org.apache.tiles.request.ApplicationContext applicationContext)
protected Map<String,Definition> loadParentDefinitions(Locale parentLocale)
loadParentDefinitions
in class CachingLocaleUrlDefinitionDAO
parentLocale
- The locale to use when loading URLs.protected Map<String,Definition> loadDefinitions(Locale customizationKey)
CachingLocaleUrlDefinitionDAO
loadDefinitions
in class CachingLocaleUrlDefinitionDAO
customizationKey
- The locale to use when loading sources.protected Definition getDefinitionFromResolver(String name, Locale customizationKey)
getDefinitionFromResolver
in class CachingLocaleUrlDefinitionDAO
name
- The name of the definition.customizationKey
- The customization key to use.protected void resolveInheritances(Map<String,Definition> map, Locale locale)
map
- The definition map containing the definitions to resolve.locale
- The locale to use.NoSuchDefinitionException
- If a parent definition is not found.protected void resolveInheritance(Definition definition, Map<String,Definition> definitions, Locale locale, Set<String> alreadyResolvedDefinitions)
definition
- The definition to resolvedefinitions
- The definitions to take when obtaining a parent
definition.locale
- The locale to use.alreadyResolvedDefinitions
- The set of the definitions that have
been already resolved.NoSuchDefinitionException
- If an inheritance can not be solved.protected Map<String,Definition> copyDefinitionMap(Map<String,Definition> localeDefsMap)
copyDefinitionMap
in class CachingLocaleUrlDefinitionDAO
localeDefsMap
- The map of definition to be copied.localeDefsMap
into a LinkedHashMap
.Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.