|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.security.Rank
public final class Rank
This class defines Rank objects which are used in security implementation. Ranks can be associated with users. Every Rank has an unique integer 'height' (so every rank is higher or lower than any other rank) and a String which can be used to identify it. Possible Ranks are maintained by static methods in this class. Generally the 'anonymous', 'basic user' and 'adminstrator' ranks should always be available, and only be delete with good reason.
| Field Summary | |
|---|---|
static Rank |
ADMIN
Identifier for admin rank |
static int |
ADMIN_INT
int value for the anonymous Rank |
static Rank |
ANONYMOUS
Identifier for anonymous rank |
static int |
ANONYMOUS_INT
int value for the anonymous Rank |
static Rank |
BASICUSER
Identifier for basic user rank |
static int |
BASICUSER_INT
int value for the basic user Rank |
| Constructor Summary | |
|---|---|
protected |
Rank(int rank,
String description)
constructor |
| Method Summary | |
|---|---|
int |
compareTo(Rank r)
|
static Rank |
createRank(int rank,
String rankDesc)
Creates and adds a new Rank for the security system. |
static Rank |
deleteRank(String rankDesc)
Removes a rank from the security system. |
boolean |
equals(Object o)
|
int |
getInt()
This method gives back the internal int value of the rank which can be used in switch statements |
static Rank |
getRank(String rankDesc)
|
static SortedSet<Rank> |
getRanks()
Returns all ranks currently known by the security implemetation. |
int |
hashCode()
|
protected static Rank |
registerRank(Rank rank)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int ANONYMOUS_INT
public static final int BASICUSER_INT
public static final int ADMIN_INT
public static final Rank ANONYMOUS
public static final Rank BASICUSER
public static final Rank ADMIN
| Constructor Detail |
|---|
protected Rank(int rank,
String description)
| Method Detail |
|---|
public int getInt()
public String toString()
toString in class Objectpublic static Rank getRank(String rankDesc)
protected static Rank registerRank(Rank rank)
public static Rank createRank(int rank,
String rankDesc)
public static Rank deleteRank(String rankDesc)
public static SortedSet<Rank> getRanks()
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class ObjectObject.hashCode()public int compareTo(Rank r)
compareTo in interface Comparable<Rank>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||