| org.apache.jetspeed.security.PermissionManager
All known Subclasses: org.apache.jetspeed.security.impl.PermissionManagerImpl,
PermissionManager | public interface PermissionManager (Code) | |
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>
author: <a href="mailto:dlestrat@apache.org">David Le Strat</a>
|
addPermission | void addPermission(Permission permission) throws SecurityException(Code) | |
Adds a permission definition.
Parameters: permission - The permission to add. throws: Throws - a security exception. |
checkPermission | boolean checkPermission(Subject subject, Permission permission)(Code) | |
Check permission for the given subject's access to the resource protected by the permission
This is an abstraction introduced in M4 for Permission Manager implementations NOT
founded upon the a Java security policy.
Parameters: subject - The Java subject. Parameters: permission - The permission, usually a portlet, page or folder type permission. true if the subject has access to the permission protected resource, falseif the subject does not have access. |
getPermissions | Collection getPermissions()(Code) | | Retrieve a collection of all Permissions in the system ordered by Permission Type, resource
Note that we return a collection of InternalPrincipal
A Java Security collection of InternalPrincipal |
getPermissions | Permissions getPermissions(String classname, String resource)(Code) | | Retrieve a list of all Permissions in the system for a given resource
The resource can be a prefix, for example "j2-admin" will retrieve all
portlet permissions starting with j2-admin
A Java Security collection of Permissions |
getPrincipals | public Collection getPrincipals(Permission permission)(Code) | | Given a permission, return all principals granted to that permission
Parameters: permission - A collection of Java Security Permission objects |
permissionExists | boolean permissionExists(Permission permission)(Code) | |
Whether the given permission exists.
Parameters: permission - The permission to look for. Whether the permission exists. |
removePermission | void removePermission(Permission permission) throws SecurityException(Code) | |
Remove all instances of a given permission.
Parameters: permission - The permission to remove. throws: Throws - a security exception. |
removePermissions | void removePermissions(Principal principal) throws SecurityException(Code) | |
Remove all permissions for a given principal.
Parameters: principal - The principal. throws: Throws - a security exception. |
updatePermission | int updatePermission(Permission permission, Collection principals) throws SecurityException(Code) | | Update the collection of principals on the given principal,
appropriately granting or revoking principals to the given permission.
Parameters: permission - Permission to be updated Parameters: principals - The new collection of principals based on BasePrincipal to be associated with this permission throws: SecurityException - |
|
|