org.jcreme.permissioning
Class Task
java.lang.Object
org.jcreme.enumerations.Enumeration
org.jcreme.permissioning.Task
- All Implemented Interfaces:
- java.lang.Comparable, java.io.Serializable
- public class Task
- extends Enumeration
A Task represents an action from a functional point of view. It is associated
to a purpose that defines the intention of the action. Each task is also
associated to a Role. Users that hold that role are the only legitimate Users
that can accomplish this Task.
- Version:
- $Revision: 1.1 $
- Author:
- $Author: dbregeon $
- See Also:
- Serialized Form
| Fields inherited from class org.jcreme.enumerations.Enumeration |
|
|
Constructor Summary |
protected |
Task(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
fromName
protected static final java.util.Hashtable fromName
purpose
protected Purpose purpose
subTasks
protected java.util.HashSet subTasks
role
protected Role role
Task
protected Task(java.lang.String name)
setPurpose
public void setPurpose(Purpose p)
getPurpose
public Purpose getPurpose()
setRole
public void setRole(Role r)
getRole
public Role getRole()
getSubTasks
public Task[] getSubTasks()
addSubTask
public void addSubTask(Task t)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
removeSubTask
public void removeSubTask(Task t)
isSubTask
public boolean isSubTask(Task t)
isLeaf
public boolean isLeaf()
get
public static Task 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()
getTasks
public static Task[] getTasks()
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.