public abstract class BaseNotifier
extends hudson.tasks.Notifier
hudson.tasks.Publisher.DescriptorExtensionListImpl| Constructor and Description |
|---|
BaseNotifier(String globalTarget,
String successfulTarget,
String brokenTarget,
String stillBrokenTarget,
String fixedTarget,
boolean sendIfSuccess,
String extraMessage)
Creates a new notifier based on the given parameters
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract Message |
createMessage(String target,
hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
Creates the message for notifying users about the build.
|
protected BuildNotifier |
createNotifier(hudson.model.AbstractBuild<?,?> build,
Message message) |
String |
getBrokenTarget() |
String |
getExtraMessage() |
String |
getFixedTarget() |
String |
getGlobalTarget() |
hudson.tasks.BuildStepMonitor |
getRequiredMonitorService() |
String |
getStillBrokenTarget() |
String |
getSuccessfulTarget() |
boolean |
isSendIfSuccess() |
boolean |
perform(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener) |
String |
replaceEnvString(hudson.model.AbstractBuild build,
String message)
Replace Env variables to value.
|
all, getProjectAction, needsToRunAfterFinalized, prebuildpublic BaseNotifier(String globalTarget, String successfulTarget, String brokenTarget, String stillBrokenTarget, String fixedTarget, boolean sendIfSuccess, String extraMessage)
globalTarget - the target for all notificationssuccessfulTarget - the target for build success notificationsbrokenTarget - the target for broken build notificationsstillBrokenTarget - the target for still broken build notificationsfixedTarget - the target for fixed build notificationssendIfSuccess - if the notification should be sent if the build succeedextraMessage - the extra messagepublic String replaceEnvString(hudson.model.AbstractBuild build, String message)
build - message - public String getGlobalTarget()
public String getSuccessfulTarget()
public String getBrokenTarget()
public String getStillBrokenTarget()
public String getFixedTarget()
public boolean isSendIfSuccess()
public String getExtraMessage()
public hudson.tasks.BuildStepMonitor getRequiredMonitorService()
public boolean perform(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws InterruptedException,
IOException
perform in interface hudson.tasks.BuildStepperform in class hudson.tasks.BuildStepCompatibilityLayerInterruptedExceptionIOExceptionprotected BuildNotifier createNotifier(hudson.model.AbstractBuild<?,?> build, Message message)
protected abstract Message createMessage(String target, hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener)
perform(AbstractBuild, Launcher, BuildListener) plus the target of the message.Copyright © 2016–2017. All rights reserved.