org.deegree.framework.util
Class KVP2Map
java.lang.Object
org.deegree.framework.util.KVP2Map
public class KVP2Map
- extends 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 (Thu, 20 Aug 2009) $
- Author:
- Andreas Poth, last edited by: $Author: apoth $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KVP2Map
public KVP2Map()
toMap
public static Map<String,String> toMap(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 Map<String,String> toMap(Enumeration<String> iterator)
- Parameters:
iterator
- Enumeration containing KVP encoded parameters
- Returns:
- created Map
toMap
public static Map<String,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 Map<String,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