Interface UserRolesManager


  • public interface UserRolesManager
    Provides administrative (crud) userroles management.
    • Method Detail

      • addUserRole

        UserRole addUserRole​(UserRole userRoleTemplate)
                      throws IllegalArgumentException,
                             javax.jcr.AccessDeniedException,
                             javax.jcr.RepositoryException
        Add a new userrole.
        Parameters:
        userRoleTemplate - A template for the userrole to create from, for example a UserRoleBean instance
        Returns:
        the created userrole (retrieved from the UserRolesProvider
        Throws:
        IllegalArgumentException - when the userrole is null or userRoleTemplate.name is null/blank
        javax.jcr.AccessDeniedException - if not allowed to create a userrole, or trying to create a system userrole 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
      • updateUserRole

        UserRole updateUserRole​(UserRole userRoleTemplate)
                         throws IllegalArgumentException,
                                javax.jcr.AccessDeniedException,
                                javax.jcr.RepositoryException
        Update a userrole.
        Parameters:
        userRoleTemplate - A template for the userrole to update from, for example a UserRoleBean instance
        Returns:
        the (possibly) updated userrole (retrieved from the UserRolesProvider
        Throws:
        IllegalArgumentException - when the userrole is null or userRoleTemplate.name is null/blank
        javax.jcr.AccessDeniedException - if not allowed to to set the system status, or change a system userrole 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
      • deleteUserRole

        boolean deleteUserRole​(String userRoleName)
                        throws IllegalArgumentException,
                               javax.jcr.AccessDeniedException,
                               javax.jcr.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/blank
        javax.jcr.AccessDeniedException - if not allowed to delete a system userrole 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