org.apache.struts2.portlet
Class PortletApplicationMap

java.lang.Object
  extended by java.util.AbstractMap
      extended by org.apache.struts2.portlet.PortletApplicationMap
All Implemented Interfaces:
java.io.Serializable, java.util.Map

public class PortletApplicationMap
extends java.util.AbstractMap
implements java.io.Serializable

Portlet specific Map implementation representing the PortletContext of a Portlet.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
PortletApplicationMap(javax.portlet.PortletContext ctx)
          Creates a new map object given the PortletContext.
 
Method Summary
 void clear()
          Removes all entries from the Map and removes all attributes from the portlet context.
 java.util.Set entrySet()
          Creates a Set of all portlet context attributes as well as context init parameters.
 java.lang.Object get(java.lang.Object key)
          Returns the portlet context attribute or init parameter based on the given key.
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          Sets a portlet context attribute given a attribute name and value.
 java.lang.Object remove(java.lang.Object key)
          Removes the specified portlet context attribute.
 
Methods inherited from class java.util.AbstractMap
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortletApplicationMap

public PortletApplicationMap(javax.portlet.PortletContext ctx)
Creates a new map object given the PortletContext.

Parameters:
ctx - The portlet context.
Method Detail

clear

public void clear()
Removes all entries from the Map and removes all attributes from the portlet context.

Specified by:
clear in interface java.util.Map
Overrides:
clear in class java.util.AbstractMap

entrySet

public java.util.Set entrySet()
Creates a Set of all portlet context attributes as well as context init parameters.

Specified by:
entrySet in interface java.util.Map
Specified by:
entrySet in class java.util.AbstractMap
Returns:
a Set of all portlet context attributes as well as context init parameters.

get

public java.lang.Object get(java.lang.Object key)
Returns the portlet context attribute or init parameter based on the given key. If the entry is not found, null is returned.

Specified by:
get in interface java.util.Map
Overrides:
get in class java.util.AbstractMap
Parameters:
key - the entry key.
Returns:
the portlet context attribute or init parameter or null if the entry is not found.

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Sets a portlet context attribute given a attribute name and value.

Specified by:
put in interface java.util.Map
Overrides:
put in class java.util.AbstractMap
Parameters:
key - the name of the attribute.
value - the value to set.
Returns:
the attribute that was just set.

remove

public java.lang.Object remove(java.lang.Object key)
Removes the specified portlet context attribute.

Specified by:
remove in interface java.util.Map
Overrides:
remove in class java.util.AbstractMap
Parameters:
key - the attribute to remove.
Returns:
the entry that was just removed.


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.