|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.atunes.kernel.handlers.ContextInformationServiceHandler
public class ContextInformationServiceHandler
The Class ContextInformationServiceHandler.
Method Summary | |
---|---|
void |
applicationFinish()
Finish context information |
void |
clear()
Clear. |
void |
clearCaches()
Clears the caches (Last.fm & lyrics cache) Deletes as many files in the cache directories as possible. |
AlbumInfo |
getAlbum()
Gets the album. |
java.awt.Image |
getAlbumCover(AudioFile file)
Gets the album cover. |
java.util.List<AlbumInfo> |
getAlbums()
Gets the albums. |
java.util.Map<AudioFile,java.lang.String> |
getGenresForFiles(java.util.List<AudioFile> files)
Gets the genres for files. |
static ContextInformationServiceHandler |
getInstance()
Gets the single instance of AudioScrobblerServiceHandler. |
java.lang.String |
getLastAlbumRetrieved()
Gets the last album retrieved. |
java.lang.String |
getLastArtistRetrieved()
Gets the last artist retrieved. |
java.util.Map<AudioFile,java.lang.String> |
getTitlesForFiles(java.util.List<AudioFile> files)
Returns a hash of files with its songs titles. |
java.util.List<java.lang.String> |
getTrackNamesForAlbum(java.lang.String artistName,
java.lang.String albumName)
Gets the track names for album. |
java.util.Map<java.lang.String,java.lang.String> |
getUrlsForAddingLyrics(java.lang.String artist,
java.lang.String title)
Returns the url for adding new lyrics to a lyric provider |
void |
notifyAlbumRetrieved(AudioObject file,
long id)
Notify album retrieved. |
void |
notifyArtistImage(java.awt.Image img,
long id)
Notify artist image. |
void |
notifyCoverRetrieved(AlbumInfo alb,
java.awt.Image cover,
long id)
Notify cover retrieved. |
void |
notifyFinishGetSimilarArtist(ArtistInfo a,
java.awt.Image img,
long id)
Notify finish get similar artist. |
void |
notifyLyricsRetrieved(AudioObject audioObject,
Lyrics lyrics,
long id)
Notify lyrics retrieved. |
void |
notifyPodcast(PodcastFeedEntry podcast,
long id)
Notify podcast. |
void |
notifyRadio(Radio radio,
long id)
Notify radio. |
void |
notifyStartRetrievingArtistImages(long id)
Notify start retrieving artist images. |
void |
notifyStartRetrievingCovers(long id)
Notify start retrieving covers. |
void |
notifyWikiInfoRetrieved(java.lang.String wikiText,
java.lang.String wikiURL,
long id)
Notify wiki info retrieved. |
void |
retrieveInfoAndShowInPanel(AudioObject ao)
Updates panel with audio object information. |
void |
setAlbum(AlbumInfo album,
long id)
Sets the album. |
void |
setAlbums(java.util.List<? extends AlbumInfo> albums,
long id)
Sets the albums. |
void |
setImage(java.awt.Image image,
AudioObject ao,
long id)
Sets the image. |
void |
setLastAlbumRetrieved(java.lang.String lastAlbumRetrieved,
long id)
Sets the last album retrieved. |
void |
setLastArtistRetrieved(java.lang.String lastArtistRetrieved,
long id)
Sets the last artist retrieved. |
void |
submitNowPlayingInfoToLastFm(AudioFile audioFile)
Submit now playing info to Last.fm |
void |
submitToLastFm(AudioFile audioFile,
long secondsPlayed)
Submit song to Last.fm |
void |
updateService(ProxyBean proxy,
java.lang.String user,
java.lang.String password)
Update service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ContextInformationServiceHandler getInstance()
public void clear()
public void clearCaches()
Clears the caches (Last.fm & lyrics cache)
Deletes as many files in the cache directories as possible. Files that are currently used by aTunes won't be deleted.
public AlbumInfo getAlbum()
public java.awt.Image getAlbumCover(AudioFile file)
file
- the file
public java.util.List<AlbumInfo> getAlbums()
ContextInformationListener
getAlbums
in interface ContextInformationListener
public java.util.Map<AudioFile,java.lang.String> getGenresForFiles(java.util.List<AudioFile> files)
files
- the files
public java.lang.String getLastAlbumRetrieved()
public java.lang.String getLastArtistRetrieved()
public java.util.Map<AudioFile,java.lang.String> getTitlesForFiles(java.util.List<AudioFile> files)
files
- the files
public java.util.List<java.lang.String> getTrackNamesForAlbum(java.lang.String artistName, java.lang.String albumName)
artistName
- the artist namealbumName
- the album name
public java.util.Map<java.lang.String,java.lang.String> getUrlsForAddingLyrics(java.lang.String artist, java.lang.String title)
artist
- artisttitle
- title
public void notifyAlbumRetrieved(AudioObject file, long id)
ContextInformationListener
notifyAlbumRetrieved
in interface ContextInformationListener
file
- the fileid
- the idpublic void notifyArtistImage(java.awt.Image img, long id)
ContextInformationListener
notifyArtistImage
in interface ContextInformationListener
img
- the imgid
- the idpublic void notifyCoverRetrieved(AlbumInfo alb, java.awt.Image cover, long id)
ContextInformationListener
notifyCoverRetrieved
in interface ContextInformationListener
alb
- the albumcover
- the coverid
- the idpublic void notifyFinishGetSimilarArtist(ArtistInfo a, java.awt.Image img, long id)
ContextInformationListener
notifyFinishGetSimilarArtist
in interface ContextInformationListener
a
- the aimg
- the imgid
- the idpublic void notifyLyricsRetrieved(AudioObject audioObject, Lyrics lyrics, long id)
notifyLyricsRetrieved
in interface ContextInformationListener
audioObject
- the audio objectlyrics
- the lyricsid
- the idpublic void notifyPodcast(PodcastFeedEntry podcast, long id)
podcast
- the podcastid
- the idpublic void notifyRadio(Radio radio, long id)
radio
- the radioid
- the idpublic void notifyStartRetrievingArtistImages(long id)
ContextInformationListener
notifyStartRetrievingArtistImages
in interface ContextInformationListener
id
- the idpublic void notifyStartRetrievingCovers(long id)
ContextInformationListener
notifyStartRetrievingCovers
in interface ContextInformationListener
id
- the idpublic void notifyWikiInfoRetrieved(java.lang.String wikiText, java.lang.String wikiURL, long id)
ContextInformationListener
notifyWikiInfoRetrieved
in interface ContextInformationListener
wikiText
- the wiki textwikiURL
- the wiki urlid
- the idpublic void retrieveInfoAndShowInPanel(AudioObject ao)
ao
- the audio objectpublic void setAlbum(AlbumInfo album, long id)
ContextInformationListener
setAlbum
in interface ContextInformationListener
album
- the albumid
- the idpublic void setAlbums(java.util.List<? extends AlbumInfo> albums, long id)
ContextInformationListener
setAlbums
in interface ContextInformationListener
albums
- the albumid
- the idpublic void setImage(java.awt.Image image, AudioObject ao, long id)
ContextInformationListener
setImage
in interface ContextInformationListener
image
- the imgao
- audio objectid
- the idpublic void setLastAlbumRetrieved(java.lang.String lastAlbumRetrieved, long id)
ContextInformationListener
setLastAlbumRetrieved
in interface ContextInformationListener
lastAlbumRetrieved
- the albumid
- the idpublic void setLastArtistRetrieved(java.lang.String lastArtistRetrieved, long id)
ContextInformationListener
setLastArtistRetrieved
in interface ContextInformationListener
lastArtistRetrieved
- the artistid
- the idpublic void submitToLastFm(AudioFile audioFile, long secondsPlayed)
audioFile
- the filesecondsPlayed
- the seconds playedpublic void submitNowPlayingInfoToLastFm(AudioFile audioFile)
audioFile
- the filepublic void updateService(ProxyBean proxy, java.lang.String user, java.lang.String password)
proxy
- the proxyuser
- the userpassword
- the passwordpublic void applicationFinish()
applicationFinish
in interface ApplicationFinishListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |