org.apache.tiles
Class TilesContainerWrapper

Package class diagram package TilesContainerWrapper
java.lang.Object
  extended by org.apache.tiles.TilesContainerWrapper
All Implemented Interfaces:
TilesContainer
Direct Known Subclasses:
CachingTilesContainer

public class TilesContainerWrapper
extends Object
implements TilesContainer

Wraps a Tiles container to allow easy decoration.

Version:
$Rev: 1044659 $ $Date: 2010-12-11 09:16:04 -0500 (Sat, 11 Dec 2010) $

Field Summary
protected  TilesContainer container
          The container to wrap.
 
Constructor Summary
TilesContainerWrapper(TilesContainer container)
          Constructor.
 
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 TilesContainer.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.
 TilesContainer getWrappedContainer()
          Returns the wrapped container.
 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 TilesContainer.endContext(Request)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

container

protected TilesContainer container
The container to wrap.

Constructor Detail

TilesContainerWrapper

public TilesContainerWrapper(TilesContainer container)
Constructor.

Parameters:
container - The container to wrap.
Method Detail

getWrappedContainer

public TilesContainer getWrappedContainer()
Returns the wrapped container.

Returns:
The wrapped container.

endContext

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

Specified by:
endContext in interface TilesContainer
Parameters:
request - The request.

evaluate

public Object evaluate(Attribute attribute,
                       org.apache.tiles.request.Request request)
Description copied from interface: TilesContainer
Evaluates the given attribute.

Specified by:
evaluate in interface TilesContainer
Parameters:
attribute - The attribute to evaluate.
request - The request.
Returns:
The evaluated object.

getApplicationContext

public org.apache.tiles.request.ApplicationContext getApplicationContext()
Description copied from interface: TilesContainer
Retrieve the containers context.

Specified by:
getApplicationContext in interface TilesContainer
Returns:
current application context

getAttributeContext

public AttributeContext getAttributeContext(org.apache.tiles.request.Request request)
Description copied from interface: TilesContainer
Retrive the attribute context of the current request.

Specified by:
getAttributeContext in interface TilesContainer
Parameters:
request - The request.
Returns:
map of the attributes in the current attribute context.

getDefinition

public Definition getDefinition(String definitionName,
                                org.apache.tiles.request.Request request)
Description copied from interface: TilesContainer
Returns a definition specifying its name.

Specified by:
getDefinition in interface TilesContainer
Parameters:
definitionName - The name of the definition to find.
request - The request context.
Returns:
The definition, if found.

isValidDefinition

public boolean isValidDefinition(String definition,
                                 org.apache.tiles.request.Request request)
Description copied from interface: TilesContainer
Determine whether or not the definition exists.

Specified by:
isValidDefinition in interface TilesContainer
Parameters:
definition - the name of the definition.
request - The request.
Returns:
true if the definition is found.

prepare

public void prepare(String preparer,
                    org.apache.tiles.request.Request request)
Description copied from interface: TilesContainer
Executes a preparer.

Specified by:
prepare in interface TilesContainer
Parameters:
preparer - The name of the preparer to execute.
request - The request.

render

public void render(String definition,
                   org.apache.tiles.request.Request request)
Description copied from interface: TilesContainer
Render the given tiles request.

Specified by:
render in interface TilesContainer
Parameters:
definition - the current definition.
request - The request.

render

public void render(Definition definition,
                   org.apache.tiles.request.Request request)
Description copied from interface: TilesContainer
Renders the specified definition.

Specified by:
render in interface TilesContainer
Parameters:
definition - The definition to render.
request - The request context.

render

public void render(Attribute attribute,
                   org.apache.tiles.request.Request request)
            throws IOException
Description copied from interface: TilesContainer
Render the given Attribute.

Specified by:
render in interface TilesContainer
Parameters:
attribute - The attribute to render.
request - The request.
Throws:
IOException - If something goes wrong during writing to the output.

renderContext

public void renderContext(org.apache.tiles.request.Request request)
Description copied from interface: TilesContainer
Renders the current context, as it is.

Specified by:
renderContext in interface TilesContainer
Parameters:
request - The request.

startContext

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

Specified by:
startContext in interface TilesContainer
Parameters:
request - The request.
Returns:
The newly created context.


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