com.filenet.wcm.toolkit.server.util
Class WcmRequestMap

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended bycom.filenet.wcm.toolkit.server.util.WcmRequestMap
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class WcmRequestMap
extends java.util.HashMap

WcmRequestMap can be used to store all request parameters found on an HttpServletRequest object. WcmParameter.EVENT_NAME and WcmParameter.EVENT_TARGET are automatically stripped when setting values via the putAll method. This helper class is used in Workplace by authentication to pass extra parameters through the authentication process.

See Also:
Serialized Form

Constructor Summary
WcmRequestMap()
           
WcmRequestMap(java.util.Map parameterMap)
          Constructor to initialize WcmRequestMap with the parameters contained in parameterMap.
WcmRequestMap(java.util.Map parameterMap, boolean sorted)
           
 
Method Summary
 java.lang.String getParameter(java.lang.String key)
          Get a parameter String value from the map.
static java.lang.String getString(java.util.Map map, java.lang.String key)
           
protected  java.lang.String getString(java.lang.Object item)
          Get a value from the map, based on the passed in key object.
protected  void initialize(java.util.Map parameterMap)
           
 void putAll(java.util.Map t)
          Copy all entries in the specified map into this map.
 java.lang.String removeParameter(java.lang.String key)
          Remove the key/value if it exists in the map.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

WcmRequestMap

public WcmRequestMap()

WcmRequestMap

public WcmRequestMap(java.util.Map parameterMap)
Constructor to initialize WcmRequestMap with the parameters contained in parameterMap. Entries with the key WcmParameter.EVENT_TARGET or WcmParameter.EVENT_NAME are removed.

Parameters:
parameterMap -

WcmRequestMap

public WcmRequestMap(java.util.Map parameterMap,
                     boolean sorted)
Method Detail

initialize

protected void initialize(java.util.Map parameterMap)

getString

protected java.lang.String getString(java.lang.Object item)
Get a value from the map, based on the passed in key object. Some keys from a request may have multiple values, which are stored in a String[]. In these cases, the first entry is returned.

Parameters:
item - - the key to look up.
Returns:
The value for the key if it exists, or null.

getString

public static java.lang.String getString(java.util.Map map,
                                         java.lang.String key)

getParameter

public java.lang.String getParameter(java.lang.String key)
Get a parameter String value from the map. The behavior mimics HttpServletRequest.getParameter.

Parameters:
key - - the key value.
Returns:
The value for the key if it exists, or null.

removeParameter

public java.lang.String removeParameter(java.lang.String key)
Remove the key/value if it exists in the map.

Parameters:
key - - the key value.
Returns:
The value for the key if it existed, or null.

putAll

public void putAll(java.util.Map t)
Copy all entries in the specified map into this map. Entries with the key WcmParameter.EVENT_TARGET or WcmParameter.EVENT_NAME are removed.

Parameters:
t - - The request objects parameter map.


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.