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.
- Version:
- $Revision$
- Author:
- Alain Defrance
-
Field Summary
Fields inherited from interface org.exoplatform.social.core.storage.api.IdentityStorage
DEFAULT_SORTING, DEFAULT_UPLOAD_IMAGE_LIMIT -
Constructor Summary
ConstructorsConstructorDescriptionCachedIdentityStorage(RDBMSIdentityStorageImpl storage, SocialStorageCacheService cacheService, org.exoplatform.commons.file.services.FileService fileService) -
Method Summary
Modifier and TypeMethodDescriptionvoidclearIdentityCache(String providerId, String remoteId, boolean clearList) Clear the identity cache.voidclearIdentityCached(org.exoplatform.social.core.identity.model.Identity identity, String oldRemoteId) Clear identity cache.intcountIdentitiesWithRelationships(String identityId) intcountSpaceMemberIdentitiesByProfileFilter(org.exoplatform.social.core.space.model.Space space, org.exoplatform.social.core.profile.ProfileFilter profileFilter, org.exoplatform.social.core.identity.SpaceMemberFilterListAccess.Type type) voiddeleteIdentity(org.exoplatform.social.core.identity.model.Identity identity) org.exoplatform.social.core.identity.model.IdentityfindIdentity(String providerId, String remoteId) org.exoplatform.social.core.identity.model.IdentityfindIdentityById(String identityId) findIdentityId(String providerId, String remoteId) org.exoplatform.commons.file.model.FileItemgetAvatarFile(org.exoplatform.social.core.identity.model.Identity identity) getAvatarInputStreamById(org.exoplatform.social.core.identity.model.Identity identity) getBannerInputStreamById(org.exoplatform.social.core.identity.model.Identity identity) getDisabledSpaceMembers(Long spaceId) List<org.exoplatform.social.core.identity.model.Identity> getIdentities(String providerId, long offset, long limit) 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) List<org.exoplatform.social.core.identity.model.Identity> getIdentitiesByProfileFilter(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit, boolean forceLoadOrReloadProfile) intgetIdentitiesByProfileFilterCount(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter) intgetIdentitiesCount(String providerId) 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) intgetIdentitiesForMentionsCount(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter, org.exoplatform.social.core.relationship.model.Relationship.Type type) List<org.exoplatform.social.core.identity.model.Identity> getIdentitiesForUnifiedSearch(String providerId, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit) List<org.exoplatform.social.core.identity.model.IdentityWithRelationship> getIdentitiesWithRelationships(String identityId, int offset, int limit) List<org.exoplatform.social.core.identity.model.IdentityWithRelationship> getIdentitiesWithRelationships(String identityId, String sortFieldName, String sortDirection, int offset, int limit) getIdentityIds(String providerId, String sortField, String sortDirection, boolean isEnabled, String userType, Boolean isConnected, String enrollmentStatus, long offset, long limit) getProfileActivityId(org.exoplatform.social.core.identity.model.Profile profile, org.exoplatform.social.core.identity.model.Profile.AttachedActivityType type) 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) org.exoplatform.social.core.storage.api.IdentityStoragevoidhardDeleteIdentity(org.exoplatform.social.core.identity.model.Identity identity) org.exoplatform.social.core.identity.model.ProfileloadProfile(org.exoplatform.social.core.identity.model.Profile profile) voidprocessEnabledIdentity(org.exoplatform.social.core.identity.model.Identity identity, boolean isEnable) voidsaveIdentity(org.exoplatform.social.core.identity.model.Identity identity) voidsaveProfile(org.exoplatform.social.core.identity.model.Profile profile) voidsetImageUploadLimit(int imageUploadLimit) sortIdentities(List<String> identityRemoteIds, String sortField, String sortDirection) org.exoplatform.social.core.identity.model.IdentityupdateIdentity(org.exoplatform.social.core.identity.model.Identity identity) voidupdateIdentityMembership(String remoteId) voidupdateProfile(org.exoplatform.social.core.identity.model.Profile profile) voidupdateProfileActivityId(org.exoplatform.social.core.identity.model.Identity identity, String activityId, org.exoplatform.social.core.identity.model.Profile.AttachedActivityType type) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.exoplatform.social.core.storage.api.IdentityStorage
getType, sortIdentities, sortIdentities
-
Constructor Details
-
CachedIdentityStorage
public CachedIdentityStorage(RDBMSIdentityStorageImpl storage, SocialStorageCacheService cacheService, org.exoplatform.commons.file.services.FileService fileService)
-
-
Method Details
-
saveIdentity
public void saveIdentity(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.IdentityStorageException - Specified by:
saveIdentityin interfaceorg.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:
updateIdentityin interfaceorg.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:
updateIdentityMembershipin interfaceorg.exoplatform.social.core.storage.api.IdentityStorage- Throws:
org.exoplatform.social.core.storage.IdentityStorageException
-
findIdentityId
- Specified by:
findIdentityIdin interfaceorg.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:
findIdentityin interfaceorg.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:
findIdentityByIdin interfaceorg.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:
deleteIdentityin interfaceorg.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:
hardDeleteIdentityin interfaceorg.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:
loadProfilein interfaceorg.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:
saveProfilein interfaceorg.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:
updateProfilein interfaceorg.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:
getIdentitiesCountin interfaceorg.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:
getIdentitiesByProfileFilterin interfaceorg.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:
getIdentitiesForMentionsin interfaceorg.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:
getIdentitiesForMentionsCountin interfaceorg.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:
getIdentitiesByProfileFilterCountin interfaceorg.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:
getSpaceMemberIdentitiesByProfileFilterin interfaceorg.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:
updateProfileActivityIdin interfaceorg.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:
getProfileActivityIdin interfaceorg.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:
getIdentitiesForUnifiedSearchin interfaceorg.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:
processEnabledIdentityin interfaceorg.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:
getIdentitiesWithRelationshipsin interfaceorg.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:
getIdentitiesWithRelationshipsin interfaceorg.exoplatform.social.core.storage.api.IdentityStorage
-
countIdentitiesWithRelationships
- Specified by:
countIdentitiesWithRelationshipsin interfaceorg.exoplatform.social.core.storage.api.IdentityStorage- Throws:
Exception
-
getAvatarInputStreamById
public InputStream getAvatarInputStreamById(org.exoplatform.social.core.identity.model.Identity identity) throws IOException - Specified by:
getAvatarInputStreamByIdin interfaceorg.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:
getAvatarFilein interfaceorg.exoplatform.social.core.storage.api.IdentityStorage
-
getBannerInputStreamById
public InputStream getBannerInputStreamById(org.exoplatform.social.core.identity.model.Identity identity) throws IOException - Specified by:
getBannerInputStreamByIdin interfaceorg.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:
countSpaceMemberIdentitiesByProfileFilterin interfaceorg.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:
getIdentityIdsin interfaceorg.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:
getIdentitiesin interfaceorg.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:
getIdentitiesin interfaceorg.exoplatform.social.core.storage.api.IdentityStorage
-
sortIdentities
public List<String> sortIdentities(List<String> identityRemoteIds, String sortField, String sortDirection) - Specified by:
sortIdentitiesin interfaceorg.exoplatform.social.core.storage.api.IdentityStorage
-
setImageUploadLimit
public void setImageUploadLimit(int imageUploadLimit) - Specified by:
setImageUploadLimitin interfaceorg.exoplatform.social.core.storage.api.IdentityStorage
-
getStorage
public org.exoplatform.social.core.storage.api.IdentityStorage getStorage() -
getDisabledSpaceMembers
- Specified by:
getDisabledSpaceMembersin interfaceorg.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
Clear the identity cache.- Parameters:
providerId-remoteId-clearList-
-