com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier
Class GerritMessageProvider

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

public abstract class GerritMessageProvider
extends Object
implements Serializable, hudson.ExtensionPoint

ExtensionPoint that allows other plug-ins to provide custom messages.

Author:
Gustaf Lundh <gustaf.lundh@sonymobile.com>
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
GerritMessageProvider()
           
 
Method Summary
static List<GerritMessageProvider> all()
          Method fetching instances of ExtensionPoints implementing GerritMessageProvider.
 String getBuildCompletedMessage(hudson.model.AbstractBuild build)
          Method allowing plug-ins to provide extra custom messages to Gerrit when a build is completed.
 String getBuildStartedMessage(hudson.model.AbstractBuild build)
          Method allowing plug-ins to provide extra custom messages to Gerrit when a build is started.
 Collection<CommentedFile> getFileComments(hudson.model.AbstractBuild build)
          Provide any file comments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GerritMessageProvider

public GerritMessageProvider()
Method Detail

getBuildStartedMessage

public String getBuildStartedMessage(hudson.model.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(hudson.model.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<CommentedFile> getFileComments(hudson.model.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


Copyright © 2004-2013. All Rights Reserved.