|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.figure8.join.view.UserView
public class UserView
This is a JavaBean encapsulating a User domain model object and its
permission. This is necessary because in our model, a User is decoupled
from its security permission.
Instance of UserView class are intended to be stored within
a HttpSession.
| Field Summary | |
|---|---|
protected java.lang.String |
clearPassword
Non encrypted password of user (the one provided through authentication form) This is necessary in case of user calling a remote Join web-service that expect clear password for doing its own authentication. |
protected java.util.HashMap |
permissions
Map containing user's permission. |
protected User |
user
The encapsulated user domain object |
| Constructor Summary | |
|---|---|
UserView(User user)
Creates a new instance of UserView |
|
UserView(User user,
java.util.List permissions)
Creates a new instance of UserView with a set of Permissions |
|
| Method Summary | |
|---|---|
void |
addPermission(Permission permission)
Add a security permission to this user. |
java.lang.String |
getClearPassword()
|
java.util.Collection |
getPermissions()
|
java.util.Collection |
getPermissions(Role role)
|
User |
getUser()
|
boolean |
hasPermission(Role role)
Tells if this user has permission to endorse this security role |
boolean |
hasPermissionForResource(java.lang.Object resource,
Role role)
Tells if this user has permission to endorse this security role for this resource |
void |
setClearPassword(java.lang.String clearPassword)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected User user
protected java.util.HashMap permissions
protected java.lang.String clearPassword
| Constructor Detail |
|---|
public UserView(User user)
user - The encasuplated user business object
public UserView(User user,
java.util.List permissions)
Permissions
user - The encasuplated user business objectpermissions - A list of org.figure8.join.businessobjects.security.Permissions| Method Detail |
|---|
public User getUser()
public void addPermission(Permission permission)
permission - Permission to addpublic java.util.Collection getPermissions()
public java.util.Collection getPermissions(Role role)
role - The security role to filter permissions for
public boolean hasPermission(Role role)
role - Security role that has to be endorsed by user
public boolean hasPermissionForResource(java.lang.Object resource,
Role role)
resource - Entity for whom user should have permissionrole - Security role that has to be endorsed by user
public java.lang.String getClearPassword()
public void setClearPassword(java.lang.String clearPassword)
clearPassword - The non encrypted password of wrapped user
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||