org.apache.myfaces.component
Class UserRoleUtils

java.lang.Object
  |
  +--org.apache.myfaces.component.UserRoleUtils

public class UserRoleUtils
extends java.lang.Object

Version:
$Revision: 1.4 $ $Date: 2004/10/13 11:50:56 $ $Log: UserRoleUtils.java,v $ Revision 1.4 2004/10/13 11:50:56 matze renamed packages to org.apache Revision 1.3 2004/07/01 21:53:10 mwessendorf ASF switch Revision 1.2 2004/05/18 14:31:36 manolito user role support completely moved to components source tree Revision 1.1 2004/03/31 11:58:33 manolito custom component refactoring
Author:
Manfred Geiler (latest modification by $Author: matze $)

Constructor Summary
UserRoleUtils()
           
 
Method Summary
static boolean isEnabledOnUserRole(javax.faces.component.UIComponent component)
          Gets the comma separated list of enabling user roles from the given component and checks if current user is in one of these roles.
static boolean isVisibleOnUserRole(javax.faces.component.UIComponent component)
          Gets the comma separated list of visibility user roles from the given component and checks if current user is in one of these roles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserRoleUtils

public UserRoleUtils()
Method Detail

isVisibleOnUserRole

public static boolean isVisibleOnUserRole(javax.faces.component.UIComponent component)
Gets the comma separated list of visibility user roles from the given component and checks if current user is in one of these roles.

Parameters:
component - a user role aware component
Returns:
true if no user roles are defined for this component or user is in one of these roles, false otherwise

isEnabledOnUserRole

public static boolean isEnabledOnUserRole(javax.faces.component.UIComponent component)
Gets the comma separated list of enabling user roles from the given component and checks if current user is in one of these roles.

Parameters:
component - a user role aware component
Returns:
true if no user roles are defined for this component or user is in one of these roles, false otherwise