Interface PlaylistDatabaseService
- All Known Implementing Classes:
PlaylistDatabaseServiceImpl
public interface PlaylistDatabaseService
API that defines persistent storage of playlists
-
Method Summary
Modifier and TypeMethodDescriptiondeletePlaylist(Playlist playlist, String orgId) Removes a single playlist.getAllForAdministrativeRead(Date from, Date endDate, int limit) getPlaylist(String playlistId) Gets a single playlist in the current organization context by its identifier.getPlaylist(String playlistId, String orgId) Gets a single playlist by its identifier.getPlaylists(int limit, int offset, SortCriterion sortCriterion) Get several playlists based on their order in the databaseupdatePlaylist(Playlist playlist, String orgId) Creates or updates a single playlist.
-
Method Details
-
getPlaylist
Gets a single playlist in the current organization context by its identifier.- Parameters:
playlistId- the playlist identifier- Returns:
- the
Playlistwith the given identifier - Throws:
NotFoundException- if there is no playlist with this identifierPlaylistDatabaseException- if there is a problem communicating with the underlying data store
-
getPlaylist
Playlist getPlaylist(String playlistId, String orgId) throws NotFoundException, PlaylistDatabaseException Gets a single playlist by its identifier.- Parameters:
playlistId- the playlist identifierorgId- the organisation identifier- Returns:
- the
Playlistwith the given identifier - Throws:
NotFoundException- if there is no playlist with this identifierPlaylistDatabaseException- if there is a problem communicating with the underlying data store
-
getPlaylists
List<Playlist> getPlaylists(int limit, int offset, SortCriterion sortCriterion) throws PlaylistDatabaseException Get several playlists based on their order in the database- Parameters:
limit- Maximum amount of playlists to returnoffset- The index of the first result to return- Returns:
- a list of
Playlists - Throws:
PlaylistDatabaseException- if there is a problem communicating with the underlying data store
-
getAllForAdministrativeRead
List<Playlist> getAllForAdministrativeRead(Date from, Date endDate, int limit) throws PlaylistDatabaseException - Throws:
PlaylistDatabaseException
-
updatePlaylist
Creates or updates a single playlist.- Parameters:
playlist- ThePlaylist- Returns:
- The updated
Playlist - Throws:
PlaylistDatabaseException- if there is a problem communicating with the underlying data store
-
deletePlaylist
Removes a single playlist.- Parameters:
playlist- ThePlaylist- Returns:
- The deleted
Playlist - Throws:
PlaylistDatabaseException- if there is a problem communicating with the underlying data store
-