org.apache.tiles
Interface TilesContainer

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

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: 1044659 $ $Date: 2010-12-11 09:16:04 -0500 (Sat, 11 Dec 2010) $

Method Summary
 void endContext(org.apache.tiles.request.Request request)
          Ends a context, where attribute values are stored independently from others.
It must be called after a startContext(Request) call.
 Object evaluate(Attribute attribute, org.apache.tiles.request.Request request)
          Evaluates the given attribute.
 org.apache.tiles.request.ApplicationContext getApplicationContext()
          Retrieve the containers context.
 AttributeContext getAttributeContext(org.apache.tiles.request.Request request)
          Retrive the attribute context of the current request.
 Definition getDefinition(String definitionName, org.apache.tiles.request.Request request)
          Returns a definition specifying its name.
 boolean isValidDefinition(String definition, org.apache.tiles.request.Request request)
          Determine whether or not the definition exists.
 void prepare(String preparer, org.apache.tiles.request.Request request)
          Executes a preparer.
 void render(Attribute attribute, org.apache.tiles.request.Request request)
          Render the given Attribute.
 void render(Definition definition, org.apache.tiles.request.Request request)
          Renders the specified definition.
 void render(String definition, org.apache.tiles.request.Request request)
          Render the given tiles request.
 void renderContext(org.apache.tiles.request.Request request)
          Renders the current context, as it is.
 AttributeContext startContext(org.apache.tiles.request.Request request)
          Starts a new context, where attribute values are stored independently from others.
When the use of the contexts is finished, call endContext(Request)
 

Method Detail

getApplicationContext

org.apache.tiles.request.ApplicationContext getApplicationContext()
Retrieve the containers context.

Returns:
current application context

getAttributeContext

AttributeContext getAttributeContext(org.apache.tiles.request.Request request)
Retrive the attribute context of the current request.

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

startContext

AttributeContext startContext(org.apache.tiles.request.Request request)
Starts a new context, where attribute values are stored independently from others.
When the use of the contexts is finished, call endContext(Request)

Parameters:
request - The request.
Returns:
The newly created context.

endContext

void endContext(org.apache.tiles.request.Request request)
Ends a context, where attribute values are stored independently from others.
It must be called after a startContext(Request) call.

Parameters:
request - The request.

renderContext

void renderContext(org.apache.tiles.request.Request request)
Renders the current context, as it is.

Parameters:
request - The request.
Since:
2.1.0

prepare

void prepare(String preparer,
             org.apache.tiles.request.Request request)
Executes a preparer.

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

render

void render(String definition,
            org.apache.tiles.request.Request request)
Render the given tiles request.

Parameters:
definition - the current definition.
request - The request.

render

void render(Definition definition,
            org.apache.tiles.request.Request request)
Renders the specified definition.

Parameters:
definition - The definition to render.
request - The request context.

render

void render(Attribute attribute,
            org.apache.tiles.request.Request request)
            throws IOException
Render the given Attribute.

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

evaluate

Object evaluate(Attribute attribute,
                org.apache.tiles.request.Request request)
Evaluates the given attribute.

Parameters:
attribute - The attribute to evaluate.
request - The request.
Returns:
The evaluated object.
Since:
2.1.0

getDefinition

Definition getDefinition(String definitionName,
                         org.apache.tiles.request.Request request)
Returns a definition specifying its name.

Parameters:
definitionName - The name of the definition to find.
request - The request context.
Returns:
The definition, if found.

isValidDefinition

boolean isValidDefinition(String definition,
                          org.apache.tiles.request.Request request)
Determine whether or not the definition exists.

Parameters:
definition - the name of the definition.
request - The request.
Returns:
true if the definition is found.


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