Interface IUserGroupBatchUpdate


public interface IUserGroupBatchUpdate
Batch update for groups containing Users and Roles. Changes are prepared by add/remove methods and performed by the execute() method simultaneously. Each instance can be used only once.
Since:
3.19.3
  • Method Details

    • addUser

      @NotNull IUserGroupBatchUpdate addUser(@NotNull String userId)
      Adds the User to the group.
      Parameters:
      userId - ID of the User to add.
      Returns:
      the modified instance to allow for method chaining.
    • removeUser

      @NotNull IUserGroupBatchUpdate removeUser(@NotNull String userId)
      Removes the User from the group.
      Parameters:
      userId - ID of the User to remove.
      Returns:
      the modified instance to allow for method chaining.
    • addRole

      @NotNull IUserGroupBatchUpdate addRole(@NotNull String roleId, @NotNull IContextId contextId)
      Adds the Role to the group.
      Parameters:
      roleId - ID of the Role to add.
      contextId - ID of the Role's context.
      Returns:
      the modified instance to allow for method chaining.
    • removeRole

      @NotNull IUserGroupBatchUpdate removeRole(@NotNull String roleId, @NotNull IContextId contextId)
      Removes the Role from the group.
      Parameters:
      roleId - ID of the Role to remove.
      contextId - ID of the Role's context.
      Returns:
      the modified instance to allow for method chaining.
    • execute

      void execute()
      Executes the update.