Studio Developer Manual / Version 2107
Table Of Contents
To create notifications on the server side, simply inject the NotificationService
and use it at the appropriate position (event/request handler, REST method, task etc.) to create a
new notification with the method createNotification
:
Notification createNotification(@NonNull String type, @NonNull Object recipient, @NonNull String key, @Nullable List<Object> parameters);
A notification always has a combination of type
and key
. The key is basically a
subtype and will be used to determine the correct localization text key on the client
side. An example of a type / key combination is "publicationWorkflow" / "offered".
A notification has a recipient
. This parameter is typed as Object
. For
Studio notifications, it has to be a User
object.
Additional parameters
will be used on the client side to parametrize the
notification's text. In advanced cases they are additionally used to configure actions
and customize the notification's UI. Details are explained below.