|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.examples.authorization.User
public class User
Simple user object.
Constructor Summary | |
---|---|
User(String uid,
String roles)
Construct. |
Method Summary | |
---|---|
String |
getUid()
Gets the uid. |
boolean |
hasAnyRole(Roles roles)
Whether this user has any of the given roles. |
boolean |
hasRole(String role)
Whether this user has the given role. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public User(String uid, String roles)
uid
- the unique user idroles
- a comma seperated list of roles (e.g. USER,ADMIN)Method Detail |
---|
public boolean hasRole(String role)
role
-
public boolean hasAnyRole(Roles roles)
roles
- set of roles
public String getUid()
public String toString()
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |