|
||||||||||
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
public abstract class BaseLocaleUrlDefinitionDAO
Base abstract class for a DAO that is based on URLs and locale as a customization key.
Field Summary | |
---|---|
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 Summary | |
---|---|
BaseLocaleUrlDefinitionDAO()
Constructor. |
Method Summary | |
---|---|
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. |
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.dao.DefinitionDAO |
---|
getDefinition, getDefinitions |
Field Detail |
---|
protected List<URL> sourceURLs
protected Map<String,Long> lastModifiedDates
protected TilesApplicationContext applicationContext
protected DefinitionsReader reader
Constructor Detail |
---|
public BaseLocaleUrlDefinitionDAO()
Method Detail |
---|
public void setSourceURLs(List<URL> sourceURLs)
setSourceURLs
in interface URLReader
sourceURLs
- The source URLs.public void setReader(DefinitionsReader reader)
setReader
in interface URLReader
reader
- The definitions reader.public void addSourceURL(URL sourceURL)
addSourceURL
in interface URLReader
sourceURL
- The source URL to add.public void setApplicationContext(TilesApplicationContext applicationContext)
setApplicationContext
in interface TilesApplicationContextAware
applicationContext
- The Tiles application context.public void init(Map<String,String> params)
init
in interface Initializable
params
- The map of parameters.public boolean refreshRequired()
refreshRequired
in interface RefreshMonitor
true
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 BasicTilesContainer.DEFINITIONS_CONFIG
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 resources
protected Map<String,Definition> loadDefinitionsFromURL(URL url)
url
- The URL to read.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |