public abstract class BaseLocaleUrlDefinitionDAO extends java.lang.Object implements DefinitionDAO<java.util.Locale>, Initializable, TilesApplicationContextAware, RefreshMonitor, URLReader
| Modifier and Type | Field and Description |
|---|---|
protected TilesApplicationContext |
applicationContext
The application context.
|
protected java.util.Map<java.lang.String,java.lang.Long> |
lastModifiedDates
Contains the dates that the URL sources were last modified.
|
protected DefinitionsReader |
reader
Reader used to get definitions from the sources.
|
protected java.util.List<java.net.URL> |
sourceURLs
Contains the URL objects identifying where configuration data is found.
|
| Constructor and Description |
|---|
BaseLocaleUrlDefinitionDAO()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSourceURL(java.net.URL sourceURL)
Adds a single URL to use.
|
protected java.lang.String[] |
getResourceNames(java.lang.String resourceString)
Parse the resourceString into a list of resource paths which can be
loaded by the application context.
|
protected java.lang.String |
getResourceString(java.util.Map<java.lang.String,java.lang.String> parms)
Derive the resource string from the initialization parameters.
|
protected void |
identifySources(java.util.Map<java.lang.String,java.lang.String> initParameters)
Detects the sources to load.
|
void |
init(java.util.Map<java.lang.String,java.lang.String> params)
Initializes the object.
|
protected java.util.Map<java.lang.String,Definition> |
loadDefinitionsFromURL(java.net.URL url)
Loads definitions from an URL without loading from "parent" URLs.
|
boolean |
refreshRequired()
Indicates whether the sources are out of date and need to be reloaded.
|
void |
setApplicationContext(TilesApplicationContext applicationContext)
Sets the Tiles application context.
|
void |
setReader(DefinitionsReader reader)
Sets the definitions reader that will read the URLs.
|
void |
setSourceURLs(java.util.List<java.net.URL> sourceURLs)
Sets the source URLs to use.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDefinition, getDefinitionsprotected java.util.List<java.net.URL> sourceURLs
protected java.util.Map<java.lang.String,java.lang.Long> lastModifiedDates
protected TilesApplicationContext applicationContext
protected DefinitionsReader reader
public void setSourceURLs(java.util.List<java.net.URL> sourceURLs)
setSourceURLs in interface URLReadersourceURLs - The source URLs.public void setReader(DefinitionsReader reader)
public void addSourceURL(java.net.URL sourceURL)
addSourceURL in interface URLReadersourceURL - The source URL to add.public void setApplicationContext(TilesApplicationContext applicationContext)
setApplicationContext in interface TilesApplicationContextAwareapplicationContext - The Tiles application context.public void init(java.util.Map<java.lang.String,java.lang.String> params)
init in interface Initializableparams - The map of parameters.public boolean refreshRequired()
refreshRequired in interface RefreshMonitortrue if the sources need to be refreshed.protected void identifySources(java.util.Map<java.lang.String,java.lang.String> initParameters)
initParameters - The initialization parameters.protected java.lang.String getResourceString(java.util.Map<java.lang.String,java.lang.String> parms)
DefinitionsFactory.DEFINITIONS_CONFIG is available,
attempts to retrieve the deprecated
org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
parameter and LEGACY_DEFINITIONS_CONFIG. If neither are
available, returns "/WEB-INF/tiles.xml".parms - The initialization parameters.protected java.lang.String[] getResourceNames(java.lang.String resourceString)
resourceString - comma separated resourcesprotected java.util.Map<java.lang.String,Definition> loadDefinitionsFromURL(java.net.URL url)
url - The URL to read.