org.jasig.portal.url
Interface IWritableHttpServletRequest

All Superinterfaces:
HttpServletRequest, ServletRequest
All Known Implementing Classes:
PortalHttpServletRequestWrapper

public interface IWritableHttpServletRequest
extends HttpServletRequest

IWritableHttpServletRequest is an extension of the HttpServletRequest interface, which allows to manage (add, remove and modify) request parameters.

Version:
$Revision: 11911 $
Author:
Peter Kharchenko: pkharchenko at unicon.net

Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Method Summary
 boolean addParameterValue(String name, String value)
          Adds a value of a request parameter
 boolean deleteParameter(String name)
          Removes any values of an existing parameter
 boolean deleteParameterValue(String name, String value)
          Removes all occurances of the specific value of a request parameter
 boolean setParameterValue(String name, String value)
          Sets a value of request parameter (overwriting any previous values)
 boolean setParameterValues(String name, String[] values)
          Sets a set of values of request parameter (overwriting any previous values)
 
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

addParameterValue

boolean addParameterValue(String name,
                          String value)
Adds a value of a request parameter

Parameters:
name - The name of the request parameter
value - The value of the request parameter
Returns:
true if the parameter already existsted
Throws:
IllegalArgumentException - if name or value are null

setParameterValue

boolean setParameterValue(String name,
                          String value)
Sets a value of request parameter (overwriting any previous values)

Parameters:
name - The name of the request parameter
value - The value of the request parameter
Returns:
true if the parameter already existsted
Throws:
IllegalArgumentException - if name or value are null

setParameterValues

boolean setParameterValues(String name,
                           String[] values)
Sets a set of values of request parameter (overwriting any previous values)

Parameters:
name - The name of the request parameter
values - The values of the request parameter
Returns:
true if the parameter already existsted
Throws:
IllegalArgumentException - if name or values are null or if the values array contains a null

deleteParameter

boolean deleteParameter(String name)
Removes any values of an existing parameter

Parameters:
name - The name of the request parameter to remove
Returns:
true if the parameter existed
Throws:
IllegalArgumentException - if name is null

deleteParameterValue

boolean deleteParameterValue(String name,
                             String value)
Removes all occurances of the specific value of a request parameter

Parameters:
name - The name of the request parameter
value - The value to remove all occurances of
Returns:
true if the parameter value existed
Throws:
IllegalArgumentException - if name or value are null


Copyright © 2010 Jasig. All Rights Reserved.