@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.
|
NotificationParameters |
getNotificationParameters(Map<String,String> parameters)
Create a
NotificationParameters object to be used to retrieve the notifications of the given 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 happens@Unstable public NotificationParameters getNotificationParameters(Map<String,String> parameters) throws org.xwiki.notifications.NotificationException
NotificationParameters object to be used to retrieve the notifications of the given user.parameters - a map of parameters to use, see the documentation from
DefaultNotificationParametersFactory.ParametersKey to see the available parameters and accepted values.NotificationParameters that can be used to retrieve events.org.xwiki.notifications.NotificationException - in case of errors.Copyright © 2004–2022 XWiki. All rights reserved.