public interface RolesManager
Modifier and Type | Method and Description |
---|---|
Role |
addRole(Role roleTemplate)
Add a new role.
|
boolean |
deleteRole(String roleName)
Delete a role.
|
Role |
updateRole(Role roleTemplate)
Update a role.
|
Role addRole(Role roleTemplate) throws IllegalArgumentException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
roleTemplate
- A template for the role to create from, for example a RoleBean
instanceRolesProvider
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 wrongRole updateRole(Role roleTemplate) throws IllegalArgumentException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
roleTemplate
- A template for the role to update from, for example a RoleBean
instanceRolesProvider
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 wrongboolean deleteRole(String roleName) throws IllegalArgumentException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
roleName
- The name of the role to deleteIllegalArgumentException
- 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 wrongCopyright © 2007–2019 Hippo B.V. (http://www.onehippo.com). All rights reserved.