|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport
org.apache.jetspeed.security.impl.PermissionManagerImpl
public class PermissionManagerImpl
Implementation for managing Permissionand permission association to
Principal. Permissions are used to manage Principals access
entitlement on specified resources.
For instance:
grant principal o.a.j.security.UserPrincipal "theUserPrincipal" { permission o.a.j.security.PortletPermission "myportlet", "view,edit,minimize,maximize"; };<pre>
| Field Summary | |
|---|---|
private static org.apache.commons.logging.Log |
log
|
private static ThreadLocal |
permissionsCache
|
| Fields inherited from class org.springframework.dao.support.DaoSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
PermissionManagerImpl()
|
|
| Method Summary | |
|---|---|
void |
addPermission(Permission permission)
|
boolean |
checkPermission(Subject subject,
Permission permission)
|
(package private) org.apache.jetspeed.security.om.InternalPermission |
getInternalPermission(Permission permission)
Returns the InternalPermission from a Permission. |
(package private) org.apache.jetspeed.security.om.InternalPrincipal |
getInternalPrincipal(String fullPath)
Returns the InternalPrincipalfrom the full path. |
Collection |
getPermissions()
|
Permissions |
getPermissions(Collection principals)
|
Permissions |
getPermissions(Principal principal)
|
Permissions |
getPermissions(String classname,
String resource)
|
Collection |
getPrincipals(Permission permission)
|
private Collection |
getPrincipalsFullPath(Collection principals)
Get the full path for the Principalin the collection. |
private HashSet |
getSecurityPermissions(Collection omPermissions)
Iterate through a collection of InternalPermissionand build a
unique collection of Permission. |
void |
grantPermission(Principal principal,
Permission permission)
|
boolean |
permissionExists(Permission permission)
|
void |
removePermission(Permission permission)
|
void |
removePermissions(Principal principal)
|
void |
revokePermission(Principal principal,
Permission permission)
|
int |
updatePermission(Permission permission,
Collection principals)
|
| Methods inherited from class org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport |
|---|
checkDaoConfig, convertOjbAccessException, createPersistenceBrokerTemplate, getJcdAlias, getPersistenceBroker, getPersistenceBrokerTemplate, releasePersistenceBroker, setJcdAlias, setPersistenceBrokerTemplate |
| Methods inherited from class org.springframework.dao.support.DaoSupport |
|---|
afterPropertiesSet, initDao |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final org.apache.commons.logging.Log log
private static ThreadLocal permissionsCache
| Constructor Detail |
|---|
public PermissionManagerImpl()
| Method Detail |
|---|
public Permissions getPermissions(Principal principal)
getPermissions in interface org.apache.jetspeed.security.PermissionManagerPermissionManager.getPermissions(java.security.Principal)public Permissions getPermissions(Collection principals)
getPermissions in interface org.apache.jetspeed.security.PermissionManagerPermissionManager.getPermissions(java.util.Collection)private Collection getPrincipalsFullPath(Collection principals)
Get the full path for the Principalin the collection.
principals - The collection of principals.
private HashSet getSecurityPermissions(Collection omPermissions)
Iterate through a collection of InternalPermissionand build a
unique collection of Permission.
omPermissions - The collection of InternalPermission.
public void addPermission(Permission permission)
throws org.apache.jetspeed.security.SecurityException
addPermission in interface org.apache.jetspeed.security.PermissionManagerorg.apache.jetspeed.security.SecurityExceptionPermissionManager.addPermission(java.security.Permission)
public void removePermission(Permission permission)
throws org.apache.jetspeed.security.SecurityException
removePermission in interface org.apache.jetspeed.security.PermissionManagerorg.apache.jetspeed.security.SecurityExceptionPermissionManager.removePermission(java.security.Permission)
public void removePermissions(Principal principal)
throws org.apache.jetspeed.security.SecurityException
removePermissions in interface org.apache.jetspeed.security.PermissionManagerorg.apache.jetspeed.security.SecurityExceptionPermissionManager.removePermissions(java.security.Principal)
public void grantPermission(Principal principal,
Permission permission)
throws org.apache.jetspeed.security.SecurityException
grantPermission in interface org.apache.jetspeed.security.PermissionManagerorg.apache.jetspeed.security.SecurityExceptionPermissionManager.grantPermission(java.security.Principal,
java.security.Permission)public boolean permissionExists(Permission permission)
permissionExists in interface org.apache.jetspeed.security.PermissionManagerPermissionManager.permissionExists(java.security.Permission)
public void revokePermission(Principal principal,
Permission permission)
throws org.apache.jetspeed.security.SecurityException
revokePermission in interface org.apache.jetspeed.security.PermissionManagerorg.apache.jetspeed.security.SecurityExceptionPermissionManager.revokePermission(java.security.Principal,
java.security.Permission)org.apache.jetspeed.security.om.InternalPrincipal getInternalPrincipal(String fullPath)
Returns the InternalPrincipalfrom the full path.
fullPath - The full path.
InternalPrincipal.org.apache.jetspeed.security.om.InternalPermission getInternalPermission(Permission permission)
Returns the InternalPermission from a Permission.
permission - The permission.
InternalPermission.
public boolean checkPermission(Subject subject,
Permission permission)
checkPermission in interface org.apache.jetspeed.security.PermissionManagerpublic Collection getPermissions()
getPermissions in interface org.apache.jetspeed.security.PermissionManager
public Permissions getPermissions(String classname,
String resource)
getPermissions in interface org.apache.jetspeed.security.PermissionManager
public int updatePermission(Permission permission,
Collection principals)
throws org.apache.jetspeed.security.SecurityException
updatePermission in interface org.apache.jetspeed.security.PermissionManagerorg.apache.jetspeed.security.SecurityExceptionpublic Collection getPrincipals(Permission permission)
getPrincipals in interface org.apache.jetspeed.security.PermissionManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||