public interface NotificationService
Modifier and Type | Field and Description |
---|---|
static String |
COMPLETE_DELETE |
static String |
COMPLETE_GO_LIVE
Action Completed Message Keys
|
static String |
COMPLETE_REJECT |
static String |
COMPLETE_SCHEDULE_GO_LIVE |
static String |
COMPLETE_SUBMIT_TO_GO_LIVE |
Modifier and Type | Method and Description |
---|---|
String |
getNotificationMessage(String site,
NotificationMessageType type,
String key,
Locale locale,
org.apache.commons.lang3.tuple.Pair<String,Object>... params)
Gets and process notification message
|
void |
notify(String site,
List<String> toUsers,
String key,
Locale locale,
org.apache.commons.lang3.tuple.Pair<String,Object>... params)
Process and Sends a generic email.
|
void |
notifyApprovesContentSubmission(String site,
List<String> usersToNotify,
List<String> itemsSubmitted,
String submitter,
ZonedDateTime scheduleDate,
boolean isADelete,
String submissionComments,
Locale locale)
Send to all given users a notification of content that need to be review.
|
void |
notifyContentApproval(String site,
String submitterUser,
List<String> itemsSubmitted,
String approver,
ZonedDateTime scheduleDate,
Locale locale)
Sends Notification when content was approve.
|
void |
notifyContentRejection(String site,
String submittedBy,
List<String> rejectedItems,
String rejectionReason,
String userThatRejects,
Locale locale)
Notifies to the submitter that the content has been rejected.
|
void |
notifyDeploymentError(String name,
Throwable throwable)
Sends a email to configure emails when a deployment had fail
|
void |
notifyDeploymentError(String site,
Throwable throwable,
List<String> filesUnableToPublish,
Locale locale)
Sends a email to configure emails when a deployment had fail
|
void |
reloadConfiguration(String site)
Reloads the current configuration of the notification Service.
|
static final String COMPLETE_GO_LIVE
static final String COMPLETE_REJECT
static final String COMPLETE_SCHEDULE_GO_LIVE
static final String COMPLETE_SUBMIT_TO_GO_LIVE
static final String COMPLETE_DELETE
void notifyDeploymentError(String site, Throwable throwable, List<String> filesUnableToPublish, Locale locale)
Sends a email to configure emails when a deployment had fail
site
- Name of the site which the deployment fail.throwable
- Throwable error which break the deployment. (Can be null)filesUnableToPublish
- List of files that where unable to publish (can be null)locale
- Language of the notification ,if null defaults to English.void notifyDeploymentError(String name, Throwable throwable)
Sends a email to configure emails when a deployment had fail
name
- Name of the site which the deployment fail.throwable
- Throwable error which break the deployment. (Can be null)void notify(String site, List<String> toUsers, String key, Locale locale, org.apache.commons.lang3.tuple.Pair<String,Object>... params)
site
- Site of the Content.toUsers
- List of recipients.key
- key of the message wantedlocale
- Language of the message ,if null defaults to English.params
- parameters of the message this params will be use to process the message string.void reloadConfiguration(String site)
site
- Site to reload the notification service configuration.void notifyContentApproval(String site, String submitterUser, List<String> itemsSubmitted, String approver, ZonedDateTime scheduleDate, Locale locale)
site
- Site of the Content.submitterUser
- User that submit the content to approval.itemsSubmitted
- List of Item paths that where approve (can be null)approver
- User that approve the content.scheduleDate
- locale
- Language of the notification ,if null defaults to English.String getNotificationMessage(String site, NotificationMessageType type, String key, Locale locale, org.apache.commons.lang3.tuple.Pair<String,Object>... params)
site
- Site of the Content.type
- Type of the message wanted.key
- key of the message wantedlocale
- Language of the message ,if null defaults to English.params
- parameters of the message this params will be use to process the message string.the message in the given locale and processed with the given variables.
If message not found either by key/locale it will return a default string)
void notifyApprovesContentSubmission(String site, List<String> usersToNotify, List<String> itemsSubmitted, String submitter, ZonedDateTime scheduleDate, boolean isADelete, String submissionComments, Locale locale)
site
- Site of the Content.usersToNotify
- List of users (username) to be notify.itemsSubmitted
- List of Item paths that where approve (can be null)submitter
- User (username) that is submitting the content.scheduleDate
- When the content should go live (null if now (or as soon is approve)).locale
- Language of the message ,if null defaults to English.isADelete
- Is this submission a delete one.void notifyContentRejection(String site, String submittedBy, List<String> rejectedItems, String rejectionReason, String userThatRejects, Locale locale)
site
- Site of the Content.submittedBy
- User that submitted the rejected content.rejectedItems
- Items that where rejectedrejectionReason
- why the content was rejected.userThatRejects
- User that is rejecting the content.locale
- Language of the message ,if null defaults to English.Copyright © 2018 CrafterCMS. All rights reserved.