Class CachedIdentityStorage

java.lang.Object
org.exoplatform.social.core.storage.cache.CachedIdentityStorage
All Implemented Interfaces:
org.exoplatform.social.core.storage.api.IdentityStorage

public class CachedIdentityStorage extends Object implements org.exoplatform.social.core.storage.api.IdentityStorage
Cache support for IdentityStorage.
  • Constructor Details

  • Method Details

    • saveIdentity

      public void saveIdentity(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      saveIdentity in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • updateIdentity

      public org.exoplatform.social.core.identity.model.Identity updateIdentity(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      updateIdentity in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • updateIdentityMembership

      public void updateIdentityMembership(String remoteId) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      updateIdentityMembership in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • findIdentityId

      public String findIdentityId(String providerId, String remoteId)
      Specified by:
      findIdentityId in interface org.exoplatform.social.core.storage.api.IdentityStorage
    • findIdentity

      public org.exoplatform.social.core.identity.model.Identity findIdentity(String providerId, String remoteId) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      findIdentity in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • findIdentityById

      public org.exoplatform.social.core.identity.model.Identity findIdentityById(String identityId) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      findIdentityById in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • deleteIdentity

      public void deleteIdentity(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      deleteIdentity in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • hardDeleteIdentity

      public void hardDeleteIdentity(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      hardDeleteIdentity in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • loadProfile

      public org.exoplatform.social.core.identity.model.Profile loadProfile(org.exoplatform.social.core.identity.model.Profile profile) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      loadProfile in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • saveProfile

      public void saveProfile(org.exoplatform.social.core.identity.model.Profile profile) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      saveProfile in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • updateProfile

      public void updateProfile(org.exoplatform.social.core.identity.model.Profile profile) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      updateProfile in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • getIdentitiesCount

      public int getIdentitiesCount(String providerId) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      getIdentitiesCount in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • getIdentitiesByProfileFilter

      public List<org.exoplatform.social.core.identity.model.Identity> getIdentitiesByProfileFilter(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit, boolean forceLoadOrReloadProfile) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      getIdentitiesByProfileFilter in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • getIdentitiesForMentions

      public List<org.exoplatform.social.core.identity.model.Identity> getIdentitiesForMentions(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter, org.exoplatform.social.core.relationship.model.Relationship.Type type, long offset, long limit, boolean forceLoadOrReloadProfile) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      getIdentitiesForMentions in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • getIdentitiesForMentionsCount

      public int getIdentitiesForMentionsCount(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter, org.exoplatform.social.core.relationship.model.Relationship.Type type) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      getIdentitiesForMentionsCount in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • getIdentitiesByProfileFilterCount

      public int getIdentitiesByProfileFilterCount(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      getIdentitiesByProfileFilterCount in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • getSpaceMemberIdentitiesByProfileFilter

      public List<org.exoplatform.social.core.identity.model.Identity> getSpaceMemberIdentitiesByProfileFilter(org.exoplatform.social.core.space.model.Space space, org.exoplatform.social.core.profile.ProfileFilter profileFilter, org.exoplatform.social.core.identity.SpaceMemberFilterListAccess.Type type, long offset, long limit) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      getSpaceMemberIdentitiesByProfileFilter in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • updateProfileActivityId

      public void updateProfileActivityId(org.exoplatform.social.core.identity.model.Identity identity, String activityId, org.exoplatform.social.core.identity.model.Profile.AttachedActivityType type)
      Specified by:
      updateProfileActivityId in interface org.exoplatform.social.core.storage.api.IdentityStorage
    • getProfileActivityId

      public String getProfileActivityId(org.exoplatform.social.core.identity.model.Profile profile, org.exoplatform.social.core.identity.model.Profile.AttachedActivityType type)
      Specified by:
      getProfileActivityId in interface org.exoplatform.social.core.storage.api.IdentityStorage
    • getIdentitiesForUnifiedSearch

      public List<org.exoplatform.social.core.identity.model.Identity> getIdentitiesForUnifiedSearch(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit) throws org.exoplatform.social.core.storage.IdentityStorageException
      Specified by:
      getIdentitiesForUnifiedSearch in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      org.exoplatform.social.core.storage.IdentityStorageException
    • processEnabledIdentity

      public void processEnabledIdentity(org.exoplatform.social.core.identity.model.Identity identity, boolean isEnable)
      Specified by:
      processEnabledIdentity in interface org.exoplatform.social.core.storage.api.IdentityStorage
    • getIdentitiesWithRelationships

      public List<org.exoplatform.social.core.identity.model.IdentityWithRelationship> getIdentitiesWithRelationships(String identityId, int offset, int limit)
      Specified by:
      getIdentitiesWithRelationships in interface org.exoplatform.social.core.storage.api.IdentityStorage
    • getIdentitiesWithRelationships

      public List<org.exoplatform.social.core.identity.model.IdentityWithRelationship> getIdentitiesWithRelationships(String identityId, String sortFieldName, String sortDirection, int offset, int limit)
      Specified by:
      getIdentitiesWithRelationships in interface org.exoplatform.social.core.storage.api.IdentityStorage
    • countIdentitiesWithRelationships

      public int countIdentitiesWithRelationships(String identityId) throws Exception
      Specified by:
      countIdentitiesWithRelationships in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      Exception
    • getAvatarInputStreamById

      public InputStream getAvatarInputStreamById(org.exoplatform.social.core.identity.model.Identity identity) throws IOException
      Specified by:
      getAvatarInputStreamById in interface org.exoplatform.social.core.storage.api.IdentityStorage
      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.storage.api.IdentityStorage
    • getBannerInputStreamById

      public InputStream getBannerInputStreamById(org.exoplatform.social.core.identity.model.Identity identity) throws IOException
      Specified by:
      getBannerInputStreamById in interface org.exoplatform.social.core.storage.api.IdentityStorage
      Throws:
      IOException
    • countSpaceMemberIdentitiesByProfileFilter

      public int countSpaceMemberIdentitiesByProfileFilter(org.exoplatform.social.core.space.model.Space space, org.exoplatform.social.core.profile.ProfileFilter profileFilter, org.exoplatform.social.core.identity.SpaceMemberFilterListAccess.Type type)
      Specified by:
      countSpaceMemberIdentitiesByProfileFilter in interface org.exoplatform.social.core.storage.api.IdentityStorage
    • getIdentityIds

      public List<String> getIdentityIds(String providerId, String sortField, String sortDirection, boolean isEnabled, String userType, Boolean isConnected, String enrollmentStatus, long offset, long limit)
      Specified by:
      getIdentityIds in interface org.exoplatform.social.core.storage.api.IdentityStorage
    • getIdentities

      public List<org.exoplatform.social.core.identity.model.Identity> getIdentities(String providerId, String sortField, String sortDirection, boolean isEnabled, String userType, Boolean isConnected, String enrollmentStatus, long offset, long limit)
      Specified by:
      getIdentities in interface org.exoplatform.social.core.storage.api.IdentityStorage
    • getIdentities

      public List<org.exoplatform.social.core.identity.model.Identity> getIdentities(String providerId, long offset, long limit)
      Specified by:
      getIdentities in interface org.exoplatform.social.core.storage.api.IdentityStorage
    • sortIdentities

      public List<String> sortIdentities(List<String> identityRemoteIds, String sortField, String sortDirection)
      Specified by:
      sortIdentities in interface org.exoplatform.social.core.storage.api.IdentityStorage
    • setImageUploadLimit

      public void setImageUploadLimit(int imageUploadLimit)
      Specified by:
      setImageUploadLimit in interface org.exoplatform.social.core.storage.api.IdentityStorage
    • getStorage

      public org.exoplatform.social.core.storage.api.IdentityStorage getStorage()
    • getDisabledSpaceMembers

      public List<String> getDisabledSpaceMembers(Long spaceId)
      Specified by:
      getDisabledSpaceMembers in interface org.exoplatform.social.core.storage.api.IdentityStorage
    • clearIdentityCached

      public void clearIdentityCached(org.exoplatform.social.core.identity.model.Identity identity, String oldRemoteId)
      Clear identity cache.
      Parameters:
      identity -
      oldRemoteId -
      Since:
      1.2.8
    • clearIdentityCache

      public void clearIdentityCache(String providerId, String remoteId, boolean clearList)
      Clear the identity cache.
      Parameters:
      providerId -
      remoteId -
      clearList -