Interface ActivityStorage
-
public interface ActivityStorage- Version:
- $Revision$
- Author:
- Alain Defrance
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classActivityStorage.TimestampType
-
Field Summary
Fields Modifier and Type Field Description static StringMENTION_CHAR
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default ActivityShareActioncreateShareActivityAction(ActivityShareAction activityShareAction)Stores in database the share activity action detailvoiddeleteActivity(String activityId)Deletes activity by its id.voiddeleteComment(String activityId, String commentId)Delete comment by its id.List<ExoSocialActivity>getActivities(List<String> activityIdList)Load activities switch list of IDsList<ExoSocialActivity>getActivities(Identity owner, Identity viewer, long offset, long limit)Gets the activities by identity owner but it's viewed by viewer.List<ExoSocialActivity>getActivitiesByPoster(Identity posterIdentity, int offset, int limit)Gets activities by poster.List<ExoSocialActivity>getActivitiesByPoster(Identity posterIdentity, int offset, int limit, String... activityTypes)Gets activities by poster and activity's typesList<ExoSocialActivity>getActivitiesOfConnections(Identity ownerIdentity, int offset, int limit)Gets activities of connections of an identity with offset, limit.List<ExoSocialActivity>getActivitiesOfConnectionsForUpgrade(Identity ownerIdentity, int offset, int limit)Deprecated.not used anymoreList<ExoSocialActivity>getActivitiesOfIdentity(Identity ownerIdentity, long offset, long limit)Gets the activities of the identity with offset, limit.ExoSocialActivitygetActivity(String activityId)Load an activity by its id.List<ExoSocialActivity>getActivityFeed(Identity ownerIdentity, int offset, int limit)Gets activity feed from an identity.List<ExoSocialActivity>getActivityFeedForUpgrade(Identity ownerIdentity, int offset, int limit)Deprecated.not used anymoreList<String>getActivityIdsFeed(Identity ownerIdentity, int offset, int limit)Gets activity ids feed from an identity.List<String>getActivityIdsOfConnections(Identity ownerIdentity, int offset, int limit)Gets activity id list of connections of an identity with offset, limit.SortedSet<ActivityProcessor>getActivityProcessors()Gets the activity processors.List<ExoSocialActivity>getAllActivities(int index, int limit)Get all activitiesList<ExoSocialActivity>getComments(ExoSocialActivity existingActivity, boolean loadSubComments, int offset, int limit)Gets the comments of an activity with offset, limit.default List<ExoSocialActivity>getComments(ExoSocialActivity activity, boolean loadSubComments, int offset, int limit, boolean sortDescending)Gets the comments of an activity with offset, limit.List<ExoSocialActivity>getNewerActivitiesOfConnections(Identity owner, Long sinceTime, int limit)Gets connections' activities of an user base on since time.List<ExoSocialActivity>getNewerComments(ExoSocialActivity existingActivity, Long sinceTime, int limit)Gets the newer comments of an activity based on an updated time.List<ExoSocialActivity>getNewerComments(ExoSocialActivity existingActivity, ExoSocialActivity baseComment, int limit)Gets the newer comments of an activity based on a comment.List<ExoSocialActivity>getNewerFeedActivities(Identity owner, Long sinceTime, int limit)Gets feed activities base on since time.List<ExoSocialActivity>getNewerOnActivitiesOfConnections(Identity ownerIdentity, ExoSocialActivity baseActivity, long limit)Gets the newer activities of connections based on baseActivity.List<ExoSocialActivity>getNewerOnActivityFeed(Identity ownerIdentity, ExoSocialActivity baseActivity, int limit)Gets the list of newer activities feed based on an existing activity.List<ExoSocialActivity>getNewerOnSpaceActivities(Identity spaceIdentity, ExoSocialActivity baseActivity, int limit)Gets list of newer activities of spaces where the identity can accessList<ExoSocialActivity>getNewerOnUserActivities(Identity ownerIdentity, ExoSocialActivity baseActivity, int limit)Gets the list of newer activities based on an existing activity.List<ExoSocialActivity>getNewerOnUserSpacesActivities(Identity ownerIdentity, ExoSocialActivity baseActivity, int limit)Gets the newer activities of spaces where identity can access (manager or member), based on an existing activity.List<ExoSocialActivity>getNewerSpaceActivities(Identity owner, Long sinceTime, int limit)Gets space activities base on since time.List<ExoSocialActivity>getNewerUserActivities(Identity owner, Long sinceTime, int limit)Gets activities of an user base on since time.List<ExoSocialActivity>getNewerUserSpacesActivities(Identity owner, Long sinceTime, int limit)Gets activities of an user on spaces base on since time.intgetNumberOfActivitesOnActivityFeed(Identity ownerIdentity)Gets the number of activities feed based from ownerIdentity.intgetNumberOfActivitesOnActivityFeedForUpgrade(Identity ownerIdentity)Gets the number of activities feed based from ownerIdentity for upgrade Activity Stream feature.intgetNumberOfActivitiesByPoster(Identity posterIdentity)Gets the number of activities of poster.intgetNumberOfActivitiesByPoster(Identity ownerIdentity, Identity viewerIdentity)Gets the number of activities of poster.intgetNumberOfActivitiesOfConnections(Identity ownerIdentity)Gets the count of the activities of connections who connected with an identity.intgetNumberOfActivitiesOfConnectionsForUpgrade(Identity ownerIdentity)Gets the count of the activities of connections who connected with an identity for upgrade Activity Stream feature.intgetNumberOfComments(ExoSocialActivity existingActivity)Gets the number of comments of an activity.intgetNumberOfNewerComments(ExoSocialActivity existingActivity, Long sinceTime)Gets the number of newer commentsintgetNumberOfNewerComments(ExoSocialActivity existingActivity, ExoSocialActivity baseComment)Gets the number of newer comments of an activity based on a comment.intgetNumberOfNewerOnActivitiesOfConnections(Identity ownerIdentity, Long sinceTime)Gets the number of newer activities based on postedTime of connections.intgetNumberOfNewerOnActivitiesOfConnections(Identity ownerIdentity, ExoSocialActivity baseActivity)Gets the number of newer activities based on base activity of connections.intgetNumberOfNewerOnActivityFeed(Identity ownerIdentity, Long sinceTime)Gets the list of newer activities feed based on an existing postedTime.intgetNumberOfNewerOnActivityFeed(Identity ownerIdentity, ExoSocialActivity baseActivity)Gets the list of newer activities feed based on an existing activity.intgetNumberOfNewerOnSpaceActivities(Identity spaceIdentity, Long sinceTime)Gets the number of older activities of spaces where the identity can access and based on an existing postedTime of baseActivity.intgetNumberOfNewerOnSpaceActivities(Identity spaceIdentity, ExoSocialActivity baseActivity)Gets the number of newer activities of spaces where the identity can access and based on an existing postedTime of baseActivity.intgetNumberOfNewerOnUserActivities(Identity ownerIdentity, Long sinceTime)Gets the number of newer activities based on an existing postedTime.intgetNumberOfNewerOnUserActivities(Identity ownerIdentity, ExoSocialActivity baseActivity)Gets the number of newer activities based on an existing activity.intgetNumberOfNewerOnUserSpacesActivities(Identity ownerIdentity, Long sinceTime)Gets the number of newer activities of spaces where the identity can access, based on an existing postedTime.intgetNumberOfNewerOnUserSpacesActivities(Identity ownerIdentity, ExoSocialActivity baseActivity)Gets the number of newer activities of spaces where the identity can access, based on an existing activity.intgetNumberOfOlderComments(ExoSocialActivity existingActivity, Long sinceTime)Gets the number of older commentsintgetNumberOfOlderComments(ExoSocialActivity existingActivity, ExoSocialActivity baseComment)Gets the number of newer comments of an activity based on a comment.intgetNumberOfOlderOnActivitiesOfConnections(Identity ownerIdentity, Long sinceTime)Gets the number of older activities based on postedTime of connections.intgetNumberOfOlderOnActivitiesOfConnections(Identity ownerIdentity, ExoSocialActivity baseActivity)Gets the number of older activities of connections based on baseActivity.intgetNumberOfOlderOnActivityFeed(Identity ownerIdentity, Long sinceTime)Gets the list of older activities feed based on an existing postedTime.intgetNumberOfOlderOnActivityFeed(Identity ownerIdentity, ExoSocialActivity baseActivity)Gets the list of older activities feed based on an existing activity.intgetNumberOfOlderOnSpaceActivities(Identity ownerIdentity, Long sinceTime)Gets the number of older activities of spaces base on a time.intgetNumberOfOlderOnSpaceActivities(Identity spaceIdentity, ExoSocialActivity baseActivity)Gets the number of older activities of spaces where the identity can access and based on an existing postedTime of baseActivity.intgetNumberOfOlderOnUserActivities(Identity ownerIdentity, Long sinceTime)Gets the number of older activities based on an existing postedTime.intgetNumberOfOlderOnUserActivities(Identity ownerIdentity, ExoSocialActivity baseActivity)Gets the number of older activities based on an existing activity.intgetNumberOfOlderOnUserSpacesActivities(Identity ownerIdentity, Long sinceTime)Gets the number of older activities of spacesintgetNumberOfOlderOnUserSpacesActivities(Identity ownerIdentity, ExoSocialActivity baseActivity)Gets the number of newer activities of spaces where the identity can access, based on an existing activity.intgetNumberOfSpaceActivities(Identity spaceIdentity)Gets the number of newer activities of spaces where the identity can access.intgetNumberOfSpaceActivitiesForUpgrade(Identity spaceIdentity)Gets the number of newer activities of spaces where the identity can access for upgrade Stream featureintgetNumberOfUserActivities(Identity owner)Count the number of activities from an ownerIdentityintgetNumberOfUserActivitiesForUpgrade(Identity owner)Count the number of activities from an ownerIdentity for upgrade Activity Stream featureintgetNumberOfUserSpacesActivities(Identity ownerIdentity)Gets the number of activities of spaces where identity can access (manager or member).intgetNumberOfUserSpacesActivitiesForUpgrade(Identity ownerIdentity)Gets the number of activities of spaces where identity can access (manager or member) for upgrade Activity Stream feature.List<ExoSocialActivity>getOlderActivitiesOfConnections(Identity owner, Long sinceTime, int limit)Gets connections' activities of an user base on since time.List<ExoSocialActivity>getOlderComments(ExoSocialActivity existingActivity, Long sinceTime, int limit)Gets the older comments of an activity based on an updated time.List<ExoSocialActivity>getOlderComments(ExoSocialActivity existingActivity, ExoSocialActivity baseComment, int limit)Gets the older comments of an activity based on a comment.List<ExoSocialActivity>getOlderFeedActivities(Identity owner, Long sinceTime, int limit)Gets feed activities base on since time.List<ExoSocialActivity>getOlderOnActivitiesOfConnections(Identity ownerIdentity, ExoSocialActivity baseActivity, int limit)Gets the older of activities of connections based on base an activity.List<ExoSocialActivity>getOlderOnActivityFeed(Identity ownerIdentity, ExoSocialActivity baseActivity, int limit)Gets the list of older activities feed based on an existing activity.List<ExoSocialActivity>getOlderOnSpaceActivities(Identity spaceIdentity, ExoSocialActivity baseActivity, int limit)Gets the list of older activities of spaces where the identity can access and based on an existing postedTime of baseActivity.List<ExoSocialActivity>getOlderOnUserActivities(Identity ownerIdentity, ExoSocialActivity baseActivity, int limit)Gets the list of older activities based on an existing activity.List<ExoSocialActivity>getOlderOnUserSpacesActivities(Identity ownerIdentity, ExoSocialActivity baseActivity, int limit)Gets the older activities of spaces where identity can access (manager or member), based on an existing activity.List<ExoSocialActivity>getOlderSpaceActivities(Identity owner, Long sinceTime, int limit)Gets space activities base on since time.List<ExoSocialActivity>getOlderUserActivities(Identity owner, Long sinceTime, int limit)Gets activities of an user base on since time.List<ExoSocialActivity>getOlderUserSpacesActivities(Identity owner, Long sinceTime, int limit)Gets activities of an user on spaces base on since time.ExoSocialActivitygetParentActivity(ExoSocialActivity comment)List<ExoSocialActivity>getSpaceActivities(Identity spaceIdentity, int index, int limit)Gets list of activities of spaces where the identity can access.List<ExoSocialActivity>getSpaceActivitiesForUpgrade(Identity spaceIdentity, int index, int limit)Gets list of activities of spaces where the identity can access for upgrade Stream featureList<String>getSpaceActivityIds(Identity spaceIdentity, int index, int limit)Gets list of activity ids of spaces where the identity can access.default Set<Long>getStreamFeedOwnerIds(Identity identity)Computes the owner Ids of Streams that the user identity can see in his main activity stream (Spaces where the user is member and his confirmed connections)List<ExoSocialActivity>getSubComments(ExoSocialActivity comment)Get all sub comments of a chosen commentList<ExoSocialActivity>getUserActivities(Identity owner)Gets all the activities by identity.List<ExoSocialActivity>getUserActivities(Identity owner, long offset, long limit)Gets the activities by identity.List<ExoSocialActivity>getUserActivitiesForUpgrade(Identity owner, long offset, long limit)Gets the activities by identity for upgrade Activity Stream feature Access a user's activity stream by specifying the offset and limit.List<String>getUserIdsActivities(Identity owner, long offset, long limit)Gets the activity ids by identity.List<ExoSocialActivity>getUserSpacesActivities(Identity ownerIdentity, int offset, int limit)Gets the activities of spaces where identity can access (manager or member).List<ExoSocialActivity>getUserSpacesActivitiesForUpgrade(Identity ownerIdentity, int offset, int limit)Gets the activities of spaces where identity can access (manager or member) for upgrade Activity Stream featureList<String>getUserSpacesActivityIds(Identity ownerIdentity, int offset, int limit)Gets the activity id list of spaces where identity can access (manager or member).default ExoSocialActivityhideActivity(String activityId)Hides an activity to not be displayed in stream, but keep it accessible in standalone modedefault booleanisActivityExists(String activityId)ExoSocialActivitysaveActivity(Identity owner, ExoSocialActivity activity)Saves an activity into a stream.voidsaveComment(ExoSocialActivity activity, ExoSocialActivity comment)Save comment to an activity.voidupdateActivity(ExoSocialActivity existingActivity)Updates an existing activity.
-
-
-
Field Detail
-
MENTION_CHAR
static final String MENTION_CHAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getActivity
ExoSocialActivity getActivity(String activityId) throws ActivityStorageException
Load an activity by its id.- Parameters:
activityId- the id of the activity. An UUID.- Returns:
- the activity
- Throws:
ActivityStorageException
-
getUserActivities
List<ExoSocialActivity> getUserActivities(Identity owner) throws ActivityStorageException
Gets all the activities by identity.- Parameters:
owner- the identity- Returns:
- the activities
- Throws:
ActivityStorageException
-
getUserActivities
List<ExoSocialActivity> getUserActivities(Identity owner, long offset, long limit) throws ActivityStorageException
Gets the activities by identity. Access a user's activity stream by specifying the offset and limit.- Parameters:
owner- the identityoffset-limit-- Returns:
- the activities
- Throws:
ActivityStorageException
-
getUserIdsActivities
List<String> getUserIdsActivities(Identity owner, long offset, long limit) throws ActivityStorageException
Gets the activity ids by identity. Access a user's activity stream by specifying the offset and limit.- Parameters:
owner- the identityoffset-limit-- Returns:
- the activity ids list
- Throws:
ActivityStorageException
-
getUserActivitiesForUpgrade
List<ExoSocialActivity> getUserActivitiesForUpgrade(Identity owner, long offset, long limit) throws ActivityStorageException
Gets the activities by identity for upgrade Activity Stream feature Access a user's activity stream by specifying the offset and limit.- Parameters:
owner- the identityoffset-limit-- Returns:
- the activities
- Throws:
ActivityStorageException
-
getActivities
List<ExoSocialActivity> getActivities(Identity owner, Identity viewer, long offset, long limit) throws ActivityStorageException
Gets the activities by identity owner but it's viewed by viewer. Example: If there is relationship between Mary and Demo, signed in Demo, and then watch Mary's activity stream Expectation: Only show user's activities and space activity if both of them is member. Access a user's activity stream by specifying the offset and limit.- Parameters:
owner- the identityviewer- the identityoffset-limit-- Returns:
- the activities
- Throws:
ActivityStorageException
-
saveComment
void saveComment(ExoSocialActivity activity, ExoSocialActivity comment) throws ActivityStorageException
Save comment to an activity. activity's ownerstream has to be the same as ownerStream param here.- Parameters:
activity-comment-- Throws:
ActivityStorageException- Since:
- 1.1.1
-
saveActivity
ExoSocialActivity saveActivity(Identity owner, ExoSocialActivity activity) throws ActivityStorageException
Saves an activity into a stream. Note that the fieldExoSocialActivity.setUserId(String)should be the id of an identityIdentity.getId()- Parameters:
owner- owner of the stream where this activity is bound. Usually a user or space identityactivity- the activity to save- Returns:
- stored activity
- Throws:
ActivityStorageException- activity storage exception with type: ActivityStorageException.Type.FAILED_TO_SAVE_ACTIVITY- Since:
- 1.1.1
-
getParentActivity
ExoSocialActivity getParentActivity(ExoSocialActivity comment) throws ActivityStorageException
- Throws:
ActivityStorageException
-
deleteActivity
void deleteActivity(String activityId) throws ActivityStorageException
Deletes activity by its id. This will delete comments from this activity first, then delete the activity.- Parameters:
activityId- the activity id- Throws:
ActivityStorageException
-
deleteComment
void deleteComment(String activityId, String commentId) throws ActivityStorageException
Delete comment by its id.- Parameters:
activityId-commentId-- Throws:
ActivityStorageException
-
getNumberOfUserActivities
int getNumberOfUserActivities(Identity owner) throws ActivityStorageException
Count the number of activities from an ownerIdentity- Parameters:
owner-- Returns:
- the number of activities
- Throws:
ActivityStorageException
-
getNumberOfUserActivitiesForUpgrade
int getNumberOfUserActivitiesForUpgrade(Identity owner) throws ActivityStorageException
Count the number of activities from an ownerIdentity for upgrade Activity Stream feature- Parameters:
owner-- Returns:
- the number of activities
- Throws:
ActivityStorageException
-
getNumberOfNewerOnUserActivities
int getNumberOfNewerOnUserActivities(Identity ownerIdentity, ExoSocialActivity baseActivity)
Gets the number of newer activities based on an existing activity.- Parameters:
ownerIdentity-baseActivity-- Returns:
-
getNewerOnUserActivities
List<ExoSocialActivity> getNewerOnUserActivities(Identity ownerIdentity, ExoSocialActivity baseActivity, int limit)
Gets the list of newer activities based on an existing activity.- Parameters:
ownerIdentity-baseActivity-limit-- Returns:
-
getNumberOfOlderOnUserActivities
int getNumberOfOlderOnUserActivities(Identity ownerIdentity, ExoSocialActivity baseActivity)
Gets the number of older activities based on an existing activity.- Parameters:
ownerIdentity-baseActivity-- Returns:
-
getOlderOnUserActivities
List<ExoSocialActivity> getOlderOnUserActivities(Identity ownerIdentity, ExoSocialActivity baseActivity, int limit)
Gets the list of older activities based on an existing activity.- Parameters:
ownerIdentity-baseActivity-limit-- Returns:
-
getActivityFeed
List<ExoSocialActivity> getActivityFeed(Identity ownerIdentity, int offset, int limit)
Gets activity feed from an identity.- Parameters:
ownerIdentity-offset-limit-- Returns:
-
getActivityIdsFeed
List<String> getActivityIdsFeed(Identity ownerIdentity, int offset, int limit)
Gets activity ids feed from an identity.- Parameters:
ownerIdentity-offset-limit-- Returns:
-
getActivityFeedForUpgrade
@Deprecated List<ExoSocialActivity> getActivityFeedForUpgrade(Identity ownerIdentity, int offset, int limit)
Deprecated.not used anymoreGets activity feed from an identity for upgrade Activity Stream feature- Parameters:
ownerIdentity-offset-limit-- Returns:
- Since:
- 4.1.x, 4.0.2
-
getNumberOfActivitesOnActivityFeed
int getNumberOfActivitesOnActivityFeed(Identity ownerIdentity)
Gets the number of activities feed based from ownerIdentity.- Parameters:
ownerIdentity-- Returns:
-
getNumberOfActivitesOnActivityFeedForUpgrade
int getNumberOfActivitesOnActivityFeedForUpgrade(Identity ownerIdentity)
Gets the number of activities feed based from ownerIdentity for upgrade Activity Stream feature.- Parameters:
ownerIdentity-- Returns:
- Since:
- 4.1.x, 4.0.2
-
getNumberOfNewerOnActivityFeed
int getNumberOfNewerOnActivityFeed(Identity ownerIdentity, ExoSocialActivity baseActivity)
Gets the list of newer activities feed based on an existing activity.- Parameters:
ownerIdentity-baseActivity-- Returns:
-
getNewerOnActivityFeed
List<ExoSocialActivity> getNewerOnActivityFeed(Identity ownerIdentity, ExoSocialActivity baseActivity, int limit)
Gets the list of newer activities feed based on an existing activity.- Parameters:
ownerIdentity-baseActivity-limit-- Returns:
-
getNumberOfOlderOnActivityFeed
int getNumberOfOlderOnActivityFeed(Identity ownerIdentity, ExoSocialActivity baseActivity)
Gets the list of older activities feed based on an existing activity.- Parameters:
ownerIdentity-baseActivity-- Returns:
-
getOlderOnActivityFeed
List<ExoSocialActivity> getOlderOnActivityFeed(Identity ownerIdentity, ExoSocialActivity baseActivity, int limit)
Gets the list of older activities feed based on an existing activity.- Parameters:
ownerIdentity-baseActivity-limit-- Returns:
-
getActivitiesOfConnections
List<ExoSocialActivity> getActivitiesOfConnections(Identity ownerIdentity, int offset, int limit)
Gets activities of connections of an identity with offset, limit.- Parameters:
ownerIdentity-offset-limit-- Returns:
- Since:
- 1.2.0-Beta3
-
getActivityIdsOfConnections
List<String> getActivityIdsOfConnections(Identity ownerIdentity, int offset, int limit)
Gets activity id list of connections of an identity with offset, limit.- Parameters:
ownerIdentity-offset-limit-- Returns:
- list of activity id
- Since:
- 4.3.0
-
getActivitiesOfConnectionsForUpgrade
@Deprecated List<ExoSocialActivity> getActivitiesOfConnectionsForUpgrade(Identity ownerIdentity, int offset, int limit)
Deprecated.not used anymoreGets activities of connections of an identity with offset, limit for upgrade Activity Stream feature.- Parameters:
ownerIdentity-offset-limit-- Returns:
- Since:
- 4.1.x, 4.0.2
-
getNumberOfActivitiesOfConnections
int getNumberOfActivitiesOfConnections(Identity ownerIdentity)
Gets the count of the activities of connections who connected with an identity.- Parameters:
ownerIdentity-- Returns:
- Since:
- 1.2.0-Beta3
-
getNumberOfActivitiesOfConnectionsForUpgrade
int getNumberOfActivitiesOfConnectionsForUpgrade(Identity ownerIdentity)
Gets the count of the activities of connections who connected with an identity for upgrade Activity Stream feature.- Parameters:
ownerIdentity-- Returns:
- Since:
- 4.1.x, 4.0.2
-
getActivitiesOfIdentity
List<ExoSocialActivity> getActivitiesOfIdentity(Identity ownerIdentity, long offset, long limit)
Gets the activities of the identity with offset, limit.- Parameters:
ownerIdentity-offset-limit-- Returns:
- Throws:
ActivityStorageException- Since:
- 1.2.0-Beta3
-
getNumberOfNewerOnActivitiesOfConnections
int getNumberOfNewerOnActivitiesOfConnections(Identity ownerIdentity, ExoSocialActivity baseActivity)
Gets the number of newer activities based on base activity of connections.- Parameters:
ownerIdentity-baseActivity-- Returns:
- Since:
- 1.2.0-Beta3
-
getNewerOnActivitiesOfConnections
List<ExoSocialActivity> getNewerOnActivitiesOfConnections(Identity ownerIdentity, ExoSocialActivity baseActivity, long limit)
Gets the newer activities of connections based on baseActivity.- Parameters:
ownerIdentity-baseActivity-limit-- Returns:
- Since:
- 1.2.0-Beta3
-
getNumberOfOlderOnActivitiesOfConnections
int getNumberOfOlderOnActivitiesOfConnections(Identity ownerIdentity, ExoSocialActivity baseActivity)
Gets the number of older activities of connections based on baseActivity.- Parameters:
ownerIdentity-baseActivity-- Returns:
- Since:
- 1.2.0-Beta3
-
getOlderOnActivitiesOfConnections
List<ExoSocialActivity> getOlderOnActivitiesOfConnections(Identity ownerIdentity, ExoSocialActivity baseActivity, int limit)
Gets the older of activities of connections based on base an activity.- Parameters:
ownerIdentity-baseActivity-limit-- Returns:
- Since:
- 1.2.0-Beta3
-
getUserSpacesActivities
List<ExoSocialActivity> getUserSpacesActivities(Identity ownerIdentity, int offset, int limit)
Gets the activities of spaces where identity can access (manager or member).- Parameters:
ownerIdentity-offset-limit-- Returns:
- Since:
- 1.2.0-Beta3
-
getUserSpacesActivityIds
List<String> getUserSpacesActivityIds(Identity ownerIdentity, int offset, int limit)
Gets the activity id list of spaces where identity can access (manager or member).- Parameters:
ownerIdentity-offset-limit-- Returns:
- the activity id list
- Since:
- 4.3.0
-
getUserSpacesActivitiesForUpgrade
List<ExoSocialActivity> getUserSpacesActivitiesForUpgrade(Identity ownerIdentity, int offset, int limit)
Gets the activities of spaces where identity can access (manager or member) for upgrade Activity Stream feature- Parameters:
ownerIdentity-offset-limit-- Returns:
- Since:
- 4.1.x, 4.0.2
-
getNumberOfUserSpacesActivities
int getNumberOfUserSpacesActivities(Identity ownerIdentity)
Gets the number of activities of spaces where identity can access (manager or member).- Parameters:
ownerIdentity-- Returns:
- Since:
- 1.2.0-Beta3
-
getNumberOfUserSpacesActivitiesForUpgrade
int getNumberOfUserSpacesActivitiesForUpgrade(Identity ownerIdentity)
Gets the number of activities of spaces where identity can access (manager or member) for upgrade Activity Stream feature.- Parameters:
ownerIdentity-- Returns:
- Since:
- 4.1.x, 4.0.2
-
getNumberOfNewerOnUserSpacesActivities
int getNumberOfNewerOnUserSpacesActivities(Identity ownerIdentity, ExoSocialActivity baseActivity)
Gets the number of newer activities of spaces where the identity can access, based on an existing activity.- Parameters:
ownerIdentity-baseActivity-- Returns:
- Since:
- 1.2.0-Beta3
-
getNewerOnUserSpacesActivities
List<ExoSocialActivity> getNewerOnUserSpacesActivities(Identity ownerIdentity, ExoSocialActivity baseActivity, int limit)
Gets the newer activities of spaces where identity can access (manager or member), based on an existing activity.- Parameters:
ownerIdentity-baseActivity-limit-- Returns:
- Since:
- 1.2.0-Beta3
-
getNumberOfOlderOnUserSpacesActivities
int getNumberOfOlderOnUserSpacesActivities(Identity ownerIdentity, ExoSocialActivity baseActivity)
Gets the number of newer activities of spaces where the identity can access, based on an existing activity.- Parameters:
ownerIdentity-baseActivity-- Returns:
- Since:
- 1.2.0-Beta3
-
getOlderOnUserSpacesActivities
List<ExoSocialActivity> getOlderOnUserSpacesActivities(Identity ownerIdentity, ExoSocialActivity baseActivity, int limit)
Gets the older activities of spaces where identity can access (manager or member), based on an existing activity.- Parameters:
ownerIdentity-baseActivity-limit-- Returns:
- Since:
- 1.2.0-Beta3
-
getComments
List<ExoSocialActivity> getComments(ExoSocialActivity existingActivity, boolean loadSubComments, int offset, int limit)
Gets the comments of an activity with offset, limit. If loadSubComments is true, sub comments will be added to the list.- Parameters:
existingActivity-loadSubComments-offset-limit-- Returns:
-
getComments
default List<ExoSocialActivity> getComments(ExoSocialActivity activity, boolean loadSubComments, int offset, int limit, boolean sortDescending)
Gets the comments of an activity with offset, limit. If loadSubComments is true, sub comments will be added to the list. The returned list will be sorted by last post time or by first post time.- Parameters:
activity-loadSubComments-offset-limit-sortDescending-- Returns:
-
getNumberOfComments
int getNumberOfComments(ExoSocialActivity existingActivity)
Gets the number of comments of an activity.- Parameters:
existingActivity-- Returns:
- Since:
- 1.2.0-Beta3
-
getNumberOfNewerComments
int getNumberOfNewerComments(ExoSocialActivity existingActivity, ExoSocialActivity baseComment)
Gets the number of newer comments of an activity based on a comment.- Parameters:
existingActivity-baseComment-- Returns:
- Since:
- 1.2.0-Beta3
-
getNewerComments
List<ExoSocialActivity> getNewerComments(ExoSocialActivity existingActivity, ExoSocialActivity baseComment, int limit)
Gets the newer comments of an activity based on a comment.- Parameters:
existingActivity-baseComment-limit-- Returns:
-
getNumberOfOlderComments
int getNumberOfOlderComments(ExoSocialActivity existingActivity, ExoSocialActivity baseComment)
Gets the number of newer comments of an activity based on a comment.- Parameters:
existingActivity-baseComment-- Returns:
- Since:
- 1.2.0-Beta3
-
getOlderComments
List<ExoSocialActivity> getOlderComments(ExoSocialActivity existingActivity, ExoSocialActivity baseComment, int limit)
Gets the older comments of an activity based on a comment.- Parameters:
existingActivity-baseComment-limit-- Returns:
- Since:
- 1.2.0-Beta3
-
getActivityProcessors
SortedSet<ActivityProcessor> getActivityProcessors()
Gets the activity processors.- Returns:
- 1.2.0-GA
-
updateActivity
void updateActivity(ExoSocialActivity existingActivity) throws ActivityStorageException
Updates an existing activity. If the updatedDate is different than the previous one, it is updated and the activity is moved up in the activity stream, otherwise the activity is updated without being moved in the stream.- Parameters:
existingActivity-- Throws:
ActivityStorageException
-
getNumberOfNewerOnActivityFeed
int getNumberOfNewerOnActivityFeed(Identity ownerIdentity, Long sinceTime)
Gets the list of newer activities feed based on an existing postedTime.- Parameters:
ownerIdentity-sinceTime-- Returns:
- Since:
- 4.0 Alpha01
-
getNumberOfNewerOnUserActivities
int getNumberOfNewerOnUserActivities(Identity ownerIdentity, Long sinceTime)
Gets the number of newer activities based on an existing postedTime.- Parameters:
ownerIdentity-sinceTime-- Returns:
- Since:
- 4.0 Alpha01
-
getNumberOfNewerOnActivitiesOfConnections
int getNumberOfNewerOnActivitiesOfConnections(Identity ownerIdentity, Long sinceTime)
Gets the number of newer activities based on postedTime of connections.- Parameters:
ownerIdentity-sinceTime-- Returns:
- Since:
- 4.0 Alpha01
-
getNumberOfNewerOnUserSpacesActivities
int getNumberOfNewerOnUserSpacesActivities(Identity ownerIdentity, Long sinceTime)
Gets the number of newer activities of spaces where the identity can access, based on an existing postedTime.- Parameters:
ownerIdentity-sinceTime-- Returns:
- Since:
- 4.0 Alpha01
-
getNumberOfSpaceActivities
int getNumberOfSpaceActivities(Identity spaceIdentity)
Gets the number of newer activities of spaces where the identity can access.- Parameters:
spaceIdentity-- Returns:
- Since:
- 4.0 Alpha01
-
getNumberOfSpaceActivitiesForUpgrade
int getNumberOfSpaceActivitiesForUpgrade(Identity spaceIdentity)
Gets the number of newer activities of spaces where the identity can access for upgrade Stream feature- Parameters:
spaceIdentity-- Returns:
- Since:
- 4.0.2, 4.1.x
-
getSpaceActivities
List<ExoSocialActivity> getSpaceActivities(Identity spaceIdentity, int index, int limit)
Gets list of activities of spaces where the identity can access.- Parameters:
spaceIdentity-index-limit-- Returns:
- Since:
- 4.0 Alpha01
-
getSpaceActivityIds
List<String> getSpaceActivityIds(Identity spaceIdentity, int index, int limit)
Gets list of activity ids of spaces where the identity can access.- Parameters:
spaceIdentity-index-limit-- Returns:
- Since:
- 4.3.0
-
getSpaceActivitiesForUpgrade
List<ExoSocialActivity> getSpaceActivitiesForUpgrade(Identity spaceIdentity, int index, int limit)
Gets list of activities of spaces where the identity can access for upgrade Stream feature- Parameters:
spaceIdentity-index-limit-- Returns:
- Since:
- 4.0.2, 4.1.x
-
getActivitiesByPoster
List<ExoSocialActivity> getActivitiesByPoster(Identity posterIdentity, int offset, int limit)
Gets activities by poster.- Parameters:
posterIdentity- The identity of given poster.offset- The start point to load.limit- The range to load.- Returns:
- The activities that match the given poster.
- Since:
- 4.0.1-GA
-
getActivitiesByPoster
List<ExoSocialActivity> getActivitiesByPoster(Identity posterIdentity, int offset, int limit, String... activityTypes)
Gets activities by poster and activity's types- Parameters:
posterIdentity- The identity of given poster.offset- The start point to load.limit- The range to load.activityTypes- : type of activities- Returns:
- The activities that match the given poster.
- Since:
- 4.0.2-GA
-
getNumberOfActivitiesByPoster
int getNumberOfActivitiesByPoster(Identity posterIdentity)
Gets the number of activities of poster.- Parameters:
posterIdentity- The given poster identity information.- Returns:
- The size of return results.
- Since:
- 4.0.1-GA
-
getNumberOfActivitiesByPoster
int getNumberOfActivitiesByPoster(Identity ownerIdentity, Identity viewerIdentity)
Gets the number of activities of poster.- Parameters:
viewerIdentity- The given viewer identity information.ownerIdentity- The given owner identity information.- Returns:
- The size of return results.
- Since:
- 4.0.4
-
getNewerOnSpaceActivities
List<ExoSocialActivity> getNewerOnSpaceActivities(Identity spaceIdentity, ExoSocialActivity baseActivity, int limit)
Gets list of newer activities of spaces where the identity can access- Parameters:
spaceIdentity-baseActivity-limit-- Returns:
- Since:
- 4.0 Alpha01
-
getNumberOfNewerOnSpaceActivities
int getNumberOfNewerOnSpaceActivities(Identity spaceIdentity, ExoSocialActivity baseActivity)
Gets the number of newer activities of spaces where the identity can access and based on an existing postedTime of baseActivity.- Parameters:
spaceIdentity-baseActivity-- Returns:
- Since:
- 4.0 Alpha01
-
getOlderOnSpaceActivities
List<ExoSocialActivity> getOlderOnSpaceActivities(Identity spaceIdentity, ExoSocialActivity baseActivity, int limit)
Gets the list of older activities of spaces where the identity can access and based on an existing postedTime of baseActivity.- Parameters:
spaceIdentity-baseActivity-limit-- Returns:
- Since:
- 4.0 Alpha01
-
getNumberOfOlderOnSpaceActivities
int getNumberOfOlderOnSpaceActivities(Identity spaceIdentity, ExoSocialActivity baseActivity)
Gets the number of older activities of spaces where the identity can access and based on an existing postedTime of baseActivity.- Parameters:
spaceIdentity-baseActivity-- Returns:
- Since:
- 4.0 Alpha01
-
getNumberOfNewerOnSpaceActivities
int getNumberOfNewerOnSpaceActivities(Identity spaceIdentity, Long sinceTime)
Gets the number of older activities of spaces where the identity can access and based on an existing postedTime of baseActivity.- Parameters:
spaceIdentity-sinceTime-- Returns:
- Since:
- 4.0 Alpha01
-
getNewerFeedActivities
List<ExoSocialActivity> getNewerFeedActivities(Identity owner, Long sinceTime, int limit)
Gets feed activities base on since time.- Parameters:
owner-sinceTime-limit-- Returns:
- Since:
- 4.0
-
getNewerUserActivities
List<ExoSocialActivity> getNewerUserActivities(Identity owner, Long sinceTime, int limit)
Gets activities of an user base on since time.- Parameters:
owner-sinceTime-limit-- Returns:
- Since:
- 4.0
-
getNewerUserSpacesActivities
List<ExoSocialActivity> getNewerUserSpacesActivities(Identity owner, Long sinceTime, int limit)
Gets activities of an user on spaces base on since time.- Parameters:
owner-sinceTime-limit-- Returns:
- Since:
- 4.0
-
getNewerActivitiesOfConnections
List<ExoSocialActivity> getNewerActivitiesOfConnections(Identity owner, Long sinceTime, int limit)
Gets connections' activities of an user base on since time.- Parameters:
owner-sinceTime-limit-- Returns:
- Since:
- 4.0
-
getNewerSpaceActivities
List<ExoSocialActivity> getNewerSpaceActivities(Identity owner, Long sinceTime, int limit)
Gets space activities base on since time.- Parameters:
owner-sinceTime-limit-- Returns:
- Since:
- 4.0
-
getOlderFeedActivities
List<ExoSocialActivity> getOlderFeedActivities(Identity owner, Long sinceTime, int limit)
Gets feed activities base on since time.- Parameters:
owner-sinceTime-limit-- Returns:
- Since:
- 4.0
-
getOlderUserActivities
List<ExoSocialActivity> getOlderUserActivities(Identity owner, Long sinceTime, int limit)
Gets activities of an user base on since time.- Parameters:
owner-sinceTime-limit-- Returns:
- Since:
- 4.0
-
getOlderUserSpacesActivities
List<ExoSocialActivity> getOlderUserSpacesActivities(Identity owner, Long sinceTime, int limit)
Gets activities of an user on spaces base on since time.- Parameters:
owner-sinceTime-limit-- Returns:
- Since:
- 4.0
-
getOlderActivitiesOfConnections
List<ExoSocialActivity> getOlderActivitiesOfConnections(Identity owner, Long sinceTime, int limit)
Gets connections' activities of an user base on since time.- Parameters:
owner-sinceTime-limit-- Returns:
- Since:
- 4.0
-
getOlderSpaceActivities
List<ExoSocialActivity> getOlderSpaceActivities(Identity owner, Long sinceTime, int limit)
Gets space activities base on since time.- Parameters:
owner-sinceTime-limit-- Returns:
- Since:
- 4.0
-
getNumberOfOlderOnActivityFeed
int getNumberOfOlderOnActivityFeed(Identity ownerIdentity, Long sinceTime)
Gets the list of older activities feed based on an existing postedTime.- Parameters:
ownerIdentity-sinceTime-- Returns:
- Since:
- 4.0
-
getNumberOfOlderOnUserActivities
int getNumberOfOlderOnUserActivities(Identity ownerIdentity, Long sinceTime)
Gets the number of older activities based on an existing postedTime.- Parameters:
ownerIdentity-sinceTime-- Returns:
- Since:
- 4.0
-
getNumberOfOlderOnActivitiesOfConnections
int getNumberOfOlderOnActivitiesOfConnections(Identity ownerIdentity, Long sinceTime)
Gets the number of older activities based on postedTime of connections.- Parameters:
ownerIdentity-sinceTime-- Returns:
- Since:
- 4.0
-
getNumberOfOlderOnUserSpacesActivities
int getNumberOfOlderOnUserSpacesActivities(Identity ownerIdentity, Long sinceTime)
Gets the number of older activities of spaces- Parameters:
ownerIdentity-sinceTime-- Returns:
- Since:
- 4.0
-
getNumberOfOlderOnSpaceActivities
int getNumberOfOlderOnSpaceActivities(Identity ownerIdentity, Long sinceTime)
Gets the number of older activities of spaces base on a time.- Parameters:
ownerIdentity-sinceTime-- Returns:
- Since:
- 4.0
-
getNewerComments
List<ExoSocialActivity> getNewerComments(ExoSocialActivity existingActivity, Long sinceTime, int limit)
Gets the newer comments of an activity based on an updated time.- Parameters:
existingActivity-sinceTime-limit-- Returns:
- Since:
- 4.0
-
getOlderComments
List<ExoSocialActivity> getOlderComments(ExoSocialActivity existingActivity, Long sinceTime, int limit)
Gets the older comments of an activity based on an updated time.- Parameters:
existingActivity-sinceTime-limit-- Returns:
- Since:
- 4.0
-
getNumberOfNewerComments
int getNumberOfNewerComments(ExoSocialActivity existingActivity, Long sinceTime)
Gets the number of newer comments- Parameters:
existingActivity-sinceTime-- Returns:
- Since:
- 4.0
-
getNumberOfOlderComments
int getNumberOfOlderComments(ExoSocialActivity existingActivity, Long sinceTime)
Gets the number of older comments- Parameters:
existingActivity-sinceTime-- Returns:
- Since:
- 4.0
-
getAllActivities
List<ExoSocialActivity> getAllActivities(int index, int limit)
Get all activities- Parameters:
index-limit-- Returns:
-
getSubComments
List<ExoSocialActivity> getSubComments(ExoSocialActivity comment)
Get all sub comments of a chosen comment- Parameters:
comment-- Returns:
-
getActivities
List<ExoSocialActivity> getActivities(List<String> activityIdList)
Load activities switch list of IDs- Parameters:
activityIdList-- Returns:
-
getStreamFeedOwnerIds
default Set<Long> getStreamFeedOwnerIds(Identity identity)
Computes the owner Ids of Streams that the user identity can see in his main activity stream (Spaces where the user is member and his confirmed connections)
-
createShareActivityAction
default ActivityShareAction createShareActivityAction(ActivityShareAction activityShareAction)
Stores in database the share activity action detail- Parameters:
activityShareAction-ActivityShareActionto store- Returns:
- created
ActivityShareAction
-
hideActivity
default ExoSocialActivity hideActivity(String activityId)
Hides an activity to not be displayed in stream, but keep it accessible in standalone mode- Parameters:
activityId- Activity Identifier to hide- Returns:
- hidden
ExoSocialActivity
-
isActivityExists
default boolean isActivityExists(String activityId)
- Parameters:
activityId-ExoSocialActivitytechnical identifier- Returns:
- true if activity exists else false
-
-