Interface RolesManager
-
public interface RolesManager
Provides administrative (crud) roles management.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Role
addRole(Role roleTemplate)
Add a new role.boolean
deleteRole(String roleName)
Delete a role.Role
updateRole(Role roleTemplate)
Update a role.
-
-
-
Method Detail
-
addRole
Role addRole(Role roleTemplate) throws IllegalArgumentException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
Add a new role.- Parameters:
roleTemplate
- A template for the role to create from, for example aRoleBean
instance- Returns:
- the created role (retrieved from the
RolesProvider
- Throws:
IllegalArgumentException
- when the role is null or roleTemplate.name is null/blankjavax.jcr.AccessDeniedException
- if not allowed to create a role, or trying to create a system role which is only allowed for system users:HippoSession.isSystemSession()
javax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrong
-
updateRole
Role updateRole(Role roleTemplate) throws IllegalArgumentException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
Update a role.- Parameters:
roleTemplate
- A template for the role to update from, for example aRoleBean
instance- Returns:
- the (possibly) updated role (retrieved from the
RolesProvider
- Throws:
IllegalArgumentException
- when the role is null or roleTemplate.name is null/blankjavax.jcr.AccessDeniedException
- if not allowed to set the system status, or change a system role, which is only allowed for system users:HippoSession.isSystemSession()
javax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrong
-
deleteRole
boolean deleteRole(String roleName) throws IllegalArgumentException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
Delete a role.- Parameters:
roleName
- The name of the role to delete- Returns:
- true if the role was deleted; false if the role didn't exist (anymore)
- Throws:
IllegalArgumentException
- when the roleName is null/blankjavax.jcr.AccessDeniedException
- if not allowed to delete a system role which is only allowed for system users:HippoSession.isSystemSession()
javax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrong
-
-