Esri Geoportal Server
1.0

com.esri.gpt.framework.jsf
Class FacesMap<MemberType extends Serializable>

java.lang.Object
  extended by com.esri.gpt.framework.jsf.FacesMap<MemberType>
All Implemented Interfaces:
Serializable, Map<String,MemberType>
Direct Known Subclasses:
BaseSortDirectionStyleMap, HasAttributeMap, MenuStyleMap, RoleMap, SortOptionStyleMap, TabStyleMap, TocsByKey

public class FacesMap<MemberType extends Serializable>
extends Object
implements Map<String,MemberType>, Serializable

Supplies an implemented Map interface intended for use within a JSF expression.

All Map interface methods are implemented, but basically have no behavior.

Sub-classes should override the "public Object get(Object key)" method to provide JSF with expression based results.

Example:
rendered="#{PageContext.roleMap['someRole']}"

In this case, RoleMap extends FacesMap and overrides the get() method returning a Boolean indicating whether or not the active user has the supplied role 'someRole'.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
FacesMap()
          Default constructor.
 
Method Summary
 void clear()
          Clears the map.
 boolean containsKey(Object key)
          Determines if a key is contained within the map.
 boolean containsValue(Object value)
          Determines if a value is contained within the map.
 Set<Map.Entry<String,MemberType>> entrySet()
          Returns the set of entries contained within the map.
 MemberType get(Object key)
          Gets the value associated with a key.
 boolean isEmpty()
          Determines if the map is empty.
 Set<String> keySet()
          Returns the set of keys contained within the map.
 MemberType put(String key, MemberType value)
          Puts a value within the map.
 void putAll(Map<? extends String,? extends MemberType> map)
          Copies the entries from the supplied Map to this Map.
 MemberType remove(Object key)
          Removes the value associated with a key.
 int size()
          Returns the number of entries contained within the map.
 Collection<MemberType> values()
          Returns the collection of values contained within the map.
 
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

FacesMap

public FacesMap()
Default constructor.

Method Detail

clear

public void clear()
Clears the map.
The method is ignored.

Specified by:
clear in interface Map<String,MemberType extends Serializable>

containsKey

public boolean containsKey(Object key)
Determines if a key is contained within the map.

Specified by:
containsKey in interface Map<String,MemberType extends Serializable>
Parameters:
key - the key to check
Returns:
true if the key is contained (always false)

containsValue

public boolean containsValue(Object value)
Determines if a value is contained within the map.

Specified by:
containsValue in interface Map<String,MemberType extends Serializable>
Parameters:
value - the value to check
Returns:
true if the value is contained (always false)

entrySet

public Set<Map.Entry<String,MemberType>> entrySet()
Returns the set of entries contained within the map.

Specified by:
entrySet in interface Map<String,MemberType extends Serializable>
Returns:
the set of entries (always null)

get

public MemberType get(Object key)
Gets the value associated with a key.
This method is overridden by the sub-class to provide a Map interface for a JSF tag.

Specified by:
get in interface Map<String,MemberType extends Serializable>
Returns:
the associated value (always null for this super-class)

isEmpty

public boolean isEmpty()
Determines if the map is empty.

Specified by:
isEmpty in interface Map<String,MemberType extends Serializable>
Returns:
always false

keySet

public Set<String> keySet()
Returns the set of keys contained within the map.

Specified by:
keySet in interface Map<String,MemberType extends Serializable>
Returns:
the set of keys (always null)

put

public MemberType put(String key,
                      MemberType value)
Puts a value within the map.
The method is ignored.

Specified by:
put in interface Map<String,MemberType extends Serializable>
Parameters:
key - the map entry key
value - the map entry value (always null)

putAll

public void putAll(Map<? extends String,? extends MemberType> map)
Copies the entries from the supplied Map to this Map.
The method is ignored.

Specified by:
putAll in interface Map<String,MemberType extends Serializable>
Parameters:
map - the map to copy

remove

public MemberType remove(Object key)
Removes the value associated with a key.
The method is ignored.

Specified by:
remove in interface Map<String,MemberType extends Serializable>
Parameters:
key - the key associated with the value to remove
Returns:
the value that was removed (always null))

size

public int size()
Returns the number of entries contained within the map.

Specified by:
size in interface Map<String,MemberType extends Serializable>
Returns:
the number of entries (always 0)

values

public Collection<MemberType> values()
Returns the collection of values contained within the map.

Specified by:
values in interface Map<String,MemberType extends Serializable>
Returns:
the collection of values (always null)

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.