This project has retired. For details please refer to its Attic page.
TilesContainer (Tiles 2 2.1.4 API)

org.apache.tiles
Interface TilesContainer

Package class diagram package TilesContainer
All Known Subinterfaces:
MutableTilesContainer
All Known Implementing Classes:
BasicTilesContainer, CachingKeyedDefinitionsFactoryTilesContainer, CachingTilesContainer, KeyedDefinitionsFactoryTilesContainer

public interface TilesContainer

An encapsulation of the tiles framework. This interface is used to expose tiles features to frameworks which leverage it as a plugin. It can alternately be used by web applications which would like a programmatic interface.

Since:
2.0
Version:
$Rev: 736275 $ $Date: 2009-01-21 10:58:20 +0100 (mer, 21 gen 2009) $

Method Summary
 void endContext(Object... requestItems)
          Ends a context, where attribute values are stored independently from others.
 Object evaluate(Attribute attribute, Object... requestItems)
          Evaluates the given attribute.
 TilesApplicationContext getApplicationContext()
          Retrieve the containers context.
 AttributeContext getAttributeContext(Object... requestItems)
          Retrive the attribute context of the current request.
 void init(Map<String,String> initParameters)
          Initialize the container with the given configuration.
 boolean isValidDefinition(String definition, Object... requestItems)
          Determine whether or not the definition exists.
 void prepare(String preparer, Object... requestItems)
          Executes a preparer.
 void render(Attribute attribute, Object... requestItems)
          Render the given Attribute.
 void render(Attribute attribute, Writer writer, Object... requestItems)
          Deprecated. Use render(Attribute, Object...).
 void render(String definition, Object... requestItems)
          Render the given tiles request.
 void renderContext(Object... requestItems)
          Renders the current context, as it is.
 AttributeContext startContext(Object... requestItems)
          Starts a new context, where attribute values are stored independently from others.
 

Method Detail

init

void init(Map<String,String> initParameters)
Initialize the container with the given configuration.

Parameters:
initParameters - application context

getApplicationContext

TilesApplicationContext getApplicationContext()
Retrieve the containers context.

Returns:
current application context

getAttributeContext

AttributeContext getAttributeContext(Object... requestItems)
Retrive the attribute context of the current request.

Parameters:
requestItems - the current request objects.
Returns:
map of the attributes in the current attribute context.

startContext

AttributeContext startContext(Object... requestItems)
Starts a new context, where attribute values are stored independently from others.
When the use of the contexts is finished, call endContext(Object...)

Parameters:
requestItems - the current request objects.
Returns:
The newly created context.

endContext

void endContext(Object... requestItems)
Ends a context, where attribute values are stored independently from others.
It must be called after a startContext(Object...) call.

Parameters:
requestItems - the current request objects.

renderContext

void renderContext(Object... requestItems)
Renders the current context, as it is.

Parameters:
requestItems - the current request objects.
Since:
2.1.0

prepare

void prepare(String preparer,
             Object... requestItems)
Executes a preparer.

Parameters:
preparer - The name of the preparer to execute.
requestItems - the current request objects.

render

void render(String definition,
            Object... requestItems)
Render the given tiles request.

Parameters:
definition - the current definition.
requestItems - the current request objects.

render

@Deprecated
void render(Attribute attribute,
                       Writer writer,
                       Object... requestItems)
            throws IOException
Deprecated. Use render(Attribute, Object...).

Render the given Attribute.

Parameters:
attribute - The attribute to render.
writer - A writer. IT WON'T BE EVALUATED!!!
requestItems - the current request objects.
Throws:
IOException - If something goes wrong during writing to the output.

render

void render(Attribute attribute,
            Object... requestItems)
            throws IOException
Render the given Attribute.

Parameters:
attribute - The attribute to render.
requestItems - the current request objects.
Throws:
IOException - If something goes wrong during writing to the output.
Since:
2.1.2

evaluate

Object evaluate(Attribute attribute,
                Object... requestItems)
Evaluates the given attribute.

Parameters:
attribute - The attribute to evaluate.
requestItems - the current request objects.
Returns:
The evaluated object.
Since:
2.1.0

isValidDefinition

boolean isValidDefinition(String definition,
                          Object... requestItems)
Determine whether or not the definition exists.

Parameters:
definition - the name of the definition.
requestItems - the current request objects.
Returns:
true if the definition is found.


Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.