|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO
public class ResolvingLocaleUrlDefinitionDAO
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.
Field Summary |
---|
Fields inherited from class org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO |
---|
CHECK_REFRESH_INIT_PARAMETER, checkRefresh, definitionResolver, locale2definitionMap |
Fields inherited from class org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO |
---|
applicationContext, lastModifiedDates, reader, sourceURLs |
Constructor Summary | |
---|---|
ResolvingLocaleUrlDefinitionDAO()
|
Method Summary | |
---|---|
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> |
loadDefinitionsFromURLs(Locale customizationKey)
Loads definitions from the URLs. |
protected Map<String,Definition> |
loadParentDefinitions(Locale parentLocale)
Loads parent definitions, i.e. definitions mapped to a parent locale. |
protected void |
postDefinitionLoadOperations(Map<String,Definition> localeDefsMap,
Locale customizationKey)
Deprecated. |
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. |
Methods inherited from class org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO |
---|
checkAndloadDefinitions, getDefinition, getDefinitions, init, loadDefinitions, loadRawDefinitionsFromURLs, refresh, setCheckRefresh, setPatternDefinitionResolver |
Methods inherited from class org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO |
---|
addSourceURL, getResourceNames, getResourceString, identifySources, loadDefinitionsFromURL, refreshRequired, setApplicationContext, setReader, setSourceURLs |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.tiles.definition.RefreshMonitor |
---|
refreshRequired |
Constructor Detail |
---|
public ResolvingLocaleUrlDefinitionDAO()
Method Detail |
---|
protected Map<String,Definition> loadParentDefinitions(Locale parentLocale)
loadParentDefinitions
in class CachingLocaleUrlDefinitionDAO
parentLocale
- The locale to use when loading URLs.
protected Map<String,Definition> loadDefinitionsFromURLs(Locale customizationKey)
loadDefinitionsFromURLs
in class CachingLocaleUrlDefinitionDAO
customizationKey
- The locale to use when loading URLs.
protected Definition getDefinitionFromResolver(String name, Locale customizationKey)
getDefinitionFromResolver
in class CachingLocaleUrlDefinitionDAO
name
- The name of the definition.customizationKey
- The customization key to use.
@Deprecated protected void postDefinitionLoadOperations(Map<String,Definition> localeDefsMap, Locale customizationKey)
postDefinitionLoadOperations
in class CachingLocaleUrlDefinitionDAO
localeDefsMap
- The loaded definitions.customizationKey
- The locale to use when loading URLs.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
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |