org.springframework.social.linkedin.connect
Class LinkedInApiAdapter

java.lang.Object
  extended by org.springframework.social.linkedin.connect.LinkedInApiAdapter
All Implemented Interfaces:
ApiAdapter<LinkedInApi>

public class LinkedInApiAdapter
extends java.lang.Object
implements ApiAdapter<LinkedInApi>

LinkedIn ApiAdapter implementation.


Constructor Summary
LinkedInApiAdapter()
           
 
Method Summary
 UserProfile fetchUserProfile(LinkedInApi api)
          Implements Connection.fetchUserProfile() for connections to the given API.
 void setConnectionValues(LinkedInApi api, ConnectionValues values)
          Sets values for ConnectionKey.getProviderUserId(), Connection.getDisplayName(), Connection.getProfileUrl(), and Connection.getImageUrl() for connections to the given API.
 boolean test(LinkedInApi api)
          Implements Connection.test() for connections to the given API.
 void updateStatus(LinkedInApi 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

LinkedInApiAdapter

public LinkedInApiAdapter()
Method Detail

test

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

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

setConnectionValues

public void setConnectionValues(LinkedInApi 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<LinkedInApi>
Parameters:
api - the API binding
values - the connection values to set

fetchUserProfile

public UserProfile fetchUserProfile(LinkedInApi 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<LinkedInApi>
Parameters:
api - the API binding
Returns:
the service provider user profile
See Also:
UserProfileBuilder

updateStatus

public void updateStatus(LinkedInApi 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<LinkedInApi>
Parameters:
api - the API binding
message - the status message