Package org.apache.tiles.api
Class TilesContainerWrapper
java.lang.Object
org.apache.tiles.api.TilesContainerWrapper
- All Implemented Interfaces:
TilesContainer
- Direct Known Subclasses:
CachingTilesContainer
Wraps a Tiles container to allow easy decoration.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
endContext
(Request request) Ends a context, where attribute values are stored independently of others.
It must be called after aTilesContainer.startContext(Request)
call.Evaluates the given attribute.Retrieve the container's context.getAttributeContext
(Request request) Retrieve the attribute context of the current request.getDefinition
(String definitionName, Request request) Returns a definition specifying its name.boolean
isValidDefinition
(String definition, Request request) Determine whether the definition exists.void
Executes a preparer.void
Render the given tiles request.void
Render the given Attribute.void
render
(Definition definition, Request request) Renders the specified definition.void
renderContext
(Request request) Renders the current context, as it is.startContext
(Request request) Starts a new context, where attribute values are stored independently of others.
When the use of the contexts is finished, callTilesContainer.endContext(Request)
-
Field Details
-
container
The container to wrap.
-
-
Constructor Details
-
TilesContainerWrapper
Constructor.- Parameters:
container
- The container to wrap.
-
-
Method Details
-
endContext
Description copied from interface:TilesContainer
Ends a context, where attribute values are stored independently of others.
It must be called after aTilesContainer.startContext(Request)
call.- Specified by:
endContext
in interfaceTilesContainer
- Parameters:
request
- The request.
-
evaluate
Description copied from interface:TilesContainer
Evaluates the given attribute.- Specified by:
evaluate
in interfaceTilesContainer
- Parameters:
attribute
- The attribute to evaluate.request
- The request.- Returns:
- The evaluated object.
-
getApplicationContext
Description copied from interface:TilesContainer
Retrieve the container's context.- Specified by:
getApplicationContext
in interfaceTilesContainer
- Returns:
- current application context
-
getAttributeContext
Description copied from interface:TilesContainer
Retrieve the attribute context of the current request.- Specified by:
getAttributeContext
in interfaceTilesContainer
- Parameters:
request
- The request.- Returns:
- map of the attributes in the current attribute context.
-
getDefinition
Description copied from interface:TilesContainer
Returns a definition specifying its name.- Specified by:
getDefinition
in interfaceTilesContainer
- Parameters:
definitionName
- The name of the definition to find.request
- The request context.- Returns:
- The definition, if found.
-
isValidDefinition
Description copied from interface:TilesContainer
Determine whether the definition exists.- Specified by:
isValidDefinition
in interfaceTilesContainer
- Parameters:
definition
- the name of the definition.request
- The request.- Returns:
- true if the definition is found.
-
prepare
Description copied from interface:TilesContainer
Executes a preparer.- Specified by:
prepare
in interfaceTilesContainer
- Parameters:
preparer
- The name of the preparer to execute.request
- The request.
-
render
Description copied from interface:TilesContainer
Render the given tiles request.- Specified by:
render
in interfaceTilesContainer
- Parameters:
definition
- the current definition.request
- The request.
-
render
Description copied from interface:TilesContainer
Renders the specified definition.- Specified by:
render
in interfaceTilesContainer
- Parameters:
definition
- The definition to render.request
- The request context.
-
render
Description copied from interface:TilesContainer
Render the given Attribute.- Specified by:
render
in interfaceTilesContainer
- Parameters:
attribute
- The attribute to render.request
- The request.- Throws:
IOException
- If something goes wrong during writing to the output.
-
renderContext
Description copied from interface:TilesContainer
Renders the current context, as it is.- Specified by:
renderContext
in interfaceTilesContainer
- Parameters:
request
- The request.
-
startContext
Description copied from interface:TilesContainer
Starts a new context, where attribute values are stored independently of others.
When the use of the contexts is finished, callTilesContainer.endContext(Request)
- Specified by:
startContext
in interfaceTilesContainer
- Parameters:
request
- The request.- Returns:
- The newly created context.
-