org.springframework.social.facebook.api.impl
Class MusicActionsTemplate

java.lang.Object
  extended by org.springframework.social.facebook.api.impl.MusicActionsTemplate
All Implemented Interfaces:
MusicActions

public class MusicActionsTemplate
extends Object
implements MusicActions


Constructor Summary
MusicActionsTemplate(OpenGraphOperations openGraphOperations)
           
 
Method Summary
 String createPlaylist(String playlistUrl)
          Publishes a "music.playlists" action (indicating that a playlist was created) for the OpenGraph playlist object at the given URL.
 String createPlaylist(String playlistUrl, ActionMetadata metadata)
          Publishes a "music.playlists" action (indicating that a playlist was created) for the OpenGraph playlist object at the given URL.
 String listen(String objectType, String url, ActionMetadata metadata)
          Publishes a "music.listens" action for the OpenGraph object at the given URL.
 String listenToAlbum(String albumUrl)
          Publishes a "music.listens" action for the OpenGraph album object at the given URL.
 String listenToAlbum(String albumUrl, ActionMetadata metadata)
          Publishes a "music.listens" action for the OpenGraph album object at the given URL.
 String listenToMusician(String musicianUrl)
          Publishes a "music.listens" action for the OpenGraph musician object at the given URL.
 String listenToMusician(String musicianUrl, ActionMetadata metadata)
          Publishes a "music.listens" action for the OpenGraph musician object at the given URL.
 String listenToPlaylist(String playlistUrl)
          Publishes a "music.listens" action for the OpenGraph playlist object at the given URL.
 String listenToPlaylist(String playlistUrl, ActionMetadata metadata)
          Publishes a "music.listens" action for the OpenGraph playlist object at the given URL.
 String listenToRadioStation(String radioStationUrl)
          Publishes a "music.listens" action for the OpenGraph radio station object at the given URL.
 String listenToRadioStation(String radioStationUrl, ActionMetadata metadata)
          Publishes a "music.listens" action for the OpenGraph radio station object at the given URL.
 String listenToSong(String songUrl)
          Publishes a "music.listens" action for the OpenGraph song object at the given URL.
 String listenToSong(String songUrl, ActionMetadata metadata)
          Publishes a "music.listens" action for the OpenGraph song object at the given URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MusicActionsTemplate

public MusicActionsTemplate(OpenGraphOperations openGraphOperations)
Method Detail

listenToSong

public String listenToSong(String songUrl)
Description copied from interface: MusicActions
Publishes a "music.listens" action for the OpenGraph song object at the given URL.

Specified by:
listenToSong in interface MusicActions
Parameters:
songUrl - The URL of the song that was listened to. Must reference an OpenGraph object of type "music.song".
Returns:
The ID for the action created.

listenToSong

public String listenToSong(String songUrl,
                           ActionMetadata metadata)
Description copied from interface: MusicActions
Publishes a "music.listens" action for the OpenGraph song object at the given URL.

Specified by:
listenToSong in interface MusicActions
Parameters:
songUrl - The URL of the song that was listened to. Must reference an OpenGraph object of type "music.song".
metadata - Action metadata to be applied to the action.
Returns:
The ID for the action created.

listenToAlbum

public String listenToAlbum(String albumUrl)
Description copied from interface: MusicActions
Publishes a "music.listens" action for the OpenGraph album object at the given URL.

Specified by:
listenToAlbum in interface MusicActions
Parameters:
albumUrl - The URL of the album that was listened to. Must reference an OpenGraph object of type "music.album".
Returns:
The ID for the action created.

listenToAlbum

public String listenToAlbum(String albumUrl,
                            ActionMetadata metadata)
Description copied from interface: MusicActions
Publishes a "music.listens" action for the OpenGraph album object at the given URL.

Specified by:
listenToAlbum in interface MusicActions
Parameters:
albumUrl - The URL of the album that was listened to. Must reference an OpenGraph object of type "music.album".
metadata - Action metadata to be applied to the action.
Returns:
The ID for the action created.

listenToMusician

