Package musichub.business
Class MusicHub
java.lang.Object
musichub.business.MusicHub
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addElement(AudioElement element)
void
addElementToAlbum(String elementTitle, String albumTitle)
void
addElementToPlayList(String elementTitle, String playListTitle)
void
addPlaylist(PlayList playlist)
albums()
void
deletePlayList(String playListTitle)
elements()
getAlbumSongs(String albumTitle)
getAlbumSongsSortedByGenre(String albumTitle)
void
getAudioElement(List<AudioElement> audios, String elementTitle)
getPlayListSongs(String playListTitle)
Method checking the songs contained in a chosen playlist and returning them if found.Method getting a list of playlistsvoid
void
void
void
-
Field Details
-
DIR
-
ALBUMS_FILE_PATH
-
PLAYLISTS_FILE_PATH
-
ELEMENTS_FILE_PATH
-
-
Constructor Details
-
MusicHub
public MusicHub()
-
-
Method Details
-
addElement
-
addAlbum
-
addPlaylist
-
deletePlayList
- Throws:
NoPlayListFoundException
-
albums
-
playlists
-
elements
-
getAlbumsTitlesSortedByDate
-
getAudiobooksTitlesSortedByAuthor
-
getAlbumSongs
- Throws:
NoAlbumFoundException
-
getAlbumSongsSortedByGenre
- Throws:
NoAlbumFoundException
-
addElementToAlbum
public void addElementToAlbum(String elementTitle, String albumTitle) throws NoAlbumFoundException, NoElementFoundException -
addElementToPlayList
public void addElementToPlayList(String elementTitle, String playListTitle) throws NoPlayListFoundException, NoElementFoundException -
saveAlbums
public void saveAlbums() -
savePlayLists
public void savePlayLists() -
saveElements
public void saveElements() -
getAudioElement
public void getAudioElement(List<AudioElement> audios, String elementTitle) throws NoAlbumFoundException, UnsupportedAudioFileException, IOException, LineUnavailableException -
searchAudioElement
public void searchAudioElement() throws UnsupportedAudioFileException, NoAlbumFoundException, LineUnavailableException, IOException, NoElementFoundException -
getPlayListsTitles
Method getting a list of playlists- Returns:
- a list of playlist titles
-
getPlayListSongs
Method checking the songs contained in a chosen playlist and returning them if found.- Parameters:
playListTitle
- the title of a (chosen) playlist- Returns:
- a list of songs from a playlist
- Throws:
NoPlayListFoundException
- if the chosen playlist doesn't exist
-