Class JmixEmptyKanbanItems<T>

java.lang.Object
io.jmix.kanbanflowui.kit.component.data.JmixEmptyKanbanItems<T>
Type Parameters:
T - type of items contained
All Implemented Interfaces:
JmixKanbanItems<T>, Serializable
Direct Known Subclasses:
EmptyKanbanItems

public class JmixEmptyKanbanItems<T> extends Object implements JmixKanbanItems<T>
Empty data provider for a JmixKanban component.
See Also:
  • Field Details

  • Constructor Details

    • JmixEmptyKanbanItems

      public JmixEmptyKanbanItems()
  • Method Details

    • getInstance

      public static <T> JmixEmptyKanbanItems<T> getInstance()
      Type Parameters:
      T - type of items contained
      Returns:
      instance of the JmixEmptyKanbanItems
    • getItems

      public Collection<T> getItems()
      Specified by:
      getItems in interface JmixKanbanItems<T>
      Returns:
      unmodifiable collection of items
    • getItem

      @Nullable public T getItem(Object itemId)
      Description copied from interface: JmixKanbanItems
      Finds an item by its id.
      Specified by:
      getItem in interface JmixKanbanItems<T>
      Parameters:
      itemId - the item id
      Returns:
      the item by the given id
    • getItem

      @Nullable public T getItem(String stringId)
      Description copied from interface: JmixKanbanItems
      Finds an item by its string id.
      Specified by:
      getItem in interface JmixKanbanItems<T>
      Parameters:
      stringId - the item string id
      Returns:
      the item by the given id
    • getItemValue

      @Nullable public <V> V getItemValue(T itemId, String propertyId)
      Specified by:
      getItemValue in interface JmixKanbanItems<T>
      Parameters:
      itemId - the item
      propertyId - the property path
      Returns:
      the item value
    • getItemId

      @Nullable public Object getItemId(T item)
      Specified by:
      getItemId in interface JmixKanbanItems<T>
      Parameters:
      item - the item
      Returns:
      the id of the item
    • setItemValue

      public void setItemValue(T item, String propertyPath, @Nullable Object value)
      Description copied from interface: JmixKanbanItems
      Sets the value to the item.
      Specified by:
      setItemValue in interface JmixKanbanItems<T>
      Parameters:
      item - the item
      propertyPath - the property path
      value - the value to set
    • updateItem

      public void updateItem(T item)
      Description copied from interface: JmixKanbanItems
      If the item with the same id exists, it is replaced with the given instance. If not, the given instance is added to the items list.
      Specified by:
      updateItem in interface JmixKanbanItems<T>
      Parameters:
      item - item to update
    • containsItem

      public boolean containsItem(T item)
      Specified by:
      containsItem in interface JmixKanbanItems<T>
      Parameters:
      item - an item to check
      Returns:
      true if the underlying collection contains an item, false otherwise
    • addItemsChangeListener

      public com.vaadin.flow.shared.Registration addItemsChangeListener(Consumer<JmixKanbanItems.ItemsChangeEvent<T>> listener)
      Description copied from interface: JmixKanbanItems
      Adds a listener that will be called when the associated collection or the property of an item of this collection changes.
      Specified by:
      addItemsChangeListener in interface JmixKanbanItems<T>
      Parameters:
      listener - a listener to add
      Returns:
      a handle that can be used for removing the listener