Class IdentityProvider<T>

java.lang.Object
org.exoplatform.social.core.identity.IdentityProvider<T>

public abstract class IdentityProvider<T> extends Object
An identity provider represent a service that can serve identity it can be eXo CS contact manager or a CRM tool for example.
  • Constructor Details

    • IdentityProvider

      public IdentityProvider()
  • Method Details

    • getIdentityByRemoteId

      public Identity getIdentityByRemoteId(String remoteId)
      The identifier can be the URL of the profile or if it's a CS contact manager contact, it will be the UID of the contact
      Parameters:
      remoteId -
      Returns:
      null if nothing is found, or the Identity object
    • getName

      public abstract String getName()
      Name for this provider. Must be unique among the registered providers.
      Returns:
    • findByRemoteId

      public abstract T findByRemoteId(String remoteId)
      Finds the remote object for an identity by ID.
      Parameters:
      remoteId - id of the remote object
      Returns:
    • createIdentity

      public abstract Identity createIdentity(T remoteObject)
      Creates a new identity for a given remote object
      Parameters:
      remoteObject - the remote object for the identity holding the profile
      Returns:
      an new Identity object with name and remote id set
    • populateProfile

      public abstract void populateProfile(Profile profile, T remoteObject)
      Populate an identity profile for a given remote object
      Parameters:
      profile - the profile to be populated
      remoteObject - the remote object for the identity holding the profile
    • onSaveIdentity

      public void onSaveIdentity(Identity identity)
      this method is called after the IdentityManager has saved the identity object.
      Parameters:
      identity - the identity
    • onSaveProfile

      @Deprecated public void onSaveProfile(Profile profile)
      Deprecated.
      Will be removed by 1.3.x
      This method is called after the IdentityManager have saved the profile object.
      Parameters:
      profile -
    • onUpdateProfile

      public void onUpdateProfile(Profile profile)
      This method is called after the IdentityManager updated the profile object.
      Parameters:
      profile -
      Since:
      1.2.0-GA
    • getAllUserId

      @Deprecated public List<String> getAllUserId()
      Deprecated.
      Will be removed by 1.3.x
      Gets the list of string containing the remote ids.
      Returns:
      the string list containing remote ids