|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.figure8.join.businessfacades.security.DefaultPermissionManager
public class DefaultPermissionManager
Default implementation of PermissionManager
| Field Summary | |
|---|---|
protected PermissionDao |
dao
Permission data access object |
protected RoleDao |
roleDao
Role data access object |
| Constructor Summary | |
|---|---|
DefaultPermissionManager()
Creates a new instance of DefaultPermissionManager |
|
| Method Summary | |
|---|---|
Role |
getRole(long id)
Retrieve an application security Role using its unique identifier |
Role |
getRole(java.lang.String name)
Retrieve an application security Role using its name |
java.util.List |
getRoles()
Retrieve the available security roles within application |
java.util.List |
getUserPermissions(User user)
Retrieves all the permission acquired by a specified User |
boolean |
hasPermission(Role role,
java.lang.String userId)
Tells if a user has permission to endorse this security role |
boolean |
hasPermissionForResource(java.lang.Object resource,
Role role,
java.lang.String userId)
Tells if a user has permission to endorse this security role for this resource |
void |
removeAllUserPermissions(User user)
Remove all permissions assigned to a specific user |
void |
removePermission(Permission permission)
Remove a given permission from datastore |
void |
removeRole(Role role)
Remove a given security role from datastore |
void |
savePermission(Permission permission)
Save or update a given permission into datastore |
void |
saveRole(Role role)
Save or update a givean security role into datastore. |
void |
setPermissionDao(PermissionDao dao)
|
void |
setRoleDao(RoleDao dao)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected RoleDao roleDao
protected PermissionDao dao
| Constructor Detail |
|---|
public DefaultPermissionManager()
| Method Detail |
|---|
public void setRoleDao(RoleDao dao)
dao - A Role data access objectpublic void setPermissionDao(PermissionDao dao)
dao - A Permission data access object
public void saveRole(Role role)
throws DuplicateEntityException
saveRole in interface PermissionManagerrole - The security role to save
DuplicateEntityException - if a role with same name already existspublic void removeRole(Role role)
removeRole in interface PermissionManagerrole - The role to removepublic java.util.List getRoles()
getRoles in interface PermissionManagerorg.figure8.join.businessobjects.security.Rolepublic Role getRole(long id)
getRole in interface PermissionManagerid - Unique identifier of role within datastore
public Role getRole(java.lang.String name)
getRole in interface PermissionManagername - The name of security role to retrieve
public void savePermission(Permission permission)
savePermission in interface PermissionManagerpermission - The permission to savepublic void removePermission(Permission permission)
removePermission in interface PermissionManagerpermission - The permission to removepublic void removeAllUserPermissions(User user)
removeAllUserPermissions in interface PermissionManageruser - The user to remove permissions for
public boolean hasPermission(Role role,
java.lang.String userId)
hasPermission in interface PermissionManagerrole - Security role that has to be endorsed by useruserId - Id of user for whom permission test is done
public boolean hasPermissionForResource(java.lang.Object resource,
Role role,
java.lang.String userId)
hasPermissionForResource in interface PermissionManagerresource - Entity for whom user should have permissionrole - Security role that has to be endorsed by useruserId - Id of user for whom permission test is done
public java.util.List getUserPermissions(User user)
getUserPermissions in interface PermissionManageruser - The user to retrieve permissions for
org.figure8.join.businessobjects.security.Permission
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||