Esri Geoportal Server
1.0

com.esri.gpt.framework.jsf
Class RoleMap

java.lang.Object
  extended by com.esri.gpt.framework.jsf.FacesMap<Boolean>
      extended by com.esri.gpt.framework.jsf.RoleMap
All Implemented Interfaces:
Serializable, Map<String,Boolean>

public class RoleMap
extends FacesMap<Boolean>

Provides a Map interface for setting the rendered attribute of a Faces component based upon a supplied role key.

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

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
RoleMap(User activeUser)
          Constructs based upon a supplied user.
 
Method Summary
 Boolean get(Object role)
          Implements the "get" method for a Map to determine if the active user has a specified role.
 
Methods inherited from class com.esri.gpt.framework.jsf.FacesMap
clear, containsKey, containsValue, entrySet, 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

RoleMap

public RoleMap(User activeUser)
Constructs based upon a supplied user.

Parameters:
activeUser - the user associated with the active request
Method Detail

get

public Boolean get(Object role)
Implements the "get" method for a Map to determine if the active user has a specified role.

The supplied role String is tokenized with the following 3 delimiters:
semi-colon comma space
If the has any specified role, Boolean.TRUE is returned.

Specified by:
get in interface Map<String,Boolean>
Overrides:
get in class FacesMap<Boolean>
Parameters:
role - the role(s) to check (must be a String)
Returns:
Boolean.TRUE if the active user has the specified role

Esri Geoportal Server
1.0

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