Spring Social

org.springframework.social.connect
Class ConnectionKey

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

public final class ConnectionKey
extends java.lang.Object
implements java.io.Serializable

The unique business key for a Connection 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().

Author:
Keith Donald
See Also:
Serialized Form

Constructor Summary
ConnectionKey(java.lang.String providerId, java.lang.String providerUserId)
          Creates a new ConnectionKey.
 
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()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectionKey

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

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Spring Social