A
- a strongly-typed binding to the service provider's APIpublic interface Connection<A> extends Serializable
access user profile information
and update user status
.Modifier and Type | Method and Description |
---|---|
ConnectionData |
createData()
Creates a data transfer object that can be used to persist the state of this connection.
|
UserProfile |
fetchUserProfile()
Fetch a normalized model of the user's profile on the provider system.
|
A |
getApi()
A Java binding to the service provider's native API.
|
String |
getDisplayName()
A display name or label for this connection.
|
String |
getImageUrl()
A link to a image that visualizes this connection.
|
ConnectionKey |
getKey()
The key identifying this connection.
|
String |
getProfileUrl()
The public URL of the connected user's profile at the provider's site.
|
boolean |
hasExpired()
Returns true if this connection has expired.
|
void |
refresh()
Refresh this connection.
|
void |
sync()
Sync's this connection object with the current state of the external user's profile.
|
boolean |
test()
Test this connection.
|
void |
updateStatus(String message)
Update the user's status on the provider's system.
|
ConnectionKey getKey()
String getDisplayName()
sync()
String getProfileUrl()
sync()
String getImageUrl()
sync()
void sync()
boolean test()
api
will fail.
Used to proactively test authorization credentials such as an API access token before invoking the service API.boolean hasExpired()
test()
return false, and any service API invocations fail.
If expired, you may call refresh()
to renew the connection.
Not supported by all Connection implementations; always returns false if not supported.void refresh()
hasExpired()
returns false.
Not supported by all connection implementations; if not supported, this method is a no-op.UserProfile fetchUserProfile()
void updateStatus(String message)
message
- the status messageA getApi()
ConnectionData createData()