Interface ThemesServiceDatabase

All Known Implementing Classes:
ThemesServiceDatabaseImpl

public interface ThemesServiceDatabase
API that defines persistent storage of themes.
  • Method Details

    • getTheme

      Theme getTheme(long id) throws ThemesServiceDatabaseException, org.opencastproject.util.NotFoundException
      Return the theme by the unique given id.
      Parameters:
      id - The unique id of the theme.
      Returns:
      A Theme that matches the id.
      Throws:
      org.opencastproject.util.NotFoundException - if the theme could not be found
      ThemesServiceDatabaseException - if there is a problem communicating with the underlying data store
    • findThemes

      List<Theme> findThemes(Optional<Integer> limit, Optional<Integer> offset, ArrayList<org.opencastproject.util.requests.SortCriterion> sortCriteria, Optional<String> creatorFilter, Optional<String> textFilter)
      Return themes that match the query parameters
      Parameters:
      limit - Maximum amount of themes to return (optional)
      offset - The offset to read data from (optional)
      sortCriteria - How the resulting list should be sorted
      creatorFilter - filter by creator name (optional)
      textFilter - fulltext filter (optional)
      Returns:
      A List of Theme that match the query parameters
    • updateTheme

      Theme updateTheme(Theme theme) throws ThemesServiceDatabaseException
      Crate or update a theme.
      Parameters:
      theme - The theme to create or update.
      Returns:
      The updated Theme.
      Throws:
      ThemesServiceDatabaseException - if there is a problem communicating with the underlying data store
    • deleteTheme

      void deleteTheme(long id) throws ThemesServiceDatabaseException, org.opencastproject.util.NotFoundException
      Delete a theme by using a unique id to find it.
      Parameters:
      id - The unique id of the theme.
      Throws:
      ThemesServiceDatabaseException - if there is a problem communicating with the underlying data store
      org.opencastproject.util.NotFoundException
    • countThemes

      int countThemes() throws ThemesServiceDatabaseException
      Returns:
      Count the total number of themes.
      Throws:
      ThemesServiceDatabaseException - if there is a problem communicating with the underlying data store