Expresso 5-6

com.jcorporate.expresso.core.controller
Class DynamicForwarder

java.lang.Object
  extended bycom.jcorporate.expresso.core.controller.DynamicForwarder
All Implemented Interfaces:
Serializable

public class DynamicForwarder
extends Object
implements Serializable

Used for custom dynamic routing. Specify the pageStyle parameter before calling a struts-based controller and the RequestProcessor will pick it up at forward time.

Author:
Michael Rimov
See Also:
Serialized Form

Constructor Summary
protected DynamicForwarder()
          Do not call directly
 
Method Summary
static void addConfig(String pageStyle, HttpServletRequest servletRequest, org.apache.struts.config.ForwardConfig forwardConfig)
          Add's a forward config to the session as defined by 'pageStyle'
static org.apache.struts.config.ForwardConfig redeemConfig(String pageStyle, HttpServletRequest servletRequest)
          Redeem the configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicForwarder

protected DynamicForwarder()
Do not call directly

Method Detail

addConfig

public static void addConfig(String pageStyle,
                             HttpServletRequest servletRequest,
                             org.apache.struts.config.ForwardConfig forwardConfig)
                      throws ServletException
Add's a forward config to the session as defined by 'pageStyle'

Parameters:
pageStyle - the key for the forward config
servletRequest - the servlet request object
forwardConfig - the actual forward object
Throws:
ServletException - upon error saving the object to the session.

redeemConfig

public static org.apache.struts.config.ForwardConfig redeemConfig(String pageStyle,
                                                                  HttpServletRequest servletRequest)
                                                           throws ServletException
Redeem the configuration. IF it doesn't exist then we return null. If it DOES exist, then we remove it from the session

Parameters:
pageStyle - the page style to redeeem
servletRequest - the servletRequest object
Returns:
a ForwardConfig or null if none exists in the session
Throws:
ServletException - upon error retrieving the object from the session

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.