public final class User extends Object
| Constructor and Description |
|---|
User() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRole(String role) |
void |
addRoles(List<String> roles) |
static Map<String,List<User>> |
createRoleMap(List<User> users)
Create a user map indexed on the roles.
|
boolean |
equals(Object userObject) |
String |
getName() |
String |
getPassword() |
List<String> |
getRoles() |
int |
hashCode() |
protected static List<String> |
parseRoles(String rolesAsString)
Parse roles defined as a list in the format "role1,role2,...,roleN".
|
protected static User |
parseUser(String userAsString)
Parse a user defined in the format "name:pwd:role1,...roleN".
|
static List<User> |
parseUsers(String usersAsString)
Parse a string representing the users (see
ServletPropertySet.USERS. |
void |
setName(String name) |
void |
setPassword(String password)
Sets the authenticated user password.
|
public void setName(String name)
name - the user namepublic String getName()
public void setPassword(String password)
password - the user passwordpublic String getPassword()
public void addRole(String role)
role - a role attached to this userpublic void addRoles(List<String> roles)
roles - a list of roles attached to this userpublic boolean equals(Object userObject)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public static List<User> parseUsers(String usersAsString)
ServletPropertySet.USERS.usersAsString - the string representing the usersUser objectsprotected static User parseUser(String userAsString)
userAsString - the user defines as a stringprotected static List<String> parseRoles(String rolesAsString)
rolesAsString - the roles defined as a stringCopyright © 2004-2013 Codehaus. All Rights Reserved.