Interface DataProvider

All Superinterfaces:
Serializable
All Known Implementing Classes:
ContainerDataProvider, ListDataProvider

public interface DataProvider extends Serializable
  • Method Details

    • getItems

      List<DataItem> getItems()
      Returns:
      list of all items.
    • getItem

      default DataItem getItem(Object id)
      Parameters:
      id - id of data item
      Returns:
      data item by id
    • addItem

      void addItem(DataItem item)
      Adds an item to the data provider.
      Parameters:
      item - an item to be added
    • addItems

      default void addItems(Collection<? extends DataItem> items)
      Adds a collection of data items to the data provider.
      Parameters:
      items - a collection of data items to be added
    • updateItem

      void updateItem(DataItem item)
      Update an item in the data provider if it is already there.
      Parameters:
      item - an item to be updated
    • removeItem

      void removeItem(DataItem item)
      Removes an item from the data provider.
      Parameters:
      item - an item to be removed
    • removeAll

      void removeAll()
      Removes all items from the data provider.
    • addChangeListener

      void addChangeListener(DataChangeListener listener)
      Adds listener to the data provider events.
      Parameters:
      listener - listener to be added
    • removeChangeListener

      void removeChangeListener(DataChangeListener listener)
      Removes listener to data provider events
      Parameters:
      listener - listener to be removed