- All Superinterfaces:
AnyType,QilletniType
Represents a
collection type in Qilletni. This is essentially an abstracted playlist, or list of songs.
This may be created by the "Collection Name" collection by "Creator Name" expression syntax.-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the current collection definition associated with the implementing object.getCreator(EntityDefinitionManager entityDefinitionManager) Retrieves the creator as a UserEntityTypeusing the given entity definition manager.getOrder()Retrieves the current ordering of the collection when it is played.Gets the currentPlaylistinstance associated with the current collection for the current service provider.Retrieves the supplied creator for a specific collection, if the creator's name was provided.Retrieves the supplied title for a specific collection, if the title was provided.Retrieves the supplied URL for a specific collection, if the URL was provided.Gets the weights applied to the collection.booleanChecks whether service provider data has been successfully populated for the current instance.voidpopulateSpotifyData(Playlist playlist) Populates the music provider instance of thePlayliststored in the CollectionType.voidsetCollectionDefinition(CollectionDefinition collectionDefinition) Sets the collection definition for the implementing object.voidsetOrder(CollectionOrder order) Sets the ordering of the collection when it is played.voidsetWeights(WeightsType weights) Sets the weights for the collection.Methods inherited from interface dev.qilletni.api.lang.types.QilletniType
getTypeClass, minusOperator, minusOperatorInPlace, plusOperator, plusOperatorInPlace, qilletniEquals, stringValue, typeName
-
Method Details
-
getCollectionDefinition
CollectionDefinition getCollectionDefinition()Retrieves the current collection definition associated with the implementing object. The collection definition determines how the collection data is classified or resolved, such as by URL, name and creator, prepopulated data, or a list of specific songs.- Returns:
- The
CollectionDefinitionrepresenting the current method of collection classification or resolution
-
setCollectionDefinition
Sets the collection definition for the implementing object. The collection definition determines how the collection data is classified or resolved, such as by URL, name and creator, prepopulated data, or a list of specific songs.- Parameters:
collectionDefinition- TheCollectionDefinitionrepresenting the classification method to be set
-
getSuppliedUrl
String getSuppliedUrl()Retrieves the supplied URL for a specific collection, if the URL was provided.- Returns:
- A string representing the user-supplied URL
-
getSuppliedName
String getSuppliedName()Retrieves the supplied title for a specific collection, if the title was provided.- Returns:
- A string representing the user-supplied title
-
getSuppliedCreator
String getSuppliedCreator()Retrieves the supplied creator for a specific collection, if the creator's name was provided.- Returns:
- A string representing the user-supplied creator's name
-
getOrder
CollectionOrder getOrder()Retrieves the current ordering of the collection when it is played. The order specifies how the collection items are arranged, such as in a sequential manner or shuffled.- Returns:
- The
CollectionOrderrepresenting the current ordering of the collection
-
setOrder
Sets the ordering of the collection when it is played. The order specifies how the items in the collection are arranged, such as sequentially or shuffled.- Parameters:
order- TheCollectionOrderto set for the collection
-
getWeights
WeightsType getWeights()Gets the weights applied to the collection.- Returns:
- The weights applied to the collection
-
setWeights
Sets the weights for the collection.- Parameters:
weights- TheWeightsTypeobject to be associated with the collection
-
getCreator
Retrieves the creator as a UserEntityTypeusing the given entity definition manager. The creator is resolved using the providedEntityDefinitionManager.- Parameters:
entityDefinitionManager- The manager responsible for defining and resolving entity definitions- Returns:
- The
EntityTyperepresenting the creator resolved through the entity definition manager
-
getPlaylist
-
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
-