org.apache.cocoon.environment.wrapper
Class RequestParameters

java.lang.Object
  extended by org.apache.cocoon.environment.wrapper.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 and creates a parameter representation required for the Request object.

Version:
CVS $Id: RequestParameters.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler
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.
 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

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.


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