deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.framework.util
Class KVP2Map

java.lang.Object
  extended by 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 (Do, 20. Aug 2009) $
Author:
Andreas Poth, last edited by: $Author: apoth $

Constructor Summary
KVP2Map()
           
 
Method Summary
static Map<String,String> toMap(Enumeration<String> iterator)
           
static Map<String,String> toMap(javax.servlet.http.HttpServletRequest request)
           
static Map<String,String> toMap(javax.servlet.ServletRequest request)
          returns the parameters of a HttpServletRequest as Map.
static Map<String,String> toMap(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
 

Constructor Detail

KVP2Map

public KVP2Map()
Method Detail

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

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org