|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.security.RepositoryBackedSecurityManager
public abstract class RepositoryBackedSecurityManager
Common parent class for repo based security managers.
Constructor Summary | |
---|---|
RepositoryBackedSecurityManager()
|
Method Summary | |
---|---|
protected void |
add(String principalName,
String resourceName,
String resourceTypeName)
Adds link to a resource (group or role) to the principal (user or group). |
protected abstract javax.jcr.Node |
findPrincipalNode(String principalName,
javax.jcr.Session session)
|
protected javax.jcr.Node |
findPrincipalNode(String principalName,
javax.jcr.Session session,
String primaryNodeType)
|
protected javax.jcr.Node |
findPrincipalNode(String principalName,
javax.jcr.Session session,
String primaryNodeType,
javax.jcr.Node startNode)
Helper method to find principal node of type NodeTypes.User#NAME , NodeTypes.Group#NAME or
NodeTypes.Role#NAME . |
protected Map<String,ACL> |
getACLs(javax.jcr.Node node)
|
Map<String,ACL> |
getACLs(String principalName)
|
protected abstract String |
getRepositoryName()
|
protected String |
getResourceName(String resourceId)
|
boolean |
hasAny(String principalName,
String resourceName,
String resourceTypeName)
|
protected void |
remove(String principalName,
String resourceName,
String resourceTypeName)
This call is lenient and will not throw exception in case principal doesn't exist! Instead it will simply return without making any change. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RepositoryBackedSecurityManager()
Method Detail |
---|
public boolean hasAny(String principalName, String resourceName, String resourceTypeName)
protected void add(String principalName, String resourceName, String resourceTypeName) throws PrincipalNotFoundException
principalName
- name of the user or group to be updatedresourceName
- name of the group or role to be addedresourceTypeName
- type of the added resource (group or role) #NODE_ROLES
, #NODE_GROUPS
PrincipalNotFoundException
protected String getResourceName(String resourceId)
protected void remove(String principalName, String resourceName, String resourceTypeName) throws PrincipalNotFoundException
principalName
- name of the user or group to be updatedresourceName
- name of the group or role to be addedresourceTypeName
- type of the added resource (group or role) #NODE_ROLES
, #NODE_GROUPS
PrincipalNotFoundException
protected abstract String getRepositoryName()
protected abstract javax.jcr.Node findPrincipalNode(String principalName, javax.jcr.Session session) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected javax.jcr.Node findPrincipalNode(String principalName, javax.jcr.Session session, String primaryNodeType) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected javax.jcr.Node findPrincipalNode(String principalName, javax.jcr.Session session, String primaryNodeType, javax.jcr.Node startNode) throws javax.jcr.RepositoryException
NodeTypes.User#NAME
, NodeTypes.Group#NAME
or
NodeTypes.Role#NAME
.
Not using JCR queries as they require an updated index, which might not been given, i.e. during
installation of a module (bootstrapped resources).
javax.jcr.RepositoryException
public Map<String,ACL> getACLs(String principalName)
protected Map<String,ACL> getACLs(javax.jcr.Node node) throws javax.jcr.RepositoryException, javax.jcr.ValueFormatException, javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
javax.jcr.ValueFormatException
javax.jcr.PathNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |