|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tiles.definition.LocaleDefinitionsFactory org.apache.tiles.definition.UrlDefinitionsFactory
public class UrlDefinitionsFactory
DefinitionsFactory
implementation that manages
Definitions configuration data from URLs, resolving inheritance when the URL
is loaded.
The Definition objects are read from the
DigesterDefinitionsReader
class unless another implementation is specified.
Field Summary | |
---|---|
protected Map<String,Long> |
lastModifiedDates
Deprecated. No more used. |
protected DefinitionsReader |
reader
Deprecated. No more used. |
protected List<Object> |
sources
Deprecated. Use #sourceURLs . |
Fields inherited from class org.apache.tiles.definition.LocaleDefinitionsFactory |
---|
applicationContext, definitionDao, localeResolver |
Fields inherited from interface org.apache.tiles.definition.DefinitionsFactory |
---|
DEFINITION_DAO_INIT_PARAM, DEFINITIONS_CONFIG, LOCALE_RESOLVER_IMPL_PROPERTY, READER_IMPL_PROPERTY |
Constructor Summary | |
---|---|
UrlDefinitionsFactory()
|
Method Summary | |
---|---|
protected void |
addDefinitions(Definitions definitions,
TilesRequestContext tilesContext)
Deprecated. Let the definitions be loaded by a DefinitionDAO . |
void |
addSource(Object source)
Deprecated. Use URLReader.addSourceURL(URL) . |
protected static List<String> |
calculatePostfixes(Locale locale)
Deprecated. Use LocaleUtil.calculatePostfixes(Locale) instead. |
protected static String |
concatPostfix(String name,
String postfix)
Deprecated. Use LocaleUtil.concatPostfix(String,String) instead |
protected DefinitionDAO<Locale> |
createDefaultDefinitionDAO()
Creates the default definition DAO, if it has not been specified outside. |
protected Definitions |
createDefinitions()
Deprecated. Do not use! Deprecated with no replacement. |
Definition |
getDefinition(String name,
TilesRequestContext tilesContext)
Returns a Definition object that matches the given name and Tiles context. |
protected Definitions |
getDefinitions()
Deprecated. Do not use! Deprecated with no replacement. |
protected List<String> |
getResourceNames(String resourceString)
Deprecated. Deprecated without replacement. |
protected String |
getResourceString(Map<String,String> parms)
Deprecated. Deprecated without replacement. |
protected boolean |
isContextProcessed(TilesRequestContext tilesContext)
Deprecated. It always return true . |
Definitions |
readDefinitions()
Deprecated. Let the Definitions Factory use it. |
void |
refresh()
Refreshes the stored definitions, reloading them. |
boolean |
refreshRequired()
Indicates whether the DefinitionsFactory is out of date and needs to be reloaded. |
Methods inherited from class org.apache.tiles.definition.LocaleDefinitionsFactory |
---|
createDefaultLocaleResolver, init, setApplicationContext, setDefinitionDAO, setLocaleResolver |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected List<Object> sources
#sourceURLs
.
protected DefinitionsReader reader
protected Map<String,Long> lastModifiedDates
Constructor Detail |
---|
public UrlDefinitionsFactory()
Method Detail |
---|
public Definition getDefinition(String name, TilesRequestContext tilesContext)
getDefinition
in interface DefinitionsFactory
getDefinition
in class LocaleDefinitionsFactory
name
- The name of the Definition to return.tilesContext
- The Tiles context to use to resolve the definition.
DefinitionsFactoryException
- if an error occurs reading definitions.public void refresh()
refresh
in interface Refreshable
public boolean refreshRequired()
refreshRequired
in interface RefreshMonitor
@Deprecated protected boolean isContextProcessed(TilesRequestContext tilesContext)
true
.
tilesContext
- The Tiles context to check.
public void addSource(Object source)
URLReader.addSourceURL(URL)
.
addSource
in interface DefinitionsFactory
addSource
in class LocaleDefinitionsFactory
source
- The configuration source for definitions.
DefinitionsFactoryException
- if an invalid source is passed in or
an error occurs resolving the source to an actual data store.protected DefinitionDAO<Locale> createDefaultDefinitionDAO()
createDefaultDefinitionDAO
in class LocaleDefinitionsFactory
@Deprecated public Definitions readDefinitions()
Definitions
set by reading
configuration data from the applied sources.
readDefinitions
in interface DefinitionsFactory
readDefinitions
in class LocaleDefinitionsFactory
DefinitionsFactoryException
- if an error occurs reading the
sources.@Deprecated protected Definitions getDefinitions()
@Deprecated protected void addDefinitions(Definitions definitions, TilesRequestContext tilesContext)
DefinitionDAO
.
Definition
objects to an existing
Definitions
set by reading locale-specific versions of
the applied sources.
definitions
- The Definitions object to append to.tilesContext
- The requested locale.
DefinitionsFactoryException
- if an error occurs reading definitions.@Deprecated protected Definitions createDefinitions()
Definitions
. Override this method
to provide your custom instance of Definitions.
Definitions
.protected static String concatPostfix(String name, String postfix)
LocaleUtil.concatPostfix(String,String)
instead
name
- Filename.postfix
- Postfix to add.
protected static List<String> calculatePostfixes(Locale locale)
LocaleUtil.calculatePostfixes(Locale)
instead.
locale
- the locale
@Deprecated 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.
@Deprecated protected List<String> getResourceNames(String resourceString)
resourceString
- comma seperated resources
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |