close

Filter

loading table of contents...

Studio Developer Manual / Version 2401

Table Of Contents

9.23.3 Creating Notifications (Server Side)

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.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.