org.deegree.framework.util
Class KVP2Map
java.lang.Object
org.deegree.framework.util.KVP2Map
public class KVP2Map
- extends java.lang.Object
offeres utility method for transformating a key-value-pair encoded request to a Map
- Since:
- 2.0
- Version:
- $Revision: 19270 $, 1.0. $Revision: 19270 $, $Date: 2009-08-20 10:28:52 +0200 (Do, 20 Aug 2009) $
- Author:
- Andreas Poth, last edited by: $Author: apoth $
Method Summary |
static java.util.Map<java.lang.String,java.lang.String> |
toMap(java.util.Enumeration<java.lang.String> iterator)
|
static java.util.Map<java.lang.String,java.lang.String> |
toMap(javax.servlet.http.HttpServletRequest request)
|
static java.util.Map<java.lang.String,java.lang.String> |
toMap(javax.servlet.ServletRequest request)
returns the parameters of a HttpServletRequest as Map. |
static java.util.Map<java.lang.String,java.lang.String> |
toMap(java.lang.String kvp)
Transforms a String/KVPs like it is used for HTTP-GET request to a Map. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KVP2Map
public KVP2Map()
toMap
public static java.util.Map<java.lang.String,java.lang.String> toMap(java.lang.String kvp)
- Transforms a String/KVPs like it is used for HTTP-GET request to a Map.
TODO: Check if the trim () call may cause side effects. It is currently used to eliminate possible new line
characters at the end of the string, that occured using the
GenericClient
.
- Parameters:
kvp
- key-value-pair encoded request
- Returns:
- created Map
toMap
public static java.util.Map<java.lang.String,java.lang.String> toMap(java.util.Enumeration<java.lang.String> iterator)
- Parameters:
iterator
- Enumeration containing KVP encoded parameters
- Returns:
- created Map
toMap
public static java.util.Map<java.lang.String,java.lang.String> toMap(javax.servlet.http.HttpServletRequest request)
- Parameters:
request
-
- Returns:
- a Map which contains kvp's from the given request
- See Also:
toMap(HttpServletRequest)
toMap
public static java.util.Map<java.lang.String,java.lang.String> toMap(javax.servlet.ServletRequest request)
- returns the parameters of a HttpServletRequest as Map. (HINT: all the keys get changed to upper
case)
- Parameters:
request
-
- Returns:
- a Map which contains kvp's from the given request
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org