Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.ui.util
Class RequestUtils

java.lang.Object
  extended by org.hyperic.hq.ui.util.RequestUtils

public class RequestUtils
extends java.lang.Object

Utilities class that provides many convenience methods for logging, request parameter processing, etc.


Constructor Summary
RequestUtils()
           
 
Method Summary
static void bustaCache(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
           
static void bustaCache(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, boolean expire)
          When you really really want to defeat a browser's cache, expire the content and set the no-cache header
static void dumpRequestParams(javax.servlet.ServletRequest request, org.apache.commons.logging.Log log, boolean html)
           
static void dumpRequestParams(javax.servlet.ServletRequest request, java.io.OutputStream out, boolean html)
           
static void dumpRequestParams(javax.servlet.ServletRequest request, java.io.PrintWriter out, boolean html)
          A development aid.
static java.lang.String dumpRequestParamsToString(javax.servlet.ServletRequest request, boolean html)
           
static java.lang.String generateSessionKey(javax.servlet.http.HttpServletRequest request)
           
static java.lang.Integer getAutogroupResourceTypeId(javax.servlet.http.HttpServletRequest request)
          Retrieve the Integer value of the AUTOGROUP_TYPE_ID_PARAM parameter from the HTTP request.
static AppdefEntityTypeID getChildResourceTypeId(javax.servlet.http.HttpServletRequest request)
          Retrieve the AppdefEntityTypeID value of the CHILD_RESOURCE_TYPE_ID_PARAM parameter from the HTTP request.
static AppdefEntityID getEntityId(javax.servlet.http.HttpServletRequest req)
          Get the appdefEntityID value of the eid param from the http request also works with rid/type attribute combination
static AppdefEntityID[] getEntityIds(javax.servlet.http.HttpServletRequest request)
          Retrieve the AppdefEntityID[] value of the ENTITY_ID_PARAM ("eid") parameters from the HTTP request.
static AppdefEntityTypeID getEntityTypeId(javax.servlet.http.HttpServletRequest req)
          Get the appdefEntityTypeID value of the aetid param from the http request
static java.lang.Integer getIntParameter(javax.servlet.http.HttpServletRequest request, java.lang.String name)
          Fetchs the int value of the parameter from the request
static java.lang.Integer getIntParameter(javax.servlet.http.HttpServletRequest request, java.lang.String name, java.lang.Integer def)
          Fetchs the int value of the parameter from the request
static java.lang.Integer getMetricId(javax.servlet.http.HttpServletRequest request)
          Retrieve the Integer value of the METRIC_BASELINE_PARAM parameter from the HTTP request.
static java.lang.String getMode(javax.servlet.http.HttpServletRequest request)
          Extract the subcontroller mode from the Constants.MODE_PARAM parameter of the HTTP request.
static PageControl getPageControl(javax.servlet.http.HttpServletRequest request)
          Create and return a PageControl object by examining various request parameters.
static PageControl getPageControl(javax.servlet.http.HttpServletRequest request, java.lang.String pageSizeParam, java.lang.String pageNumParam, java.lang.String sortOrderParam, java.lang.String sortColParam)
          Create and return a PageControl object by examining various request parameters.
static int getPageNum(javax.servlet.http.HttpServletRequest request, java.lang.String param)
          Retrieve the int value of the Constants.PAGENUM_PARAM request parameter, or Constants.PAGENUM_DEFAULT if the parameter was not found or not specified as an integer.
static int getPageSize(javax.servlet.http.HttpServletRequest request, java.lang.String param)
          Retrieve the int value of the Constants.PAGESIZE_PARAM request parameter, or Constants.PAGESIZE_DEFAULT if the parameter was not found or not specified as an integer.
static AppdefResourceValue getResource(javax.servlet.http.HttpServletRequest request)
          Retrieve the AppdefResourceValue value of the RESOURCE_ATTR parameter from the HTTP request.
static java.lang.Integer getResourceId(javax.servlet.http.HttpServletRequest request)
          Retrieve the Integer value of the RESOURCE_PARAM parameter from the HTTP request.
static java.lang.Integer getResourceTypeId(javax.servlet.http.HttpServletRequest request)
          Retrieve the Integer value of the RESOURCE_TYPE_ID_PARAM parameter from the HTTP request.
static java.lang.Integer getRoleId(javax.servlet.http.HttpServletRequest request)
          Retrieve the Integer value of the ROLE_PARAM parameter from the HTTP request.
static java.lang.Integer getScheduleId(javax.servlet.http.HttpServletRequest request)
          Retrieve the Integer value of the SCHEDULE_PARAM parameter from the HTTP request.
static java.lang.Integer getSessionId(javax.servlet.http.HttpServletRequest request)
          Extract the BizApp session id as an Integer from the web session.
static int getSessionIdInt(javax.servlet.http.HttpServletRequest request)
           
static int getSortCol(javax.servlet.http.HttpServletRequest request, java.lang.String param)
          Retrieve the int value of the Constants.SORTCOL_PARAM request parameter, or Constants.SORTCOL_DEFAULT if the parameter was not found or not specified as an integer.
static int getSortOrder(javax.servlet.http.HttpServletRequest request, java.lang.String param)
          Retrieve the int value of the Constants.SORTORDER_PARAM request parameter, or Constants.SORTORDER_DEFAULT if the parameter was not found or not specified as an integer.
static java.lang.String getStringParameter(javax.servlet.http.HttpServletRequest request, java.lang.String name)
          Fetches the String value of the parameter from the request
static java.lang.String getStringParameter(javax.servlet.http.HttpServletRequest request, java.lang.String name, java.lang.String def)
          Fetchs the String value of the parameter from the request
static java.lang.String getUrl(javax.servlet.http.HttpServletRequest request)
          Retrieve the String value of the URL_ATTR parameter from the HTTP request.
static java.lang.Integer getUserId(javax.servlet.http.HttpServletRequest request)
          Retrieve the Integer value of the USER_PARAM parameter from the HTTP request.
static WebUser getWebUser(javax.servlet.http.HttpServletRequest request)
          Return the WebUser representing the person currently interacting with the product.
static WebUser getWebUser(javax.servlet.http.HttpSession session)
          Return the WebUser representing the person currently interacting with the product.
static boolean isAddClicked(javax.servlet.http.HttpServletRequest request)
          Examine the request to see if an "add" button was clicked on the previous page.
static boolean isCancelClicked(javax.servlet.http.HttpServletRequest request)
          Examine the request to see if an "cancel" button was clicked on the previous page.
static boolean isEditClicked(javax.servlet.http.HttpServletRequest request)
          Examine the request to see if an "edit" button was clicked on the previous page.
static boolean isNewClicked(javax.servlet.http.HttpServletRequest request)
          Examine the request to see if an "new" button was clicked on the previous page.
static boolean isOkAssignClicked(javax.servlet.http.HttpServletRequest request)
          Examine the request to see if an "okassign" button was clicked on the previous page.
static boolean isOkClicked(javax.servlet.http.HttpServletRequest request)
          Examine the request to see if an "ok" button was clicked on the previous page.
static boolean isRemoveClicked(javax.servlet.http.HttpServletRequest request)
          Examine the request to see if a "remove" button was clicked on the previous page.
static boolean isResetClicked(javax.servlet.http.HttpServletRequest request)
          Examine the request to see if an "reset" button was clicked on the previous page.
static java.lang.String message(javax.servlet.http.HttpServletRequest request, java.lang.String key)
          Get an i18n message from the application resource bundle.
static java.lang.String message(javax.servlet.http.HttpServletRequest request, java.lang.String key, java.lang.Object[] args)
          Get an i18n message from the application resource bundle.
static java.lang.String message(javax.servlet.http.HttpServletRequest request, java.lang.String bundle, java.lang.String locale, java.lang.String key)
          Get an i18n message from the application resource bundle.
static java.lang.String message(javax.servlet.http.HttpServletRequest request, java.lang.String bundle, java.lang.String locale, java.lang.String key, java.lang.Object[] args)
          Get an i18n message from the application resource bundle.
static boolean parameterExists(javax.servlet.http.HttpServletRequest request, java.lang.String name)
          Verify if a parameter exists in the request
static void propogateParam(javax.servlet.http.HttpServletRequest request, java.util.Map params, java.lang.String param)
          Propogate a request parameter.
static void setConfirmation(javax.servlet.http.HttpServletRequest request, java.lang.String key)
          Set a confirmation message upon completion of a user action.
static void setConfirmation(javax.servlet.http.HttpServletRequest request, java.lang.String key, java.lang.Object value0)
          Set a confirmation message with a replacement value upon completion of a user action.
static void setError(javax.servlet.http.HttpServletRequest request, org.apache.struts.action.ActionMessage msg, java.lang.String property)
           
static void setError(javax.servlet.http.HttpServletRequest request, java.lang.String key)
          Set an error message when a user action fails with a user-level error.
static void setError(javax.servlet.http.HttpServletRequest request, java.lang.String key, java.lang.Object value0)
          Set an error message with a replacement value when a user action fails with a user-level error.
static void setError(javax.servlet.http.HttpServletRequest request, java.lang.String key, java.lang.Object value0, java.lang.String property)
          Set an error message with a replacement value when a user action fails with a user-level error.
static void setError(javax.servlet.http.HttpServletRequest request, java.lang.String key, java.lang.String property)
          Set an error message when a user action fails with a user-level error.
static void setErrorObject(javax.servlet.http.HttpServletRequest request, java.lang.String key, java.lang.String object)
          Set an error message when a user action fails with a user-level error.
static void setErrors(javax.servlet.http.HttpServletRequest request, org.apache.struts.action.ActionErrors errs)
          sets an ActionErrors object into the request object.
static void setErrorWithNullCheck(javax.servlet.http.HttpServletRequest request, java.lang.Exception e, java.lang.String nullMsg, java.lang.String regularMsg)
           
static void setResource(javax.servlet.http.HttpServletRequest request, AppdefResourceValue resource)
          Set the AppdefResourceValue value in the RESOURCE_ATTR parameter of the HTTP request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestUtils

public RequestUtils()
Method Detail

generateSessionKey

public static java.lang.String generateSessionKey(javax.servlet.http.HttpServletRequest request)

parameterExists

public static boolean parameterExists(javax.servlet.http.HttpServletRequest request,
                                      java.lang.String name)
Verify if a parameter exists in the request

Parameters:
name - The name of the parameter in the request
Returns:
Boolean if the parameter exists in the request

getStringParameter

public static java.lang.String getStringParameter(javax.servlet.http.HttpServletRequest request,
                                                  java.lang.String name)
                                           throws ParameterNotFoundException
Fetches the String value of the parameter from the request

Parameters:
name - The name of the parameter in the request
Returns:
The value of the parameter passed into the request
Throws:
ParameterNotFoundException - If the parameter name is not found in the request

getStringParameter

public static java.lang.String getStringParameter(javax.servlet.http.HttpServletRequest request,
                                                  java.lang.String name,
                                                  java.lang.String def)
Fetchs the String value of the parameter from the request

Parameters:
name - The name of the parameter in the request
def - The default value to return if the parameter is not found
Returns:
The value of the parameter passed into the request

getIntParameter

public static java.lang.Integer getIntParameter(javax.servlet.http.HttpServletRequest request,
                                                java.lang.String name)
                                         throws ParameterNotFoundException,
                                                java.lang.NumberFormatException
Fetchs the int value of the parameter from the request

Parameters:
name - The name of the parameter in the request
Returns:
The value of the parameter passed into the request
Throws:
ParameterNotFoundException - If the parameter name is not found in the request
java.lang.NumberFormatException - If the parameter value is not a valid integer

getIntParameter

public static java.lang.Integer getIntParameter(javax.servlet.http.HttpServletRequest request,
                                                java.lang.String name,
                                                java.lang.Integer def)
Fetchs the int value of the parameter from the request

Parameters:
name - The name of the parameter in the request
def - The default value to return if the parameter is not found
Returns:
The value of the parameter passed into the request

getWebUser

public static WebUser getWebUser(javax.servlet.http.HttpServletRequest request)
                          throws javax.servlet.ServletException
Return the WebUser representing the person currently interacting with the product.

Throws:
javax.servlet.ServletException - if the session cannot be accessed

getWebUser

public static WebUser getWebUser(javax.servlet.http.HttpSession session)
                          throws javax.servlet.ServletException
Return the WebUser representing the person currently interacting with the product.

Parameters:
session - The servlet session object
Throws:
javax.servlet.ServletException - if the session cannot be accessed

getSessionId

public static java.lang.Integer getSessionId(javax.servlet.http.HttpServletRequest request)
                                      throws javax.servlet.ServletException
Extract the BizApp session id as an Integer from the web session.

Throws:
javax.servlet.ServletException - if the session cannot be accessed

getSessionIdInt

public static int getSessionIdInt(javax.servlet.http.HttpServletRequest request)
                           throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

getMode

public static java.lang.String getMode(javax.servlet.http.HttpServletRequest request)
Extract the subcontroller mode from the Constants.MODE_PARAM parameter of the HTTP request.


getRoleId

public static java.lang.Integer getRoleId(javax.servlet.http.HttpServletRequest request)
                                   throws ParameterNotFoundException
Retrieve the Integer value of the ROLE_PARAM parameter from the HTTP request.

Throws:
ParameterNotFoundException - if the parameter was not specified

getResource

public static AppdefResourceValue getResource(javax.servlet.http.HttpServletRequest request)
Retrieve the AppdefResourceValue value of the RESOURCE_ATTR parameter from the HTTP request. If the resource is not cached in the request, set a user error and return null.


setResource

public static void setResource(javax.servlet.http.HttpServletRequest request,
                               AppdefResourceValue resource)
Set the AppdefResourceValue value in the RESOURCE_ATTR parameter of the HTTP request.


setErrorWithNullCheck

public static void setErrorWithNullCheck(javax.servlet.http.HttpServletRequest request,
                                         java.lang.Exception e,
                                         java.lang.String nullMsg,
                                         java.lang.String regularMsg)

getEntityTypeId

public static AppdefEntityTypeID getEntityTypeId(javax.servlet.http.HttpServletRequest req)
                                          throws ParameterNotFoundException
Get the appdefEntityTypeID value of the aetid param from the http request

Throws:
ParameterNotFoundException

getEntityId

public static AppdefEntityID getEntityId(javax.servlet.http.HttpServletRequest req)
                                  throws ParameterNotFoundException
Get the appdefEntityID value of the eid param from the http request also works with rid/type attribute combination

Throws:
ParameterNotFoundException

getEntityIds

public static AppdefEntityID[] getEntityIds(javax.servlet.http.HttpServletRequest request)
                                     throws ParameterNotFoundException
Retrieve the AppdefEntityID[] value of the ENTITY_ID_PARAM ("eid") parameters from the HTTP request. For backwards compatibility, RESOURCE_TYPE_ID_PARAM ("type") and RESOURCE_PARAM ("rid") are also acceptable parameters as well.

Throws:
ParameterNotFoundException - if the parameter was not specified

getResourceId

public static java.lang.Integer getResourceId(javax.servlet.http.HttpServletRequest request)
                                       throws ParameterNotFoundException
Retrieve the Integer value of the RESOURCE_PARAM parameter from the HTTP request.

Throws:
ParameterNotFoundException - if the parameter was not specified

getScheduleId

public static java.lang.Integer getScheduleId(javax.servlet.http.HttpServletRequest request)
                                       throws ParameterNotFoundException
Retrieve the Integer value of the SCHEDULE_PARAM parameter from the HTTP request.

Throws:
ParameterNotFoundException - if the parameter was not specified

getResourceTypeId

public static java.lang.Integer getResourceTypeId(javax.servlet.http.HttpServletRequest request)
                                           throws ParameterNotFoundException
Retrieve the Integer value of the RESOURCE_TYPE_ID_PARAM parameter from the HTTP request.

Throws:
ParameterNotFoundException - if the parameter was not specified

getChildResourceTypeId

public static AppdefEntityTypeID getChildResourceTypeId(javax.servlet.http.HttpServletRequest request)
                                                 throws ParameterNotFoundException
Retrieve the AppdefEntityTypeID value of the CHILD_RESOURCE_TYPE_ID_PARAM parameter from the HTTP request.

Throws:
ParameterNotFoundException - if the parameter was not specified

getAutogroupResourceTypeId

public static java.lang.Integer getAutogroupResourceTypeId(javax.servlet.http.HttpServletRequest request)
                                                    throws ParameterNotFoundException
Retrieve the Integer value of the AUTOGROUP_TYPE_ID_PARAM parameter from the HTTP request.

Throws:
ParameterNotFoundException - if the parameter was not specified

getUserId

public static java.lang.Integer getUserId(javax.servlet.http.HttpServletRequest request)
                                   throws ParameterNotFoundException
Retrieve the Integer value of the USER_PARAM parameter from the HTTP request.

Throws:
ParameterNotFoundException - if the parameter was not specified

getMetricId

public static java.lang.Integer getMetricId(javax.servlet.http.HttpServletRequest request)
                                     throws ParameterNotFoundException
Retrieve the Integer value of the METRIC_BASELINE_PARAM parameter from the HTTP request.

Throws:
ParameterNotFoundException - if the parameter was not specified

getUrl

public static java.lang.String getUrl(javax.servlet.http.HttpServletRequest request)
Retrieve the String value of the URL_ATTR parameter from the HTTP request.

Throws:
ParameterNotFoundException - if the parameter was not specified

getPageControl

public static PageControl getPageControl(javax.servlet.http.HttpServletRequest request,
                                         java.lang.String pageSizeParam,
                                         java.lang.String pageNumParam,
                                         java.lang.String sortOrderParam,
                                         java.lang.String sortColParam)
Create and return a PageControl object by examining various request parameters.


getPageControl

public static PageControl getPageControl(javax.servlet.http.HttpServletRequest request)
Create and return a PageControl object by examining various request parameters.


getPageNum

public static int getPageNum(javax.servlet.http.HttpServletRequest request,
                             java.lang.String param)
Retrieve the int value of the Constants.PAGENUM_PARAM request parameter, or Constants.PAGENUM_DEFAULT if the parameter was not found or not specified as an integer.


getPageSize

public static int getPageSize(javax.servlet.http.HttpServletRequest request,
                              java.lang.String param)
Retrieve the int value of the Constants.PAGESIZE_PARAM request parameter, or Constants.PAGESIZE_DEFAULT if the parameter was not found or not specified as an integer.


getSortOrder

public static int getSortOrder(javax.servlet.http.HttpServletRequest request,
                               java.lang.String param)
Retrieve the int value of the Constants.SORTORDER_PARAM request parameter, or Constants.SORTORDER_DEFAULT if the parameter was not found or not specified as an integer.


getSortCol

public static int getSortCol(javax.servlet.http.HttpServletRequest request,
                             java.lang.String param)
Retrieve the int value of the Constants.SORTCOL_PARAM request parameter, or Constants.SORTCOL_DEFAULT if the parameter was not found or not specified as an integer.


setConfirmation

public static void setConfirmation(javax.servlet.http.HttpServletRequest request,
                                   java.lang.String key)
Set a confirmation message upon completion of a user action.

Parameters:
key - the message resource key

setConfirmation

public static void setConfirmation(javax.servlet.http.HttpServletRequest request,
                                   java.lang.String key,
                                   java.lang.Object value0)
Set a confirmation message with a replacement value upon completion of a user action.

Parameters:
key - the message resource key
value0 - the replacement value

setError

public static void setError(javax.servlet.http.HttpServletRequest request,
                            java.lang.String key)
Set an error message when a user action fails with a user-level error.

Parameters:
key - the message resource key

setError

public static void setError(javax.servlet.http.HttpServletRequest request,
                            java.lang.String key,
                            java.lang.String property)
Set an error message when a user action fails with a user-level error.

Parameters:
key - the message resource key
property - the form property for which the error occurred

setErrorObject

public static void setErrorObject(javax.servlet.http.HttpServletRequest request,
                                  java.lang.String key,
                                  java.lang.String object)
Set an error message when a user action fails with a user-level error.

Parameters:
key - the message resource key
property - the form property for which the error occurred

setError

public static void setError(javax.servlet.http.HttpServletRequest request,
                            org.apache.struts.action.ActionMessage msg,
                            java.lang.String property)

setErrors

public static void setErrors(javax.servlet.http.HttpServletRequest request,
                             org.apache.struts.action.ActionErrors errs)
sets an ActionErrors object into the request object. typically this api is used when an action class builds up a list of ActionError objects. Current use case is building of the ConfigOptions before saving into bizapp layer.


setError

public static void setError(javax.servlet.http.HttpServletRequest request,
                            java.lang.String key,
                            java.lang.Object value0)
Set an error message with a replacement value when a user action fails with a user-level error.

Parameters:
key - the message resource key
value0 - the replacement value

setError

public static void setError(javax.servlet.http.HttpServletRequest request,
                            java.lang.String key,
                            java.lang.Object value0,
                            java.lang.String property)
Set an error message with a replacement value when a user action fails with a user-level error.

Parameters:
key - the message resource key
value0 - the replacement value
property - the form property for which the error occurred

isCancelClicked

public static boolean isCancelClicked(javax.servlet.http.HttpServletRequest request)
Examine the request to see if an "cancel" button was clicked on the previous page. If so, one of the Constants.CANCEL_PARAM or Constants.CANCEL_X_PARAM parameters will exist.


isOkClicked

public static boolean isOkClicked(javax.servlet.http.HttpServletRequest request)
Examine the request to see if an "ok" button was clicked on the previous page. If so, one of the Constants.OK_PARAM or Constants.OK_X_PARAM parameters will exist.


isOkAssignClicked

public static boolean isOkAssignClicked(javax.servlet.http.HttpServletRequest request)
Examine the request to see if an "okassign" button was clicked on the previous page. If so, one of the Constants.OK_ASSIGN_PARAM or Constants.OK_ASSIGN_X_PARAM parameters will exist.


isResetClicked

public static boolean isResetClicked(javax.servlet.http.HttpServletRequest request)
Examine the request to see if an "reset" button was clicked on the previous page. If so, one of the Constants.RESET_PARAM or Constants.RESET_X_PARAM parameters will exist.


isNewClicked

public static boolean isNewClicked(javax.servlet.http.HttpServletRequest request)
Examine the request to see if an "new" button was clicked on the previous page. If so, one of the Constants.NEW_PARAM or Constants.NEW_X_PARAM parameters will exist.


isEditClicked

public static boolean isEditClicked(javax.servlet.http.HttpServletRequest request)
Examine the request to see if an "edit" button was clicked on the previous page. If so, one of the Constants.EDIT_PARAM or Constants.EDIT_X_PARAM parameters will exist.


isAddClicked

public static boolean isAddClicked(javax.servlet.http.HttpServletRequest request)
Examine the request to see if an "add" button was clicked on the previous page. If so, one of the Constants.ADD_PARAM or Constants.ADD_X_PARAM parameters will exist.


isRemoveClicked

public static boolean isRemoveClicked(javax.servlet.http.HttpServletRequest request)
Examine the request to see if a "remove" button was clicked on the previous page. If so, one of the Constants.REMOVE_PARAM or Constants.REMOVE_X_PARAM parameters will exist.


propogateParam

public static void propogateParam(javax.servlet.http.HttpServletRequest request,
                                  java.util.Map params,
                                  java.lang.String param)
Propogate a request parameter.

Parameters:
params - the parameters passed to the ActionForward
param - the parameter name to propogate

message

public static java.lang.String message(javax.servlet.http.HttpServletRequest request,
                                       java.lang.String key)
Get an i18n message from the application resource bundle.

Parameters:
key - the message key we want

message

public static java.lang.String message(javax.servlet.http.HttpServletRequest request,
                                       java.lang.String key,
                                       java.lang.Object[] args)
Get an i18n message from the application resource bundle.

Parameters:
key - the message key we want
args - the positional parameters for the message

message

public static java.lang.String message(javax.servlet.http.HttpServletRequest request,
                                       java.lang.String bundle,
                                       java.lang.String locale,
                                       java.lang.String key)
Get an i18n message from the application resource bundle.

Parameters:
bundle - the resource bundle name
bundle - the user locale
key - the message key we want

message

public static java.lang.String message(javax.servlet.http.HttpServletRequest request,
                                       java.lang.String bundle,
                                       java.lang.String locale,
                                       java.lang.String key,
                                       java.lang.Object[] args)
Get an i18n message from the application resource bundle.

Parameters:
bundle - the resource bundle name
bundle - the user locale
key - the message key we want
args - the positional parameters for the message

bustaCache

public static void bustaCache(javax.servlet.ServletRequest request,
                              javax.servlet.ServletResponse response)

bustaCache

public static void bustaCache(javax.servlet.ServletRequest request,
                              javax.servlet.ServletResponse response,
                              boolean expire)
When you really really want to defeat a browser's cache, expire the content and set the no-cache header

Parameters:
expire - set true to have the content expire immediately

dumpRequestParams

public static void dumpRequestParams(javax.servlet.ServletRequest request,
                                     java.io.PrintWriter out,
                                     boolean html)
A development aid. Since most parameter handling is wrapped by utility methods, quick-n-dirty debugging of what data is actually passed in a request is sometimes necessary. Obviously, you wouldn't want this in production.

Parameters:
out - output the parameter dump to a PrintWriter
html - formats the dump with <ol> if true

dumpRequestParams

public static void dumpRequestParams(javax.servlet.ServletRequest request,
                                     java.io.OutputStream out,
                                     boolean html)

dumpRequestParams

public static void dumpRequestParams(javax.servlet.ServletRequest request,
                                     org.apache.commons.logging.Log log,
                                     boolean html)

dumpRequestParamsToString

public static java.lang.String dumpRequestParamsToString(javax.servlet.ServletRequest request,
                                                         boolean html)

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.