Package lumis.portal.activitystream
Interface IActivityStreamManager
-
- All Known Subinterfaces:
IActivityStreamManagerSPI
- All Known Implementing Classes:
ActivityStreamManager
@StableMinor(version="14.1", sinceVersion="8.2") public interface IActivityStreamManager
Service provider interface for the activity stream framework manager.- Since:
- 8.2.0
- Version:
- $Revision: 24683 $ $Date: 2021-08-23 18:55:58 -0300 (Mon, 23 Aug 2021) $
-
-
Field Summary
Fields Modifier and Type Field Description static String
ACTION_ID_ADD
Identifier of the standard action of add.static String
ACTION_ID_CREATE
Identifier of the standard action of create.static String
ACTION_ID_DELETE
Identifier of the standard action of delete.static String
ACTION_ID_REMOVE
Identifier of the standard action of add.static String
ACTION_ID_SHARE
Identifier of the standard action of share.static String
ACTION_ID_UPDATE
Identifier of the standard action of update.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAction(ActivityAction action)
Adds a new action that may be used byactivities
.void
addActivity(Activity activity)
Adds an activity.void
addObjectType(ActivityObjectType objectType)
Adds an object type to the global registry.ISearchQueryFilter
createActivityStructureSearchQueryFilter(String rootChannelId, Collection<String> areaTags)
Creates aISearchQueryFilter
that filters the activities that belongs to a part of the structure of the portal.ISearchQueryFilter
createPriorityAndUserSearchQueryFilter(double minimumPriority, String userId)
Returns a big data search query filter that filters the activities according to the ones the specified user is allowed to access and has a priority of at least the value specified.void
deleteAction(ActivityAction action)
Deletes an action.void
deleteActivity(String activityId)
Deletes an activity given its identifier.void
deleteObjectType(ActivityObjectType objectType)
Deletes an object type from the global registry.ActivityAction
getAction(String actionId)
Returns the action of given identifier.ActivityObjectType
getObjectType(String objectTypeId)
Returns the object type of given identifier.Collection<String>
getReadActivityIds(long minimumTimeMillis)
Returns the identifiers of activities read by the current user since the specified time millis.boolean
isActivityRead(String activityId)
Verifies if an activity was already read by the current user.void
markActivityAsRead(String activityId)
Marks an activity as read by the current user.void
markActivityAsUnread(String activityId)
Marks an activity as unread by the current user.
-
-
-
Field Detail
-
ACTION_ID_CREATE
static final String ACTION_ID_CREATE
Identifier of the standard action of create. Indicates that theactor
has created theobject
.For indicating an object was added to another object, use
ACTION_ID_ADD
.The opposite of this action is
ACTION_ID_DELETE
.- Since:
- 8.2.0
- See Also:
- Constant Field Values
-
ACTION_ID_UPDATE
static final String ACTION_ID_UPDATE
- Since:
- 8.2.0
- See Also:
- Constant Field Values
-
ACTION_ID_DELETE
static final String ACTION_ID_DELETE
Identifier of the standard action of delete. Indicates that theactor
has deleted theobject
.For removing an object from another object, use
ACTION_ID_REMOVE
.The opposite of this action is
ACTION_ID_CREATE
.- Since:
- 8.2.0
- See Also:
- Constant Field Values
-
ACTION_ID_SHARE
static final String ACTION_ID_SHARE
Identifier of the standard action of share. Indicates that theactor
has shared theobject
to thetarget
.- Since:
- 8.2.0
- See Also:
- Constant Field Values
-
ACTION_ID_ADD
static final String ACTION_ID_ADD
Identifier of the standard action of add. Indicates that theactor
has added theobject
to thetarget
.For indicating creation of new object, use
ACTION_ID_CREATE
.The opposite of this action is
ACTION_ID_REMOVE
.- Since:
- 8.2.0
- See Also:
- Constant Field Values
-
ACTION_ID_REMOVE
static final String ACTION_ID_REMOVE
Identifier of the standard action of add. Indicates that theactor
has removed theobject
from thetarget
.For indicating deletion of a object, use
ACTION_ID_DELETE
.The opposite of this action is
ACTION_ID_ADD
.- Since:
- 8.2.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
addActivity
void addActivity(Activity activity) throws PortalException
Adds an activity.- Parameters:
activity
- the activity to add.- Throws:
PortalException
- Since:
- 8.2.0
-
deleteActivity
void deleteActivity(String activityId) throws PortalException
Deletes an activity given its identifier.- Parameters:
activityId
- the activity identifier.- Throws:
PortalException
- Since:
- 8.2.0
-
getObjectType
ActivityObjectType getObjectType(String objectTypeId) throws PortalException
Returns the object type of given identifier.- Parameters:
objectTypeId
- the object type identifier.- Returns:
- the persisted object type object.
- Throws:
PortalObjectNotFoundException
- if no object type with the given identifier was found.PortalException
- Since:
- 8.2.0
-
addObjectType
void addObjectType(ActivityObjectType objectType) throws PortalException
Adds an object type to the global registry.- Parameters:
objectType
- the object type.- Throws:
PortalException
- Since:
- 8.2.0
-
deleteObjectType
void deleteObjectType(ActivityObjectType objectType) throws PortalException
Deletes an object type from the global registry. All activities that refers the specified object type are also deleted.- Parameters:
objectType
- the object type.- Throws:
PortalException
- Since:
- 8.2.0
-
addAction
void addAction(ActivityAction action) throws PortalException
Adds a new action that may be used byactivities
.- Parameters:
action
- the action to add.- Throws:
PortalException
- if the action could be be added.- Since:
- 8.2.0
-
getAction
ActivityAction getAction(String actionId) throws PortalException
Returns the action of given identifier.- Parameters:
actionId
- the action identifier.- Returns:
- the persisted action object.
- Throws:
PortalObjectNotFoundException
- if no action with the given identifier was found.PortalException
- Since:
- 8.2.0
-
deleteAction
void deleteAction(ActivityAction action) throws PortalException
Deletes an action. All activities that refers the specified action are also deleted.- Parameters:
action
- the action to be deleted.- Throws:
PortalException
- if the action could not be deleted.- Since:
- 8.2.0
-
createActivityStructureSearchQueryFilter
ISearchQueryFilter createActivityStructureSearchQueryFilter(String rootChannelId, Collection<String> areaTags) throws PortalException
Creates aISearchQueryFilter
that filters the activities that belongs to a part of the structure of the portal.The filter created automatically discards the structure elements the current user does not have view permission on.
- Parameters:
rootChannelId
- the identifier of the root channel of the portal area to be considered. Ifnull
, the portal root channel is used.areaTags
- the area tags to use to filter which part of structure is to be considered. Ifnull
, area tags will not be used to filter.- Returns:
- the corresponding search query filter.
- Throws:
PortalException
- Since:
- 8.2.0
- See Also:
SearchQuery.setControlFilter(ISearchQueryFilter)
,IBigDataSearcher.search(SearchQuery)
,IBigDataManager.getDefaultRepository()
,ManagerFactory.getBigDataManager()
,ActivityDocument
-
createPriorityAndUserSearchQueryFilter
ISearchQueryFilter createPriorityAndUserSearchQueryFilter(double minimumPriority, String userId) throws PortalException
Returns a big data search query filter that filters the activities according to the ones the specified user is allowed to access and has a priority of at least the value specified.- Parameters:
minimumPriority
- the minimum priority value.userId
- the user identifier,- Returns:
- the query filter.
- Throws:
PortalException
- Since:
- 8.2.0
-
markActivityAsRead
void markActivityAsRead(String activityId) throws PortalException
Marks an activity as read by the current user. If the activity is already marked as read by the current user, this method has no effect.- Parameters:
activityId
- the activity identifier.- Throws:
PortalException
- if the operation could not be completed.- Since:
- 8.2.0
-
markActivityAsUnread
void markActivityAsUnread(String activityId) throws PortalException
Marks an activity as unread by the current user. If the activity is already marked as unread by the current user, this method has no effect.- Parameters:
activityId
- the activity identifier.- Throws:
PortalException
- if the operation could not be completed.- Since:
- 8.2.0
-
isActivityRead
boolean isActivityRead(String activityId) throws PortalException
Verifies if an activity was already read by the current user.- Parameters:
activityId
- the identifier of the activity to be verified.- Returns:
- true if the current user read the activity.
- Throws:
PortalException
- Since:
- 8.2.0
-
getReadActivityIds
Collection<String> getReadActivityIds(long minimumTimeMillis)
Returns the identifiers of activities read by the current user since the specified time millis.- Parameters:
minimumTimeMillis
- the time millis specifying the minimum time value of activity read.- Returns:
- the activity identifiers.
- Since:
- 8.2.0
-
-