A spring boot microservice for processing messages in uportal
View the Project on GitHub UW-Madison-DoIT/uportal-messaging
Note: All messages must be contained within the “messages” array.
{
"messages": [
{
"id": "sample-unactivated-services-notification",
"title": "You need to modify your NetID account to activate essential UW Services.",
"titleShort": null,
"description": "Because this message's messageType is 'notification', this field is not actually needed.",
"descriptionShort": null,
"messageType": "notification",
"featureImageUrl": null,
"priority": "high",
"recurrence": true,
"dismissible": false,
"filter": {
"goLiveDate": "2017-08-01T09:30",
"expireDate": "2017-08-02",
"groups": ["Users - Service Activation Required"],
},
"data": {
"dataUrl": "/restProxyURL/unactivatedServices",
"dataObject": "services",
"dataArrayFilter": {"priority":"essential", "type":"netid"},
"dataMessageTitle": ["result", "title"],
"dataMessageMoreInfoUrl": ["result", "url"],
},
"actionButton": {
"label": "Activate services",
"url": "my.wisc.edu/go/example/path"
},
"moreInfoButton": {
"label": "Learn more",
"url": "/learnMore"
},
"confirmButton": null
}
]
}
Attribute breakdown
messageType
is “announcement”.messageType
is “announcement”.dataUrl
is present, otherwise ignored. Used as an optional further refinement from dataUrl, if you want the notification to show only if the specific object is in the data.dataUrl
is present, otherwise ignored. Used as an optional further refinement from dataUrl. If your object return is an array, you can filter on the array. Does support multiple filtering criteria as shown in the example. If used in conjunction with dataObject
, will filter to dataObject
first. [AngularJS array filtering documentation] (https://docs.angularjs.org/api/ng/filter/filter)dataUrl
. Expects an array for where to find the title in the data response from dataUrl
.dataUrl
is specified and the more info button
is configured. Used to set the url of the more info button
. Expects an array for where to find the more info button url
in the data response from dataUrl
.messageType
is “notification”.
actionButton
.actionButton
. Required for messageType
“announcement” with priority
“high”.