|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.trinidadinternal.share.data.RequestParameters
org.apache.myfaces.trinidadinternal.share.data.ServletRequestParameters
public class ServletRequestParameters
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.Map<java.lang.String,java.lang.Object> requestParams)
Returns a request parameters object wrapping the parameters of a ServletRequest. |
Method Summary | |
---|---|
static java.util.Map<java.lang.String,java.lang.Object> |
createRequestMap(java.util.Map<java.lang.String,java.lang.Object> requestParams)
Returns a Map containing the modified parameters and keys for Map of input request parameters. |
static void |
decodeCompoundKeyValues(java.lang.String compoundValue,
int startIndex,
java.util.Map<java.lang.String,java.lang.Object> keyValues)
Decodes key value pairs from a single value, placing the decoded values into the specified Map of String[]s. |
static java.lang.String |
encodeCompoundKeyValues(java.util.Iterator<java.lang.Object> keyValues,
int keyValueSize)
Encodes an Iterator key value pairs as a single value appended to the baseName, if any; |
static java.lang.String |
encodeCompoundKeyValues(java.util.Iterator<java.lang.Object> keyValues,
int keyValueSize,
java.util.Iterator<java.lang.Object> keyExchanges,
int keyExchangesSize)
Encodes an Iterator key value pairs as a single value appended to the baseName, if any. |
static java.lang.String |
encodeCompoundKeyValues(java.lang.String namePrefix,
java.util.Iterator<java.lang.Object> keyValues,
int keyValueSize)
Encodes an Iterator key value pairs as a single value appended to the baseName, if any; |
static java.lang.String |
encodeCompoundKeyValues(java.lang.String namePrefix,
java.util.Iterator<java.lang.Object> keyValues,
int keyValueSize,
java.lang.String exchangePrefix,
java.util.Iterator<java.lang.Object> keyExchanges,
int keyExchangesSize)
Encodes an Iterator 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.Iterator<java.lang.String> |
getParameterNames()
Returns an Iterator 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 |
---|
public static final java.lang.String HAS_COMPOUND_NAME
Constructor Detail |
---|
public ServletRequestParameters(java.util.Map<java.lang.String,java.lang.Object> requestParams)
Method Detail |
---|
public static java.util.Map<java.lang.String,java.lang.Object> createRequestMap(java.util.Map<java.lang.String,java.lang.Object> requestParams)
If not modification is required the returned Dicitonary instance
will be the
public static void decodeCompoundKeyValues(java.lang.String compoundValue, int startIndex, java.util.Map<java.lang.String,java.lang.Object> keyValues)
adapted from org.apache.myfaces.trinidadinternal.uix22.servlet.url.DefaultPageEncoder
public static java.lang.String encodeCompoundKeyValues(java.lang.String namePrefix, java.util.Iterator<java.lang.Object> keyValues, int keyValueSize)
public static java.lang.String encodeCompoundKeyValues(java.lang.String namePrefix, java.util.Iterator<java.lang.Object> keyValues, int keyValueSize, java.lang.String exchangePrefix, java.util.Iterator<java.lang.Object> keyExchanges, int keyExchangesSize)
public static java.lang.String encodeCompoundKeyValues(java.util.Iterator<java.lang.Object> keyValues, int keyValueSize)
public static java.lang.String encodeCompoundKeyValues(java.util.Iterator<java.lang.Object> keyValues, int keyValueSize, java.util.Iterator<java.lang.Object> keyExchanges, int keyExchangesSize)
public java.lang.String getParameter(java.lang.String name)
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
.
getParameter
in class RequestParameters
name
- a String
specifying the
name of the parameter
String
representing the
single value of the parametergetParameterValues(java.lang.String)
public java.util.Iterator<java.lang.String> getParameterNames()
Iterator
of String
objects containing the names of the parameters contained
in this request. If the request has
no parameters, the method returns an
empty Iterator
.
getParameterNames
in class RequestParameters
Iterator
of String
objects, each String
containing
the name of a request parameter; or an
empty Iterator
if the
request has no parameterspublic java.lang.String[] getParameterValues(java.lang.String name)
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.
getParameterValues
in class RequestParameters
name
- a String
containing the name of
the parameter whose value is requested
String
objects
containing the parameter's valuesgetParameter(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |