-
Notifications
You must be signed in to change notification settings - Fork 13
API notification
The notification API is used as a means for transferring notifications between interested parties. In most cases a notification provider maintains a list of messages, and each message is associated with an ever increasing 'epoch number.' A client can retrieve the latest epoch number from a provider and then poll for changes since that epoch - all updates since that point can be returned.
HttpNotificationApi notificationApi = new HttpNotificationApi(loginApi);
List<RaptureNotificationConfig> retVal = notificationApi.getNotificationManagerConfigs();retVal = baseAPI.doNotification_GetNotificationManagerConfigs();Entitlement: /admin/notification
This method retrieves the notification providers in use at this Rapture system.
This function takes no parameters.
| Type | Description |
|---|---|
| List |
HttpNotificationApi notificationApi = new HttpNotificationApi(loginApi);
List<RaptureFolderInfo> retVal = notificationApi.listNotificationsByUriPrefix(uriPrefix);retVal = baseAPI.doNotification_ListNotificationsByUriPrefix(uriPrefix);Entitlement: /user/get
Returns a list of full display names of the paths below this one. Ideally optimized depending on the repo.
| Parameter | Type | Description |
|---|---|---|
| uriPrefix | String |
| Type | Description |
|---|---|
| List |
HttpNotificationApi notificationApi = new HttpNotificationApi(loginApi);
List<RaptureNotificationConfig> retVal = notificationApi.findNotificationManagerConfigsByPurpose(purpose);retVal = baseAPI.doNotification_FindNotificationManagerConfigsByPurpose(purpose);Entitlement: /admin/notification
Notification providers have an associated purpose - this method returns only those providers that match the given purpose.
| Parameter | Type | Description |
|---|---|---|
| purpose | String |
| Type | Description |
|---|---|
| List |
HttpNotificationApi notificationApi = new HttpNotificationApi(loginApi);
RaptureNotificationConfig retVal = notificationApi.createNotificationManager(notificationManagerUri, config, purpose);retVal = baseAPI.doNotification_CreateNotificationManager(notificationManagerUri, config, purpose);Entitlement: /admin/notification
This method creates a definition of a notification provider.
| Parameter | Type | Description |
|---|---|---|
| notificationManagerUri | String | |
| config | String | |
| purpose | String |
| Type | Description |
|---|---|
| RaptureNotificationConfig |
Config info for the main object in the Notification API.
| Field | Type |
|---|---|
| name | String |
| config | String |
| purpose | String |
HttpNotificationApi notificationApi = new HttpNotificationApi(loginApi);
boolean retVal = notificationApi.notificationManagerExists(notificationManagerUri);retVal = baseAPI.doNotification_NotificationManagerExists(notificationManagerUri);Entitlement: /admin/notification
Indicates whether a notification provider with notificationName was found.
| Parameter | Type | Description |
|---|---|---|
| notificationManagerUri | String |
| Type | Description |
|---|---|
| boolean |
HttpNotificationApi notificationApi = new HttpNotificationApi(loginApi);
RaptureNotificationConfig retVal = notificationApi.getNotificationManagerConfig(notificationManagerUri);retVal = baseAPI.doNotification_GetNotificationManagerConfig(notificationManagerUri);Entitlement: /admin/notification
This method returns the low level config for a given notification provider.
| Parameter | Type | Description |
|---|---|---|
| notificationManagerUri | String |
| Type | Description |
|---|---|
| RaptureNotificationConfig |
Config info for the main object in the Notification API.
| Field | Type |
|---|---|
| name | String |
| config | String |
| purpose | String |
HttpNotificationApi notificationApi = new HttpNotificationApi(loginApi);
void retVal = notificationApi.deleteNotificationManager(notificationManagerUri);retVal = baseAPI.doNotification_DeleteNotificationManager(notificationManagerUri);Entitlement: /admin/notification
This method removes a notification provider and all its content.
| Parameter | Type | Description |
|---|---|---|
| notificationManagerUri | String |
| Type | Description |
|---|---|
| void |
HttpNotificationApi notificationApi = new HttpNotificationApi(loginApi);
Long retVal = notificationApi.getLatestNotificationEpoch(notificationManagerUri);retVal = baseAPI.doNotification_GetLatestNotificationEpoch(notificationManagerUri);Entitlement: /user/notification
This method retrieves the current epoch number for a given notification point.
| Parameter | Type | Description |
|---|---|---|
| notificationManagerUri | String |
| Type | Description |
|---|---|
| Long |
HttpNotificationApi notificationApi = new HttpNotificationApi(loginApi);
String retVal = notificationApi.publishNotification(notificationManagerUri, referenceId, content, contentType);retVal = baseAPI.doNotification_PublishNotification(notificationManagerUri, referenceId, content, contentType);Entitlement: /user/notification
This method pushes a notification to a provider.
| Parameter | Type | Description |
|---|---|---|
| notificationManagerUri | String | |
| referenceId | String | |
| content | String | |
| contentType | String |
| Type | Description |
|---|---|
| String |
HttpNotificationApi notificationApi = new HttpNotificationApi(loginApi);
NotificationResult retVal = notificationApi.findNotificationsAfterEpoch(notificationManagerUri, epoch);retVal = baseAPI.doNotification_FindNotificationsAfterEpoch(notificationManagerUri, epoch);Entitlement: /admin/notification
This method returns the changes seen on a notification since an epoch. A client would then update its latest epoch by using the value in the notification result.
| Parameter | Type | Description |
|---|---|---|
| notificationManagerUri | String | |
| epoch | Long |
| Type | Description |
|---|---|
| NotificationResult |
The object returned by a notification
| Field | Type |
|---|---|
| currentEpoch | Long |
| references | List(String) |
HttpNotificationApi notificationApi = new HttpNotificationApi(loginApi);
NotificationInfo retVal = notificationApi.getNotification(notificationUri, id);retVal = baseAPI.doNotification_GetNotification(notificationUri, id);Entitlement: /admin/notification
This method returns a notification message given its id.
| Parameter | Type | Description |
|---|---|---|
| notificationUri | String | |
| id | String |
| Type | Description |
|---|---|
| NotificationInfo |
Contains all relevant data for a notification.
| Field | Type |
|---|---|
| id | String |
| content | String |
| reference | String |
| epoch | Long |
| when | Date |
| contentType | String |
| who | String |