Spring Social

org.springframework.social.connect
Class ConnectionData

java.lang.Object
  extended by org.springframework.social.connect.ConnectionData
All Implemented Interfaces:
java.io.Serializable

public class ConnectionData
extends java.lang.Object
implements java.io.Serializable

A data transfer object that allows the internal state of a Connection to be persisted and transferred between layers of an application. Some fields may be null depending on the specific type of Connection. For example, an OAuth2Connection has a null 'secret' field while an OAuth1Connection has null 'refreshToken' and 'expireTime' fields.

Author:
Keith Donald
See Also:
Connection.createData(), Serialized Form

Constructor Summary
ConnectionData(java.lang.String providerId, java.lang.String providerUserId, java.lang.String displayName, java.lang.String profileUrl, java.lang.String imageUrl, java.lang.String accessToken, java.lang.String secret, java.lang.String refreshToken, java.lang.Long expireTime)
           
 
Method Summary
 java.lang.String getAccessToken()
          The access token required to make authorized API calls.
 java.lang.String getDisplayName()
          A display name for the connection.
 java.lang.Long getExpireTime()
          The time the connection expires.
 java.lang.String getImageUrl()
          An image visualizing the connection.
 java.lang.String getProfileUrl()
          A link to the provider's user profile page.
 java.lang.String getProviderId()
          The id of the provider the connection is associated with.
 java.lang.String getProviderUserId()
          The id of the provider user this connection is connected to.
 java.lang.String getRefreshToken()
          A token use to renew this connection.
 java.lang.String getSecret()
          The secret token needed to make authorized API calls.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionData

public ConnectionData(java.lang.String providerId,
                      java.lang.String providerUserId,
                      java.lang.String displayName,
                      java.lang.String profileUrl,
                      java.lang.String imageUrl,
                      java.lang.String accessToken,
                      java.lang.String secret,
                      java.lang.String refreshToken,
                      java.lang.Long expireTime)
Method Detail

getProviderId

public java.lang.String getProviderId()
The id of the provider the connection is associated with.


getProviderUserId

public java.lang.String getProviderUserId()
The id of the provider user this connection is connected to.


getDisplayName

public java.lang.String getDisplayName()
A display name for the connection.


getProfileUrl

public java.lang.String getProfileUrl()
A link to the provider's user profile page.


getImageUrl

public java.lang.String getImageUrl()
An image visualizing the connection.


getAccessToken

public java.lang.String getAccessToken()
The access token required to make authorized API calls.


getSecret

public java.lang.String getSecret()
The secret token needed to make authorized API calls. Required for OAuth1-based connections.


getRefreshToken

public java.lang.String getRefreshToken()
A token use to renew this connection. Optional. Always null for OAuth1-based connections.


getExpireTime

public java.lang.Long getExpireTime()
The time the connection expires. Optional. Always null for OAuth1-based connections.


Spring Social