Interface ItemProvider

All Known Implementing Classes:
CommandItemProvider, TimelineItemDb

public interface ItemProvider
  • Method Details

    • getItem

      TimelineItem getItem(String id)
    • getItems

      void getItems(int limit, String next, RetrievalFilter filter, ItemReceiver consumer)
    • addItem

      TimelineItem addItem(TimelineItem item)
      Add an item and return the added item.

      The returned value should have defaults (if any) filled in, also if the item has a relative time, the start time of the returned value will be computed from the relative time and the start of TimelineItem.relativeItemUuid

    • updateItem

      TimelineItem updateItem(TimelineItem item)
      Update an item and return the updated item.

      The item parameter should have the uuid set and at least the start time or relative time

      Returns:
      the updated item
      Throws:
      InvalidRequestException - if the item does not exist, if the groupUuuid or relatimeTimeUuid properties create a circular dependency or other source specific error conditions
    • deleteItem

      TimelineItem deleteItem(UUID id)
      Delete the item with the given uuid and return the deleted item.

      If the item does not exist, return null

    • deleteTimelineGroup

      TimelineItem deleteTimelineGroup(UUID id)
    • getCapabilities

      TimelineSourceCapabilities getCapabilities()
    • validateFilters

      void validateFilters(List<ItemFilter> filters) throws BadRequestException
      Checks that the source can filter based on the criteria specified
      Throws:
      BadRequestException
    • getItemLog

      default TimelineItemLog getItemLog(String id)
      Returns the item log or null if the item does not exist
    • addItemLog

      default LogEntry addItemLog(String id, LogEntry entry)
      Adds an entry to the log table