org.springframework.social.connect
Class ConnectionKey

java.lang.Object
  extended by org.springframework.social.connect.ConnectionKey

public final class ConnectionKey
extends java.lang.Object

The unique business key for a ServiceProviderConnection instance. A composite key that consists of the providerId (e.g. "facebook") plus providerUserId (e.g. "125660"). Provides the basis for connection equals() and hashCode().


Constructor Summary
ConnectionKey(java.lang.String providerId, java.lang.String providerUserId)
          Creates a new ServiceProviderConnectionKey.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getProviderId()
          The id of the provider as it is registered in the system.
 java.lang.String getProviderUserId()
          The id of the external provider user representing the remote end of the connection.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionKey

public ConnectionKey(java.lang.String providerId,
                     java.lang.String providerUserId)
Creates a new ServiceProviderConnectionKey.

Parameters:
providerId - the id of the provider e.g. facebook
providerUserId - id of the provider user account e.g. '125660'
Method Detail

getProviderId

public java.lang.String getProviderId()
The id of the provider as it is registered in the system. This value should never change. Never null.


getProviderUserId

public java.lang.String getProviderUserId()
The id of the external provider user representing the remote end of the connection. May be null if this information is not exposed by the provider. This value should never change. Must be present to support sign-in by the provider user. Must be present to establish multiple connections with the provider.


equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object