org.jboss.seam.social.twitter.jackson
Class TwitterServiceJackson

java.lang.Object
  extended by org.jboss.seam.social.OAuthServiceBase
      extended by org.jboss.seam.social.OAuthServiceJackson
          extended by org.jboss.seam.social.twitter.jackson.TwitterServiceJackson
All Implemented Interfaces:
Serializable, org.jboss.seam.social.HasStatus, org.jboss.seam.social.oauth.OAuthService, org.jboss.seam.social.rest.RestService, TwitterService

public class TwitterServiceJackson
extends org.jboss.seam.social.OAuthServiceJackson
implements TwitterService

Author:
Antoine Sabot-Durand
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.seam.social.OAuthServiceJackson
jsonMapper
 
Fields inherited from class org.jboss.seam.social.OAuthServiceBase
ip, myProfile, sessionSettings, socialConfig
 
Constructor Summary
TwitterServiceJackson()
           
 
Method Summary
protected  org.codehaus.jackson.map.Module getJacksonModule()
           
 TwitterProfile getMyProfile()
          Retrieves the authenticated user's Twitter profile details.
 String getProfileId()
          Retrieves the authenticated user's Twitter ID.
 String getScreenName()
          Retrieves the authenticated user's Twitter screen name
 String getServiceLogo()
           
 List<SuggestionCategory> getSuggestionCategories()
          Retrieves a list of categories from which suggested users to follow may be found.
 List<TwitterProfile> getSuggestions(String slug)
          Retrieves a list of suggestions of users to follow for a given category.
 TwitterProfile getUserProfile(long userId)
          Retrieves a specific user's Twitter profile details.
 TwitterProfile getUserProfile(String screenName)
          Retrieves a specific user's Twitter profile details.
 List<TwitterProfile> getUsers(Long... userIds)
          Retrieves a list of Twitter profiles for the given list of user IDs.
 List<TwitterProfile> getUsers(String... screenNames)
          Retrieves a list of Twitter profiles for the given list of screen names.
protected  void initMyProfile()
           
 List<TwitterProfile> searchForUsers(String query)
          Searches for users that match a given query.
 Tweet updateStatus()
           
 Tweet updateStatus(String message)
           
 
Methods inherited from class org.jboss.seam.social.OAuthServiceJackson
init
 
Methods inherited from class org.jboss.seam.social.OAuthServiceBase
equals, getAccessToken, getAuthorizationUrl, getName, getQualifier, getRequestToken, getSession, getSettings, getStatus, getType, getVerifier, getVerifierParamName, hashCode, initAccessToken, isConnected, requireAuthorization, resetConnection, sendSignedRequest, sendSignedRequest, sendSignedRequest, sendSignedRequest, sendSignedXmlRequest, setAccessToken, setAccessToken, setSession, setSettings, setStatus, setVerifier, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.seam.social.oauth.OAuthService
getAccessToken, getAuthorizationUrl, getSession, getSettings, getVerifier, getVerifierParamName, initAccessToken, sendSignedRequest, sendSignedRequest, sendSignedRequest, sendSignedXmlRequest, setAccessToken, setAccessToken, setSession, setSettings, setVerifier
 
Methods inherited from interface org.jboss.seam.social.rest.RestService
getName, getQualifier, getType, isConnected, resetConnection
 
Methods inherited from interface org.jboss.seam.social.HasStatus
getStatus, setStatus
 

Constructor Detail

TwitterServiceJackson

public TwitterServiceJackson()
Method Detail

updateStatus

public Tweet updateStatus(String message)
Specified by:
updateStatus in interface org.jboss.seam.social.HasStatus

getServiceLogo

public String getServiceLogo()
Specified by:
getServiceLogo in interface org.jboss.seam.social.rest.RestService

updateStatus

public Tweet updateStatus()
Specified by:
updateStatus in interface org.jboss.seam.social.HasStatus

getProfileId

public String getProfileId()
Description copied from interface: TwitterService
Retrieves the authenticated user's Twitter ID.

Specified by:
getProfileId in interface TwitterService
Returns:
the user's ID at Twitter

getScreenName

public String getScreenName()
Description copied from interface: TwitterService
Retrieves the authenticated user's Twitter screen name

Specified by:
getScreenName in interface TwitterService
Returns:
the user's screen name

getMyProfile

public TwitterProfile getMyProfile()
Description copied from interface: TwitterService
Retrieves the authenticated user's Twitter profile details.

Specified by:
getMyProfile in interface org.jboss.seam.social.rest.RestService
Specified by:
getMyProfile in interface TwitterService
Overrides:
getMyProfile in class org.jboss.seam.social.OAuthServiceBase
Returns:
a TwitterProfile object representing the user's profile.

getUserProfile

public TwitterProfile getUserProfile(String screenName)
Description copied from interface: TwitterService
Retrieves a specific user's Twitter profile details. Note that this method does not require authentication.

Specified by:
getUserProfile in interface TwitterService
Parameters:
screenName - the screen name for the user whose details are to be retrieved.
Returns:
a TwitterProfile object representing the user's profile.

getUserProfile

public TwitterProfile getUserProfile(long userId)
Description copied from interface: TwitterService
Retrieves a specific user's Twitter profile details. Note that this method does not require authentication.

Specified by:
getUserProfile in interface TwitterService
Parameters:
userId - the user ID for the user whose details are to be retrieved.
Returns:
a TwitterProfile object representing the user's profile.

getUsers

public List<TwitterProfile> getUsers(Long... userIds)
Description copied from interface: TwitterService
Retrieves a list of Twitter profiles for the given list of user IDs.

Specified by:
getUsers in interface TwitterService

getUsers

public List<TwitterProfile> getUsers(String... screenNames)
Description copied from interface: TwitterService
Retrieves a list of Twitter profiles for the given list of screen names.

Specified by:
getUsers in interface TwitterService

searchForUsers

public List<TwitterProfile> searchForUsers(String query)
Description copied from interface: TwitterService
Searches for users that match a given query.

Specified by:
searchForUsers in interface TwitterService

getSuggestionCategories

public List<SuggestionCategory> getSuggestionCategories()
Description copied from interface: TwitterService
Retrieves a list of categories from which suggested users to follow may be found.

Specified by:
getSuggestionCategories in interface TwitterService

getSuggestions

public List<TwitterProfile> getSuggestions(String slug)
Description copied from interface: TwitterService
Retrieves a list of suggestions of users to follow for a given category.

Specified by:
getSuggestions in interface TwitterService
Parameters:
slug - the category's slug

initMyProfile

protected void initMyProfile()
Specified by:
initMyProfile in class org.jboss.seam.social.OAuthServiceBase

getJacksonModule

protected org.codehaus.jackson.map.Module getJacksonModule()
Specified by:
getJacksonModule in class org.jboss.seam.social.OAuthServiceJackson


Copyright © 2011 Seam Framework. All Rights Reserved.