Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.share.data
Class ServletRequestParameters

java.lang.Object
  |
  +--oracle.cabo.share.data.RequestParameters
        |
        +--oracle.cabo.share.data.ServletRequestParameters

public class ServletRequestParameters
extends RequestParameters

Class wrapping up access to parameters. This allows the values and contents of these parameters to be modified from their values in the HttpServletRequest


Field Summary
static java.lang.String HAS_COMPOUND_NAME
          Flag parameter indicating that the request contains a compound name that has to be parsed.
 
Constructor Summary
ServletRequestParameters(java.util.Dictionary requestParams)
          Returns a request parameters object wrapping the parameters of a ServletRequest.
ServletRequestParameters(javax.servlet.ServletRequest request)
          Returns a request parameters object wrapping the parameters of a ServletRequest.
 
Method Summary
static java.util.Dictionary createRequestDictionary(java.util.Dictionary requestParams)
          Returns a Dictionary containing the modified parameters and keys for Dictionary of input request parameters.
static java.util.Dictionary createRequestDictionary(javax.servlet.ServletRequest request)
          Returns a Dictionary containing the modified parameters and keys for the ServletRequest.
static void decodeCompoundKeyValues(java.lang.String compoundValue, int startIndex, java.util.Dictionary keyValues)
          Decodes key value pairs from a single value, placing the decoded values into the specified Dictionary of String[]s.
static java.lang.String encodeCompoundKeyValues(java.util.Enumeration keyValues, int keyValueSize)
          Encodes an Enumeration key value pairs as a single value appended to the baseName, if any;
static java.lang.String encodeCompoundKeyValues(java.lang.String namePrefix, java.util.Enumeration keyValues, int keyValueSize)
          Encodes an Enumeration key value pairs as a single value appended to the baseName, if any;
 java.lang.String getParameter(java.lang.String name)
          Returns the value of a request parameter as a String, or null if the parameter does not exist.
 java.util.Enumeration getParameterNames()
          Returns an Enumeration of String objects containing the names of the parameters contained in this request.
 java.lang.String[] getParameterValues(java.lang.String name)
          Returns an array of String objects containing all of the values the given request parameter has, or null if the parameter does not exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HAS_COMPOUND_NAME

public static final java.lang.String HAS_COMPOUND_NAME
Flag parameter indicating that the request contains a compound name that has to be parsed.
Constructor Detail

ServletRequestParameters

public ServletRequestParameters(javax.servlet.ServletRequest request)
Returns a request parameters object wrapping the parameters of a ServletRequest.

ServletRequestParameters

public ServletRequestParameters(java.util.Dictionary requestParams)
Returns a request parameters object wrapping the parameters of a ServletRequest.
Method Detail

createRequestDictionary

public static java.util.Dictionary createRequestDictionary(javax.servlet.ServletRequest request)
Returns a Dictionary containing the modified parameters and keys for the ServletRequest. The Dictionary most only contain either Strings or String arrays.

The returned Dictionary may not support mutation.


createRequestDictionary

public static java.util.Dictionary createRequestDictionary(java.util.Dictionary requestParams)
Returns a Dictionary containing the modified parameters and keys for Dictionary of input request parameters.

If not modification is required the returned Dicitonary instance will be the requestParams instance.


decodeCompoundKeyValues

public static void decodeCompoundKeyValues(java.lang.String compoundValue,
                                           int startIndex,
                                           java.util.Dictionary keyValues)
Decodes key value pairs from a single value, placing the decoded values into the specified Dictionary of String[]s. This code does not currently handle multiple values for the same key.

adapted from oracle.cabo.servlet.url.DefaultPageEncoder


encodeCompoundKeyValues

public static java.lang.String encodeCompoundKeyValues(java.lang.String namePrefix,
                                                       java.util.Enumeration keyValues,
                                                       int keyValueSize)
Encodes an Enumeration key value pairs as a single value appended to the baseName, if any;

encodeCompoundKeyValues

public static java.lang.String encodeCompoundKeyValues(java.util.Enumeration keyValues,
                                                       int keyValueSize)
Encodes an Enumeration key value pairs as a single value appended to the baseName, if any;

getParameter

public java.lang.String getParameter(java.lang.String name)
Returns the value of a request parameter as a String, or null if the parameter does not exist. Request parameters are extra information sent with the request. For HTTP servlets, parameters are contained in the query string or posted form data.

You should only use this method when you are sure the parameter has only one value. If the parameter might have more than one value, use getParameterValues(java.lang.String).

If you use this method with a multivalued parameter, the value returned is equal to the first value in the array returned by getParameterValues.

Overrides:
getParameter in class RequestParameters
Parameters:
name - a String specifying the name of the parameter
Returns:
a String representing the single value of the parameter
See Also:
getParameterValues(java.lang.String)

getParameterNames

public java.util.Enumeration getParameterNames()
Returns an Enumeration of String objects containing the names of the parameters contained in this request. If the request has no parameters, the method returns an empty Enumeration.
Overrides:
getParameterNames in class RequestParameters
Returns:
an Enumeration of String objects, each String containing the name of a request parameter; or an empty Enumeration if the request has no parameters

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)
Returns an array of String objects containing all of the values the given request parameter has, or null if the parameter does not exist.

If the parameter has a single value, the array has a length of 1.

Overrides:
getParameterValues in class RequestParameters
Parameters:
name - a String containing the name of the parameter whose value is requested
Returns:
an array of String objects containing the parameter's values
See Also:
getParameter(java.lang.String)

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.