info.magnolia.cms.security
Class MgnlRoleManager

java.lang.Object
  extended by info.magnolia.cms.security.RepositoryBackedSecurityManager
      extended by info.magnolia.cms.security.MgnlRoleManager
All Implemented Interfaces:
RoleManager

public class MgnlRoleManager
extends RepositoryBackedSecurityManager
implements RoleManager

Manages the users stored in the RepositoryConstants.USER_ROLES workspace.

Version:
$Revision$ ($Author$)
Author:
philipp

Constructor Summary
MgnlRoleManager()
          Do not instantiate it!
 
Method Summary
 void addPermission(Role role, String repository, String path, long permission)
          Add permission to the specified role, assuming current user has enough rights to perform such operation.
 Role createRole(String name)
          Create a role without any security restrictions.
protected  javax.jcr.Node findPrincipalNode(String principalName, javax.jcr.Session session)
          Helper method to find a role.
protected  HierarchyManager getHierarchyManager()
           
protected  String getRepositoryName()
           
 Role getRole(String name)
          Get the specific role without any security restrictions.
 String getRoleNameById(String string)
          Retrieve role name by its identifier.
protected  MgnlRole newRoleInstance(Content node)
          Deprecated. since 4.5
protected  MgnlRole newRoleInstance(javax.jcr.Node node)
           
 void removePermission(Role role, String repository, String path, long permission)
          Remove permission from the specified role.
 
Methods inherited from class info.magnolia.cms.security.RepositoryBackedSecurityManager
add, 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.RoleManager
getACLs
 

Constructor Detail

MgnlRoleManager

public MgnlRoleManager()
Do not instantiate it!

Method Detail

getRole

public Role getRole(String name)
Description copied from interface: RoleManager
Get the specific role without any security restrictions.

Specified by:
getRole in interface RoleManager

createRole

public Role createRole(String name)
Description copied from interface: RoleManager
Create a role without any security restrictions.

Specified by:
createRole in interface RoleManager

newRoleInstance

@Deprecated
protected MgnlRole newRoleInstance(Content node)
                            throws javax.jcr.RepositoryException
Deprecated. since 4.5

Throws:
javax.jcr.RepositoryException

newRoleInstance

protected MgnlRole newRoleInstance(javax.jcr.Node node)
                            throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getHierarchyManager

protected HierarchyManager getHierarchyManager()

removePermission

public void removePermission(Role role,
                             String repository,
                             String path,
                             long permission)
Description copied from interface: RoleManager
Remove permission from the specified role.

Specified by:
removePermission in interface RoleManager

addPermission

public void addPermission(Role role,
                          String repository,
                          String path,
                          long permission)
Description copied from interface: RoleManager
Add permission to the specified role, assuming current user has enough rights to perform such operation.

Specified by:
addPermission in interface RoleManager

findPrincipalNode

protected javax.jcr.Node findPrincipalNode(String principalName,
                                           javax.jcr.Session session)
                                    throws javax.jcr.RepositoryException
Helper method to find a role. This will return null if role doesn't exist.

Specified by:
findPrincipalNode in class RepositoryBackedSecurityManager
Throws:
javax.jcr.RepositoryException

getRepositoryName

protected String getRepositoryName()
Specified by:
getRepositoryName in class RepositoryBackedSecurityManager

getRoleNameById

public String getRoleNameById(String string)
Description copied from interface: RoleManager
Retrieve role name by its identifier.

Specified by:
getRoleNameById in interface RoleManager


Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.