deegree 2.2 (2008/12/22 11:33 build-3038-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: 9339 $, 1.0. $Revision: 9339 $, $Date: 2007-12-27 13:31:52 +0100 (Do, 27 Dez 2007) $
Author:
Andreas Poth, last edited by: $Author: apoth $

Constructor Summary
KVP2Map()
           
 
Method Summary
static Map<String,String> toMap(Enumeration iterator)
           
static Map<String,String> toMap(HttpServletRequest 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 iterator)
Parameters:
iterator - Enumeration containing KVP encoded parameters
Returns:
created Map

toMap

public static Map<String,String> toMap(HttpServletRequest 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.2 (2008/12/22 11:33 build-3038-official)

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