live.struts.actions
Class Util

java.lang.Object
  extended bylive.struts.actions.Util

public class Util
extends Object

Various important functions and constants for actions


Field Summary
private static int SECONDS
          Utility constants
static int TIMEOUT_MS
          Holds the timeout before actions return to a timeout page
 
Constructor Summary
Util()
           
 
Method Summary
static String buildRequestString(HttpServletRequest request)
          This function builds the URL+query string that was used to get the current page.
static void checkForDoneActions(HttpServletRequest request)
          This function checks to see if there are any threads that have recently completed and, if so, adds the list to the request attribute recentlyCompleteThreads.
(package private) static HashSet getUserSelectedGuestNames(HttpServletRequest request)
          Returns a Set of guest names (Strings) that are checked by the user.
private static String queryString(HttpServletRequest request)
           
protected static void setRedirectAndParams(org.apache.struts.action.ActionForward forward, HttpServletRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SECONDS

private static final int SECONDS
Utility constants

See Also:
Constant Field Values

TIMEOUT_MS

public static final int TIMEOUT_MS
Holds the timeout before actions return to a timeout page

See Also:
Constant Field Values
Constructor Detail

Util

public Util()
Method Detail

buildRequestString

public static String buildRequestString(HttpServletRequest request)
This function builds the URL+query string that was used to get the current page. It does this by concatinating the URL of the current request with "?" and the query string if the latter is present.

Parameters:
request - The request BuildRequestString should build the URL of
Returns:
The URL that was used to load the page with the request passed in.

checkForDoneActions

public static void checkForDoneActions(HttpServletRequest request)
This function checks to see if there are any threads that have recently completed and, if so, adds the list to the request attribute recentlyCompleteThreads.

Parameters:
request - The request for the current page

getUserSelectedGuestNames

static HashSet getUserSelectedGuestNames(HttpServletRequest request)
Returns a Set of guest names (Strings) that are checked by the user. Specifically, it returns a list of all parameter names (not values) that begin with "GUEST_".

Parameters:
request - The servlet request (where the parameter list is from)
Returns:
A Set of guest names selected by the user

setRedirectAndParams

protected static void setRedirectAndParams(org.apache.struts.action.ActionForward forward,
                                           HttpServletRequest request)

queryString

private static String queryString(HttpServletRequest request)


Copyright © 2005