public String listenToMusician(String musicianUrl)
Description copied from interface: MusicActions
Publishes a "music.listens" action for the OpenGraph musician object at the given URL.

Specified by:
listenToMusician in interface MusicActions
Parameters:
musicianUrl - The profile URL of the musician that was listened to. Must reference an OpenGraph object of type "profile".
Returns:
The ID for the action created.

listenToMusician

public String listenToMusician(String musicianUrl,
                               ActionMetadata metadata)
Description copied from interface: MusicActions
Publishes a "music.listens" action for the OpenGraph musician object at the given URL.

Specified by:
listenToMusician in interface MusicActions
Parameters:
musicianUrl - The profile URL of the musician that was listened to. Must reference an OpenGraph object of type "profile".
metadata - Action metadata to be applied to the action.
Returns:
The ID for the action created.

listenToRadioStation

public String listenToRadioStation(String radioStationUrl)
Description copied from interface: MusicActions
Publishes a "music.listens" action for the OpenGraph radio station object at the given URL.

Specified by:
listenToRadioStation in interface MusicActions
Parameters:
radioStationUrl - The URL of the radio station that was listened to. Must reference an OpenGraph object of type "music.radio_station".
Returns:
The ID for the action created.

listenToRadioStation

public String listenToRadioStation(String radioStationUrl,
                                   ActionMetadata metadata)
Description copied from interface: MusicActions
Publishes a "music.listens" action for the OpenGraph radio station object at the given URL.

Specified by:
listenToRadioStation in interface MusicActions
Parameters:
radioStationUrl - The URL of the radio station that was listened to. Must reference an OpenGraph object of type "music.radio_station".
metadata - Action metadata to be applied to the action.
Returns:
The ID for the action created.

listenToPlaylist

public String listenToPlaylist(String playlistUrl)
Description copied from interface: MusicActions
Publishes a "music.listens" action for the OpenGraph playlist object at the given URL.

Specified by:
listenToPlaylist in interface MusicActions
Parameters:
playlistUrl - The URL of the playlist that was listened to. Must reference an OpenGraph object of type "music.playlist".
Returns:
The ID for the action created.

listenToPlaylist

public String listenToPlaylist(String playlistUrl,
                               ActionMetadata metadata)
Description copied from interface: MusicActions
Publishes a "music.listens" action for the OpenGraph playlist object at the given URL.

Specified by:
listenToPlaylist in interface MusicActions
Parameters:
playlistUrl - The URL of the playlist that was listened to. Must reference an OpenGraph object of type "music.playlist".
metadata - Action metadata to be applied to the action.
Returns:
The ID for the action created.

listen

public String listen(String objectType,
                     String url,
                     ActionMetadata metadata)
Description copied from interface: MusicActions
Publishes a "music.listens" action for the OpenGraph object at the given URL. This is a lower level and more generic method for creating "music.listens" actions that aren't covered by the more specific listenToXXX() methods. It allows for the possibility that Facebook may add additional types that may be listened to beyond those currently supported.

Specified by:
listen in interface MusicActions
Parameters:
objectType - The type of object being listened to. E.g., "song", "album", "musician", "radio_station", or "playlist".
url - The URL of the object being listened to.
metadata - Action metadata to be applied to the action.
Returns:
The ID for the action created.

createPlaylist

public String createPlaylist(String playlistUrl)
Description copied from interface: MusicActions
Publishes a "music.playlists" action (indicating that a playlist was created) for the OpenGraph playlist object at the given URL.

Specified by:
createPlaylist in interface MusicActions
Parameters:
playlistUrl - The URL of the playlist that was created. Must reference an OpenGraph object of type "music.playlist".
Returns:
The ID for the action created.

createPlaylist

public String createPlaylist(String playlistUrl,
                             ActionMetadata metadata)
Description copied from interface: MusicActions
Publishes a "music.playlists" action (indicating that a playlist was created) for the OpenGraph playlist object at the given URL.

Specified by:
createPlaylist in interface MusicActions
Parameters:
playlistUrl - The URL of the playlist that was created. Must reference an OpenGraph object of type "music.playlist".
metadata - Action metadata to be applied to the action.
Returns:
The ID for the action created.