|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.auth.impl.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. |
Fields inherited from interface org.apache.cocoon.auth.User |
ATTRIBUTE_PRINCIPAL |
Constructor Summary | |
StandardUser()
Create a new user object. |
|
StandardUser(String userId)
Create a new user object. |
Method Summary | |
Object |
getAttribute(String key)
|
Iterator |
getAttributeNames()
|
String |
getId()
|
boolean |
isUserInRole(String role)
Check if the user is in a given role. |
void |
removeAttribute(String key)
|
void |
setAttribute(String key,
Object value)
|
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()
getId
in interface org.apache.cocoon.auth.User
User.getId()
public void setAttribute(String key, Object value)
setAttribute
in interface org.apache.cocoon.auth.User
User.setAttribute(java.lang.String, java.lang.Object)
public void removeAttribute(String key)
removeAttribute
in interface org.apache.cocoon.auth.User
User.removeAttribute(java.lang.String)
public Object getAttribute(String key)
getAttribute
in interface org.apache.cocoon.auth.User
User.getAttribute(java.lang.String)
public Iterator getAttributeNames()
getAttributeNames
in interface org.apache.cocoon.auth.User
User.getAttributeNames()
public boolean isUserInRole(String role)
isUserInRole
in interface org.apache.cocoon.auth.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 |