@Component @Named(value="notification.sources") @Singleton public class NotificationSourcesScriptService extends Object implements org.xwiki.script.service.ScriptService
Constructor and Description |
---|
NotificationSourcesScriptService() |
Modifier and Type | Method and Description |
---|---|
List<org.xwiki.notifications.CompositeEvent> |
getEvents(int expectedCount) |
List<org.xwiki.notifications.CompositeEvent> |
getEvents(int expectedCount,
Date untilDate,
List<String> blackList) |
List<org.xwiki.notifications.CompositeEvent> |
getEvents(int expectedCount,
Date untilDate,
String[] blackList) |
long |
getEventsCount(int maxCount)
Return the number of events to display as notifications concerning the current user.
|
public List<org.xwiki.notifications.CompositeEvent> getEvents(int expectedCount) throws org.xwiki.notifications.NotificationException
expectedCount
- number of expected eventsorg.xwiki.notifications.NotificationException
- if error happenspublic List<org.xwiki.notifications.CompositeEvent> getEvents(int expectedCount, Date untilDate, String[] blackList) throws org.xwiki.notifications.NotificationException
expectedCount
- number of expected eventsuntilDate
- do not return events happened after this dateblackList
- array of events id to exclude from the searchorg.xwiki.notifications.NotificationException
- if error happenspublic List<org.xwiki.notifications.CompositeEvent> getEvents(int expectedCount, Date untilDate, List<String> blackList) throws org.xwiki.notifications.NotificationException
expectedCount
- number of expected eventsuntilDate
- do not return events happened after this dateblackList
- list of events id to exclude from the searchorg.xwiki.notifications.NotificationException
- if error happenspublic long getEventsCount(int maxCount) throws org.xwiki.notifications.NotificationException
maxCount
- maximum number of events to countorg.xwiki.notifications.NotificationException
- if an error happensCopyright © 2004–2019 XWiki. All rights reserved.