@Component @Named(value="notification.notifiers") @Singleton public class NotificationNotifiersScriptService extends Object implements org.xwiki.script.service.ScriptService
Constructor and Description |
---|
NotificationNotifiersScriptService() |
Modifier and Type | Method and Description |
---|---|
String |
getFeed(int entryNumber)
Get the RSS notifications feed of the given user.
|
String |
getFeed(String userId,
int entryNumber)
Get the RSS notifications feed of the given user.
|
String |
getNotificationCount(NotificationParameters parameters,
boolean forcePlaceHolder)
Request asynchronously the notifications for the given parameters to retrieve their number.
|
String |
getNotifications(NotificationParameters parameters,
boolean forcePlaceHolder)
Request asynchronously the notifications for the given parameters to display them.
|
org.xwiki.rendering.block.Block |
render(CompositeEvent event)
Generate a rendering Block for a given event to display as notification.
|
public org.xwiki.rendering.block.Block render(CompositeEvent event) throws NotificationException
event
- the event to renderNotificationException
- if an error happenspublic String getFeed(int entryNumber) throws NotificationException
entryNumber
- number of entries to getNotificationException
- if an error occurspublic String getFeed(String userId, int entryNumber) throws NotificationException
userId
- id of the userentryNumber
- number of entries to getNotificationException
- if an error occurs@Unstable public String getNotificationCount(NotificationParameters parameters, boolean forcePlaceHolder) throws NotificationException
parameters
- the NotificationParameters
used to make the request.
You can retrieve it by usingforcePlaceHolder
- true
if the script service should always return a placeholder, even when the data
is immediately available (useful in case of AJAX request).
NotificationSourcesScriptService.getNotificationParameters(Map)
.NotificationException
- in case of error during the request.@Unstable public String getNotifications(NotificationParameters parameters, boolean forcePlaceHolder) throws NotificationException
parameters
- the NotificationParameters
used to make the request.
You can retrieve it by usingforcePlaceHolder
- true
if the script service should always return a placeholder, even when the data
is immediately available (useful in case of AJAX request).
NotificationSourcesScriptService.getNotificationParameters(Map)
.NotificationException
- in case of error during the request.Copyright © 2004–2021 XWiki. All rights reserved.