|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.bff.javampd.MPDDatabase
public class MPDDatabase
MPDDatabase represents a database controller to a MPD server. To obtain
an instance of the class you must use the getMPDDatabase method from
the MPD connection class. This class does not have a public constructor
(singleton model) so the object must be obtained from the connection object.
| Method Summary | |
|---|---|
java.util.Collection<MPDSong> |
findAlbum(java.lang.String album)
Returns a Collection of MPDSongs for an artist. |
java.util.Collection<MPDSong> |
findAlbumByArtist(java.lang.String artist,
java.lang.String album)
Returns a Collection of MPDSongs for an album by
a particulat artist. |
java.util.Collection<MPDSong> |
findArtist(java.lang.String artist)
Returns a Collection of MPDSongs for an artist. |
java.util.Collection<MPDSong> |
findTitle(java.lang.String title)
Returns a Collection of MPDSongs for a title. |
int |
getAlbumCount()
Returns the total number of albums in the database. |
int |
getArtistCount()
Returns the total number of artists in the database. |
long |
getDbPlayTime()
Returns the sum of all song times in database. |
long |
getLastUpdateTime()
Returns the last database update in UNIX time. |
MPD |
getMpd()
Returns the mpd this database class is using. |
int |
getSongCount()
Returns the total number of songs in the database. |
java.util.Collection<java.lang.String> |
listAlbumsByArtist(java.lang.String artist)
Returns a Collection of Strings of all
albums by a particular artist. |
java.util.Collection<java.lang.String> |
listAllAlbums()
Returns a Collection of Strings of all
albums in the database. |
java.util.Collection<java.lang.String> |
listAllArtists()
Returns a Collection of Strings of all
artists in the database. |
java.util.Collection<java.lang.String> |
listAllFiles()
Returns a Collection of Strings of all
songs and directories from the mpd root. |
java.util.Collection<java.lang.String> |
listAllFiles(java.lang.String path)
Returns a Collection of Strings of all
songs and directories from the given path. |
java.util.Collection<java.lang.String> |
listAllGenres()
Returns a Collection of Strings of all
genres in the database. |
java.util.Collection<java.lang.String> |
listAllSongFiles()
Returns a Collection of Strings of all
songs from the mpd root. |
java.util.Collection<java.lang.String> |
listAllSongFiles(java.lang.String path)
Returns a Collection of Strings of all
songs from the given path. |
java.util.Collection<MPDSong> |
listAllSongs()
Returns a Collection of MPDSongs of all
songs from the mpd root. |
java.util.Collection<MPDSong> |
listAllSongs(java.lang.String path)
Returns a Collection of MPDSongs of all
songs from the given path. |
java.util.Collection<java.lang.String> |
listPlaylists()
Returns a list of all available playlist names on the server. |
java.util.Collection<MPDSong> |
listPlaylistSongs(java.lang.String playlistName)
|
java.util.Collection<MPDSong> |
searchAlbum(java.lang.String album)
Returns a Collection of MPDSongs for an any
album containing the parameter album. |
java.util.Collection<MPDSong> |
searchArtist(java.lang.String artist)
Returns a Collection of MPDSongs for an any
artist containing the parameter artist. |
java.util.Collection<MPDSong> |
searchFileName(java.lang.String fileName)
Returns a Collection of MPDSongs for an any
file name containing the parameter filename. |
java.util.Collection<MPDSong> |
searchTitle(java.lang.String title)
Returns a Collection of MPDSongs for an any
title containing the parameter title. |
void |
setMpd(MPD mpd)
Set the mpd connection this class is using. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public java.util.Collection<MPDSong> findArtist(java.lang.String artist)
throws MPDConnectionException,
MPDDatabaseException
Collection of MPDSongs for an artist.
Please note this only returns an exact match of artist. To find a partial
match use searchArtist(String artist).
artist - the artist to find
Collection of MPDSongs
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<MPDSong> findAlbum(java.lang.String album)
throws MPDConnectionException,
MPDDatabaseException
Collection of MPDSongs for an artist.
Please note this only returns an exact match of album. To find a partial
match use searchAlbum(String artist).
album - the album to find
Collection of MPDSongs
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<MPDSong> findAlbumByArtist(java.lang.String artist,
java.lang.String album)
throws MPDConnectionException,
MPDDatabaseException
Collection of MPDSongs for an album by
a particulat artist. Please note this only returns an exact match of album
and artist.
artist - the artist alcum belongs toalbum - the album to find
Collection of MPDSongs
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<MPDSong> findTitle(java.lang.String title)
throws MPDConnectionException,
MPDDatabaseException
Collection of MPDSongs for a title.
Please note this only returns an exact match of title. To find a partial
match use searchTitle(String title).
title - the title to find
Collection of MPDSongs
MPDConnectionException - if there is a problem sending the command
MPDDatabaseException - if the MPD responded with an error
public java.util.Collection<java.lang.String> listAllFiles()
throws MPDConnectionException,
MPDDatabaseException
Collection of Strings of all
songs and directories from the mpd root.
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<java.lang.String> listAllFiles(java.lang.String path)
throws MPDConnectionException,
MPDDatabaseException
Collection of Strings of all
songs and directories from the given path.
path - the root of the list
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<java.lang.String> listAllSongFiles()
throws MPDConnectionException,
MPDDatabaseException
Collection of Strings of all
songs from the mpd root.
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<java.lang.String> listAllSongFiles(java.lang.String path)
throws MPDConnectionException,
MPDDatabaseException
Collection of Strings of all
songs from the given path.
path - the root of the list
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<MPDSong> listAllSongs()
throws MPDConnectionException,
MPDDatabaseException
Collection of MPDSongs of all
songs from the mpd root.
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<MPDSong> listAllSongs(java.lang.String path)
throws MPDConnectionException,
MPDDatabaseException
Collection of MPDSongs of all
songs from the given path.
path - the root of the list
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<MPDSong> searchArtist(java.lang.String artist)
throws MPDConnectionException,
MPDDatabaseException
Collection of MPDSongs for an any
artist containing the parameter artist.
Please note this returns a partial match of an artist. To find an
exact match use searchArtist(String artist).
artist - the artist to match
Collection of MPDSongs
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<MPDSong> searchAlbum(java.lang.String album)
throws MPDConnectionException,
MPDDatabaseException
Collection of MPDSongs for an any
album containing the parameter album.
Please note this returns a partial match of an album. To find an
exact match use searchAlbum(String album).
album - the album to match
Collection of MPDSongs
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<MPDSong> searchTitle(java.lang.String title)
throws MPDConnectionException,
MPDDatabaseException
Collection of MPDSongs for an any
title containing the parameter title.
Please note this returns a partial match of a title. To find an
exact match use searchTitle(String title).
title - the title to match
Collection of MPDSongs
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<MPDSong> searchFileName(java.lang.String fileName)
throws MPDConnectionException,
MPDDatabaseException
Collection of MPDSongs for an any
file name containing the parameter filename.
fileName - the file name to match
Collection of MPDSongs
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<java.lang.String> listAllAlbums()
throws MPDConnectionException,
MPDDatabaseException
Collection of Strings of all
albums in the database.
Collection of Strings containing the album names
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<java.lang.String> listAllArtists()
throws MPDConnectionException,
MPDDatabaseException
Collection of Strings of all
artists in the database.
Collection of Strings containing the album names
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<java.lang.String> listAllGenres()
throws MPDConnectionException,
MPDDatabaseException
Collection of Strings of all
genres in the database.
Collection of Strings containing the genre names
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<java.lang.String> listAlbumsByArtist(java.lang.String artist)
throws MPDConnectionException,
MPDDatabaseException
Collection of Strings of all
albums by a particular artist.
artist - the artist to find albums
Collection of Strings of all
albums
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is aproblem sending the command
public int getArtistCount()
throws MPDConnectionException,
MPDDatabaseException
MPDConnectionException - if there is a problem sending the command
MPDDatabaseException - if the MPD responded with an error
public int getAlbumCount()
throws MPDConnectionException,
MPDDatabaseException
MPDConnectionException - if there is a problem sending the command
MPDDatabaseException - if the MPD responded with an error
public int getSongCount()
throws MPDConnectionException,
MPDDatabaseException
MPDConnectionException - if there is a problem sending the command
MPDDatabaseException - if the MPD responded with an error
public long getDbPlayTime()
throws MPDConnectionException,
MPDDatabaseException
MPDConnectionException - if there is a problem sending the command
MPDDatabaseException - if the MPD responded with an error
public long getLastUpdateTime()
throws MPDConnectionException,
MPDDatabaseException
MPDConnectionException - if there is a problem sending the command
MPDDatabaseException - if the MPD responded with an errorpublic MPD getMpd()
public void setMpd(MPD mpd)
mpd - the mpd to use
public java.util.Collection<java.lang.String> listPlaylists()
throws MPDConnectionException,
MPDDatabaseException
MPDDatabaseException - if the MPD responded with an error
MPDConnectionException - if there is a problem sending the command
public java.util.Collection<MPDSong> listPlaylistSongs(java.lang.String playlistName)
throws MPDConnectionException,
MPDDatabaseException
MPDConnectionException
MPDDatabaseException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||