|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface INotificationManager
This is the primary interface for operations on notifications.
Method Summary | |
---|---|
Collection<NotificationId> |
consume(Collection<NotificationId> notificationIds)
Consumes a set of notifications. |
boolean |
consume(NotificationId notificationId)
Consumes a notification. |
Collection<Notification> |
getActiveNotifications(String username,
String webApp)
Retrieves all active notifications for the specified user and webapp. |
SortableFilterablePagedResult<NotificationPayload> |
getNotificationPayloads(CustomizationContext context,
NotificationCriteria criteria,
int pageSize)
Retrieves a paginated set of NotificationPayload objects matching the specified criteria. |
SortableFilterablePagedResult<String> |
getNotificationRecipients(CustomizationContext context,
NotificationCriteria criteria,
int pageSize)
Retrieves a set of usernames who received notifications matching the specified criteria. |
SortableFilterablePagedResult<Notification> |
getNotifications(CustomizationContext context,
NotificationCriteria criteria,
int pageSize)
Retrieves a paginated set of Notification objects matching the specified criteria. |
void |
notifyUser(String username,
NotificationPayloadInfo payload)
Used to send a notification to a single user. |
void |
notifyUsers(INotificationUserEnumerator userEnumerator,
NotificationPayloadInfo payload)
Used to send a notification to multiple users in an asynchronous manner. |
void |
removeNotifications(NotificationCriteria criteria)
Removes a set of notification objects matching the specified criteria; use with caution. |
void |
synchronousNotifyUsers(INotificationUserEnumerator userEnumerator,
NotificationPayloadInfo payload)
Used to send a notification to multiple users in a synchronous manner. |
Method Detail |
---|
void notifyUser(String username, NotificationPayloadInfo payload) throws IllegalArgumentException, RemoteException
username
- the user to send the notification to.payload
- the payload of the notification to send.
IllegalArgumentException
- if any of the fields in the
NotificationPayloadInfo
object are invalid.
RemoteException
void notifyUsers(INotificationUserEnumerator userEnumerator, NotificationPayloadInfo payload) throws IllegalArgumentException, RemoteException
userEnumerator
- an object which can be used to enumerate the set
of users to send the notification to. It is important that
this method is never called twice with the same instance of a
userEnumerator
object, as there is no
guarantee that the requests will not be processed in parallel
and the enumeration is not thread-safe.payload
- the payload of the notification to send.
IllegalArgumentException
- if any of the fields in the
NotificationPayloadInfo
object are invalid.
RemoteException
Collection<Notification> getActiveNotifications(String username, String webApp) throws RemoteException
username
- the username to retrieve notifications for.webApp
- the webapp name to retrieve notifications for.
If null, all active notifications for all webapps are returned.
RemoteException
boolean consume(NotificationId notificationId) throws RemoteException
notificationId
- the ID of the notification to consume.
RemoteException
Collection<NotificationId> consume(Collection<NotificationId> notificationIds) throws RemoteException
notificationIds
- a collection of IDs for the notifications to consume.
RemoteException
SortableFilterablePagedResult<Notification> getNotifications(CustomizationContext context, NotificationCriteria criteria, int pageSize) throws RemoteException
context
- the customization context for the request.criteria
- the criteria notifications must match to be returned.pageSize
- the number of notifications to return per result page.
RemoteException
SortableFilterablePagedResult<NotificationPayload> getNotificationPayloads(CustomizationContext context, NotificationCriteria criteria, int pageSize) throws RemoteException
context
- the customization context for the request.criteria
- the criteria notification payloads must match to be returned.pageSize
- the number of notification payloads to return per result page.
RemoteException
SortableFilterablePagedResult<String> getNotificationRecipients(CustomizationContext context, NotificationCriteria criteria, int pageSize) throws RemoteException
context
- the customization context for the request.criteria
- the criteria notification payloads must match to be returned.pageSize
- the number of notification payloads to return per result page.
RemoteException
void removeNotifications(NotificationCriteria criteria) throws RemoteException
removeNotifications(new NotificationCriteria())
will remove ALL notifications in the database.
criteria
- the criteria notifications must match to be removed.
RemoteException
void synchronousNotifyUsers(INotificationUserEnumerator userEnumerator, NotificationPayloadInfo payload) throws IllegalArgumentException, RemoteException
notifyUsers()
method be used
when sending a notification to a large number of users, as it runs
asynchronously.
userEnumerator
- an object which can be used to enumerate the set
of users to send the notification to.payload
- the payload of the notification to send.
IllegalArgumentException
- if any of the fields in the
NotificationPayloadInfo
object are invalid.
RemoteException
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |