org.jboss.portal.theme
Class LayoutDispatcher

java.lang.Object
  extended by org.jboss.portal.theme.LayoutDispatcher
All Implemented Interfaces:
RequestDispatchCallback

public final class LayoutDispatcher
extends java.lang.Object
implements RequestDispatchCallback

Dispatches the request to the target layout. The major side effect is to change the context path returned by the request to the value returned by PortalLayout#getContextPath() so the layout can safely use the getContextPath in order to designates resources located in the same web application.

Version:
$Revision: 6977 $
Author:
Julien Viet

Constructor Summary
LayoutDispatcher(RendererContext rendererContext, PageRendererContext result, java.lang.String layoutURI, LayoutInfo layoutInfo)
           
 
Method Summary
 java.lang.Object doCallback(ServletContext dispatchedServletContext, HttpServletRequest dispatchedRequest, HttpServletResponse dispatchedResponse, java.lang.Object handback)
          Called by the runtime context when request dispatching has been done.
 void include()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutDispatcher

public LayoutDispatcher(RendererContext rendererContext,
                        PageRendererContext result,
                        java.lang.String layoutURI,
                        LayoutInfo layoutInfo)
                 throws java.lang.IllegalArgumentException
Parameters:
rendererContext -
Throws:
java.lang.IllegalArgumentException - if the layout is null
Method Detail

include

public void include()
             throws java.io.IOException,
                    ServletException
Throws:
java.io.IOException
ServletException

doCallback

public java.lang.Object doCallback(ServletContext dispatchedServletContext,
                                   HttpServletRequest dispatchedRequest,
                                   HttpServletResponse dispatchedResponse,
                                   java.lang.Object handback)
                            throws java.lang.Exception
Description copied from interface: RequestDispatchCallback
Called by the runtime context when request dispatching has been done.

Specified by:
doCallback in interface RequestDispatchCallback
Parameters:
dispatchedServletContext - the dispatched servlet context
dispatchedRequest - the dispatched request
dispatchedResponse - the dispatched response
handback - the handback object provided to the dispatched @return any object
Throws:
java.lang.Exception - any exception