org.displaytag.util
Class DefaultRequestHelper

java.lang.Object
  extended by org.displaytag.util.DefaultRequestHelper
All Implemented Interfaces:
RequestHelper

public class DefaultRequestHelper
extends java.lang.Object
implements RequestHelper

Default RequestHelper implementation.

Version:
$Revision: 1104 $ ($Author: fgiust $)
Author:
Fabrizio Giustina
See Also:
Href, RequestHelper

Constructor Summary
DefaultRequestHelper(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
          Construct a new RequestHelper for the given request.
 
Method Summary
 Href getHref()
          return the current Href for the request (base url and parameters).
 java.lang.Integer getIntParameter(java.lang.String key)
          Reads an Integer parameter from the request.
 java.lang.String getParameter(java.lang.String key)
          Reads a String parameter from the request.
 java.util.Map getParameterMap()
          Returns a Map containing all the parameters in the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRequestHelper

public DefaultRequestHelper(javax.servlet.http.HttpServletRequest servletRequest,
                            javax.servlet.http.HttpServletResponse servletResponse)
Construct a new RequestHelper for the given request.

Parameters:
servletRequest - HttpServletRequest needed to generate the base href
servletResponse - HttpServletResponse needed to encode generated urls
Method Detail

getHref

public Href getHref()
Description copied from interface: RequestHelper
return the current Href for the request (base url and parameters).

Specified by:
getHref in interface RequestHelper
Returns:
Href
See Also:
RequestHelper.getHref()

getParameter

public java.lang.String getParameter(java.lang.String key)
Description copied from interface: RequestHelper
Reads a String parameter from the request.

Specified by:
getParameter in interface RequestHelper
Parameters:
key - String parameter name
Returns:
String parameter value
See Also:
RequestHelper.getParameter(java.lang.String)

getIntParameter

public java.lang.Integer getIntParameter(java.lang.String key)
Description copied from interface: RequestHelper
Reads an Integer parameter from the request.

Specified by:
getIntParameter in interface RequestHelper
Parameters:
key - String parameter name
Returns:
Integer parameter value or null if the parameter is not found or it can't be transformed to an Integer
See Also:
RequestHelper.getIntParameter(java.lang.String)

getParameterMap

public java.util.Map getParameterMap()
Description copied from interface: RequestHelper
Returns a Map containing all the parameters in the request.

Specified by:
getParameterMap in interface RequestHelper
Returns:
Map
See Also:
RequestHelper.getParameterMap()


Copyright © 2002-2007 the Displaytag team. All Rights Reserved.