info.magnolia.cms.security
Interface RoleManager

All Known Implementing Classes:
MgnlRoleManager

public interface RoleManager

Manages roles, roles are identified by name and can be organized in folders. The name is globally unique regardless of their organisation in folders.

See Also:
Role

Method Summary
 void addPermission(Role role, String workspaceName, String path, long permission)
          Add permission to the specified role, assuming current user has enough rights to perform such operation.
 Role createRole(String name)
          Creates a new role in the root folder without any security restrictions.
 Role createRole(String path, String name)
           
 Map<String,ACL> getACLs(String role)
          Obtain list of ACLs defined for specified role.
 Role getRole(String name)
          Get the specific role.
 String getRoleNameById(String string)
          Retrieve role name by its identifier.
 void removePermission(Role role, String workspace, String path, long permission)
          Remove permission from the specified role.
 

Method Detail

createRole

Role createRole(String name)
                throws UnsupportedOperationException,
                       Exception
Creates a new role in the root folder without any security restrictions.

Throws:
IllegalArgumentException - if the name is not valid or if a group with this name already exists
UnsupportedOperationException - in case the role manager does not support this operation
Exception

createRole

Role createRole(String path,
                String name)
                throws AccessDeniedException
Throws:
AccessDeniedException

getRole

Role getRole(String name)
             throws UnsupportedOperationException
Get the specific role.

Throws:
UnsupportedOperationException - in case the role manager does not support this operation

getACLs

Map<String,ACL> getACLs(String role)
                        throws UnsupportedOperationException
Obtain list of ACLs defined for specified role.

Throws:
UnsupportedOperationException - in case the role manager does not support this operation

addPermission

void addPermission(Role role,
                   String workspaceName,
                   String path,
                   long permission)
Add permission to the specified role, assuming current user has enough rights to perform such operation.


removePermission

void removePermission(Role role,
                      String workspace,
                      String path,
                      long permission)
Remove permission from the specified role.


getRoleNameById

String getRoleNameById(String string)
Retrieve role name by its identifier.



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