com.wewebu.ow.server.util.paramcodec
Class OwParameterMap

java.lang.Object
  extended by com.wewebu.ow.server.util.paramcodec.OwParameterMap

public class OwParameterMap
extends Object

Encapsulates a Map containing parameter names as keys and parameter values as map values. The keys in the parameter map are of type String. The values in the parameter map are of type String array.
It is used to handle HTTP servlet request parameter maps.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com

Since:
3.0.0.0

Constructor Summary
OwParameterMap()
          Constructor
OwParameterMap(Map parameterMap_p)
          Constructor
OwParameterMap(OwParameterMap parameterMap_p)
          Deep copy constructor
 
Method Summary
 void addAll(Map cookieMap_p)
          Adds all values of the given Map.
 boolean equals(Object obj_p)
           
 String getParameter(String parameterName_p)
          Returns the value of a request parameter as a String, or null if the parameter does not exist.
 Set getParameterNames()
           
 String[] getParameterValues(String parameterName_p)
           
 void setParameter(String parameterName_p, String value_p)
          Adds the given value to the already existing values of the specifed parameter
 Map toRequestParametersMap()
           
 String toRequestQueryString()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OwParameterMap

public OwParameterMap()
Constructor


OwParameterMap

public OwParameterMap(OwParameterMap parameterMap_p)
Deep copy constructor

Parameters:
parameterMap_p -

OwParameterMap

public OwParameterMap(Map parameterMap_p)
Constructor

Parameters:
parameterMap_p - Map containing parameter names as keys and parameter values as map values. The keys in the parameter map must be of type String. The values in the parameter map must be of type String array.
Method Detail

getParameterNames

public Set getParameterNames()
Returns:
a Set of String parameter names

getParameterValues

public String[] getParameterValues(String parameterName_p)
Parameters:
parameterName_p -
Returns:
an array of String values for the given parameter or null no parameter with the given name is found

getParameter

public String getParameter(String parameterName_p)
Returns the value of a request parameter as a String, or null if the parameter does not exist.

Parameters:
parameterName_p -
Returns:
a String representing the single value of the parameter

setParameter

public void setParameter(String parameterName_p,
                         String value_p)
Adds the given value to the already existing values of the specifed parameter

Parameters:
parameterName_p -
value_p -

toRequestParametersMap

public Map toRequestParametersMap()
Returns:
a Map containing parameter names as keys and parameter values as map values. The keys in the parameter map are of type String. The values in the parameter map are of type String array.

toRequestQueryString

public String toRequestQueryString()
Returns:
the a HTTP query string representation of the encapsulated parameter and values

addAll

public void addAll(Map cookieMap_p)
Adds all values of the given Map. The keys in the parameter map must be of type String. The values in the parameter map must be of type String array.

Parameters:
cookieMap_p -

equals

public boolean equals(Object obj_p)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.