|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.applib.security.UserMemento
public final class UserMemento
Details, obtained from the container, about the user and his roles. Read-only.
| Constructor Summary | |
|---|---|
UserMemento(java.lang.String name)
Creates a new user with the specified name and no roles. |
|
UserMemento(java.lang.String name,
java.util.List<RoleMemento> roles)
Creates a new user with the specified name and assigned roles. |
|
UserMemento(java.lang.String name,
RoleMemento... roles)
Creates a new user with the specified name and assigned roles. |
|
| Method Summary | |
|---|---|
java.lang.String |
getName()
The user's login name. |
java.util.List<RoleMemento> |
getRoles()
The roles associated with this user. |
boolean |
hasRole(RoleMemento role)
Determines if the user fulfills the specified role. |
boolean |
hasRole(java.lang.String roleName)
Determines if the user fulfills the specified role. |
boolean |
isCurrentUser(java.lang.String user)
Determine if the specified user is this user. |
java.lang.String |
title()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UserMemento(java.lang.String name)
public UserMemento(java.lang.String name,
RoleMemento... roles)
public UserMemento(java.lang.String name,
java.util.List<RoleMemento> roles)
| Method Detail |
|---|
public java.lang.String title()
public java.lang.String getName()
public boolean isCurrentUser(java.lang.String user)
public java.util.List<RoleMemento> getRoles()
public boolean hasRole(RoleMemento role)
public boolean hasRole(java.lang.String roleName)
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||