Spring Web Flow

org.springframework.faces.webflow.context.portlet
Class RequestPropertyMap

java.lang.Object
  extended by org.springframework.binding.collection.StringKeyedMapAdapter
      extended by org.springframework.faces.webflow.context.portlet.RequestPropertyMap
All Implemented Interfaces:
java.util.Map

public class RequestPropertyMap
extends StringKeyedMapAdapter

Map backed by a PortletContext for accessing Portlet request properties. Request properties can have multiple values. The setUseArrayForMultiValueAttributes(Boolean) property allows choosing whether the map will return:

Since:
2.2.0
Author:
Rossen Stoyanchev
See Also:
PortletRequest.getProperty(String), PortletRequest.getProperties(String)

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
RequestPropertyMap(javax.portlet.PortletRequest portletRequest)
           
 
Method Summary
protected  java.lang.Object getAttribute(java.lang.String key)
          Hook method that needs to be implemented by concrete subclasses.
protected  java.util.Iterator<java.lang.String> getAttributeNames()
          Hook method that needs to be implemented by concrete subclasses.
protected  void removeAttribute(java.lang.String key)
          Hook method that needs to be implemented by concrete subclasses.
protected  void setAttribute(java.lang.String key, java.lang.Object value)
          Hook method that needs to be implemented by concrete subclasses.
 void setUseArrayForMultiValueAttributes(java.lang.Boolean useArrayForMultiValueAttributes)
          This property allows choosing what kind of attributes the map will return: String - selects the first element in case of multiple values String[] - wraps single-values attributes as array String or String[] - depends on the values of the property The above choices correspond to the following values for useArrayForMultiValueAttributes: False True null
 java.lang.Boolean useArrayForMultiValueAttributes()
           
 
Methods inherited from class org.springframework.binding.collection.StringKeyedMapAdapter
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

RequestPropertyMap

public RequestPropertyMap(javax.portlet.PortletRequest portletRequest)
Method Detail

setUseArrayForMultiValueAttributes

public void setUseArrayForMultiValueAttributes(java.lang.Boolean useArrayForMultiValueAttributes)
This property allows choosing what kind of attributes the map will return:
  1. String - selects the first element in case of multiple values
  2. String[] - wraps single-values attributes as array
  3. String or String[] - depends on the values of the property
The above choices correspond to the following values for useArrayForMultiValueAttributes:
  1. False
  2. True
  3. null

Parameters:
useArrayForMultiValueAttributes -

useArrayForMultiValueAttributes

public java.lang.Boolean useArrayForMultiValueAttributes()

getAttribute

protected java.lang.Object getAttribute(java.lang.String key)
Description copied from class: StringKeyedMapAdapter
Hook method that needs to be implemented by concrete subclasses. Gets a value associated with a key.

Specified by:
getAttribute in class StringKeyedMapAdapter
Parameters:
key - the key to lookup
Returns:
the associated value, or null if none

setAttribute

protected void setAttribute(java.lang.String key,
                            java.lang.Object value)
Description copied from class: StringKeyedMapAdapter
Hook method that needs to be implemented by concrete subclasses. Puts a key-value pair in the map, overwriting any possible earlier value associated with the same key.

Specified by:
setAttribute in class StringKeyedMapAdapter
Parameters:
key - the key to associate the value with
value - the value to associate with the key

removeAttribute

protected void removeAttribute(java.lang.String key)
Description copied from class: StringKeyedMapAdapter
Hook method that needs to be implemented by concrete subclasses. Removes a key and its associated value from the map.

Specified by:
removeAttribute in class StringKeyedMapAdapter
Parameters:
key - the key to remove

getAttributeNames

protected java.util.Iterator<java.lang.String> getAttributeNames()
Description copied from class: StringKeyedMapAdapter
Hook method that needs to be implemented by concrete subclasses. Returns an enumeration listing all keys known to the map.

Specified by:
getAttributeNames in class StringKeyedMapAdapter
Returns:
the key enumeration

Spring Web Flow