org.apache.cocoon.servletservice.util
Class RequestParameters

java.lang.Object
  extended by org.apache.cocoon.servletservice.util.RequestParameters
All Implemented Interfaces:
Serializable

public final class RequestParameters
extends Object
implements Serializable

This class is used by the RequestWrapper. It parses a query string, decodes request parameters, and creates a parameter map ready for use by the Request object.

Since:
1.0.0
Version:
$Id: RequestParameters.html 1422810 2012-12-17 09:13:50Z ilgrosso $
See Also:
Serialized Form

Constructor Summary
RequestParameters(String queryString)
          Construct a new object from a queryString
 
Method Summary
 String getParameter(String name)
          Get the value of a parameter.
 String getParameter(String name, String defaultValue)
          Get the value of a parameter.
 Map getParameterMap()
          Get map of parameter names to String array values
 Enumeration getParameterNames()
          Get all parameter names.
 String[] getParameterValues(String name)
          Get all values of a parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestParameters

public RequestParameters(String queryString)
Construct a new object from a queryString

Parameters:
queryString - request query string
Method Detail

getParameter

public String getParameter(String name)
Get the value of a parameter.

Parameters:
name - The name of the parameter.
Returns:
The value of the first parameter with the name or null

getParameter

public String getParameter(String name,
                           String defaultValue)
Get the value of a parameter.

Parameters:
name - The name of the parameter.
defaultValue - The default value if the parameter does not exist.
Returns:
The value of the first parameter with the name or defaultValue

getParameterValues

public String[] getParameterValues(String name)
Get all values of a parameter.

Parameters:
name - The name of the parameter.
Returns:
Array of the (String) values or null if the parameter is not defined.

getParameterNames

public Enumeration getParameterNames()
Get all parameter names.

Returns:
Enumeration for the (String) parameter names.

getParameterMap

public Map getParameterMap()
Get map of parameter names to String array values

Returns:
map of parameter values


Copyright © 1999-2012 The Apache Software Foundation. All Rights Reserved.