|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PermissionManager
Provides method for managing security roles and permissions.
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 given security role into datastore. |
Method Detail |
---|
void saveRole(Role role) throws DuplicateEntityException
role
- The security role to save
DuplicateEntityException
- if a role with same name already existsvoid removeRole(Role role)
role
- The role to removejava.util.List getRoles()
org.figure8.join.businessobjects.security.Role
Role getRole(long id)
id
- Unique identifier of role within datastore
Role getRole(java.lang.String name)
name
- The name of security role to retrieve
void savePermission(Permission permission)
permission
- The permission to savevoid removePermission(Permission permission)
permission
- The permission to removevoid removeAllUserPermissions(User user)
user
- The user to remove permissions forboolean hasPermission(Role role, java.lang.String userId)
role
- Security role that has to be endorsed by useruserId
- Id of user for whom permission test is done
boolean hasPermissionForResource(java.lang.Object resource, Role role, java.lang.String userId)
resource
- 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
java.util.List getUserPermissions(User user)
user
- 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 |