hudson.plugins.im.build_notify
Class BuildToChatNotifier

java.lang.Object
  extended by hudson.plugins.im.build_notify.BuildToChatNotifier
All Implemented Interfaces:
hudson.model.Describable<BuildToChatNotifier>
Direct Known Subclasses:
SummaryOnlyBuildToChatNotifier

public abstract class BuildToChatNotifier
extends java.lang.Object
implements hudson.model.Describable<BuildToChatNotifier>

Controls the exact messages to be sent to a chat upon start/completion of a build.

Since:
1.10
Author:
Kohsuke Kawaguchi

Constructor Summary
BuildToChatNotifier()
           
 
Method Summary
static hudson.DescriptorExtensionList<BuildToChatNotifier,BuildToChatNotifierDescriptor> all()
          All the registered BuildToChatNotifier types.
abstract  java.lang.String buildCompletionMessage(IMPublisher publisher, hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener)
          Calculates the message to send out to a chat when the specified build is completed.
abstract  java.lang.String buildStartMessage(IMPublisher publisher, hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener)
          Calculates the message to send out to a chat when the specified build is started.
 java.lang.String culpritMessage(IMPublisher publisher, hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener)
          Calculates the message to send out to a 'culprit' of a broken build.
 java.lang.String fixerMessage(IMPublisher publisher, hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener)
          Calculates the message to send out to a committer of a fixed build.
 BuildToChatNotifierDescriptor getDescriptor()
           
 java.lang.String suspectMessage(IMPublisher publisher, hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener, boolean firstFailure)
          Calculates the message to send out to a committer of a broken build.
 java.lang.String upstreamCommitterMessage(IMPublisher publisher, hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener, hudson.model.AbstractBuild<?,?> upstreamBuild)
          Calculates the message to send out to a committer of an upstream build if this build is broken.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildToChatNotifier

public BuildToChatNotifier()
Method Detail

buildStartMessage

public abstract java.lang.String buildStartMessage(IMPublisher publisher,
                                                   hudson.model.AbstractBuild<?,?> build,
                                                   hudson.model.BuildListener listener)
                                            throws java.io.IOException,
                                                   java.lang.InterruptedException
Calculates the message to send out to a chat when the specified build is started.

Parameters:
publisher - The publisher that's driving this. Never null.
build - The build that just completed. Never null.
listener - Any errors can be reported here.
Throws:
java.io.IOException
java.lang.InterruptedException

buildCompletionMessage

public abstract java.lang.String buildCompletionMessage(IMPublisher publisher,
                                                        hudson.model.AbstractBuild<?,?> build,
                                                        hudson.model.BuildListener listener)
                                                 throws java.io.IOException,
                                                        java.lang.InterruptedException
Calculates the message to send out to a chat when the specified build is completed.

Parameters:
publisher - The publisher that's driving this. Never null.
build - The build that just completed. Never null.
listener - Any errors can be reported here.
Throws:
java.io.IOException
java.lang.InterruptedException

suspectMessage

public java.lang.String suspectMessage(IMPublisher publisher,
                                       hudson.model.AbstractBuild<?,?> build,
                                       hudson.model.BuildListener listener,
                                       boolean firstFailure)
Calculates the message to send out to a committer of a broken build.

Parameters:
publisher - The publisher that's driving this. Never null.
build - The build that just completed. Never null.
listener - Any errors can be reported here.

culpritMessage

public java.lang.String culpritMessage(IMPublisher publisher,
                                       hudson.model.AbstractBuild<?,?> build,
                                       hudson.model.BuildListener listener)
Calculates the message to send out to a 'culprit' of a broken build. I.e. a committer to a previous build which was broken and all builds since then have been broken.

Parameters:
publisher - The publisher that's driving this. Never null.
build - The build that just completed. Never null.
listener - Any errors can be reported here.

fixerMessage

public java.lang.String fixerMessage(IMPublisher publisher,
                                     hudson.model.AbstractBuild<?,?> build,
                                     hudson.model.BuildListener listener)
Calculates the message to send out to a committer of a fixed build.

Parameters:
publisher - The publisher that's driving this. Never null.
build - The build that just completed. Never null.
listener - Any errors can be reported here.

upstreamCommitterMessage

public java.lang.String upstreamCommitterMessage(IMPublisher publisher,
                                                 hudson.model.AbstractBuild<?,?> build,
                                                 hudson.model.BuildListener listener,
                                                 hudson.model.AbstractBuild<?,?> upstreamBuild)
Calculates the message to send out to a committer of an upstream build if this build is broken.

Parameters:
publisher - The publisher that's driving this. Never null.
build - The build that just completed. Never null.
listener - Any errors can be reported here.
upstreamBuild - The upstream build

getDescriptor

public BuildToChatNotifierDescriptor getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<BuildToChatNotifier>

all

public static hudson.DescriptorExtensionList<BuildToChatNotifier,BuildToChatNotifierDescriptor> all()
All the registered BuildToChatNotifier types.



Copyright © 2010. All Rights Reserved.