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

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

public class BookActionsTemplate
extends Object
implements BookActions


Constructor Summary
BookActionsTemplate(OpenGraphOperations openGraphOperations)
           
 
Method Summary
 String quoteBook(String bookUrl, String quote)
          Publishes a "books.quotes" action for the OpenGraph book object at the given URL.
 String quoteBook(String bookUrl, String quote, ActionMetadata metadata)
          Publishes a "books.quotes" action for the OpenGraph book object at the given URL.
 String rateBook(String bookUrl, float rating, int scale)
          Publishes a "books.rates" action for the OpenGraph book object at the given URL.
 String rateBook(String bookUrl, float rating, int scale, ActionMetadata metadata)
          Publishes a "books.rates" action for the OpenGraph book object at the given URL.
 String readBook(String bookUrl, long timestamp, float percentComplete)
          Publishes a "books.reads" action for the OpenGraph book object at the given URL.
 String readBook(String bookUrl, long timestamp, float percentComplete, ActionMetadata metadata)
          Publishes a "books.reads" action for the OpenGraph book object at the given URL.
 String wantsToRead(String bookUrl)
          Publishes a "books.wants_to_read" action for the OpenGraph book object at the given URL.
 String wantsToRead(String bookUrl, ActionMetadata metadata)
          Publishes a "books.wants_to_read" action for the OpenGraph book 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

BookActionsTemplate

public BookActionsTemplate(OpenGraphOperations openGraphOperations)
Method Detail

readBook

public String readBook(String bookUrl,
                       long timestamp,
                       float percentComplete)
Description copied from interface: BookActions
Publishes a "books.reads" action for the OpenGraph book object at the given URL.

Specified by:
readBook in interface BookActions
Parameters:
bookUrl - The URL of the book that is being read. Must reference an OpenGraph object of type "books.book".
timestamp - The time that the book was read.
percentComplete - The percentage of the book that has been read.
Returns:
The ID for the action created.

readBook

public String readBook(String bookUrl,
                       long timestamp,
                       float percentComplete,
                       ActionMetadata metadata)
Description copied from interface: BookActions
Publishes a "books.reads" action for the OpenGraph book object at the given URL.

Specified by:
readBook in interface BookActions
Parameters:
bookUrl - The URL of the book that is being read. Must reference an OpenGraph object of type "books.book".
timestamp - The time that the book was read.
percentComplete - The percentage of the book that has been read.
metadata - Action metadata to be applied to the action.
Returns:
The ID for the action created.

quoteBook

public String quoteBook(String bookUrl,
                        String quote)
Description copied from interface: BookActions
Publishes a "books.quotes" action for the OpenGraph book object at the given URL.

Specified by:
quoteBook in interface BookActions
Parameters:
bookUrl - The URL of the book that is being quoted. Must reference an OpenGraph object of type "books.book".
quote - The quote from the book.
Returns:
The ID for the action created.

quoteBook

public String quoteBook(String bookUrl,
                        String quote,
                        ActionMetadata metadata)
Description copied from interface: BookActions
Publishes a "books.quotes" action for the OpenGraph book object at the given URL.

Specified by:
quoteBook in interface BookActions
Parameters:
bookUrl - The URL of the book that is being quoted. Must reference an OpenGraph object of type "books.book".
quote - The quote from the book.
metadata - Action metadata to be applied to the action.
Returns:
The ID for the action created.

wantsToRead

public String wantsToRead(String bookUrl)
Description copied from interface: BookActions
Publishes a "books.wants_to_read" action for the OpenGraph book object at the given URL.

Specified by:
wantsToRead in interface BookActions
Parameters:
bookUrl - The URL of the book that is wanted to be read. Must reference an OpenGraph object of type "books.book".
Returns:
The ID for the action created.

wantsToRead

public String wantsToRead(String bookUrl,
                          ActionMetadata metadata)
Description copied from interface: BookActions
Publishes a "books.wants_to_read" action for the OpenGraph book object at the given URL.

Specified by:
wantsToRead in interface BookActions
Parameters:
bookUrl - The URL of the book that is wanted to be read. Must reference an OpenGraph object of type "books.book".
metadata - Action metadata to be applied to the action.
Returns:
The ID for the action created.

rateBook

public String rateBook(String bookUrl,
                       float rating,
                       int scale)
Description copied from interface: BookActions
Publishes a "books.rates" action for the OpenGraph book object at the given URL.

Specified by:
rateBook in interface BookActions
Parameters:
bookUrl - The URL of the book that is being rated. Must reference an OpenGraph object of type "books.book".
rating - The rating given to the book, relative to the scale attribute. (e.g., "{rating} out of {scale} stars")
scale - The maximum rating possible.
Returns:
The ID for the action created.

rateBook

public String rateBook(String bookUrl,
                       float rating,
                       int scale,
                       ActionMetadata metadata)
Description copied from interface: BookActions
Publishes a "books.rates" action for the OpenGraph book object at the given URL.

Specified by:
rateBook in interface BookActions
Parameters:
bookUrl - The URL of the book that is being rated. Must reference an OpenGraph object of type "books.book".
rating - The rating given to the book, relative to the scale attribute. (e.g., "{rating} out of {scale} stars")
scale - The maximum rating possible.
metadata - Action metadata to be applied to the action. May be an instance of RatingActionMetadata to apply review text and/or a review link to the rating.
Returns:
The ID for the action created.