|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface McService
Defines the service for managing the musicians that perform on songs.
Method Summary | |
---|---|
Band |
addBand(java.lang.String bandName)
Adds a band with the given name to the database. |
void |
addKeywordsToPlaylist(Playlist playlist,
java.lang.String keywords,
TrackList tracks)
Adds the keywords in the comma separated list to the playlist. |
void |
addMusician(Playlist playlist,
java.lang.String artistfirstname,
java.lang.String artistlastname,
java.lang.String instruments,
java.lang.String tracks)
Adds the artist as a performer to all songs in the playlist, playing the specified instruments. |
void |
addMusician(Song song,
java.lang.String artistfirstname,
java.lang.String artistlastname,
java.lang.String instruments)
Adds the artist as a performing artist in the song. |
void |
addSongToPlaylist(Song song,
Playlist playlist,
int songIndex)
Adds the song to the playlist at the given song index. |
java.io.File |
attemptToDownloadCoverArt(long playlistid,
int size)
Test the existence of a cover art image with the required size. |
java.util.List<PlaylistMergeBean> |
constructMergeBeanList(Playlist playlist)
Construct a list of PlaylistMergeBean objects. |
java.util.List<SongBean> |
constructSongBeanList(Playlist playlist)
Construct a list with a SongBean object for each song in the playlist. |
Playlist |
createPlaylist(java.lang.String playlistname)
Creates a playlist with the given name. |
Song |
createSong(java.lang.String songname,
Band band,
int length,
java.util.Set<java.lang.String> keywords,
java.lang.String destination)
Creates a persistent song with the given name. |
void |
deleteMusician(Playlist playlist,
java.lang.String artistfirstname,
java.lang.String artistlastname,
java.lang.String instruments,
java.lang.String tracks)
Removes the artist-instrument relations specified by the argument from every song in the playlist. |
void |
deleteMusician(Song song,
java.lang.String artistfirstname,
java.lang.String artistlastname,
java.lang.String instruments)
Deletes the artist as a performing artist in the song. |
void |
editSongsOfPlaylist(Playlist playlist,
java.util.List<SongBean> songbeans)
Edit song properties according to the new values stored in the songbeans in the supplied list. |
java.util.List<Playlist> |
findImportedPlaylist(MusicArchiveBean archive)
Tries to find persistent playlists that matches the playlist name of 1 or more entries in the music archive. |
Artist |
getArtistById(long artistId)
Return the artist with the given identifier |
Band |
getBandById(long bandid)
Return the band with a given identifier. |
java.util.List<Playlist> |
getBandPlaylists(Band band)
Returns a list of playlists containing at least one song by this band. |
java.util.Collection<CoverArtSearchResult> |
getCoverArtList(Playlist playlist)
Returns a list of available cover art for the playlist. |
java.util.Collection<CoverArtSearchResult> |
getCoverArtList(java.lang.String bandName,
java.lang.String playlistName)
Returns a list of available cover art for the named playlist by the named band. |
java.util.List<Keywordbag> |
getKeywordBagsWithKeywords(java.util.List<java.lang.Long> selectedKeywordIds)
Returns a list of all keyword bags containing all the keywords in the "selectedKeywordIds" parameter. |
Keyword |
getKeywordById(java.lang.Long selectedKeywordId)
Returns the keyword with the id of the parameter. |
Playlist |
getPlaylistById(long playlistid)
Retrieves the playlist with the specified id. |
java.util.Set<Comment> |
getReviews(Band band)
Returns a (possibly empty) sorted set of reviews for a Band. |
java.util.Set<Comment> |
getReviews(Playlist playlist)
Returns a (possibly empty) sorted set of reviews for a Playlist. |
Song |
getSongById(long songid)
Return the song with a given identifier. |
Playlist |
getSongNeighbours(Song song,
IUser user)
Returns a playlist of songs that were played to a user close before or after a song. |
java.util.List<Playlist> |
getSongPlaylists(Song song)
Returns a list of playlist containing the song. |
Playlist |
getSongsByBand(Band band)
Returns a playlist with all songs played by the band. |
Playlist |
getUpcoming(long userid)
Return a playlist with a prediction of the next 6 songs the DJ will play for the specified user. |
java.lang.String |
guessBandNameOfArchive(MusicArchiveBean archive)
Return a guess about the band on the cover of a playlist. |
java.util.Set<Playlist> |
guessPlaylistsInArchive(MusicArchiveBean archive)
Compile a set of persistent playlists that could be the same as the contents of the music archive. |
java.util.List<java.lang.Object[]> |
listBands(IUser user)
|
java.util.List<java.lang.Object[]> |
listKeywords(IUser user,
java.util.List<Keywordbag> bags)
|
void |
mergePlaylist(Playlist playlist,
IUser user,
java.util.List<PlaylistMergeBean> mergeBeanList)
Merge the playlist with the playlist in the list of beans that have the mergeIndicator set. |
void |
removeKeywordsFromPlaylist(Playlist playlist,
java.lang.String keywords,
TrackList tracks)
Removes the keywords in the comma separated list from the playlist. |
java.util.List<Playlist> |
searchPlaylistByName(java.lang.String playlistName)
Returns a list of playlists with the same name as the parameter. |
void |
setBandProperties(Band band,
java.lang.String bandName)
Sets the band name and comments string according to the specified parameters. |
void |
setPlaylistCoverArt(Playlist playlist,
CoverArtSearchResult selected)
Use the image in the CoverArtSearchResult to update the coverart for the playlist. |
void |
setPlaylistProperties(Playlist playlist,
java.lang.String name,
java.util.Date releaseDate)
Edit basic playlist properties: name and releasedate. |
void |
setSongProperties(Song song,
java.lang.String name,
java.lang.String bandName,
int msecs,
java.lang.String keywords)
Sets the song name, the song length in milliseconds and the song keywords according to the parameters specified. |
Playlist |
songsByKeywordbags(java.util.List<Keywordbag> bags,
User user,
int i)
Generates a Playlist containing songs that belong to the specified Keywordbags. |
Method Detail |
---|
Band addBand(java.lang.String bandName)
bandName
- The name of the new band.
void addMusician(Playlist playlist, java.lang.String artistfirstname, java.lang.String artistlastname, java.lang.String instruments, java.lang.String tracks)
playlist
- The playlist to add the defined Musician-Instrument relation to. Nothing
happens if this is null.artistfirstname
- The first name of the artis to create/edit.artistlastname
- The last name of the artis to create/edit. Nothing happens if this
is null.instruments
- The Instruments the artists plays on this playlist. This is
a comma separated list of instrument names.tracks
- The tracklist. If the tracklist is null the artist will be added to
all tracks of the playlist.Artist getArtistById(long artistId)
artistId
- The identifier of the artist sought
void addMusician(Song song, java.lang.String artistfirstname, java.lang.String artistlastname, java.lang.String instruments)
song
- The song to add a performer to. Nothing happens if this is null.artistfirstname
- The first name of the artis to create/edit.artistlastname
- The last name of the artis to create/edit.instruments
- The Instruments the artists plays on this playlist. This is
a comma separated list of instrument names.void deleteMusician(Playlist playlist, java.lang.String artistfirstname, java.lang.String artistlastname, java.lang.String instruments, java.lang.String tracks)
playlist
- The playlist to remove the artist instrument relation from. Nothing happens if this
is null.artistfirstname
- The first name of the artist.artistlastname
- The last name of the artist. Nothing happens if this is null.instruments
- The instruments (a comma separated string). Nothing happens if this is null.tracks
- Indicates which tracks should be affected.void deleteMusician(Song song, java.lang.String artistfirstname, java.lang.String artistlastname, java.lang.String instruments)
song
- The song to remove a performer from. Nothing happens if this is null.artistfirstname
- The first name of the artis to create/edit.artistlastname
- The last name of the artis to create/edit. Nothing happens if this is null.instruments
- The Instruments the artists plays on this playlist. This is
a comma separated list of instrument names. Nothing happens if this is null.void addSongToPlaylist(Song song, Playlist playlist, int songIndex)
song
- The song to add. This parameter must be a persistent song object. If this parameter is null
then nothing happens.playlist
- The playlist to add the song to. This parameter must be a persistent playlist object.
If this parameter is null then nothing happens.songIndex
- The song index within the playlist. If the playlist already has a song at this
index, the song index will be set to 0.void editSongsOfPlaylist(Playlist playlist, java.util.List<SongBean> songbeans)
playlist
- Specifies the playlist of the songs. Used for
storing the track index numbers of the songs
in this playlist. This parameter may be NULL,
in which case no track index numbers will be set.songbeans
- The list of songbeans containing the new
song properties.void setPlaylistProperties(Playlist playlist, java.lang.String name, java.util.Date releaseDate)
playlist
- The playlist to alter.name
- The playlist name to set. The playlist name is not changed if the
parameter is null or "".releaseDate
- The release date to set. The releasedate is not changed if
this parameter is null.Playlist createPlaylist(java.lang.String playlistname)
playlistname
- The name of the new playlist. Empty names, names consisting only
of whitespaces and null valued playlistnames are invalid and
ignored. The result is NULL in those cases. Trailing and leading
whitespace will be trimmed.
Playlist getPlaylistById(long playlistid)
void mergePlaylist(Playlist playlist, IUser user, java.util.List<PlaylistMergeBean> mergeBeanList)
playlist
- The playlist to merge.user
- The user doing the merging.mergeBeanList
- A list of beans containing possible merge candidates.java.util.List<SongBean> constructSongBeanList(Playlist playlist)
playlist
- The playlist.
java.util.List<PlaylistMergeBean> constructMergeBeanList(Playlist playlist)
playlist
- The playslist
java.util.Collection<CoverArtSearchResult> getCoverArtList(Playlist playlist)
playlist
- The playlist.
java.util.Collection<CoverArtSearchResult> getCoverArtList(java.lang.String bandName, java.lang.String playlistName)
bandName
- The band name.playlistName
- The playlist name.
Song createSong(java.lang.String songname, Band band, int length, java.util.Set<java.lang.String> keywords, java.lang.String destination)
songname
- The name of the song to create. The name must not be null and must
contain a non whitespace character. Otherwise, no song is created and the
result is null. Leading and trailing whitespace is removed.band
- The band of the new song. This parameter must contain a persistent band.
Otherwise, no song is created and the result is null.length
- The lenght of the song in milliseconds.keywords
- The set of keywords of the song.destination
- The file name of the media file containg the song.Song getSongById(long songid)
songid
- The idenitfier.
Playlist getUpcoming(long userid)
userid
- The user.
void setSongProperties(Song song, java.lang.String name, java.lang.String bandName, int msecs, java.lang.String keywords)
song
- The song to change.name
- The new song name. White space will be trimmed. The name will
not change if the new name is null or empty after trimming.bandName
- The name of the band performing the song. The song will be
moved to the band with this name. A new band will be made
if it does not exist. If the bandname is null or empty after
stripping white space, the band will not change.msecs
- The new song length in milliseconds. Zero or negative values
will have no effect.keywords
- The new comma separated list of keywords.java.util.List<Playlist> getSongPlaylists(Song song)
song
- The song to look for.
Playlist getSongNeighbours(Song song, IUser user)
song
- The song whose neighbours must be found.user
- The user.
Playlist getSongsByBand(Band band)
band
- The band.
Band getBandById(long bandid)
bandid
- The idenitfier.
java.util.List<Playlist> getBandPlaylists(Band band)
band
- The band to look for.
void setBandProperties(Band band, java.lang.String bandName)
band
- The band to modify.bandName
- The new band name. If a band with this name already exists,
then the 2 bands will be merged. If the trimmed band name is null or
empty, no change occurs.java.util.List<java.lang.Object[]> listBands(IUser user)
user
- The User to get this list for.
Keyword getKeywordById(java.lang.Long selectedKeywordId)
selectedKeywordId
- The id of the wanted keyword.
java.util.List<Keywordbag> getKeywordBagsWithKeywords(java.util.List<java.lang.Long> selectedKeywordIds)
selectedKeywordIds
- The list of keyword ids of the keywords that have to be present in
all keyword bags in the result.
java.util.List<java.lang.Object[]> listKeywords(IUser user, java.util.List<Keywordbag> bags)
user
- The User to get this list for.bags
- The Keywordbags to show Keywords of (or null to show all keywords)
Playlist songsByKeywordbags(java.util.List<Keywordbag> bags, User user, int i)
bags
- The Keywordbag(s) the Song could be in. If this parameter is null,
an empty Playlist is returned.user
- The User-object (Used for sorting according to listening-habits). If
this parameter is null, anonymous sorting is used.i
- Specifiec the maximum amount of records to return. Pass a
value >0 to show all matches.
void addKeywordsToPlaylist(Playlist playlist, java.lang.String keywords, TrackList tracks)
playlist
- The playlist. If this is null, nothing happens.keywords
- The comma separated list of keywords to add.tracks
- If not null, add the keywords only to the tracks in the track list.void removeKeywordsFromPlaylist(Playlist playlist, java.lang.String keywords, TrackList tracks)
playlist
- The playlist. If this is null, nothing happens.keywords
- The comma separated list of keywords to remove.tracks
- If not null, remove the keywords only from the tracks in the track list.void setPlaylistCoverArt(Playlist playlist, CoverArtSearchResult selected) throws java.io.IOException
playlist
- The playlist to set the cover art for. If null, the request is ignored.selected
- The selected cover art. If null, the request is ignored. If the URL inside
this is NULL, the request is ignored. If the URI is non absolute, MusiController
adds the "file:" protocol to it.
java.io.IOException
- Something went wrong when downloading the image or storing the image on disk.java.io.File attemptToDownloadCoverArt(long playlistid, int size)
playlistid
- The id of the playlist for which the cover art is requested.size
- The requested image size.return
- A file with the requested cover art image.java.util.List<Playlist> findImportedPlaylist(MusicArchiveBean archive)
archive
- The music archive.
java.lang.String guessBandNameOfArchive(MusicArchiveBean archive)
java.util.Set<Comment> getReviews(Playlist playlist)
playlist
- The playlist tot get the reviews for
java.util.Set<Comment> getReviews(Band band)
band
- The Band tot get the reviews for
java.util.Set<Playlist> guessPlaylistsInArchive(MusicArchiveBean archive)
archive
- The music archive.
java.util.List<Playlist> searchPlaylistByName(java.lang.String playlistName)
playlistName
- The name of the playlist.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |