public final class User extends Object
| Constructor and Description |
|---|
User() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRole(String role) |
void |
addRoles(List roles) |
static Map |
createRoleMap(List users)
Create a user map indexed on the roles.
|
boolean |
equals(Object userObject) |
String |
getName() |
String |
getPassword() |
List |
getRoles() |
int |
hashCode() |
protected static List |
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 |
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 roles)
roles - a list of roles attached to this userpublic List getRoles()
public boolean equals(Object userObject)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public static List 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 parseRoles(String rolesAsString)
rolesAsString - the roles defined as a stringCopyright © 2004-2013 Codehaus. All Rights Reserved.