- All Superinterfaces:
AnyType,QilletniType
Represents a
song type in Qilletni. This may be created by the "Song Name" by "Artist Name"
expression syntax. The internal service provider's type is dynamic, changing how the data is fetched when the service
provider is changed.-
Method Summary
Modifier and TypeMethodDescriptiongetAlbum()Retrieves the album this song is on.getArtist(EntityDefinitionManager entityDefinitionManager) Retrieves the artist as an ArtistEntityTypefor the given entity definition manager.getArtists(EntityDefinitionManager entityDefinitionManager) Retrieves a list of artists as aListType, resolved using the givenEntityDefinitionManager.Retrieves the current song definition associated with the implementing object.Retrieves the supplied artist name for the album, if the artist was provided.Retrieves the supplied title for the album, if the title was provided.Retrieves the supplied URL for the song, if the URL was provided.getTrack()Retrieves the current track instance associated with the implementing object for the current service provider.booleanChecks whether service provider data has been successfully populated for the current instance.voidpopulateSpotifyData(Track track) Populates the music provider instance of theTrackstored in the SongType.voidsetSongDefinition(SongDefinition songDefinition) Sets the song definition for the implementing object.Methods inherited from interface dev.qilletni.api.lang.types.QilletniType
getTypeClass, minusOperator, minusOperatorInPlace, plusOperator, plusOperatorInPlace, qilletniEquals, stringValue, typeName
-
Method Details
-
getSongDefinition
SongDefinition getSongDefinition()Retrieves the current song definition associated with the implementing object. The song definition determines the method by which song data is classified or resolved, such as by URL, title and artist, or prepopulated data.- Returns:
- The
SongDefinitionrepresenting the current song classification method
-
setSongDefinition
Sets the song definition for the implementing object. The song definition determines how the song data is classified or resolved, such as by URL, title and artist, or prepopulated data.- Parameters:
songDefinition- TheSongDefinitionrepresenting the classification method to be set
-
getSuppliedUrl
String getSuppliedUrl()Retrieves the supplied URL for the song, if the URL was provided.- Returns:
- A string representing the user-supplied URL
-
getSuppliedTitle
String getSuppliedTitle()Retrieves the supplied title for the album, if the title was provided.- Returns:
- A string representing the user-supplied title
-
getSuppliedArtist
String getSuppliedArtist()Retrieves the supplied artist name for the album, if the artist was provided.- Returns:
- A string representing the user-supplied artist
-
getAlbum
-
getArtist
Retrieves the artist as an ArtistEntityTypefor the given entity definition manager. The artist entity is resolved using the providedEntityDefinitionManager.- Parameters:
entityDefinitionManager- The manager responsible for defining and looking up entity definitions- Returns:
- The
EntityTyperepresenting the artist resolved through the entity definition manager
-
getArtists
Retrieves a list of artists as aListType, resolved using the givenEntityDefinitionManager.- Parameters:
entityDefinitionManager- The manager responsible for defining and resolving entity definitions- Returns:
- A
ListTyperepresenting the artists resolved through the entity definition manager
-
getTrack
-
isSpotifyDataPopulated
boolean isSpotifyDataPopulated()Checks whether service provider data has been successfully populated for the current instance.- Returns:
- true if service provider data is populated, false otherwise
-
populateSpotifyData
-