|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.auth.StandardUser
public class StandardUser
This object represents the current user. Each user must have a unique
identifier (per SecurityHandler
).
Field Summary | |
---|---|
protected Map |
attributes
The user attributes. |
protected String |
id
The unique id of the user. |
protected List |
roles
Cache the roles info. |
Constructor Summary | |
---|---|
StandardUser()
Create a new user object. |
|
StandardUser(String userId)
Create a new user object. |
Method Summary | |
---|---|
Object |
getAttribute(String key)
Get information about the user. |
Iterator |
getAttributeNames()
Return all available names. |
String |
getId()
Return the unique id of this user. |
boolean |
isUserInRole(String role)
Check if the user is in a given role. |
void |
removeAttribute(String key)
Remove an information about the user. |
void |
setAttribute(String key,
Object value)
Set an information about the user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String id
protected final Map attributes
protected List roles
Constructor Detail |
---|
public StandardUser(String userId)
userId
- The unique identifier for this user.public StandardUser()
Method Detail |
---|
public String getId()
User
getId
in interface User
User.getId()
public void setAttribute(String key, Object value)
User
Serializable
.
setAttribute
in interface User
key
- The key identifying the information.value
- The value of the information.User.setAttribute(java.lang.String, java.lang.Object)
public void removeAttribute(String key)
User
removeAttribute
in interface User
key
- The key identifying the information.User.removeAttribute(java.lang.String)
public Object getAttribute(String key)
User
getAttribute
in interface User
key
- The key identifying the information.
User.getAttribute(java.lang.String)
public Iterator getAttributeNames()
User
getAttributeNames
in interface User
User.getAttributeNames()
public boolean isUserInRole(String role)
isUserInRole
in interface User
role
- The role to test.
User.isUserInRole(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |