# Linaris_MAUI_SAE_201 ## Diagramme de classe ```plantuml @startuml class Artist { - string name + Artist(string name) + boolean Equals(object obj) + int GetHashCode() + string ToString() } class Album { - string name - string description - string imageURL - string information + Album(string name, string file_Name, Artist artist, string description, string information) + Album() + void AddTitle(Title title) + void RemoveTitle(Title title) + boolean Equals(object obj) + int GetHashCode() + string ToString() } class Playlist { - string name - string description - string imageURL - int index = 0 + boolean shuffle = false + boolean loop = false + boolean looptitle = false - List played + Playlist(string nom, string description, string imageURL) + Playlist() + void AddTitle(CustomTitle morceau) + void RemoveTitle(CustomTitle morceau) + void NextTitle() + void PreviousTitle() + Title? GetCurrentTitle() + boolean Equals(object? obj) + int GetHashCode() + string ToString() - int RandomGenerator(int n) } class Title { - string name - string imageURL - string information + Title(string nom, string file_Name, string informations) + boolean Equals(object? obj) + int GetHashCode() + string ToString() } enum Genre { HIP_HOP POP ROCK ELECTRO CLASSIQUE JAZZ VARIETE_FRANCAISE VARIETE_INTERNATIONALE REGGAE RAP RNB DISCO BLUES COUNTRY FUNK GOSPEL METAL K_POP } class CustomTitle { - string path + CustomTitle(string name, string imageURL, string information, string path) + CustomTitle() + boolean Equals(object? obj) + int GetHashCode() + string ToString() } class InfoTitle { - string description - List feat + InfoTitle(string name, string imageURL, string information, Artist artist, string description, Genre genre) + InfoTitle() + void AddFeat(Artist artist) + void RemoveFeat(Artist artiste) + boolean Equals(object? obj) + int GetHashCode() + string ToString() } interface IDataManager { + void AddAlbum(Album album) + void AddAlbums(List albumsList) + void AddArtist(Artist artist) + void AddArtists(List artistsList) + void AddPlaylist(Playlist playlist) + void AddPlaylists(List playlistsList) + void AddCustomTitle(CustomTitle title) + void AddCustomTitles(List customTitlesList) + void AddInfoTitle(InfoTitle title) + void AddInfoTitles(List infoTitlesList) + List GetCustomTitles() + CustomTitle? GetCustomTitleByUrl(string custom) + List GetInfoTitles() + InfoTitle? GetInfoTitleByUrl(string url) + List GetAlbums() + Album? GetAlbumByUrl(string url) + List GetArtists() + Artist? GetArtistByName(string name) + List 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 albumsList) + void RemoveArtist(Artist artist) + void RemoveArtists(List artistsList) + void RemovePlaylist(Playlist playlist) + void RemovePlaylists(List playlistsList) + void RemoveCustomTitle(CustomTitle title) + void RemoveCustomTitles(List customTitlesList) + void RemoveInfoTitle(InfoTitle title) + void RemoveInfoTitles(List 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 albums - List customTitles - List infoTitles - List playlists - List 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 GetPlaylists() + IEnumerable GetAlbums() + IEnumerable GetCustomTitles() + IEnumerable GetInfoTitles() + IEnumerable GetArtists() + void LoadSerialization() + void SaveSerialization() } class StubAlbum { + StubAlbum() + List GetAlbums() + Album? GetAlbumByUrl(string url) + void AddAlbum(Album album) + void RemoveAlbum(Album album) } class StubArtist { + StubArtist() + List GetArtists() + Artist? GetArtistByName(string name) + void AddArtist(Artist artist) + void RemoveArtist(Artist artist) } Album --> "+ artist" Artist Album --> "- titles*" Title Playlist --> "- titles*" Title CustomTitle <|-- Title InfoTitle <|-- Title InfoTitle --> "+ genre" Genre InfoTitle --> "+ artist" Artist Manager --> "+ datamanager" IDataManager StubArtist --> "- artists*" Artist StubAlbum --> "- stubArtist" StubArtist StubAlbum --> "- albums" Album @enduml