Interface RolesUpdate<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addRole​(T id, RoleScope roleScope, Role role)
      Adds a role with specified scope to an entity with specified id.
      void removeRole​(Role role)
      Removes the specified role for all roles holders.
      void removeRole​(T id, Role role)
      Removes the specified role from the entity with specified id.
      void removeRole​(T id, RoleScope roleScope, Role role)
      Removes role with specified scope from the entity with specified id.
      void removeRoles​(T id, RoleScope roleScope)
      Removes all roles with specified scope from the entity with specified id.
    • Method Detail

      • addRole

        void addRole​(@NotNull
                     T id,
                     @NotNull
                     RoleScope roleScope,
                     @NotNull
                     Role role)
        Adds a role with specified scope to an entity with specified id.
        Parameters:
        id - uid
        roleScope - scope of the role
        role - role
        Throws:
        UserNotFoundException
      • removeRole

        void removeRole​(@NotNull
                        T id,
                        @NotNull
                        RoleScope roleScope,
                        @NotNull
                        Role role)
        Removes role with specified scope from the entity with specified id.
        Parameters:
        id - id
        roleScope - scope of the role
        role - role
        Throws:
        UserNotFoundException
      • removeRole

        void removeRole​(@NotNull
                        T id,
                        @NotNull
                        Role role)
        Removes the specified role from the entity with specified id. The role is removed from all of the scopes.
        Parameters:
        id - id
        role - role to remove
      • removeRoles

        void removeRoles​(@NotNull
                         T id,
                         @NotNull
                         RoleScope roleScope)
        Removes all roles with specified scope from the entity with specified id.
        Parameters:
        id - id
        roleScope - scope of the role
        Throws:
        UserNotFoundException
      • removeRole

        void removeRole​(@NotNull
                        Role role)
        Removes the specified role for all roles holders.
        Parameters:
        role - role to remove