public class HipChatNotifier
extends hudson.tasks.Notifier
implements hudson.matrix.MatrixAggregatable
| Modifier and Type | Class and Description |
|---|---|
static class |
HipChatNotifier.DescriptorImpl |
static class |
HipChatNotifier.HipChatJobProperty
Deprecated.
The plugin configuration should be stored in
HipChatNotifier. This class only exists, so
configurations can be migrated for the build jobs. |
hudson.tasks.Publisher.DescriptorExtensionListImpl| Constructor and Description |
|---|
HipChatNotifier(String credentialId,
String room,
List<NotificationConfig> notifications,
MatrixTriggerMode matrixTriggerMode,
String startJobMessage,
String completeJobMessage) |
| Modifier and Type | Method and Description |
|---|---|
hudson.matrix.MatrixAggregator |
createAggregator(hudson.matrix.MatrixBuild build,
hudson.Launcher launcher,
hudson.model.BuildListener listener) |
String |
getCompleteJobMessage() |
String |
getCredentialId() |
HipChatNotifier.DescriptorImpl |
getDescriptor() |
static HipChatService |
getHipChatService(String server,
String token,
boolean v2Enabled,
String room,
String sendAs)
Obtains a
HipChatService implementation corresponding to the provided settings. |
MatrixTriggerMode |
getMatrixTriggerMode() |
List<NotificationConfig> |
getNotifications() |
hudson.tasks.BuildStepMonitor |
getRequiredMonitorService() |
String |
getResolvedRoom(hudson.model.AbstractBuild<?,?> build)
Return the room name defined in the job configuration, or if that's empty return the room name from the global
configuration.
|
String |
getRoom() |
String |
getStartJobMessage() |
String |
getToken() |
static String |
migrateMessageTemplate(String oldMessageTemplate) |
boolean |
needsToRunAfterFinalized() |
boolean |
perform(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener) |
boolean |
prebuild(hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener) |
Object |
readResolve() |
void |
setCompleteJobMessage(String completeJobMessage) |
void |
setCredentialId(String credentialId) |
void |
setMatrixTriggerMode(MatrixTriggerMode matrixTriggerMode) |
void |
setNotifications(List<NotificationConfig> notifications) |
void |
setNotifyAborted(boolean notifyAborted) |
void |
setNotifyBackToNormal(boolean notifyBackToNormal) |
void |
setNotifyFailure(boolean notifyFailure) |
void |
setNotifyNotBuilt(boolean notifyNotBuilt) |
void |
setNotifySuccess(boolean notifySuccess) |
void |
setNotifyUnstable(boolean notifyUnstable) |
void |
setRoom(String room) |
void |
setStartJobMessage(String startJobMessage) |
void |
setStartNotification(boolean startNotification) |
void |
setToken(String token) |
@DataBoundConstructor public HipChatNotifier(String credentialId, String room, List<NotificationConfig> notifications, MatrixTriggerMode matrixTriggerMode, String startJobMessage, String completeJobMessage)
public String getCredentialId()
public void setCredentialId(String credentialId)
public void setStartNotification(boolean startNotification)
public void setNotifySuccess(boolean notifySuccess)
public void setNotifyAborted(boolean notifyAborted)
public void setNotifyNotBuilt(boolean notifyNotBuilt)
public void setNotifyUnstable(boolean notifyUnstable)
public void setNotifyFailure(boolean notifyFailure)
public void setNotifyBackToNormal(boolean notifyBackToNormal)
public MatrixTriggerMode getMatrixTriggerMode()
public void setMatrixTriggerMode(MatrixTriggerMode matrixTriggerMode)
public void setNotifications(List<NotificationConfig> notifications)
public List<NotificationConfig> getNotifications()
public String getStartJobMessage()
public void setStartJobMessage(String startJobMessage)
public String getCompleteJobMessage()
public void setCompleteJobMessage(String completeJobMessage)
public String getRoom()
public void setRoom(String room)
public Object readResolve()
public String getResolvedRoom(hudson.model.AbstractBuild<?,?> build)
build - The current build for which we need to get the room.public String getToken()
public void setToken(String token)
public HipChatNotifier.DescriptorImpl getDescriptor()
getDescriptor in interface hudson.model.Describable<hudson.tasks.Publisher>getDescriptor in class hudson.tasks.Notifierpublic boolean needsToRunAfterFinalized()
needsToRunAfterFinalized in class hudson.tasks.Publisherpublic hudson.tasks.BuildStepMonitor getRequiredMonitorService()
getRequiredMonitorService in interface hudson.tasks.BuildSteppublic boolean prebuild(hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener)
prebuild in interface hudson.tasks.BuildStepprebuild in class hudson.tasks.BuildStepCompatibilityLayerpublic 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.BuildStepCompatibilityLayerInterruptedExceptionIOExceptionpublic static HipChatService getHipChatService(String server, String token, boolean v2Enabled, String room, String sendAs)
HipChatService implementation corresponding to the provided settings.server - The URL for the HipChat server.token - The auth token to use when sending the notification.v2Enabled - Whether v1 or v2 API should be used.room - The room to notify.sendAs - The username to use as the sender when using the v1 API.HipChatService instance.public hudson.matrix.MatrixAggregator createAggregator(hudson.matrix.MatrixBuild build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
createAggregator in interface hudson.matrix.MatrixAggregatableCopyright © 2016–2018. All rights reserved.