org.enhydra.barracuda.core.helper.servlet
Interface BarracudaServletRequestWrapper

All Superinterfaces:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest
All Known Implementing Classes:
DefaultServletRequestWrapper

public interface BarracudaServletRequestWrapper
extends javax.servlet.http.HttpServletRequest

This class acts as a thin wrapper around a ServletRequest, adding several additional methods which enabled the request parameters to be modified programatically

Since:
//csc_010404_1
Author:
christianc@granitepeaks.com

Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Method Summary
 void addParameter(String name, String value)
          Set a given parameter (note that this is backed by a hashmap, so the structure is slightly different than that of the underlying ServletRequest which allows multiple paramters with the same name).
 void removeAllParameters(String name)
          Remove all parameters for a specified name
 void removeParameter(String name)
          Remove the first parameter whose key matches the specified name
 void resetParameters()
          Reset the parameter values to their original state (ie. the actual values in the request)
 void setMethod(String method)
          Set the underlying request method.
 
Methods inherited from interface javax.servlet.http.HttpServletRequest
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from interface javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 

Method Detail

setMethod

public void setMethod(String method)
Set the underlying request method.

Parameters:
method - the underlying request method (GET, POST, etc)

addParameter

public void addParameter(String name,
                         String value)
Set a given parameter (note that this is backed by a hashmap, so the structure is slightly different than that of the underlying ServletRequest which allows multiple paramters with the same name). This means that if you attempt to set a parameter whose key already exists you will effectively overwrite the existing value.

Parameters:
name - the key name for the parameter
value - the value associated with the given key

removeParameter

public void removeParameter(String name)
Remove the first parameter whose key matches the specified name

Parameters:
name - the key name for the parameter

removeAllParameters

public void removeAllParameters(String name)
Remove all parameters for a specified name

Parameters:
name - the key name for the parameter

resetParameters

public void resetParameters()
Reset the parameter values to their original state (ie. the actual values in the request)



Copyright © 2003 BarracudaMVC.org All Rights Reserved.