Interface SpaceWebNotificationService
public interface SpaceWebNotificationService
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlugin(SpaceWebNotificationPlugin spaceWebNotification) Register the space web notification pluginlongcountUnreadActivities(String username) longcountUnreadActivitiesBySpace(String username, long spaceId) countUnreadItemsByApplication(long creatorId, long spaceId) Get a list of unread items per application to a givenMetadataItemcreatorId by a givenSpaceidentifiercountUnreadItemsBySpace(String username) Get a list of unread items per space to a givenMetadataItemvoiddispatch(org.exoplatform.commons.api.notification.model.NotificationInfo notification, String username) Dispatch notification infogetUnreadActivityIds(String username, long offset, long limit) getUnreadActivityIdsBySpace(String username, long spaceId, long offset, long limit) voidmarkAllAsRead(long userIdentityId) Mark a list of unread items per application as read to a givenMetadataItemcreatorIdvoidmarkAllAsRead(long userIdentityId, long spaceId) Mark a list of unread items per application as read to a givenMetadataItemcreatorId by a givenSpaceidentifiervoidmarkAsRead(SpaceWebNotificationItem notificationItem) Mark a space notification item as readvoidmarkAsUnread(SpaceWebNotificationItem notificationItem) Mark a space notification item as unread
-
Field Details
-
NOTIFICATION_UNREAD_EVENT_NAME
- See Also:
-
NOTIFICATION_READ_EVENT_NAME
- See Also:
-
NOTIFICATION_ALL_READ_EVENT_NAME
- See Also:
-
-
Method Details
-
addPlugin
Register the space web notification plugin- Parameters:
spaceWebNotification-
-
dispatch
void dispatch(org.exoplatform.commons.api.notification.model.NotificationInfo notification, String username) throws Exception Dispatch notification info- Parameters:
notification-username-- Throws:
Exception
-
markAsUnread
Mark a space notification item as unread- Parameters:
notificationItem-- Throws:
Exception
-
markAsRead
Mark a space notification item as read- Parameters:
notificationItem-- Throws:
Exception
-
markAllAsRead
Mark a list of unread items per application as read to a givenMetadataItemcreatorId by a givenSpaceidentifier- Parameters:
userIdentityId-MetadataItemcreatorIdspaceId-SpacespaceId- Throws:
Exception
-
markAllAsRead
Mark a list of unread items per application as read to a givenMetadataItemcreatorId- Parameters:
userIdentityId-MetadataItemcreatorId- Throws:
Exception
-
countUnreadItemsByApplication
Get a list of unread items per application to a givenMetadataItemcreatorId by a givenSpaceidentifier- Parameters:
creatorId-MetadataItemcreatorIdspaceId-SpacespaceId- Returns:
- Map of application and unread items
-
countUnreadItemsBySpace
Get a list of unread items per space to a givenMetadataItem- Returns:
- Map of space id and unread items
-
getUnreadActivityIds
- Parameters:
username- UserIdentityremote idoffset- offset of the querylimit- offset of the query results- Returns:
ListofExoSocialActivityid
-
getUnreadActivityIdsBySpace
List<Long> getUnreadActivityIdsBySpace(String username, long spaceId, long offset, long limit) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Parameters:
username- UserIdentityremote idspaceId-Spaceidoffset- offset of the querylimit- offset of the query results- Returns:
ListofExoSocialActivityid- Throws:
IllegalAccessException- when user isn't member of spaceorg.exoplatform.commons.exception.ObjectNotFoundException- when space not found
-
countUnreadActivities
- Parameters:
username- UserIdentityremote id- Returns:
- count of unread activities
-
countUnreadActivitiesBySpace
long countUnreadActivitiesBySpace(String username, long spaceId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Parameters:
username- UserIdentityremote idspaceId-Spaceid- Returns:
- count of unread activities
- Throws:
IllegalAccessException- when user isn't member of spaceorg.exoplatform.commons.exception.ObjectNotFoundException- when space not found
-