Class TilesContainerWrapper

java.lang.Object
org.apache.tiles.api.TilesContainerWrapper
All Implemented Interfaces:
TilesContainer
Direct Known Subclasses:
CachingTilesContainer

public class TilesContainerWrapper extends Object implements TilesContainer
Wraps a Tiles container to allow easy decoration.
  • Field Details

    • container

      protected TilesContainer container
      The container to wrap.
  • Constructor Details

    • TilesContainerWrapper

      public TilesContainerWrapper(TilesContainer container)
      Constructor.
      Parameters:
      container - The container to wrap.
  • Method Details

    • endContext

      public void endContext(Request request)
      Description copied from interface: TilesContainer
      Ends a context, where attribute values are stored independently of 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, 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 ApplicationContext getApplicationContext()
      Description copied from interface: TilesContainer
      Retrieve the container's context.
      Specified by:
      getApplicationContext in interface TilesContainer
      Returns:
      current application context
    • getAttributeContext

      public AttributeContext getAttributeContext(Request request)
      Description copied from interface: TilesContainer
      Retrieve 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, 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, Request request)
      Description copied from interface: TilesContainer
      Determine whether 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, 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, 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, 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, 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(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(Request request)
      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 interface TilesContainer
      Parameters:
      request - The request.
      Returns:
      The newly created context.