org.apache.myfaces.trinidadinternal.ui.collection
Interface ContextMap

All Known Implementing Classes:
MapContextMap

public interface ContextMap

Map-like object for storing context-based information. Since the context is passed in to the get and keys methods, ContextMaps that delegate all or some of their properties through the RenderingContext. The MutableUINode class uses a ContextMap to store its named children, for this very reason, as it enables developers to data bind the named children nodes.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/ui/collection/ContextMap.java#0 $) $Date: 10-nov-2005.18:57:32 $
Author:
The Oracle ADF Faces Team

See Also:
BaseMutableUINode.setNamedChildMap(org.apache.myfaces.trinidadinternal.ui.collection.ContextMap)

Method Summary
 java.lang.Object get(UIXRenderingContext context, java.lang.Object key)
          Returns the Object stored under the key, returning null if no Object with that key exists.
 java.util.Iterator<java.lang.String> keys(UIXRenderingContext context)
          Returns an Iterator of all of the keys in the ContextMap given the specified context.
 void set(java.lang.String key, java.lang.Object value)
          Stores the value in the map, under the key.
 

Method Detail

get

java.lang.Object get(UIXRenderingContext context,
                     java.lang.Object key)
Returns the Object stored under the key, returning null if no Object with that key exists.

Parameters:
context - RenderingContext to use to fulfill this request
key - key used to retrieve the value
Returns:
The value stored under this key, or null if no value is found.
Throws:
java.lang.IllegalArgumentException - if the key is null

set

void set(java.lang.String key,
         java.lang.Object value)
Stores the value in the map, under the key.

As the RenderingContext is not passed to this function, sets do not have the same databinding capabilities that gets do.

Parameters:
key - key used to set the value
value - The new value to set
Throws:
java.lang.IllegalArgumentException - if either the key or value is null.

keys

java.util.Iterator<java.lang.String> keys(UIXRenderingContext context)
Returns an Iterator of all of the keys in the ContextMap given the specified context.

The entire contents of the ContextMap can be retrieved by calling ContextMap.get for each of the keys in the enumeration.

Parameters:
UIXRenderingContext - context Context used to determine the set of keys.
Returns:
The Iterator of keys in the RenderingContext


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