public abstract class BaseLocaleUrlDefinitionDAO extends Object implements DefinitionDAO<Locale>, Initializable, TilesApplicationContextAware, RefreshMonitor, URLReader
| Modifier and Type | Field and Description |
|---|---|
protected TilesApplicationContext |
applicationContext
The application context.
|
protected Map<String,Long> |
lastModifiedDates
Contains the dates that the URL sources were last modified.
|
protected DefinitionsReader |
reader
Reader used to get definitions from the sources.
|
protected List<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(URL sourceURL)
Adds a single URL to use.
|
protected String[] |
getResourceNames(String resourceString)
Parse the resourceString into a list of resource paths which can be
loaded by the application context.
|
protected String |
getResourceString(Map<String,String> parms)
Derive the resource string from the initialization parameters.
|
protected void |
identifySources(Map<String,String> initParameters)
Detects the sources to load.
|
void |
init(Map<String,String> params)
Initializes the object.
|
protected Map<String,Definition> |
loadDefinitionsFromURL(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(List<URL> sourceURLs)
Sets the source URLs to use.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDefinition, getDefinitionsprotected List<URL> sourceURLs
protected Map<String,Long> lastModifiedDates
protected TilesApplicationContext applicationContext
protected DefinitionsReader reader
public void setSourceURLs(List<URL> sourceURLs)
setSourceURLs in interface URLReadersourceURLs - The source URLs.public void setReader(DefinitionsReader reader)
public void addSourceURL(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(Map<String,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(Map<String,String> initParameters)
initParameters - The initialization parameters.protected String getResourceString(Map<String,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 String[] getResourceNames(String resourceString)
resourceString - comma separated resourcesprotected Map<String,Definition> loadDefinitionsFromURL(URL url)
url - The URL to read.Copyright © 2025. All rights reserved.