|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opentox.auth.Priviledges
public final class Priviledges
Defines different three levels of authorization. These are user/simple, user/priviledged and user/admin.
Field Summary | |
---|---|
static Priviledges |
ADMIN
Administrators. |
static Priviledges |
GUEST
Guest Users with no priviledges. |
private java.lang.String |
level
User priviledges level. |
static Priviledges |
PRIVILEDGED_USER
Priviledged Users. |
static Priviledges |
USER
Simple Users. |
Constructor Summary | |
---|---|
Priviledges(java.lang.String level)
Constructor. |
Method Summary | |
---|---|
int |
compareTo(IAuthorizationHierarchy other)
Compares two authorization levels. Implements the ordering: |
java.lang.String |
getLevel()
Returns the identifier of a Priviledge. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String level
public static Priviledges GUEST
public static Priviledges USER
public static Priviledges PRIVILEDGED_USER
public static Priviledges ADMIN
Constructor Detail |
---|
public Priviledges(java.lang.String level)
level
- Method Detail |
---|
public java.lang.String getLevel()
getLevel
in interface IAuthorizationHierarchy
public int compareTo(IAuthorizationHierarchy other)
"guest" < "user/simple" < "user/priviledged" < "user/admin"Returns 1 if a.compareTo(b) means that a is more priviledged that b, Return 0 if the two Priviledges are equal and -1 else. The method returns -2 if no decission is taken...
compareTo
in interface java.lang.Comparable<IAuthorizationHierarchy>
compareTo
in interface IAuthorizationHierarchy
other
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |