org.jcreme.permissioning
Class Purpose

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

public class Purpose
extends Enumeration

This enumeration represent the Purpose that drives a Task. Purposes define a hierarchy. Purposes are linked to the permissions to access data as they reflect the intent rather than to the actual action.

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

Field Summary
protected static java.util.Hashtable fromName
           
protected  java.util.HashSet parents
           
 
Fields inherited from class org.jcreme.enumerations.Enumeration
 
Constructor Summary
protected Purpose(java.lang.String name)
           
 
Method Summary
 void addParent(Purpose p)
           
static boolean contains(java.lang.String name)
           
static Purpose get(java.lang.String name)
           
protected  java.util.Hashtable getFromName()
          This method is for internal use only.
 Purpose[] getParents()
           
static Purpose[] getPurposes()
           
static Enumeration[] getValues()
          This method enables to retrieve all the possible values of an Enumeration class.
 boolean hasParent(Purpose p)
           
static void remove(java.lang.String name)
           
 void removeParent(Purpose p)
           
 
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

parents

protected java.util.HashSet parents
Constructor Detail

Purpose

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

addParent

public void addParent(Purpose p)
               throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

removeParent

public void removeParent(Purpose p)

getParents

public Purpose[] getParents()

hasParent

public boolean hasParent(Purpose p)

get

public static Purpose get(java.lang.String name)

contains

public static boolean contains(java.lang.String name)

remove

public static void remove(java.lang.String name)

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()

getPurposes

public static Purpose[] getPurposes()

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.