Class TilesContainerWrapper

  • All Implemented Interfaces:
    TilesContainer
    Direct Known Subclasses:
    CachingTilesContainer

    public class TilesContainerWrapper
    extends java.lang.Object
    implements TilesContainer
    Wraps a Tiles container to allow easy decoration.
    Version:
    $Rev: 1044659 $ $Date: 2010-12-12 01:16:04 +1100 (Sun, 12 Dec 2010) $
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      java.lang.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​(java.lang.String definitionName, org.apache.tiles.request.Request request)
      Returns a definition specifying its name.
      TilesContainer getWrappedContainer()
      Returns the wrapped container.
      boolean isValidDefinition​(java.lang.String definition, org.apache.tiles.request.Request request)
      Determine whether or not the definition exists.
      void prepare​(java.lang.String preparer, org.apache.tiles.request.Request request)
      Executes a preparer.
      void render​(java.lang.String definition, org.apache.tiles.request.Request request)
      Render the given tiles request.
      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 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 java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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 java.io.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:
        java.io.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.