|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.day.cq.security.impl.privileges.CqPrivilegeManager
public class CqPrivilegeManager
Access to existing Privileges and facility to query for Privileges In most cases there are two kind of parivileges, the simple, and the path dependant. Both could easyly registred via an entry in the content. For both types there can be defaul-factories. And for everything else ther are custom factories.
| Constructor Summary | |
|---|---|
CqPrivilegeManager()
|
|
CqPrivilegeManager(com.day.crx.CRXSession session)
|
|
| Method Summary | |
|---|---|
protected void |
activate(org.osgi.service.component.ComponentContext context)
|
void |
addFactory(PrivilegeFactory factory)
|
protected void |
deactivate(org.osgi.service.component.ComponentContext context)
|
Privilege |
getPrivilege(String privilege,
Authorizable auth,
Session session)
Retrieve the Privilege witht the given path for the given authorizable, use the Session to access the repository |
Collection<Privilege> |
getPrivileges(Authorizable auth,
Session session)
Access all privilages an Authorizable are granted. |
Collection<String> |
getPrivileges(Session session)
todo: access rights? => would be the read on the handles |
Privilege |
grantPrivilege(String privPath,
Authorizable auth,
Session session)
Set the given Privilege to the Authorizable with the given session |
void |
removeFactory(PrivilegeFactory factory)
|
void |
revokePrivilege(Privilege priv,
Authorizable auth,
Session session)
Revkes the given privilge from the authorizables |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CqPrivilegeManager()
public CqPrivilegeManager(com.day.crx.CRXSession session)
throws RepositoryException
RepositoryException| Method Detail |
|---|
public Privilege getPrivilege(String privilege,
Authorizable auth,
Session session)
throws AccessDeniedException
getPrivilege in interface PrivilegeManagerprivilege - identifier of the privilegeauth - to accss the privilieg forsession - Session to access the access the repository
null if none set
AccessDeniedException - in case Session misses privileges to access
public Privilege grantPrivilege(String privPath,
Authorizable auth,
Session session)
throws AccessDeniedException
grantPrivilege in interface PrivilegeManagerprivPath - identifier of the privilegeauth - authorizable to set the privilege tosession - session to set the privilege with
AccessDeniedException - in case session misses privileges to grant Privileg
public void revokePrivilege(Privilege priv,
Authorizable auth,
Session session)
throws AccessDeniedException
revokePrivilege in interface PrivilegeManagerpriv - to removeauth - the authorizable to remove the Privilege fromsession - to perform the operation
AccessDeniedException - in case the Session lacks access right to revkoe Privileges
public Collection<Privilege> getPrivileges(Authorizable auth,
Session session)
throws AccessDeniedException
getPrivileges in interface PrivilegeManagerauth - to querysession - to query with
AccessDeniedException - in case the Session lacks access rights
public Collection<String> getPrivileges(Session session)
throws AccessDeniedException
getPrivileges in interface PrivilegeManagersession - to use for query
AccessDeniedException - in case Session lacks acces rights
protected void activate(org.osgi.service.component.ComponentContext context)
throws RepositoryException
RepositoryExceptionprotected void deactivate(org.osgi.service.component.ComponentContext context)
public void addFactory(PrivilegeFactory factory)
public void removeFactory(PrivilegeFactory factory)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||