java.lang.Object
com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.GerritMessageProvider
All Implemented Interfaces:
ExtensionPoint, Serializable

public abstract class GerritMessageProvider extends Object implements Serializable, ExtensionPoint
ExtensionPoint that allows other plug-ins to provide custom messages.
Author:
Gustaf Lundh <gustaf.lundh@sonymobile.com>
See Also:
  • Constructor Details

    • GerritMessageProvider

      public GerritMessageProvider()
  • Method Details

    • getBuildStartedMessage

      public String getBuildStartedMessage(Run build)
      Method allowing plug-ins to provide extra custom messages to Gerrit when a build is started. Return null if no message should be added.
      Parameters:
      build - Triggered build to provide custom message for
      Returns:
      the custom message
    • getBuildStartedMessage

      @Deprecated public String getBuildStartedMessage(AbstractBuild build)
      Method allowing plug-ins to provide extra custom messages to Gerrit when a build is started. Return null if no message should be added.
      Parameters:
      build - Triggered build to provide custom message for
      Returns:
      the custom message
    • getBuildCompletedMessage

      public String getBuildCompletedMessage(Run build)
      Method allowing plug-ins to provide extra custom messages to Gerrit when a build is completed. Return null if no message should be added.
      Parameters:
      build - Triggered build to provide custom message for
      Returns:
      the custom message
    • getBuildCompletedMessage

      @Deprecated public String getBuildCompletedMessage(AbstractBuild build)
      Method allowing plug-ins to provide extra custom messages to Gerrit when a build is completed. Return null if no message should be added.
      Parameters:
      build - Triggered build to provide custom message for
      Returns:
      the custom message
    • getFileComments

      public Collection<com.sonymobile.tools.gerrit.gerritevents.dto.rest.CommentedFile> getFileComments(Run build)
      Provide any file comments.
      Parameters:
      build - the build to complain about
      Returns:
      the file comments, default is an empty list.
    • getFileComments

      @Deprecated public Collection<com.sonymobile.tools.gerrit.gerritevents.dto.rest.CommentedFile> getFileComments(AbstractBuild build)
      Provide any file comments.
      Parameters:
      build - the build to complain about
      Returns:
      the file comments, default is an empty list.
    • all

      public static List<GerritMessageProvider> all()
      Method fetching instances of ExtensionPoints implementing GerritMessageProvider.
      Returns:
      list of classes extending GerritMessageProvider