Interface UserRolesManager
public interface UserRolesManager
Provides administrative (crud) userroles management.
-
Method Summary
Modifier and TypeMethodDescriptionaddUserRole
(UserRole userRoleTemplate) Add a new userrole.boolean
deleteUserRole
(String userRoleName) Delete a userrole.updateUserRole
(UserRole userRoleTemplate) Update a userrole.
-
Method Details
-
addUserRole
UserRole addUserRole(UserRole userRoleTemplate) throws IllegalArgumentException, AccessDeniedException, RepositoryException Add a new userrole.- Parameters:
userRoleTemplate
- A template for the userrole to create from, for example aUserRoleBean
instance- Returns:
- the created userrole (retrieved from the
UserRolesProvider
- Throws:
IllegalArgumentException
- when the userrole is null or userRoleTemplate.name is null/blankAccessDeniedException
- if not allowed to create a userrole, or trying to create a system userrole which is only allowed for system users:HippoSession.isSystemSession()
RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrong
-
updateUserRole
UserRole updateUserRole(UserRole userRoleTemplate) throws IllegalArgumentException, AccessDeniedException, RepositoryException Update a userrole.- Parameters:
userRoleTemplate
- A template for the userrole to update from, for example aUserRoleBean
instance- Returns:
- the (possibly) updated userrole (retrieved from the
UserRolesProvider
- Throws:
IllegalArgumentException
- when the userrole is null or userRoleTemplate.name is null/blankAccessDeniedException
- if not allowed to to set the system status, or change a system userrole which is only allowed for system users:HippoSession.isSystemSession()
RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrong
-
deleteUserRole
boolean deleteUserRole(String userRoleName) throws IllegalArgumentException, AccessDeniedException, RepositoryException Delete a userrole.- Parameters:
userRoleName
- The name of the userrole to delete- Returns:
- true if the userrole was deleted; false if the userrole didn't exist (anymore)
- Throws:
IllegalArgumentException
- when the userRoleName is null/blankAccessDeniedException
- if not allowed to delete a system userrole which is only allowed for system users:HippoSession.isSystemSession()
RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrong
-