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