@StableMinor(version="12.4", sinceVersion="8.2") @Path(value="/lumis/service/activitystream/rest") public class ActivityStreamResource extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ActivityStreamResource.ActivityDocumentListResult
JAXB entity used to return a list of activity documents.
|
static class |
ActivityStreamResource.CountVO
Value object used for returning a numeric count.
|
static class |
ActivityStreamResource.MessageVO
Value object used by
addMessage(MessageVO) . |
Constructor and Description |
---|
ActivityStreamResource() |
Modifier and Type | Method and Description |
---|---|
void |
addMessage(ActivityStreamResource.MessageVO message)
Adds an activity representing a message by the current user.
|
void |
deleteActivity(String activityId)
Deletes an activity.
|
ActivityStreamResource.ActivityDocumentListResult |
getActivities(String activityStreamInterfaceInstanceId,
DateParam before,
int maxResults)
Returns the list of
activity documents returned by
ActivityStreamManager.getRecentActivities using the given parameters. |
ActivityStreamResource.CountVO |
getUnreadActivitiesCount(String activityStreamInterfaceInstanceId,
DateParam before)
Returns the number of unread activities the current user has in the specified activity stream interface instance.
|
ActivityStreamResource.CountVO |
markActivitiesAsRead(String activityStreamInterfaceInstanceId,
DateParam before)
Marks all activities displayed in the specified interface instance as read by the current user.
|
void |
markActivityAsRead(String activityId)
Marks an activity as read by the current user.
|
@POST @Path(value="/messages") @Consumes(value="application/json") public void addMessage(ActivityStreamResource.MessageVO message) throws Exception
message
- the message.Exception
@GET @Path(value="/activities") @Produces(value="application/json") public ActivityStreamResource.ActivityDocumentListResult getActivities(@NotNull @QueryParam(value="activityStreamInterfaceInstanceId") String activityStreamInterfaceInstanceId, @QueryParam(value="before") DateParam before, @DefaultValue(value="10") @QueryParam(value="maxResults") int maxResults) throws PortalException
activity documents
returned by
ActivityStreamManager.getRecentActivities
using the given parameters.activityStreamInterfaceInstanceId
- the identifier of the activity stream interface instance to use as base for generating the result.beforeTimeMillis
- only consider activities created before this value. If null
it is ignored.maxResults
- maximum number of activities to return.PortalException
ActivityStreamManager#getRecentActivities(String, String, Long, Integer)
@DELETE @Path(value="/activities/{activityId:[A-F0-9]{32}}") public void deleteActivity(@PathParam(value="activityId") @NotNull String activityId) throws PortalException
activityId
- the activity identifier.PortalException
@GET @Path(value="/activities/unreadCount") @Produces(value="application/json") public ActivityStreamResource.CountVO getUnreadActivitiesCount(@NotNull @QueryParam(value="activityStreamInterfaceInstanceId") String activityStreamInterfaceInstanceId, @QueryParam(value="before") DateParam before) throws PortalException
activityStreamInterfaceInstanceId
- the interface instance identifier.before
- if not null
, only the activities before the specified date-time will be relevant.PortalException
@POST @Path(value="/activities/{activityId:[A-F0-9]{32}}/markAsRead") public void markActivityAsRead(@NotNull @PathParam(value="activityId") String activityId) throws PortalException
activityId
- the activity identifier.PortalException
@POST @Path(value="/activities/markAllAsRead") public ActivityStreamResource.CountVO markActivitiesAsRead(@NotNull @QueryParam(value="activityStreamInterfaceInstanceId") String activityStreamInterfaceInstanceId, @QueryParam(value="before") DateParam before) throws PortalException
activityStreamInterfaceInstanceId
- the interface instance identifier.before
- if not null
, only the activities before the specified date-time will be relevant.PortalException
LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.