Class FileSystemPlayList

    • Constructor Detail

    • Method Detail

      • getImplementation

        public <T> T getImplementation​(Class<T> klass)
        Description copied from interface: PlayList

        PlayList objects are sometimes implemented by an object that acts as a facade to other objects. For example, this could be a proxy for an AppleScript iTunes object or a persistent object that is stored in a local database via Hibernate. While normal calls to an object implementing this interface are routed according to some internal logic, using one of the actual implementation classes allows you precise control over what your call does.

        Note to plugin developers: It is hardly ever a good idea to exercise this control, unless you know exactly what you are doing. :-)

        Type Parameters:
        T - implementation class
        Parameters:
        klass - class implementing PlayList
        Returns:
        object of the desired type or null, if such an object is not available
        See Also:
        AudioSong.getImplementation(Class)
      • setName

        public void setName​(String value)
      • setDescription

        public void setDescription​(String value)
      • setId

        public void setId​(Long value)
        Description copied from interface: PlayList
        Sets this list's id.
        Parameters:
        value - id
      • setParentId

        public void setParentId​(Long value)
        Description copied from interface: PlayList
        Sets the parent id.
        Parameters:
        value - id
      • setDistinguishedKind

        public void setDistinguishedKind​(PlayList.Kind value)
        Description copied from interface: PlayList
        Allows setting of a special song type, like PlayList.Kind.PODCASTS.
        Parameters:
        value - kind
      • setMovies

        public void setMovies​(boolean value)
      • setChildPlayLists

        public void setChildPlayLists​(List<PlayList> value)
      • setParentPlayList

        public void setParentPlayList​(PlayList value)
      • setMaster

        public void setMaster​(boolean value)
      • setGeniusTrackID

        public void setGeniusTrackID​(int value)
      • setAllItems

        public void setAllItems​(boolean value)
      • setSmartInfo

        public void setSmartInfo​(String value)
      • setSmartCriteria

        public void setSmartCriteria​(String value)
      • setVideos

        public void setVideos​(boolean value)
      • setSongs

        public void setSongs​(List<AudioSong> value)
        Description copied from interface: PlayList
        Removes all songs from this playlist and replaces them with the given songs. If the songs are not in your library yet, corresponding entries in the database are created.
        Parameters:
        value - songs
      • addSongs

        public void addSongs​(int filteredIndex,
                             String... locations)
        Description copied from interface: PlayList
        Adds songs to the playlist using only their locations.
        Depending on the library implementation, the insert index may be ignored. If it is ignored, the songs will be appended at the end (this is the case for iTunes libraries).
        Parameters:
        filteredIndex - filtered index, set this to -1, if you just want to add the song to the end
        locations - file or URL
        See Also:
        AudioSongLocation.getLocation()
      • addSongIds

        public void addSongIds​(List<Long> songIds)
        Description copied from interface: PlayList
        Adds the songs referenced by the given ids to this playlist.
        Parameters:
        songIds - song ids
      • addSongIds

        public void addSongIds​(int filteredIndex,
                               List<Long> songIds)
        Description copied from interface: PlayList
        Adds the given songs at the given (filtered) index.
        Parameters:
        filteredIndex - filtered index
        songIds - songs
      • addSongs

        public void addSongs​(int filteredIndex,
                             List<AudioSong> songs)
        Description copied from interface: PlayList
        Adds the given songs at the given (filtered) index.
        Parameters:
        filteredIndex - filtered index
        songs - songs
      • moveSongs

        public int moveSongs​(int[] fromIndices,
                             int toIndex)
        Description copied from interface: PlayList
        Moves songs. All indices have to be filtered.
        Parameters:
        fromIndices - indices to move songs from
        toIndex - index to move the songs to
        Returns:
        new lead index of the moved songs
      • removeSongs

        public boolean removeSongs​(int... filteredIndex)
        Description copied from interface: PlayList
        Removes the song with the given (filtered) index from the playlist. If this is a library, the file is also deleted.
        Parameters:
        filteredIndex - filtered indices
        Returns:
        true, if the system was able to find and remove the given song
      • removeSongs

        public boolean removeSongs​(Collection<Long> ids,
                                   boolean completelyDeleteSong)
        Description copied from interface: PlayList
        Removes the songs with the given ids from the list.
        Parameters:
        ids - ids
        completelyDeleteSong - if set to true, the song object itself is deleted and removed from all other lists as well
        Returns:
        success
      • setFolder

        public void setFolder​(boolean value)
      • setPurchasedMusic

        public void setPurchasedMusic​(boolean value)