Class IdentityManagerImpl

java.lang.Object
org.exoplatform.social.core.manager.IdentityManagerImpl
All Implemented Interfaces:
org.exoplatform.social.core.manager.IdentityManager

public class IdentityManagerImpl extends Object implements org.exoplatform.social.core.manager.IdentityManager
Class IdentityManagerImpl implements IdentityManager without caching.
Since:
Nov 24, 2010
Version:
1.2.0-GA
Author:
vien_levan
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Map<String,org.exoplatform.social.core.identity.IdentityProvider<?>>
    The identity providers
    protected org.exoplatform.social.core.storage.api.IdentityStorage
    The activityStorage
    protected org.exoplatform.social.core.profile.ProfileLifeCycle
    lifecycle for profile
    protected Map<String,org.exoplatform.social.core.profile.ProfileListener>
    The identity providers
    protected org.exoplatform.social.core.profileproperty.ProfilePropertyService
    The profile Property Settings Service
    protected org.exoplatform.social.core.manager.RelationshipManager
    The relationship manager

    Fields inherited from interface org.exoplatform.social.core.manager.IdentityManager

    DEFAULT_SORTING
  • Constructor Summary

    Constructors
    Constructor
    Description
    IdentityManagerImpl(org.exoplatform.social.core.storage.api.IdentityStorage identityStorage, org.exoplatform.social.core.identity.IdentityProvider<?> defaultIdentityProvider, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, org.exoplatform.container.xml.InitParams initParams)
    Instantiates a new identity manager.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addIdentityProvider(org.exoplatform.social.core.identity.IdentityProvider<?> idProvider)
    void
    addProfileListener(org.exoplatform.social.core.profile.ProfileListenerPlugin plugin)
     
    void
    deleteIdentity(org.exoplatform.social.core.identity.model.Identity identity)
     
    org.exoplatform.commons.file.model.FileItem
    getAvatarFile(org.exoplatform.social.core.identity.model.Identity identity)
    getAvatarInputStream(org.exoplatform.social.core.identity.model.Identity identity)
    getBannerInputStream(org.exoplatform.social.core.identity.model.Identity identity)
    List<org.exoplatform.social.core.identity.model.Identity>
    getConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity)
     
    org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity>
    getConnectionsWithListAccess(org.exoplatform.social.core.identity.model.Identity identity)
    org.exoplatform.social.core.search.Sorting
    List<org.exoplatform.social.core.identity.model.Identity>
    getIdentitiesByProfileFilter(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter)
     
    org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity>
    getIdentitiesByProfileFilter(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter, boolean forceLoadProfile)
    List<org.exoplatform.social.core.identity.model.Identity>
    getIdentitiesByProfileFilter(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit)
     
    List<org.exoplatform.social.core.identity.model.Identity>
    getIdentitiesByProfileFilter(org.exoplatform.social.core.profile.ProfileFilter profileFilter)
     
    List<org.exoplatform.social.core.identity.model.Identity>
    getIdentitiesByProfileFilter(org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit)
     
    long
     
    List<org.exoplatform.social.core.identity.model.Identity>
    getIdentitiesFilterByAlphaBet(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter)
     
    List<org.exoplatform.social.core.identity.model.Identity>
    getIdentitiesFilterByAlphaBet(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit)
     
    List<org.exoplatform.social.core.identity.model.Identity>
    getIdentitiesFilterByAlphaBet(org.exoplatform.social.core.profile.ProfileFilter profileFilter)
     
    org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity>
    getIdentitiesForUnifiedSearch(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter)
     
    org.exoplatform.social.core.identity.model.Identity
     
    org.exoplatform.social.core.identity.model.Identity
    getIdentity(String identityId, boolean forceLoadOrReloadProfile)
     
    org.exoplatform.social.core.identity.model.Identity
    getIdentity(String providerId, String remoteId, boolean loadProfile)
     
    <T> org.exoplatform.social.core.identity.IdentityProvider<T>
    Gets identityProvider.
    org.exoplatform.social.core.storage.api.IdentityStorage
     
    int
    List<org.exoplatform.social.core.identity.model.Identity>
    getLastIdentities(int limit)
    org.exoplatform.social.core.identity.model.Identity
    getOrCreateIdentity(String providerId, String remoteId)
     
    org.exoplatform.social.core.identity.model.Identity
    getOrCreateIdentity(String providerId, String remoteId, boolean forceLoadOrReloadProfile)
     
    org.exoplatform.social.core.identity.model.Profile
    getProfile(org.exoplatform.social.core.identity.model.Identity identity)
    org.exoplatform.social.core.manager.RelationshipManager
     
    org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity>
    getSpaceIdentityByProfileFilter(org.exoplatform.social.core.space.model.Space space, org.exoplatform.social.core.profile.ProfileFilter profileFilter, org.exoplatform.social.core.identity.SpaceMemberFilterListAccess.Type type, boolean forceLoadProfile)
    org.exoplatform.social.core.storage.api.IdentityStorage
     
    void
    hardDeleteIdentity(org.exoplatform.social.core.identity.model.Identity identity)
     
    boolean
    identityExisted(String providerId, String remoteId)
     
    void
    processEnabledIdentity(String remoteId, boolean isEnable)
     
    void
    registerIdentityProviders(org.exoplatform.social.core.identity.IdentityProviderPlugin plugin)
     
    void
    registerProfileListener(org.exoplatform.social.core.profile.ProfileListener listener)
     
    void
    registerProfileListener(org.exoplatform.social.core.profile.ProfileListenerPlugin profileListenerPlugin)
    void
    removeIdentityProvider(org.exoplatform.social.core.identity.IdentityProvider<?> identityProvider)
    void
    setIdentityStorage(org.exoplatform.social.core.storage.api.IdentityStorage identityStorage)
     
    sortIdentities(List<String> identityRemoteIds, String sortField, String sortDirection)
     
    sortIdentities(List<String> identityRemoteIds, String sortField, String sortDirection, boolean filterDisabled)
     
    void
    unregisterProfileListener(org.exoplatform.social.core.profile.ProfileListener listener)
     
    org.exoplatform.social.core.identity.model.Identity
    updateIdentity(org.exoplatform.social.core.identity.model.Identity identity)
    void
    updateProfile(org.exoplatform.social.core.identity.model.Profile existingProfile)
    void
    updateProfile(org.exoplatform.social.core.identity.model.Profile profile, boolean broadcastChanges)
     
    void
    updateProfile(org.exoplatform.social.core.identity.model.Profile specificProfile, String modifierUsername, boolean broadcastChanges)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.exoplatform.social.core.manager.IdentityManager

    getIdentity, getOrCreateGroupIdentity, getOrCreateSpaceIdentity, getOrCreateUserIdentity, saveIdentity, saveProfile, sortIdentities
  • Field Details

    • identityProviders

      protected Map<String,org.exoplatform.social.core.identity.IdentityProvider<?>> identityProviders
      The identity providers
    • profileListeners

      protected Map<String,org.exoplatform.social.core.profile.ProfileListener> profileListeners
      The identity providers
    • identityStorage

      protected org.exoplatform.social.core.storage.api.IdentityStorage identityStorage
      The activityStorage
    • relationshipManager

      protected org.exoplatform.social.core.manager.RelationshipManager relationshipManager
      The relationship manager
    • profilePropertyService

      protected org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService
      The profile Property Settings Service
    • profileLifeCycle

      protected org.exoplatform.social.core.profile.ProfileLifeCycle profileLifeCycle
      lifecycle for profile
  • Constructor Details

    • IdentityManagerImpl

      public IdentityManagerImpl(org.exoplatform.social.core.storage.api.IdentityStorage identityStorage, org.exoplatform.social.core.identity.IdentityProvider<?> defaultIdentityProvider, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, org.exoplatform.container.xml.InitParams initParams)
      Instantiates a new identity manager.
      Parameters:
      identityStorage -
      defaultIdentityProvider - the built-in default identity provider to use when no other provider matches
  • Method Details

    • getImageUploadLimit

      public int getImageUploadLimit()
      Specified by:
      getImageUploadLimit in interface org.exoplatform.social.core.manager.IdentityManager
    • getDefaultSorting

      public org.exoplatform.social.core.search.Sorting getDefaultSorting()
      Specified by:
      getDefaultSorting in interface org.exoplatform.social.core.manager.IdentityManager
    • getLastIdentities

      public List<org.exoplatform.social.core.identity.model.Identity> getLastIdentities(int limit)
      Specified by:
      getLastIdentities in interface org.exoplatform.social.core.manager.IdentityManager
    • getConnectionsWithListAccess

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity> getConnectionsWithListAccess(org.exoplatform.social.core.identity.model.Identity identity)
      Specified by:
      getConnectionsWithListAccess in interface org.exoplatform.social.core.manager.IdentityManager
    • getIdentitiesByProfileFilter

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity> getIdentitiesByProfileFilter(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter, boolean forceLoadProfile)
      Specified by:
      getIdentitiesByProfileFilter in interface org.exoplatform.social.core.manager.IdentityManager
    • getSpaceIdentityByProfileFilter

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity> getSpaceIdentityByProfileFilter(org.exoplatform.social.core.space.model.Space space, org.exoplatform.social.core.profile.ProfileFilter profileFilter, org.exoplatform.social.core.identity.SpaceMemberFilterListAccess.Type type, boolean forceLoadProfile)
      Specified by:
      getSpaceIdentityByProfileFilter in interface org.exoplatform.social.core.manager.IdentityManager
    • getDisabledSpaceMembers

      public List<String> getDisabledSpaceMembers(long spaceId)
      Specified by:
      getDisabledSpaceMembers in interface org.exoplatform.social.core.manager.IdentityManager
    • getProfile

      public org.exoplatform.social.core.identity.model.Profile getProfile(org.exoplatform.social.core.identity.model.Identity identity)
      Specified by:
      getProfile in interface org.exoplatform.social.core.manager.IdentityManager
    • getAvatarInputStream

      public InputStream getAvatarInputStream(org.exoplatform.social.core.identity.model.Identity identity) throws IOException
      Specified by:
      getAvatarInputStream in interface org.exoplatform.social.core.manager.IdentityManager
      Throws:
      IOException
    • getAvatarFile

      public org.exoplatform.commons.file.model.FileItem getAvatarFile(org.exoplatform.social.core.identity.model.Identity identity)
      Specified by:
      getAvatarFile in interface org.exoplatform.social.core.manager.IdentityManager
    • getBannerInputStream

      public InputStream getBannerInputStream(org.exoplatform.social.core.identity.model.Identity identity) throws IOException
      Specified by:
      getBannerInputStream in interface org.exoplatform.social.core.manager.IdentityManager
      Throws:
      IOException
    • updateProfile

      public void updateProfile(org.exoplatform.social.core.identity.model.Profile existingProfile)
      Specified by:
      updateProfile in interface org.exoplatform.social.core.manager.IdentityManager
    • updateProfile

      public void updateProfile(org.exoplatform.social.core.identity.model.Profile profile, boolean broadcastChanges)
      Specified by:
      updateProfile in interface org.exoplatform.social.core.manager.IdentityManager
    • updateProfile

      public void updateProfile(org.exoplatform.social.core.identity.model.Profile specificProfile, String modifierUsername, boolean broadcastChanges)
      Specified by:
      updateProfile in interface org.exoplatform.social.core.manager.IdentityManager
    • registerProfileListener

      public void registerProfileListener(org.exoplatform.social.core.profile.ProfileListenerPlugin profileListenerPlugin)
      Specified by:
      registerProfileListener in interface org.exoplatform.social.core.manager.IdentityManager
    • updateIdentity

      public org.exoplatform.social.core.identity.model.Identity updateIdentity(org.exoplatform.social.core.identity.model.Identity identity)
      Specified by:
      updateIdentity in interface org.exoplatform.social.core.manager.IdentityManager
    • addIdentityProvider

      public void addIdentityProvider(org.exoplatform.social.core.identity.IdentityProvider<?> idProvider)
      Specified by:
      addIdentityProvider in interface org.exoplatform.social.core.manager.IdentityManager
    • removeIdentityProvider

      public void removeIdentityProvider(org.exoplatform.social.core.identity.IdentityProvider<?> identityProvider)
      Specified by:
      removeIdentityProvider in interface org.exoplatform.social.core.manager.IdentityManager
    • deleteIdentity

      public void deleteIdentity(org.exoplatform.social.core.identity.model.Identity identity)
      Specified by:
      deleteIdentity in interface org.exoplatform.social.core.manager.IdentityManager
    • hardDeleteIdentity

      public void hardDeleteIdentity(org.exoplatform.social.core.identity.model.Identity identity)
      Specified by:
      hardDeleteIdentity in interface org.exoplatform.social.core.manager.IdentityManager
    • getConnections

      public List<org.exoplatform.social.core.identity.model.Identity> getConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity) throws Exception
      Specified by:
      getConnections in interface org.exoplatform.social.core.manager.IdentityManager
      Throws:
      Exception
    • getIdentitiesByProfileFilter

      public List<org.exoplatform.social.core.identity.model.Identity> getIdentitiesByProfileFilter(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter) throws Exception
      Specified by:
      getIdentitiesByProfileFilter in interface org.exoplatform.social.core.manager.IdentityManager
      Throws:
      Exception
    • getIdentitiesForUnifiedSearch

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity> getIdentitiesForUnifiedSearch(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter)
      Specified by:
      getIdentitiesForUnifiedSearch in interface org.exoplatform.social.core.manager.IdentityManager
    • getIdentitiesByProfileFilter

      public List<org.exoplatform.social.core.identity.model.Identity> getIdentitiesByProfileFilter(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit) throws Exception
      Specified by:
      getIdentitiesByProfileFilter in interface org.exoplatform.social.core.manager.IdentityManager
      Throws:
      Exception
    • getIdentitiesByProfileFilter

      public List<org.exoplatform.social.core.identity.model.Identity> getIdentitiesByProfileFilter(org.exoplatform.social.core.profile.ProfileFilter profileFilter) throws Exception
      Specified by:
      getIdentitiesByProfileFilter in interface org.exoplatform.social.core.manager.IdentityManager
      Throws:
      Exception
    • getIdentitiesByProfileFilter

      public List<org.exoplatform.social.core.identity.model.Identity> getIdentitiesByProfileFilter(org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit) throws Exception
      Specified by:
      getIdentitiesByProfileFilter in interface org.exoplatform.social.core.manager.IdentityManager
      Throws:
      Exception
    • getIdentitiesFilterByAlphaBet

      public List<org.exoplatform.social.core.identity.model.Identity> getIdentitiesFilterByAlphaBet(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter) throws Exception
      Specified by:
      getIdentitiesFilterByAlphaBet in interface org.exoplatform.social.core.manager.IdentityManager
      Throws:
      Exception
    • getIdentitiesFilterByAlphaBet

      public List<org.exoplatform.social.core.identity.model.Identity> getIdentitiesFilterByAlphaBet(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit) throws Exception
      Specified by:
      getIdentitiesFilterByAlphaBet in interface org.exoplatform.social.core.manager.IdentityManager
      Throws:
      Exception
    • getIdentitiesFilterByAlphaBet

      public List<org.exoplatform.social.core.identity.model.Identity> getIdentitiesFilterByAlphaBet(org.exoplatform.social.core.profile.ProfileFilter profileFilter) throws Exception
      Specified by:
      getIdentitiesFilterByAlphaBet in interface org.exoplatform.social.core.manager.IdentityManager
      Throws:
      Exception
    • getIdentity

      public org.exoplatform.social.core.identity.model.Identity getIdentity(String id)
      Specified by:
      getIdentity in interface org.exoplatform.social.core.manager.IdentityManager
    • getIdentitiesCount

      public long getIdentitiesCount(String providerId)
      Specified by:
      getIdentitiesCount in interface org.exoplatform.social.core.manager.IdentityManager
    • getIdentity

      public org.exoplatform.social.core.identity.model.Identity getIdentity(String identityId, boolean forceLoadOrReloadProfile)
      Specified by:
      getIdentity in interface org.exoplatform.social.core.manager.IdentityManager
    • getIdentity

      public org.exoplatform.social.core.identity.model.Identity getIdentity(String providerId, String remoteId, boolean loadProfile)
      Specified by:
      getIdentity in interface org.exoplatform.social.core.manager.IdentityManager
    • getOrCreateIdentity

      public org.exoplatform.social.core.identity.model.Identity getOrCreateIdentity(String providerId, String remoteId)
      Specified by:
      getOrCreateIdentity in interface org.exoplatform.social.core.manager.IdentityManager
    • getOrCreateIdentity

      public org.exoplatform.social.core.identity.model.Identity getOrCreateIdentity(String providerId, String remoteId, boolean forceLoadOrReloadProfile)
      Specified by:
      getOrCreateIdentity in interface org.exoplatform.social.core.manager.IdentityManager
    • identityExisted

      public boolean identityExisted(String providerId, String remoteId)
      Specified by:
      identityExisted in interface org.exoplatform.social.core.manager.IdentityManager
    • registerIdentityProviders

      public void registerIdentityProviders(org.exoplatform.social.core.identity.IdentityProviderPlugin plugin)
      Specified by:
      registerIdentityProviders in interface org.exoplatform.social.core.manager.IdentityManager
    • getIdentityProvider

      public <T> org.exoplatform.social.core.identity.IdentityProvider<T> getIdentityProvider(String providerId)
      Gets identityProvider.
      Parameters:
      providerId -
      Returns:
    • getIdentityStorage

      public org.exoplatform.social.core.storage.api.IdentityStorage getIdentityStorage()
      Specified by:
      getIdentityStorage in interface org.exoplatform.social.core.manager.IdentityManager
    • addProfileListener

      public void addProfileListener(org.exoplatform.social.core.profile.ProfileListenerPlugin plugin)
      Specified by:
      addProfileListener in interface org.exoplatform.social.core.manager.IdentityManager
    • registerProfileListener

      public void registerProfileListener(org.exoplatform.social.core.profile.ProfileListener listener)
      Specified by:
      registerProfileListener in interface org.exoplatform.social.core.manager.IdentityManager
    • unregisterProfileListener

      public void unregisterProfileListener(org.exoplatform.social.core.profile.ProfileListener listener)
      Specified by:
      unregisterProfileListener in interface org.exoplatform.social.core.manager.IdentityManager
    • processEnabledIdentity

      public void processEnabledIdentity(String remoteId, boolean isEnable)
      Specified by:
      processEnabledIdentity in interface org.exoplatform.social.core.manager.IdentityManager
    • sortIdentities

      public List<String> sortIdentities(List<String> identityRemoteIds, String sortField, String sortDirection, boolean filterDisabled)
      Specified by:
      sortIdentities in interface org.exoplatform.social.core.manager.IdentityManager
    • sortIdentities

      public List<String> sortIdentities(List<String> identityRemoteIds, String sortField, String sortDirection)
      Specified by:
      sortIdentities in interface org.exoplatform.social.core.manager.IdentityManager
    • getStorage

      public org.exoplatform.social.core.storage.api.IdentityStorage getStorage()
      Specified by:
      getStorage in interface org.exoplatform.social.core.manager.IdentityManager
    • setIdentityStorage

      public void setIdentityStorage(org.exoplatform.social.core.storage.api.IdentityStorage identityStorage)
    • getRelationshipManager

      public org.exoplatform.social.core.manager.RelationshipManager getRelationshipManager()