|
Dashboard Builder Security 6.0.0.CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Policy
Policy interface is a permissions manager and is used to grant permissions to subjects.
| Method Summary | |
|---|---|
void |
addPermission(Permission perm)
|
void |
addPermission(Principal p,
Permission perm)
|
Permission |
getPermission(Principal prpal,
Class permClass,
String permName)
Retrieve a permission. |
Map |
getPermissions(Object resource,
Class permClass)
Retrieve permissions assigned to the specified resource. |
PermissionCollection |
getPermissions(Principal prpal)
|
PermissionCollection |
getPermissions(Subject user)
|
void |
removePermission(Permission perm)
Removes a permission attached to any principal. |
void |
removePermission(Principal p,
Permission perm)
Removes a permission granted to the specified principal. |
void |
removePermissions(Object resource)
|
void |
removePermissions(Principal p,
String resourceName)
Removes all permission over a resource granted to a specified principal. |
void |
removePermissions(String resourceName)
Removes all permission over a resource granted to any principal. |
| Methods inherited from interface org.jboss.dashboard.database.Persistent |
|---|
delete, isPersistent, save, update |
| Method Detail |
|---|
void addPermission(Permission perm)
void addPermission(Principal p,
Permission perm)
void removePermissions(Object resource)
throws Exception
ExceptionPermissionCollection getPermissions(Subject user)
PermissionCollection getPermissions(Principal prpal)
void removePermission(Permission perm)
void removePermission(Principal p,
Permission perm)
IMPORTANT NOTE: This policy implementation is based on java.security.PermissionCollection class. Due to the fact that PermissionCollection doesn't offer any method for remove added permissions, our removePermission implementation regenerates the full structure of permissions attached to the principal for all permissions but those 'implied' by the permission to be removed.
void removePermissions(String resourceName)
void removePermissions(Principal p,
String resourceName)
Map getPermissions(Object resource,
Class permClass)
throws Exception
resource - The resource.permClass - The permission class.
Exception
Permission getPermission(Principal prpal,
Class permClass,
String permName)
prpal - The Principal for which the permission must be assigned.permClass - The class type of the permission.permName - The name of the permission.
|
Dashboard Builder Security 6.0.0.CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||