Class RemoveOperation.RemoveBuilder<E>

java.lang.Object
io.jmix.flowui.util.RemoveOperation.RemoveBuilder<E>
Type Parameters:
E - entity type
Enclosing class:
RemoveOperation

public static class RemoveOperation.RemoveBuilder<E> extends Object
Remove builder.
  • Field Details

  • Constructor Details

  • Method Details

    • withListDataComponent

      public RemoveOperation.RemoveBuilder<E> withListDataComponent(ListDataComponent<E> listDataComponent)
      Sets the ListDataComponent to be used by the builder.
      Parameters:
      listDataComponent - the ListDataComponent instance to be associated with this builder
      Returns:
      the current instance for method chaining
    • withContainer

      public RemoveOperation.RemoveBuilder<E> withContainer(CollectionContainer<E> container)
      Sets the CollectionContainer to be used by the builder.
      Parameters:
      container - the CollectionContainer instance to be associated with this builder
      Returns:
      the current instance for method chaining
    • withItems

      public RemoveOperation.RemoveBuilder<E> withItems(List<E> items)
      Sets the items to be removed by the builder.
      Parameters:
      items - the list of items to be removed
      Returns:
      the current instance for method chaining
    • withConfirmation

      public RemoveOperation.RemoveBuilder<E> withConfirmation(boolean confirmation)
      Sets whether a confirmation dialog is required before performing the remove operation.
      Parameters:
      confirmation - true to enable confirmation dialog, false to disable it
      Returns:
      the current instance for method chaining
    • withConfirmationMessage

      public RemoveOperation.RemoveBuilder<E> withConfirmationMessage(String confirmationMessage)
      Sets the confirmation message to be displayed in the confirmation dialog for the remove operation.
      Parameters:
      confirmationMessage - the confirmation message to be displayed
      Returns:
      the current instance for method chaining
    • withConfirmationTitle

      public RemoveOperation.RemoveBuilder<E> withConfirmationTitle(String confirmationTitle)
      Sets the confirmation title to be displayed in the confirmation dialog for the remove operation.
      Parameters:
      confirmationTitle - the confirmation title to be displayed
      Returns:
      the current instance for method chaining
    • beforeActionPerformed

      Sets a handler to be invoked before the action is performed.
      Parameters:
      handler - a handler to set
      Returns:
      the current instance for method chaining
    • afterActionPerformed

      Sets a handler to be invoked after the action is performed.
      Parameters:
      handler - a handler to set
      Returns:
      the current instance for method chaining
    • onCancel

      Sets a handler to be invoked when the remove operation is cancelled by the user in the confirmation dialog.
      Parameters:
      handler - a handler to set
      Returns:
      the current instance for method chaining
    • withRemoveDelegate

      public RemoveOperation.RemoveBuilder<E> withRemoveDelegate(Consumer<Collection<E>> removeDelegate)
      Sets the delegate to be invoked instead of DataManager to remove the entities from a storage.
      Parameters:
      removeDelegate - a delegate to set
      Returns:
      the current instance for method chaining
    • getListDataComponent

      @Nullable public ListDataComponent<E> getListDataComponent()
      Returns the ListDataComponent associated with this builder.
      Returns:
      the ListDataComponent instance, or null if not set
    • getContainer

      @Nullable public CollectionContainer<E> getContainer()
      Returns the CollectionContainer associated with this builder.
      Returns:
      the CollectionContainer instance, or null if not set
    • getItems

      @Nullable public List<E> getItems()
      Returns the list of items to be removed associated with this builder.
      Returns:
      the list of items, or null if no items are set
    • getConfirmationTitle

      @Nullable public String getConfirmationTitle()
      Returns the confirmation title to be displayed in the confirmation dialog for the remove operation.
      Returns:
      the confirmation title, or null if not set
    • getConfirmationMessage

      @Nullable public String getConfirmationMessage()
      Returns the confirmation message to be displayed in the confirmation dialog for the remove operation.
      Returns:
      the confirmation message, or null if not set
    • isConfirmationRequired

      public boolean isConfirmationRequired()
      Returns whether a confirmation dialog is required before performing the remove operation.
      Returns:
      true if a confirmation dialog is required; false otherwise
    • getOrigin

      public View<?> getOrigin()
      Returns the View associated with this builder.
      Returns:
      the View instance
    • getEntityClass

      public Class<E> getEntityClass()
      Returns the class of the entity associated with this builder.
      Returns:
      the Class of the entity
    • getOperation

      public RemoveOperation.Operation getOperation()
      Returns the RemoveOperation.Operation associated with this builder.
      Returns:
      the RemoveOperation.Operation instance
    • getBeforeActionPerformedHandler

      @Nullable public Consumer<RemoveOperation.BeforeActionPerformedEvent<E>> getBeforeActionPerformedHandler()
      Returns the handler to be invoked before the action is performed.
      Returns:
      the handler to be invoked before the action is performed, or null if no handler is set
    • getAfterActionPerformedHandler

      @Nullable public Consumer<RemoveOperation.AfterActionPerformedEvent<E>> getAfterActionPerformedHandler()
      Returns the handler to be invoked after the action is performed.
      Returns:
      the handler to be invoked after the action is performed, or null if no handler is set
    • getActionCancelledHandler

      @Nullable public Consumer<RemoveOperation.ActionCancelledEvent<E>> getActionCancelledHandler()
      Returns the handler to be invoked when the remove operation is cancelled by the user in the confirmation dialog.
      Returns:
      the handler to be invoked upon removal cancellation, or null if no handler is set
    • exclude

      public void exclude()
      Excludes items from relation: One-To-Many or Many-To-Many.
    • remove

      public void remove()
      Removes items.