Interface NotificationService

All Known Implementing Classes:
NotificationServiceImpl

public interface NotificationService
New Interface for Workflow Notification Service.
Author:
Carlos Ortiz
  • Field Details

  • Method Details

    • notifyDeploymentError

      void notifyDeploymentError(String site, Throwable throwable, List<PublishRequest> filesUnableToPublish)

      Sends a email to configure emails when a deployment had fail

      Parameters:
      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)
    • notifyDeploymentError

      void notifyDeploymentError(String name, Throwable throwable)

      Sends a email to configure emails when a deployment had fail

      Parameters:
      name - Name of the site which the deployment fail.
      throwable - Throwable error which break the deployment. (Can be null)
    • notify

      void notify(String site, List<String> toUsers, String key, org.apache.commons.lang3.tuple.Pair<String,Object>... params)
      Process and Sends a generic email.
      Parameters:
      site - Site of the Content.
      toUsers - List of recipients.
      key - key of the message wanted
      params - parameters of the message this params will be used to process the message string.
    • notifyContentApproval

      void notifyContentApproval(String site, String submitterUser, List<String> itemsSubmitted, String approver, ZonedDateTime scheduleDate)
      Sends Notification when content was approve.
      Parameters:
      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 - scheduled date
    • getNotificationMessage

      String getNotificationMessage(String site, NotificationMessageType type, String key, org.apache.commons.lang3.tuple.Pair<String,Object>... params)
      Gets and process notification message
      Parameters:
      site - Site of the Content.
      type - Type of the message wanted.
      key - key of the message wanted
      params - parameters of the message this params will be used to process the message string.
      Returns:

      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)

    • notifyApprovesContentSubmission

      void notifyApprovesContentSubmission(String site, List<String> usersToNotify, List<String> itemsSubmitted, String submitter, ZonedDateTime scheduleDate, boolean isADelete, String submissionComments)
      Send to all given users a notification of content that need to be review.
      Parameters:
      site - Site of the Content.
      usersToNotify - List of users (username) to be notified.
      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 approved)).
      isADelete - Is this submission a delete one.
      submissionComments - submission comments
    • notifyContentRejection

      void notifyContentRejection(String site, List<String> submittedByList, List<String> rejectedItems, String rejectionReason, String userThatRejects)
      Notifies to the submitter that the content has been rejected.
      Parameters:
      site - Site of the Content.
      submittedByList - List of users that submitted the rejected content.
      rejectedItems - Items that where rejected
      rejectionReason - why the content was rejected.
      userThatRejects - User that is rejecting the content.
    • notifyRepositoryMergeConflict

      @Valid void notifyRepositoryMergeConflict(String site, List<String> filesUnableToMerge)
      Send email to admin that repository has merged conflict
      Parameters:
      site - site with merge conflict
      filesUnableToMerge - files unable to merge