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: 8210 $
Author:
Julien Viet

Constructor Summary
LayoutDispatcher(RendererContext rendererContext, PageRendererContext result, java.lang.String layoutURI, LayoutInfo layoutInfo)
           
 
Method Summary
 java.lang.Object doCallback(javax.servlet.ServletContext dispatchedServletContext, javax.servlet.http.HttpServletRequest dispatchedRequest, javax.servlet.http.HttpServletResponse dispatchedResponse, java.lang.Object handback)
          Performs the request dispatch logic.
 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,
                    javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException

doCallback

public java.lang.Object doCallback(javax.servlet.ServletContext dispatchedServletContext,
                                   javax.servlet.http.HttpServletRequest dispatchedRequest,
                                   javax.servlet.http.HttpServletResponse dispatchedResponse,
                                   java.lang.Object handback)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
Description copied from interface: RequestDispatchCallback
Performs the request dispatch logic.

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:
javax.servlet.ServletException - if an exception occurs that interferes with the normal operation
java.io.IOException - if an input or output exception occurs