Class ChangeEmail

    • Method Detail

      • setPatchSet

        public void setPatchSet​(PatchSet ps)
      • setChangeMessage

        public void setChangeMessage​(String cm,
                                     Timestamp t)
      • formatChange

        protected abstract void formatChange()
                                      throws com.google.gerrit.exceptions.EmailException
        Format the message body by calling OutgoingEmail.appendText(String).
        Throws:
        com.google.gerrit.exceptions.EmailException
      • formatFooter

        protected void formatFooter()
                             throws com.google.gerrit.exceptions.EmailException
        Format the message footer by calling OutgoingEmail.appendText(String).
        Throws:
        com.google.gerrit.exceptions.EmailException - if an error occurred.
      • init

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

        public String getChangeUrl()
        Get a link to the change; null if the server doesn't know its own address.
      • getChangeMessageThreadId

        public String getChangeMessageThreadId()
      • getCoverLetter

        public String getCoverLetter()
        Get the text of the "cover letter".
      • getChangeDetail

        public String getChangeDetail()
        Create the change message and the affected file list.
      • getProjectState

        protected ProjectState getProjectState()
        Get the project entity the change is in; null if its been deleted.
      • rcptToAuthors

        protected void rcptToAuthors​(RecipientType rt)
        TO or CC all vested parties (change owner, patch set uploader, author).
      • bccStarredBy

        protected void bccStarredBy()
        BCC any user who has starred this change.
      • removeUsersThatIgnoredTheChange

        protected void removeUsersThatIgnoredTheChange()
      • ccAllApprovals

        protected void ccAllApprovals()
        Any user who has published comments on this change.
      • ccExistingReviewers

        protected void ccExistingReviewers()
        Users who were added as reviewers to this change.
      • getAuthors

        protected Set<Account.Id> getAuthors()
        Find all users who are authors of any part of this change.
      • getIncludeDiff

        public boolean getIncludeDiff()
      • getUnifiedDiff

        public String getUnifiedDiff()
        Show patch set as unified difference.