Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.portlet
Class PortletApplicationMap

    java.lang.Object
      java.util.AbstractMap
          org.apache.struts2.portlet.PortletApplicationMap

All Implemented Interfaces:
  Serializable, Map

    public class PortletApplicationMap

extends AbstractMap
implements Serializable

Portlet specific `Map` implementation representing the `PortletContext` of a Portlet.

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from interface java.util.Map
`Map.Entry<K,V>`

Field Summary
`private javax.portlet.PortletContext` | `context`
`private Set<Object>` | `entries`
`private static long` | `serialVersionUID`

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.
`Set` | `entrySet()` Creates a Set of all portlet context attributes as well as context init parameters.
`Object` | `get(Object key)` Returns the portlet context attribute or init parameter based on the given key.
`Object` | `put(Object key, Object value)` Sets a portlet context attribute given a attribute name and value.
`Object` | `remove(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`

Field Detail

### serialVersionUID

    private static final long serialVersionUID

See Also:
  Constant Field Values

### context

    private javax.portlet.PortletContext context

### entries

    private Set<Object> entries

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 `Map`
  Overrides:
    `clear` in class `AbstractMap`

### entrySet

    public Set entrySet()

  Creates a Set of all portlet context attributes as well as context init parameters.

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

### get

    public Object get(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 `Map`
  Overrides:
    `get` in class `AbstractMap`
  Parameters:
    `key` - the entry key.
  Returns:
    the portlet context attribute or init parameter or `null` if the entry is not found.

### put

    public Object put(Object key,
                      Object value)

  Sets a portlet context attribute given a attribute name and value.

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

### remove

    public Object remove(Object key)

  Removes the specified portlet context attribute.

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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