|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectorg.apache.tiles.impl.BasicTilesContainer
org.apache.tiles.impl.KeyedDefinitionsFactoryTilesContainer
public class KeyedDefinitionsFactoryTilesContainer
Container that can be used to store multiple DefinitionsFactory
instances mapped to different keys.
| Nested Class Summary | |
|---|---|
protected class |
KeyedDefinitionsFactoryTilesContainer.DefaultKeyExtractor
This is the default factory key. |
static interface |
KeyedDefinitionsFactoryTilesContainer.KeyExtractor
It represents an object able to return a key from a request. |
| Field Summary | |
|---|---|
static java.lang.String |
DEFINITIONS_FACTORY_KEY_ATTRIBUTE_NAME
Name of the attribute inside the request that will be used to get the key of the definitions factory to be used. |
protected java.util.Map<java.lang.String,DefinitionsFactory> |
key2definitionsFactory
Maps definition factories to their keys. |
protected KeyedDefinitionsFactoryTilesContainer.KeyExtractor |
keyExtractor
The key extractor object. |
| Fields inherited from class org.apache.tiles.impl.BasicTilesContainer |
|---|
DEFINITIONS_CONFIG |
| Constructor Summary | |
|---|---|
KeyedDefinitionsFactoryTilesContainer()
Constructor. |
|
| Method Summary | |
|---|---|
protected Definition |
getDefinition(java.lang.String definitionName,
TilesRequestContext request)
Returns a definition specifying its name. |
DefinitionsFactory |
getDefinitionsFactory(java.lang.String key)
Standard Getter |
protected java.lang.String |
getDefinitionsFactoryKey(TilesRequestContext request)
Returns the definitions factory key. |
DefinitionsFactory |
getProperDefinitionsFactory(java.lang.String key)
Standard Getter |
void |
setDefinitionsFactory(java.lang.String key,
DefinitionsFactory definitionsFactory,
java.util.Map<java.lang.String,java.lang.String> initParameters)
Set the definitions factory. |
void |
setKeyExtractor(KeyedDefinitionsFactoryTilesContainer.KeyExtractor keyExtractor)
Sets the key extractor to use. |
| Methods inherited from class org.apache.tiles.impl.BasicTilesContainer |
|---|
checkInit, endContext, getApplicationContext, getAttributeContext, getContextFactory, getDefinitionsFactory, getPreparerFactory, getResourceNames, getResourceString, getResourceString, init, initializeDefinitionsFactory, isValidDefinition, prepare, render, render, setApplicationContext, setContextFactory, setDefinitionsFactory, setPreparerFactory, startContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFINITIONS_FACTORY_KEY_ATTRIBUTE_NAME
protected java.util.Map<java.lang.String,DefinitionsFactory> key2definitionsFactory
protected KeyedDefinitionsFactoryTilesContainer.KeyExtractor keyExtractor
| Constructor Detail |
|---|
public KeyedDefinitionsFactoryTilesContainer()
| Method Detail |
|---|
public DefinitionsFactory getDefinitionsFactory(java.lang.String key)
key - The key of the needed definitions factory.
public DefinitionsFactory getProperDefinitionsFactory(java.lang.String key)
key - The key of the needed definitions factory.
null will be returned.
public void setDefinitionsFactory(java.lang.String key,
DefinitionsFactory definitionsFactory,
java.util.Map<java.lang.String,java.lang.String> initParameters)
throws TilesException
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.
TilesException - If something goes wrong during initialization of
the definitions factory.public void setKeyExtractor(KeyedDefinitionsFactoryTilesContainer.KeyExtractor keyExtractor)
keyExtractor - The key extractor.
protected Definition getDefinition(java.lang.String definitionName,
TilesRequestContext request)
throws DefinitionsFactoryException
getDefinition in class BasicTilesContainerdefinitionName - The name of the definition to find.request - The request context.
DefinitionsFactoryException - If the definitions factory throws an
exception.protected java.lang.String getDefinitionsFactoryKey(TilesRequestContext request)
request - The request object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||