|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Describe the interface for managing Permission
and permission
association to Principal
. Permissions are used to manage Principals
access entitlement on specified resources.
The permission manager does not enforce any hierarchy resolution, all relevant principals must be passed to the permission manager to assess the proper permissions.
For instance:
grant principal o.a.j.security.UserPrincipal "theUserPrincipal" { permission o.a.j.security.PortletPermission "myportlet", "view,edit,minimize,maximize"; };
<pre>
Method Summary | |
void |
addPermission(Permission permission)
Adds a permission definition. |
Permissions |
getPermissions(Collection principals)
Gets the Permissions given a collection of Principal . |
Permissions |
getPermissions(Principal principal)
Gets the Permissions given a Principal . |
void |
grantPermission(Principal principal,
Permission permission)
Grant a Permission to a given Principal . |
boolean |
permissionExists(Permission permission)
Whether the given permission exists. |
void |
removePermission(Permission permission)
Remove all instances of a given permission. |
void |
removePermissions(Principal principal)
Remove all permissions for a given principal. |
void |
revokePermission(Principal principal,
Permission permission)
Revoke a Permission from a given Principal . |
Method Detail |
public Permissions getPermissions(Principal principal)
Gets the Permissions
given a Principal
.
principal
- The principal.
public Permissions getPermissions(Collection principals)
Gets the Permissions
given a collection of Principal
.
principals
- A collection of principal.
public void addPermission(Permission permission) throws SecurityException
Adds a permission definition.
permission
- The permission to add.
Throws
- a security exception.
SecurityException
public void removePermission(Permission permission) throws SecurityException
Remove all instances of a given permission.
permission
- The permission to remove.
Throws
- a security exception.
SecurityException
public boolean permissionExists(Permission permission)
Whether the given permission exists.
permission
- The permission to look for.
public void removePermissions(Principal principal) throws SecurityException
Remove all permissions for a given principal.
principal
- The principal.
Throws
- a security exception.
SecurityException
public void grantPermission(Principal principal, Permission permission) throws SecurityException
Grant a Permission
to a given Principal
.
principal
- The principal.permission
- The permission.
Throws
- a security exception if the principal does not exist.
SecurityException
public void revokePermission(Principal principal, Permission permission) throws SecurityException
Revoke a Permission
from a given Principal
.
principal
- The principal.permission
- The permission.
Throws
- a security exception.
SecurityException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |