org.jboss.portal.theme
Class LayoutDispatcher

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

public final class LayoutDispatcher
extends java.lang.Object
implements org.jboss.portal.web.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: 8784 $
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)
           
 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
Specified by:
doCallback in interface org.jboss.portal.web.RequestDispatchCallback
Throws:
javax.servlet.ServletException
java.io.IOException