Class NotificationEmail

  • Direct Known Subclasses:
    ChangeEmail

    public abstract class NotificationEmail
    extends OutgoingEmail
    Common class for notifications that are related to a project and branch
    • Method Detail

      • init

        protected void init()
                     throws com.google.gerrit.exceptions.EmailException
        Description copied from class: OutgoingEmail
        Setup the message headers and envelope (TO, CC, BCC).
        Overrides:
        init in class OutgoingEmail
        Throws:
        com.google.gerrit.exceptions.EmailException - if an error occurred.
      • includeWatchers

        protected void includeWatchers​(NotifyConfig.NotifyType type)
        Include users and groups that want notification of events.
      • includeWatchers

        protected void includeWatchers​(NotifyConfig.NotifyType type,
                                       boolean includeWatchersFromNotifyConfig)
        Include users and groups that want notification of events.
      • add

        protected void add​(RecipientType type,
                           com.google.gerrit.server.mail.send.ProjectWatch.Watchers.List list)
        Add users or email addresses to the TO, CC, or BCC list.
      • getSshHost

        public String getSshHost()
      • getShortProjectName

        protected static String getShortProjectName​(String projectName)
      • getInstanceAndProjectName

        protected static String getInstanceAndProjectName​(String instanceName,
                                                          String projectName)