org.scrashmeow.ojb.console
Class ActionForwardFactory

java.lang.Object
  |
  +--org.scrashmeow.ojb.console.ActionForwardFactory

public class ActionForwardFactory
extends java.lang.Object

A set of utilites to create ActionForwards dynamically in an application. These utilities help add additional query string parameters, as well as, clone existing forwards etc.

Author:
Alexander Bibighaus

Constructor Summary
ActionForwardFactory()
           
 
Method Summary
static org.apache.struts.action.ActionForward findForward(org.apache.struts.action.ActionForward fw, boolean redirect)
          Find a redirecting forward with the same path as the provided forward
static org.apache.struts.action.ActionForward findForward(org.apache.struts.action.ActionForward fw, java.util.Map params, boolean redirect)
          .
static org.apache.struts.action.ActionForward findForward(org.apache.struts.action.ActionForward fw, java.lang.String param1, java.lang.String value1, boolean redirect)
          Find an action forward with the provided forward's path.
static org.apache.struts.action.ActionForward findForward(java.lang.String path, boolean redirect)
          Find a forward with the given path.
static org.apache.struts.action.ActionForward findForward(java.lang.String path, java.util.Map params, boolean redirect)
          Find an action forward with the given path.
static org.apache.struts.action.ActionForward findForward(java.lang.String path, java.lang.String param1, java.lang.String value1, boolean redirect)
          Find an action forward with the given path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionForwardFactory

public ActionForwardFactory()
Method Detail

findForward

public static org.apache.struts.action.ActionForward findForward(java.lang.String path,
                                                                 java.util.Map params,
                                                                 boolean redirect)
Find an action forward with the given path. Append the provided parameters on the query string appropriately. Set the redirect flag on the forward and return

Parameters:
path - the context relative path to forward to
params - a map of param names and values as strings
redirect - flag that indicates the forward should redirect
Returns:
the action forward

findForward

public static org.apache.struts.action.ActionForward findForward(java.lang.String path,
                                                                 boolean redirect)
Find a forward with the given path. Set the redirect flag on the forward and return.

Parameters:
path - the context relative path to forward to
redirect - flag that indicates the forward should redirect
Returns:
the action forward

findForward

public static org.apache.struts.action.ActionForward findForward(java.lang.String path,
                                                                 java.lang.String param1,
                                                                 java.lang.String value1,
                                                                 boolean redirect)
Find an action forward with the given path. Append the one parameter and value appropriately. Set the redirect flag on the forward and return

Parameters:
path - the context relative path to forward to
param1 - a parameter name
value1 - a value for the parameter
redirect - flag that indicates the forward should redirect
Returns:
the action forward

findForward

public static org.apache.struts.action.ActionForward findForward(org.apache.struts.action.ActionForward fw,
                                                                 java.util.Map params,
                                                                 boolean redirect)
. Find an action forward with the provided forward's path. Append the parameters Set the redirect flag on the forward and return

Parameters:
fw - the action forward to base this forward on
params - a map of param names and values as strings
redirect - flag that indicates the forward should redirect
Returns:
the action forward

findForward

public static org.apache.struts.action.ActionForward findForward(org.apache.struts.action.ActionForward fw,
                                                                 boolean redirect)
Find a redirecting forward with the same path as the provided forward

Parameters:
fw - the action forward to base this forward on
redirect - flag that indicates the forward should redirect
Returns:
the action forward

findForward

public static org.apache.struts.action.ActionForward findForward(org.apache.struts.action.ActionForward fw,
                                                                 java.lang.String param1,
                                                                 java.lang.String value1,
                                                                 boolean redirect)
Find an action forward with the provided forward's path. Append the one parameter and value appropriately. Set the redirect flag on the forward and return

Parameters:
fw - the action forward to base this forward on
param1 - a parameter name
value1 - a value for the parameter
redirect - flag that indicates the forward should redirect
Returns:
the action forward


Copyright © 2003 Alexander Bibighaus et al. All Rights Reserved.