org.springframework.social.gowalla.connect
Class GowallaApiAdapter

java.lang.Object
  extended by org.springframework.social.gowalla.connect.GowallaApiAdapter
All Implemented Interfaces:
ApiAdapter<GowallaApi>

public class GowallaApiAdapter
extends java.lang.Object
implements ApiAdapter<GowallaApi>

Gowalla ApiAdapter implementation.


Constructor Summary
GowallaApiAdapter()
           
 
Method Summary
 UserProfile fetchUserProfile(GowallaApi api)
          Implements Connection.fetchUserProfile() for connections to the given API.
 void setConnectionValues(GowallaApi api, ConnectionValues values)
          Sets values for ConnectionKey.getProviderUserId(), Connection.getDisplayName(), Connection.getProfileUrl(), and Connection.getImageUrl() for connections to the given API.
 boolean test(GowallaApi api)
          Implements Connection.test() for connections to the given API.
 void updateStatus(GowallaApi api, java.lang.String message)
          Implements Connection.updateStatus(String) for connections to the given API.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GowallaApiAdapter

public GowallaApiAdapter()
Method Detail

test

public boolean test(GowallaApi api)
Description copied from interface: ApiAdapter
Implements Connection.test() for connections to the given API.

Specified by:
test in interface ApiAdapter<GowallaApi>
Parameters:
api - the API binding
Returns:
true if the API is functional, false if not

setConnectionValues

public void setConnectionValues(GowallaApi api,
                                ConnectionValues values)
Description copied from interface: ApiAdapter
Sets values for ConnectionKey.getProviderUserId(), Connection.getDisplayName(), Connection.getProfileUrl(), and Connection.getImageUrl() for connections to the given API.

Specified by:
setConnectionValues in interface ApiAdapter<GowallaApi>
Parameters:
api - the API binding
values - the connection values to set

fetchUserProfile

public UserProfile fetchUserProfile(GowallaApi api)
Description copied from interface: ApiAdapter
Implements Connection.fetchUserProfile() for connections to the given API. Should never return null. If the provider's API does not expose user profile data, this method should return UserProfile.EMPTY.

Specified by:
fetchUserProfile in interface ApiAdapter<GowallaApi>
Parameters:
api - the API binding
Returns:
the service provider user profile
See Also:
UserProfileBuilder

updateStatus

public void updateStatus(GowallaApi api,
                         java.lang.String message)
Description copied from interface: ApiAdapter
Implements Connection.updateStatus(String) for connections to the given API. If the provider does not have a status concept calling this method should have no effect.

Specified by:
updateStatus in interface ApiAdapter<GowallaApi>
Parameters:
api - the API binding
message - the status message