org.jcreme.permissioning
Class User

java.lang.Object
  extended byorg.jcreme.enumerations.Enumeration
      extended byorg.jcreme.permissioning.User
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class User
extends Enumeration

This defines the users of a system. Each user is assigned business roles. These roles will define what actions can be carried on.

Version:
$Revision: 1.1 $
Author:
$Author: dbregeon $
See Also:
Serialized Form

Field Summary
protected static java.util.Hashtable fromName
           
protected  java.lang.String fullName
           
protected  java.util.HashSet roles
           
 
Fields inherited from class org.jcreme.enumerations.Enumeration
 
Constructor Summary
protected User(java.lang.String name)
           
 
Method Summary
 void addRole(Role r)
           
protected  java.util.Hashtable getFromName()
          This method is for internal use only.
 java.lang.String getFullName()
           
 Role[] getRoles()
           
static User[] getUsers()
           
static Enumeration[] getValues()
          This method enables to retrieve all the possible values of an Enumeration class.
 boolean hasRole(Role r)
           
 void removeRole(Role r)
           
 void setFullName(java.lang.String s)
           
 
Methods inherited from class org.jcreme.enumerations.Enumeration
compareTo, getName, readResolve, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fromName

protected static final java.util.Hashtable fromName

fullName

protected java.lang.String fullName

roles

protected java.util.HashSet roles
Constructor Detail

User

protected User(java.lang.String name)
Method Detail

setFullName

public void setFullName(java.lang.String s)

getFullName

public java.lang.String getFullName()

addRole

public void addRole(Role r)

removeRole

public void removeRole(Role r)

getRoles

public Role[] getRoles()

hasRole

public boolean hasRole(Role r)

getFromName

protected java.util.Hashtable getFromName()
Description copied from class: Enumeration
This method is for internal use only.

Specified by:
getFromName in class Enumeration
Returns:
the Hashtable that links the enumerated values names with the actual enumerated value.
See Also:
Enumeration.getFromName()

getUsers

public static User[] getUsers()

getValues

public static Enumeration[] getValues()
Description copied from class: Enumeration
This method enables to retrieve all the possible values of an Enumeration class. This method should be overriden in the subclasses to have the desired result. The method in this class returns an empty array.



Copyright 2006 null. All Rights Reserved.