Class BulkEditorBuilder<E>

java.lang.Object
io.jmix.ui.bulk.BulkEditorBuilder<E>
Type Parameters:
E - item type

public class BulkEditorBuilder<E> extends Object
A builder that creates a new BulkEditorWindow with defined parameters.
  • Field Details

  • Constructor Details

  • Method Details

    • withOpenMode

      public BulkEditorBuilder<E> withOpenMode(OpenMode openMode)
      Sets screen open mode.
      Parameters:
      openMode - the open mode to set
      Returns:
      this builder
    • withListComponent

      public BulkEditorBuilder<E> withListComponent(ListComponent<E> listComponent)
      Sets the list component that displays the items to be edited.
      Parameters:
      listComponent - the list component to be used
      Returns:
      this builder
    • withExclude

      public BulkEditorBuilder<E> withExclude(String exclude)
      Sets a regular expression to exclude some fields explicitly from the list of attributes available for editing.
      Parameters:
      exclude - a regular expression
      Returns:
      this builder
    • withIncludeProperties

      public BulkEditorBuilder<E> withIncludeProperties(List<String> includeProperties)
      Sets the entity attributes to be included to bulk editor window. If set, other attributes will be ignored.
      Parameters:
      includeProperties - the entity attributes to be included to bulk editor window
      Returns:
      this builder
    • withFieldValidators

      public BulkEditorBuilder<E> withFieldValidators(Map<String,Validator<?>> fieldValidators)
      Sets a map with validators for fields that will be used for editing certain properties.
      Parameters:
      fieldValidators - a map with validators for fields that will be used for editing certain properties
      Returns:
      this builder
    • withModelValidators

      public BulkEditorBuilder<E> withModelValidators(List<Validator<?>> modelValidators)
      Sets a map with validators for the result of bulk editing.
      Parameters:
      modelValidators - a map with validators for the result of bulk editing
      Returns:
      this builder
    • withUseConfirmDialog

      public BulkEditorBuilder<E> withUseConfirmDialog(Boolean useConfirmDialog)
      Sets whether or not the confirmation dialog should be displayed to the user before saving the changes. The default value is true.
      Parameters:
      useConfirmDialog - whether or not the confirmation dialog should be displayed
      Returns:
      this builder
    • withFieldSorter

      public BulkEditorBuilder<E> withFieldSorter(FieldSorter fieldSorter)
      Sets field sorter that allows you to sort fields by custom logic.
      Parameters:
      fieldSorter - field sorter
      Returns:
      this builder
    • withColumnsMode

      public BulkEditorBuilder<E> withColumnsMode(ColumnsMode columnsMode)
      Sets the columns mode for editor which defines number of columns.
      Parameters:
      columnsMode - columns mode
      Returns:
      this builder
      See Also:
    • getOrigin

      public FrameOwner getOrigin()
      Returns:
      a FrameOwner of bulk editor
    • getMetaClass

      public MetaClass getMetaClass()
      Returns:
      a MetaClass of items
    • getEntities

      public Collection<E> getEntities()
      Returns:
      a collection of items to be edited
    • getOpenMode

      public OpenMode getOpenMode()
      Returns:
      screen launch mode
    • getListComponent

      @Nullable public ListComponent<E> getListComponent()
      Returns:
      the list component that displays the items to be edited
    • getExclude

      @Nullable public String getExclude()
      Returns:
      a regular expression to exclude some fields explicitly from the list of attributes available for editing
    • getIncludeProperties

      @Nullable public List<String> getIncludeProperties()
      Returns:
      the entity attributes to be included to bulk editor window
    • getFieldValidators

      @Nullable public Map<String,Validator<?>> getFieldValidators()
      Returns:
      a map with validators for fields that will be used for editing certain properties
    • getModelValidators

      @Nullable public List<Validator<?>> getModelValidators()
      Returns:
      a map with validators for the result of bulk editing
    • isUseConfirmDialog

      @Nullable public Boolean isUseConfirmDialog()
      Returns:
      whether or not the confirmation dialog should be displayed to the user before saving the changes
    • getFieldSorter

      @Nullable public FieldSorter getFieldSorter()
      Returns:
      field sorter
    • getColumnsMode

      @Nullable public ColumnsMode getColumnsMode()
      Returns:
      columns mode
      See Also:
    • create

      public BulkEditorWindow<E> create()
      Returns:
      a new instance of BulkEditorWindow