Package io.jmix.bulkeditor.view.builder
Class BulkEditorBuilder<E>
java.lang.Object
io.jmix.bulkeditor.view.builder.BulkEditorBuilder<E>
- Type Parameters:
- E- item type
A builder that creates a new 
BulkEditView with defined parameters.- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final Collection<E>protected Stringprotected Function<List<MetaProperty>,Map<MetaProperty, Integer>> protected final Function<BulkEditorBuilder<E>,DialogWindow<BulkEditView<E>>> protected ListDataComponent<E>protected final MetaClassprotected View<?>protected boolean
- 
Constructor SummaryConstructorsConstructorDescriptionBulkEditorBuilder(BulkEditorBuilder<E> builder) BulkEditorBuilder(MetaClass metaClass, Collection<E> entities, View<?> origin, Function<BulkEditorBuilder<E>, DialogWindow<BulkEditView<E>>> handler) 
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Builds an instance of DialogWindow forBulkEditViewView<?>booleanopen()Builds and opens an instance of DialogWindow forBulkEditViewwithExclude(String exclude) Sets a regular expression to exclude some fields explicitly from the list of attributes available for editing.withFieldSorter(Function<List<MetaProperty>, Map<MetaProperty, Integer>> fieldSorter) Sets field sorter function that allows you to sort fields by custom logic.withFieldValidators(Map<String, Validator<?>> fieldValidators) Sets a map with validators for fields that will be used for editing certain properties.withIncludeProperties(List<String> includeProperties) Sets the entity attributes to be included to bulk editor view.withListDataComponent(ListDataComponent<E> listDataComponent) Sets the list data component that displays the items to be edited.withModelValidators(List<Validator<E>> modelValidators) Sets a map with validators for the result of bulk editing.withUseConfirmDialog(boolean useConfirmDialog) Sets whether the confirmation dialog should be displayed to the user before saving the changes.
- 
Field Details- 
metaClass
- 
entities
- 
handler
- 
listDataComponent
- 
exclude
- 
includeProperties
- 
fieldValidators
- 
modelValidators
- 
useConfirmDialogprotected boolean useConfirmDialog
- 
fieldSorter
- 
origin
 
- 
- 
Constructor Details- 
BulkEditorBuilder
- 
BulkEditorBuilderpublic BulkEditorBuilder(MetaClass metaClass, Collection<E> entities, View<?> origin, Function<BulkEditorBuilder<E>, DialogWindow<BulkEditView<E>>> handler) 
 
- 
- 
Method Details- 
withListDataComponentSets the list data component that displays the items to be edited.- Parameters:
- listDataComponent- the list data component to be used
- Returns:
- this builder
 
- 
withExcludeSets a regular expression to exclude some fields explicitly from the list of attributes available for editing.- Parameters:
- exclude- a regular expression
- Returns:
- this builder
 
- 
withIncludePropertiesSets the entity attributes to be included to bulk editor view. If set, other attributes will be ignored.- Parameters:
- includeProperties- the entity attributes to be included to bulk editor view
- Returns:
- this builder
 
- 
withFieldValidatorsSets 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
 
- 
withModelValidatorsSets 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
 
- 
withUseConfirmDialogSets whether the confirmation dialog should be displayed to the user before saving the changes. The default value is true.- Parameters:
- useConfirmDialog- whether the confirmation dialog should be displayed
- Returns:
- this builder
 
- 
withFieldSorterpublic BulkEditorBuilder<E> withFieldSorter(Function<List<MetaProperty>, Map<MetaProperty, Integer>> fieldSorter) Sets field sorter function that allows you to sort fields by custom logic.- Parameters:
- fieldSorter- field sorter function
- Returns:
- this builder
 
- 
getMetaClass- Returns:
- a MetaClassof items
 
- 
getEntities- Returns:
- a collection of items to be edited
 
- 
getListDataComponent- Returns:
- the list data component that displays the items to be edited
 
- 
getExclude- Returns:
- a regular expression to exclude some fields explicitly from the list of attributes available for editing
 
- 
getIncludeProperties- Returns:
- the entity attributes to be included to bulk editor view
 
- 
getFieldValidators- Returns:
- a map with validators for fields that will be used for editing certain properties
 
- 
getModelValidators- Returns:
- a list with validators for the result of bulk editing
 
- 
isUseConfirmDialogpublic boolean isUseConfirmDialog()- Returns:
- whether the confirmation dialog should be displayed to the user before saving the changes
 
- 
getFieldSorter- Returns:
- field sorter function
 
- 
getOrigin- Returns:
- origin view
 
- 
buildBuilds an instance of DialogWindow forBulkEditView- Returns:
- a new instance of DialogWindow for BulkEditView
 
- 
openBuilds and opens an instance of DialogWindow forBulkEditView- Returns:
- a new instance of DialogWindow for BulkEditView
 
 
-