TilesAccess.setContainer(
org.apache.tiles.TilesApplicationContext, org.apache.tiles.TilesContainer, String)
and using CachingTilesContainer
as container implementation.public class CachingKeyedDefinitionsFactoryTilesContainer extends KeyedDefinitionsFactoryTilesContainer implements MutableTilesContainer
DefinitionsFactory
instances mapped to different keys, with the addition of being "mutable",
i.e. caches (in memory) the definitions registered to it. If a definition
is not found in cache, it will revert back to it's definitions factory.KeyedDefinitionsFactoryTilesContainer.DefaultKeyExtractor, KeyedDefinitionsFactoryTilesContainer.KeyExtractor
DEFINITIONS_CONFIG_PREFIX, key2definitionsFactory, keyExtractor
DEFINITIONS_CONFIG
Constructor and Description |
---|
CachingKeyedDefinitionsFactoryTilesContainer()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected Definition |
getDefinition(String definition,
TilesRequestContext context)
Deprecated.
Returns a definition specifying its name.
|
DefinitionsFactory |
getDefinitionsFactory()
Deprecated.
Returns the definitions factory.
|
DefinitionsFactory |
getDefinitionsFactory(String key)
Deprecated.
Returns a definition factory given its key.
|
protected DefinitionManager |
getOrCreateDefinitionManager(String key)
Deprecated.
Returns a definition manager if found, otherwise it will create a new
one.
|
protected DefinitionManager |
getProperDefinitionManager(String key)
Deprecated.
Returns a definition manager if found.
|
void |
register(Definition definition,
Object... requestItems)
Deprecated.
Register a new definition with the container.
|
protected void |
register(Definition definition,
TilesRequestContext request)
Deprecated.
Registers a custom definition.
|
void |
setDefinitionsFactory(DefinitionsFactory definitionsFactory)
Deprecated.
Set the definitions factory.
|
void |
setDefinitionsFactory(String key,
DefinitionsFactory definitionsFactory,
Map<String,String> initParameters)
Deprecated.
|
getDefinitionsFactoryKey, getProperDefinitionsFactory, setDefinitionsFactory, setKeyExtractor
checkInit, endContext, evaluate, getApplicationContext, getAttributeContext, getContext, getContextFactory, getContextStack, getPreparerFactory, getRequestContextFactory, getResourceNames, getResourceString, getResourceString, init, initializeDefinitionsFactory, isValidDefinition, popContext, prepare, pushContext, render, render, render, render, render, render, renderContext, setApplicationContext, setAttributeEvaluatorFactory, setContextFactory, setPreparerFactory, setRendererFactory, setRequestContextFactory, startContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
endContext, evaluate, getApplicationContext, getAttributeContext, init, isValidDefinition, prepare, render, render, render, renderContext, startContext
public CachingKeyedDefinitionsFactoryTilesContainer()
public void register(Definition definition, Object... requestItems)
register
in interface MutableTilesContainer
definition
- The definition to register.requestItems
- the current request objects.protected Definition getDefinition(String definition, TilesRequestContext context)
getDefinition
in class KeyedDefinitionsFactoryTilesContainer
definition
- The name of the definition to find.context
- The request context.public DefinitionsFactory getDefinitionsFactory()
getDefinitionsFactory
in class BasicTilesContainer
public DefinitionsFactory getDefinitionsFactory(String key)
getDefinitionsFactory
in class KeyedDefinitionsFactoryTilesContainer
key
- The key of the needed definitions factory.public void setDefinitionsFactory(DefinitionsFactory definitionsFactory)
setDefinitionsFactory
in class BasicTilesContainer
definitionsFactory
- the definitions factory for this instance.@Deprecated public void setDefinitionsFactory(String key, DefinitionsFactory definitionsFactory, Map<String,String> initParameters)
setDefinitionsFactory
in class KeyedDefinitionsFactoryTilesContainer
key
- The key under which the definitions factory is catalogued.definitionsFactory
- the definitions factory for this instance.initParameters
- The init parameters to configure the definitions
factory.protected void register(Definition definition, TilesRequestContext request)
definition
- The definition to register.request
- The request inside which the definition should be
registered.protected DefinitionManager getOrCreateDefinitionManager(String key)
key
- The key of the definition manager.protected DefinitionManager getProperDefinitionManager(String key)
key
- The key of the definition manager.Copyright © 2017. All rights reserved.