UnresolvingLocaleDefinitionsFactory
and using
ResolvingLocaleUrlDefinitionDAO
as Tiles DAO.public class UrlDefinitionsFactory extends UnresolvingLocaleDefinitionsFactory implements Refreshable
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.
Modifier and Type | Field and Description |
---|---|
protected Map<String,Long> |
lastModifiedDates
Deprecated.
No more used.
|
protected DefinitionsReader |
reader
Deprecated.
No more used.
|
protected List<Object> |
sources
Deprecated.
|
applicationContext, definitionDao, localeResolver
DEFINITION_DAO_INIT_PARAM, DEFINITIONS_CONFIG, LOCALE_RESOLVER_IMPL_PROPERTY, READER_IMPL_PROPERTY
Constructor and Description |
---|
UrlDefinitionsFactory()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addDefinitions(Definitions definitions,
TilesRequestContext tilesContext)
Deprecated.
Let the definitions be loaded by a
DefinitionDAO . |
void |
addSource(Object source)
Deprecated.
|
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 ResolvingLocaleUrlDefinitionDAO |
createDefaultDefinitionDAO()
Deprecated.
Creates the default definition DAO, if it has not been specified outside.
|
protected Definitions |
createDefinitions()
Deprecated.
Do not use! Deprecated with no replacement.
|
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.
|
void |
init(Map<String,String> params)
Deprecated.
Initializes the DefinitionsFactory and its subcomponents.
|
protected boolean |
isContextProcessed(TilesRequestContext tilesContext)
Deprecated.
It always return
true . |
Definitions |
readDefinitions()
Deprecated.
Let the Definitions Factory use it.
|
void |
refresh()
Deprecated.
Refreshes the stored definitions, reloading them.
|
boolean |
refreshRequired()
Deprecated.
Indicates whether the DefinitionsFactory is out of date and needs to be
reloaded.
|
getDefinition, setApplicationContext, setDefinitionDAO, setLocaleResolver
protected List<Object> sources
URLReader.addSourceURL(URL)
.protected DefinitionsReader reader
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 UnresolvingLocaleDefinitionsFactory
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 ResolvingLocaleUrlDefinitionDAO createDefaultDefinitionDAO()
public void init(Map<String,String> params)
UnresolvingLocaleDefinitionsFactory
init
in interface DefinitionsFactory
init
in class UnresolvingLocaleDefinitionsFactory
params
- The Map of configuration properties.@Deprecated public Definitions readDefinitions()
Definitions
set by reading
configuration data from the applied sources.readDefinitions
in interface DefinitionsFactory
readDefinitions
in class UnresolvingLocaleDefinitionsFactory
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)
insteadname
- 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 resourcesCopyright © 2017. All rights reserved.