org.jboss.portal.server.theme
Class LayoutDispatcher

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

public class LayoutDispatcher
extends java.lang.Object
implements FilterCommand

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.


Field Summary
 
Fields inherited from interface org.jboss.portal.server.servlet.FilterCommand
REQ_ATT_KEY
 
Constructor Summary
LayoutDispatcher(PortalLayout layout, java.lang.String uri)
           
 
Method Summary
 java.lang.Object execute(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, javax.servlet.FilterChain chain)
           
 void include(PortalRequest req, PortalResponse resp)
          Perform the dispatch to the target layout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutDispatcher

public LayoutDispatcher(PortalLayout layout,
                        java.lang.String uri)
                 throws java.lang.IllegalArgumentException
Parameters:
layout - the layout to dispatch to
Throws:
java.lang.IllegalArgumentException - if the layout is null
Method Detail

execute

public java.lang.Object execute(javax.servlet.http.HttpServletRequest req,
                                javax.servlet.http.HttpServletResponse resp,
                                javax.servlet.FilterChain chain)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Specified by:
execute in interface FilterCommand
Throws:
javax.servlet.ServletException
java.io.IOException

include

public void include(PortalRequest req,
                    PortalResponse resp)
             throws java.io.IOException,
                    javax.servlet.ServletException
Perform the dispatch to the target layout

Throws:
java.io.IOException
javax.servlet.ServletException