|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.security.RepositoryBackedSecurityManager info.magnolia.cms.security.MgnlGroupManager
public class MgnlGroupManager
Group manager working directly with JCR API and returning simple groups (no JCR node aware).
Constructor Summary | |
---|---|
MgnlGroupManager()
|
Method Summary | |
---|---|
Group |
addGroup(Group group,
String groupName)
Adds a group to a group. |
Group |
addRole(Group group,
String roleName)
Grants a role to a group. |
Group |
createGroup(String name)
Creates a new group in the root folder. |
Group |
createGroup(String path,
String name)
Creates a new group in a specific folder. |
protected void |
findAllGroupsInFolder(javax.jcr.Node node,
Collection<Group> groups)
Finds all groups located in the provided node or in sub-folders within it. |
protected javax.jcr.Node |
findPrincipalNode(String principalName,
javax.jcr.Session session)
Helper method to find a group. |
Collection<Group> |
getAllGroups()
Get all groups defined in the system. |
Collection<String> |
getAllGroups(String name)
Get all groups related to one concrete group. |
Group |
getGroup(String name)
Get a group by name. |
protected String |
getRepositoryName()
|
protected Group |
newGroupInstance(javax.jcr.Node node)
|
protected void |
validateGroupName(String name)
|
Methods inherited from class info.magnolia.cms.security.RepositoryBackedSecurityManager |
---|
add, findPrincipalNode, findPrincipalNode, getACLs, getACLs, getResourceName, hasAny, remove |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface info.magnolia.cms.security.GroupManager |
---|
getACLs |
Constructor Detail |
---|
public MgnlGroupManager()
Method Detail |
---|
public Group createGroup(String name) throws AccessDeniedException
GroupManager
createGroup
in interface GroupManager
AccessDeniedException
public Group createGroup(String path, String name) throws AccessDeniedException
IllegalArgumentException
- if the name is not valid or if a group with this name already exists
UnsupportedOperationException
- if the implementation does not support writing
AccessDeniedException
public Group getGroup(String name) throws AccessDeniedException
GroupManager
getGroup
in interface GroupManager
AccessDeniedException
public Collection<Group> getAllGroups()
GroupManager
getAllGroups
in interface GroupManager
public Collection<String> getAllGroups(String name)
GroupManager
getAllGroups
in interface GroupManager
protected Group newGroupInstance(javax.jcr.Node node) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected javax.jcr.Node findPrincipalNode(String principalName, javax.jcr.Session session) throws javax.jcr.RepositoryException
findPrincipalNode
in class RepositoryBackedSecurityManager
javax.jcr.RepositoryException
protected String getRepositoryName()
getRepositoryName
in class RepositoryBackedSecurityManager
public Group addRole(Group group, String roleName) throws AccessDeniedException
GroupManager
addRole
in interface GroupManager
AccessDeniedException
public Group addGroup(Group group, String groupName) throws AccessDeniedException
GroupManager
addGroup
in interface GroupManager
AccessDeniedException
protected void findAllGroupsInFolder(javax.jcr.Node node, Collection<Group> groups) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected void validateGroupName(String name) throws AccessDeniedException
AccessDeniedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |