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

java.lang.Objectorg.apache.tiles.impl.BasicTilesContainer
public class BasicTilesContainer
Basic implementation of the tiles container interface. In most cases, this container will be customized by injecting customized services, not necessarily by override the container
| Field Summary | |
|---|---|
static java.lang.String |
DEFINITIONS_CONFIG
Deprecated. Use DefinitionsFactory.DEFINITIONS_CONFIG. |
| Constructor Summary | |
|---|---|
BasicTilesContainer()
|
|
| Method Summary | |
|---|---|
protected void |
checkInit()
Determine whether or not the container has been initialized. |
void |
endContext(java.lang.Object... requestItems)
|
java.lang.Object |
evaluate(org.apache.tiles.Attribute attribute,
java.lang.Object... requestItems)
|
org.apache.tiles.TilesApplicationContext |
getApplicationContext()
Returns the Tiles application context used by this container. |
org.apache.tiles.AttributeContext |
getAttributeContext(java.lang.Object... requestItems)
|
protected org.apache.tiles.AttributeContext |
getContext(TilesRequestContext tilesContext)
Get attribute context from request. |
TilesContextFactory |
getContextFactory()
Deprecated. Do not use it, it returns null. Use
getRequestContextFactory(). |
protected java.util.Stack<org.apache.tiles.AttributeContext> |
getContextStack(TilesRequestContext tilesContext)
Returns the context stack. |
protected org.apache.tiles.Definition |
getDefinition(java.lang.String definitionName,
TilesRequestContext request)
Returns a definition specifying its name. |
DefinitionsFactory |
getDefinitionsFactory()
Returns the definitions factory. |
PreparerFactory |
getPreparerFactory()
Returns the preparer factory used by this container. |
protected TilesRequestContextFactory |
getRequestContextFactory()
Returns the request context factory. |
protected java.util.List<java.lang.String> |
getResourceNames(java.lang.String resourceString)
Parse the resourceString into a list of resource paths which can be loaded by the application context. |
protected java.lang.String |
getResourceString()
Derive the resource string from the initialization parameters. |
protected java.lang.String |
getResourceString(java.util.Map<java.lang.String,java.lang.String> parms)
Derive the resource string from the initialization parameters. |
void |
init(java.util.Map<java.lang.String,java.lang.String> initParameters)
Initialize the Container with the given configuration. |
protected void |
initializeDefinitionsFactory(DefinitionsFactory definitionsFactory,
java.lang.String resourceString,
java.util.Map<java.lang.String,java.lang.String> initParameters)
Deprecated. Do not use, the Definitions Factory should be initialized by the Tiles Container Factory. |
boolean |
isValidDefinition(java.lang.String definitionName,
java.lang.Object... requestItems)
|
protected org.apache.tiles.AttributeContext |
popContext(TilesRequestContext tilesContext)
Pops a context object out of the stack. |
void |
prepare(java.lang.String preparer,
java.lang.Object... requestItems)
|
protected void |
pushContext(org.apache.tiles.AttributeContext context,
TilesRequestContext tilesContext)
Pushes a context object in the stack. |
void |
render(org.apache.tiles.Attribute attr,
java.lang.Object... requestItems)
|
void |
render(org.apache.tiles.Attribute attr,
java.io.Writer writer,
java.lang.Object... requestItems)
Deprecated. |
void |
render(java.lang.String definitionName,
java.lang.Object... requestItems)
|
void |
renderContext(java.lang.Object... requestItems)
|
void |
setApplicationContext(org.apache.tiles.TilesApplicationContext context)
Sets the Tiles application context to use. |
void |
setContextFactory(TilesContextFactory contextFactory)
Deprecated. Use setRequestContextFactory(TilesRequestContextFactory). |
void |
setDefinitionsFactory(DefinitionsFactory definitionsFactory)
Set the definitions factory. |
void |
setEvaluator(AttributeEvaluator evaluator)
Sets the evaluator to use. |
void |
setPreparerFactory(PreparerFactory preparerFactory)
Set the preparerInstance factory. |
void |
setRendererFactory(RendererFactory rendererFactory)
Sets the renderer instance factory. |
void |
setRequestContextFactory(TilesRequestContextFactory contextFactory)
Sets the request context factory. |
org.apache.tiles.AttributeContext |
startContext(java.lang.Object... requestItems)
|
| 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_CONFIG
DefinitionsFactory.DEFINITIONS_CONFIG.
| Constructor Detail |
|---|
public BasicTilesContainer()
| Method Detail |
|---|
public void init(java.util.Map<java.lang.String,java.lang.String> initParameters)
init in interface org.apache.tiles.TilesContainerinitParameters - application context for this container
java.lang.IllegalStateException - If the container has been already
initialized.
DefinitionsFactoryException - If something goes wrong during
initialization.public org.apache.tiles.AttributeContext startContext(java.lang.Object... requestItems)
startContext in interface org.apache.tiles.TilesContainerpublic void endContext(java.lang.Object... requestItems)
endContext in interface org.apache.tiles.TilesContainerpublic void renderContext(java.lang.Object... requestItems)
renderContext in interface org.apache.tiles.TilesContainerpublic org.apache.tiles.TilesApplicationContext getApplicationContext()
getApplicationContext in interface org.apache.tiles.TilesContainerpublic void setApplicationContext(org.apache.tiles.TilesApplicationContext context)
context - The Tiles application context.public org.apache.tiles.AttributeContext getAttributeContext(java.lang.Object... requestItems)
getAttributeContext in interface org.apache.tiles.TilesContainer@Deprecated public TilesContextFactory getContextFactory()
null. Use
getRequestContextFactory().
null.protected TilesRequestContextFactory getRequestContextFactory()
public void setContextFactory(TilesContextFactory contextFactory)
setRequestContextFactory(TilesRequestContextFactory).
contextFactory - The context factory.public void setRequestContextFactory(TilesRequestContextFactory contextFactory)
contextFactory - The context factory.public DefinitionsFactory getDefinitionsFactory()
public void setDefinitionsFactory(DefinitionsFactory definitionsFactory)
definitionsFactory - the definitions factory for this instance.public PreparerFactory getPreparerFactory()
public void setPreparerFactory(PreparerFactory preparerFactory)
preparerFactory - the preparerInstance factory for this conainer.public void setRendererFactory(RendererFactory rendererFactory)
rendererFactory - the renderer instance factory for this container.public void setEvaluator(AttributeEvaluator evaluator)
evaluator - The evaluator to use.
public void prepare(java.lang.String preparer,
java.lang.Object... requestItems)
prepare in interface org.apache.tiles.TilesContainer
public void render(java.lang.String definitionName,
java.lang.Object... requestItems)
render in interface org.apache.tiles.TilesContainer
@Deprecated
public void render(org.apache.tiles.Attribute attr,
java.io.Writer writer,
java.lang.Object... requestItems)
throws java.io.IOException
render in interface org.apache.tiles.TilesContainerjava.io.IOException
public void render(org.apache.tiles.Attribute attr,
java.lang.Object... requestItems)
throws java.io.IOException
render in interface org.apache.tiles.TilesContainerjava.io.IOException
public java.lang.Object evaluate(org.apache.tiles.Attribute attribute,
java.lang.Object... requestItems)
evaluate in interface org.apache.tiles.TilesContainer
public boolean isValidDefinition(java.lang.String definitionName,
java.lang.Object... requestItems)
isValidDefinition in interface org.apache.tiles.TilesContainer
protected org.apache.tiles.Definition getDefinition(java.lang.String definitionName,
TilesRequestContext request)
definitionName - The name of the definition to find.request - The request context.
DefinitionsFactoryException - If the definitions factory throws an
exception.protected java.lang.String getResourceString()
DEFINITIONS_CONFIG is available, attempts
to retrieve LEGACY_DEFINITIONS_CONFIG. If niether are
available, returns "/WEB-INF/tiles.xml".
protected java.lang.String getResourceString(java.util.Map<java.lang.String,java.lang.String> parms)
DEFINITIONS_CONFIG is available, attempts
to retrieve LEGACY_DEFINITIONS_CONFIG. If niether are
available, returns "/WEB-INF/tiles.xml".
parms - The initialization parameters.
protected java.util.List<java.lang.String> getResourceNames(java.lang.String resourceString)
resourceString - comma seperated resources
protected void checkInit()
java.lang.IllegalStateException - if the container has already been initialized.
@Deprecated
protected void initializeDefinitionsFactory(DefinitionsFactory definitionsFactory,
java.lang.String resourceString,
java.util.Map<java.lang.String,java.lang.String> initParameters)
definitionsFactory - The factory to initialize.resourceString - The string containing a comma-separated-list of
resources.initParameters - A map containing the initialization parameters.
DefinitionsFactoryException - If something goes wrong.protected java.util.Stack<org.apache.tiles.AttributeContext> getContextStack(TilesRequestContext tilesContext)
tilesContext - The Tiles context object to use.
protected void pushContext(org.apache.tiles.AttributeContext context,
TilesRequestContext tilesContext)
context - The context to push.tilesContext - The Tiles context object to use.protected org.apache.tiles.AttributeContext popContext(TilesRequestContext tilesContext)
tilesContext - The Tiles context object to use.
protected org.apache.tiles.AttributeContext getContext(TilesRequestContext tilesContext)
tilesContext - current Tiles application context.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||