|
|
|
@ -103,64 +103,97 @@ class InfoTitle {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface IDataManager {
|
|
|
|
|
+ void AddAlbum(Album album);
|
|
|
|
|
+ void AddAlbums(List<Album> albumsList);
|
|
|
|
|
+ void AddArtist(Artist artist);
|
|
|
|
|
+ void AddArtists(List<Artist> artistsList);
|
|
|
|
|
+ void AddPlaylist(Playlist playlist);
|
|
|
|
|
+ void AddPlaylists(List<Playlist> playlistsList);
|
|
|
|
|
+ void AddCustomTitle(CustomTitle title);
|
|
|
|
|
+ void AddCustomTitles(List<CustomTitle> customTitlesList);
|
|
|
|
|
+ void AddInfoTitle(InfoTitle title);
|
|
|
|
|
+ void AddInfoTitles(List<InfoTitle> infoTitlesList);
|
|
|
|
|
+ List<CustomTitle> GetCustomTitles();
|
|
|
|
|
+ CustomTitle? GetCustomTitleByUrl(string custom);
|
|
|
|
|
+ List<InfoTitle> GetInfoTitles();
|
|
|
|
|
+ InfoTitle? GetInfoTitleByUrl(string url);
|
|
|
|
|
+ List<Album> GetAlbums();
|
|
|
|
|
+ Album? GetAlbumByUrl(string url);
|
|
|
|
|
+ List<Artist> GetArtists();
|
|
|
|
|
+ Artist? GetArtistByName(string name);
|
|
|
|
|
+ List<Playlist> GetPlaylists();
|
|
|
|
|
+ Playlist? GetPlaylistByUrl(string url);
|
|
|
|
|
+ void UpdateCustomTitle(CustomTitle title, string name, string url, string info, string path);
|
|
|
|
|
+ void UpdateCustomTitleByUrl(string url, string name, string newUrl, string info, string path);
|
|
|
|
|
+ void UpdateInfoTitle(InfoTitle title, string name, string url, string info, Artist artist, string description, Genre genre);
|
|
|
|
|
+ void UpdateInfoTitleByName(string url, string name, string newUrl, string info, Artist artist, string description, Genre genre);
|
|
|
|
|
+ void UpdateInfoTitleByArtistName(InfoTitle title, string name, string url, string info, string artist, string description, Genre genre);
|
|
|
|
|
+ void UpdateInfoTitleByNameByArtistName(string url, string name, string newUrl, string info, string artist, string description, Genre genre);
|
|
|
|
|
+ void UpdateAlbum(Album album, string name, string url, Artist artist, string description, string info);
|
|
|
|
|
+ void UpdateAlbumByUrl(string url, string name, string newUrl, Artist artist, string description, string info);
|
|
|
|
|
+ void UpdateAlbumByArtistName(Album album, string name, string url, string artist, string description, string info);
|
|
|
|
|
+ void UpdateAlbumByUrlByArtistName(string url, string name, string newUrl, string artist, string description, string info);
|
|
|
|
|
+ void UpdatePlaylist(Playlist playlist, string name, string description, string url);
|
|
|
|
|
+ void UpdatePlaylistByUrl(string url, string name, string description, string newUrl);
|
|
|
|
|
+ void UpdateArtist(Artist artist, string name);
|
|
|
|
|
+ void UpdateArtistByName(string name, string newName);
|
|
|
|
|
+ void RemoveAlbum(Album album);
|
|
|
|
|
+ void RemoveAlbums(List<Album> albumsList);
|
|
|
|
|
+ void RemoveArtist(Artist artist);
|
|
|
|
|
+ void RemoveArtists(List<Artist> artistsList);
|
|
|
|
|
+ void RemovePlaylist(Playlist playlist);
|
|
|
|
|
+ void RemovePlaylists(List<Playlist> playlistsList);
|
|
|
|
|
+ void RemoveCustomTitle(CustomTitle title);
|
|
|
|
|
+ void RemoveCustomTitles(List<CustomTitle> customTitlesList);
|
|
|
|
|
+ void RemoveInfoTitle(InfoTitle title);
|
|
|
|
|
+ void RemoveInfoTitles(List<InfoTitle> infoTitlesList);
|
|
|
|
|
+ void LoadSerialization();
|
|
|
|
|
+ void SaveSerialization();
|
|
|
|
|
+ bool ExistsPlaylist(Playlist playlist);
|
|
|
|
|
+ bool ExistsPlaylistByUrl(string url);
|
|
|
|
|
+ bool ExistsAlbum(Album album);
|
|
|
|
|
+ bool ExistsAlbumByUrl(string url);
|
|
|
|
|
+ bool ExistsArtist(Artist artist);
|
|
|
|
|
+ bool ExistsArtistByName(string name);
|
|
|
|
|
+ bool ExistsCustomTitle(CustomTitle title);
|
|
|
|
|
+ bool ExistsCustomTitleByUrl(string url);
|
|
|
|
|
+ bool ExistsInfoTitle(InfoTitle title);
|
|
|
|
|
+ bool ExistsInfoTitleByUrl(string url);
|
|
|
|
|
+ void AddAlbum(Album album)
|
|
|
|
|
+ void AddAlbums(List<Album> albumsList)
|
|
|
|
|
+ void AddArtist(Artist artist)
|
|
|
|
|
+ void AddArtists(List<Artist> artistsList)
|
|
|
|
|
+ void AddPlaylist(Playlist playlist)
|
|
|
|
|
+ void AddPlaylists(List<Playlist> playlistsList)
|
|
|
|
|
+ void AddCustomTitle(CustomTitle title)
|
|
|
|
|
+ void AddCustomTitles(List<CustomTitle> customTitlesList)
|
|
|
|
|
+ void AddInfoTitle(InfoTitle title)
|
|
|
|
|
+ void AddInfoTitles(List<InfoTitle> infoTitlesList)
|
|
|
|
|
+ List<CustomTitle> GetCustomTitles()
|
|
|
|
|
+ CustomTitle? GetCustomTitleByUrl(string custom)
|
|
|
|
|
+ List<InfoTitle> GetInfoTitles()
|
|
|
|
|
+ InfoTitle? GetInfoTitleByUrl(string url)
|
|
|
|
|
+ List<Album> GetAlbums()
|
|
|
|
|
+ Album? GetAlbumByUrl(string url)
|
|
|
|
|
+ List<Artist> GetArtists()
|
|
|
|
|
+ Artist? GetArtistByName(string name)
|
|
|
|
|
+ List<Playlist> GetPlaylists()
|
|
|
|
|
+ Playlist? GetPlaylistByUrl(string url)
|
|
|
|
|
+ void UpdateCustomTitle(CustomTitle title, string name, string url, string info, string path)
|
|
|
|
|
+ void UpdateCustomTitleByUrl(string url, string name, string newUrl, string info, string path)
|
|
|
|
|
+ void UpdateInfoTitle(InfoTitle title, string name, string url, string info, Artist artist, string description, Genre genre)
|
|
|
|
|
+ void UpdateInfoTitleByName(string url, string name, string newUrl, string info, Artist artist, string description, Genre genre)
|
|
|
|
|
+ void UpdateInfoTitleByArtistName(InfoTitle title, string name, string url, string info, string artist, string description, Genre genre)
|
|
|
|
|
+ void UpdateInfoTitleByNameByArtistName(string url, string name, string newUrl, string info, string artist, string description, Genre genre)
|
|
|
|
|
+ void UpdateAlbum(Album album, string name, string url, Artist artist, string description, string info)
|
|
|
|
|
+ void UpdateAlbumByUrl(string url, string name, string newUrl, Artist artist, string description, string info)
|
|
|
|
|
+ void UpdateAlbumByArtistName(Album album, string name, string url, string artist, string description, string info)
|
|
|
|
|
+ void UpdateAlbumByUrlByArtistName(string url, string name, string newUrl, string artist, string description, string info)
|
|
|
|
|
+ void UpdatePlaylist(Playlist playlist, string name, string description, string url)
|
|
|
|
|
+ void UpdatePlaylistByUrl(string url, string name, string description, string newUrl)
|
|
|
|
|
+ void UpdateArtist(Artist artist, string name)
|
|
|
|
|
+ void UpdateArtistByName(string name, string newName)
|
|
|
|
|
+ void RemoveAlbum(Album album)
|
|
|
|
|
+ void RemoveAlbums(List<Album> albumsList)
|
|
|
|
|
+ void RemoveArtist(Artist artist)
|
|
|
|
|
+ void RemoveArtists(List<Artist> artistsList)
|
|
|
|
|
+ void RemovePlaylist(Playlist playlist)
|
|
|
|
|
+ void RemovePlaylists(List<Playlist> playlistsList)
|
|
|
|
|
+ void RemoveCustomTitle(CustomTitle title)
|
|
|
|
|
+ void RemoveCustomTitles(List<CustomTitle> customTitlesList)
|
|
|
|
|
+ void RemoveInfoTitle(InfoTitle title)
|
|
|
|
|
+ void RemoveInfoTitles(List<InfoTitle> infoTitlesList)
|
|
|
|
|
+ void LoadSerialization()
|
|
|
|
|
+ void SaveSerialization()
|
|
|
|
|
+ boolean ExistsPlaylist(Playlist playlist)
|
|
|
|
|
+ boolean ExistsPlaylistByUrl(string url)
|
|
|
|
|
+ boolean ExistsAlbum(Album album)
|
|
|
|
|
+ boolean ExistsAlbumByUrl(string url)
|
|
|
|
|
+ boolean ExistsArtist(Artist artist)
|
|
|
|
|
+ boolean ExistsArtistByName(string name)
|
|
|
|
|
+ boolean ExistsCustomTitle(CustomTitle title)
|
|
|
|
|
+ boolean ExistsCustomTitleByUrl(string url)
|
|
|
|
|
+ boolean ExistsInfoTitle(InfoTitle title)
|
|
|
|
|
+ boolean ExistsInfoTitleByUrl(string url)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class Manager {
|
|
|
|
|
+ {static} int MAX_NAME_LENGTH = 75
|
|
|
|
|
+ {static} int MAX_DESCRIPTION_LENGTH = 500
|
|
|
|
|
+ {static} string DEFAULT_NAME = "Unknown"
|
|
|
|
|
+ {static} string DEFAULT_URL = "none.png"
|
|
|
|
|
+ {static} string DEFAULT_DESC = ""
|
|
|
|
|
- List<Album> albums
|
|
|
|
|
- List<CustomTitle> customTitles
|
|
|
|
|
- List<InfoTitle> infoTitles
|
|
|
|
|
- List<Playlist> playlists
|
|
|
|
|
- List<Artist> artists
|
|
|
|
|
+ Manager(IDataManager dataManager)
|
|
|
|
|
+ void AddAlbum(Album album)
|
|
|
|
|
+ void AddCustomTitle(CustomTitle title)
|
|
|
|
|
+ void AddInfoTitle(InfoTitle title)
|
|
|
|
|
+ void AddPlaylist(Playlist playlist)
|
|
|
|
|
+ void AddArtist(Artist artist)
|
|
|
|
|
+ void RemoveAlbum(Album album)
|
|
|
|
|
+ void RemoveCustomTitle(CustomTitle title)
|
|
|
|
|
+ void RemoveInfoTitle(InfoTitle title)
|
|
|
|
|
+ void RemovePlaylist(Playlist playlist)
|
|
|
|
|
+ IEnumerable<Playlist> GetPlaylists()
|
|
|
|
|
+ IEnumerable<Album> GetAlbums()
|
|
|
|
|
+ IEnumerable<CustomTitle> GetCustomTitles()
|
|
|
|
|
+ IEnumerable<InfoTitle> GetInfoTitles()
|
|
|
|
|
+ IEnumerable<Artist> GetArtists()
|
|
|
|
|
+ void LoadSerialization()
|
|
|
|
|
+ void SaveSerialization()
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Album --> "+ artist" Artist
|
|
|
|
|
Album --> "- titles" Title
|
|
|
|
|
Playlist --> "- titles" Title
|
|
|
|
@ -168,5 +201,6 @@ CustomTitle <|-- Title
|
|
|
|
|
InfoTitle <|-- Title
|
|
|
|
|
InfoTitle --> "+ genre" Genre
|
|
|
|
|
InfoTitle --> "+ artist" Artist
|
|
|
|
|
Manager --> "+ datamanager" IDataManager
|
|
|
|
|
@enduml
|
|
|
|
|
|
|
|
|
|