Class User
- java.lang.Object
-
- org.apache.wicket.examples.authorization.User
-
- All Implemented Interfaces:
Serializable,IClusterable
public class User extends Object implements IClusterable
Simple user object.- Author:
- Eelco Hillenius
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetUid()Gets the uid.booleanhasAnyRole(Roles roles)Whether this user has any of the given roles.booleanhasRole(String role)Whether this user has the given role.StringtoString()
-
-
-
Method Detail
-
hasRole
public boolean hasRole(String role)
Whether this user has the given role.- Parameters:
role-- Returns:
- whether this user has the given role
-
hasAnyRole
public boolean hasAnyRole(Roles roles)
Whether this user has any of the given roles.- Parameters:
roles- set of roles- Returns:
- whether this user has any of the given roles
-
getUid
public String getUid()
Gets the uid.- Returns:
- the uid
-
toString
public String toString()
- Overrides:
toStringin classObject- See Also:
Object.toString()
-
-