Class MockNotificator
- java.lang.Object
-
- jetbrains.buildServer.notification.NotificatorAdapter
-
- jetbrains.buildServer.notification.MockNotificator
-
- All Implemented Interfaces:
Notificator
public class MockNotificator extends NotificatorAdapter
- Author:
- Kir
-
-
Constructor Summary
Constructors Constructor Description MockNotificator(String notificatorType)
MockNotificator(String notificatorType, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDisplayName()
Notificator display name.String
getNotificatorType()
Unique type of the notificator.void
notifyBuildFailed(SRunningBuild buildId, Set<SUser> users)
Called when build failed.void
notifyBuildFailedToStart(SRunningBuild build, Set<SUser> users)
Called when build failed with internal error, i.e.void
notifyBuildFailing(SRunningBuild buildId, Set<SUser> users)
Called when the first failed message occurred.void
notifyBuildStarted(SRunningBuild build, Set<SUser> users)
Called when new build started.void
notifyBuildSuccessful(SRunningBuild buildId, Set<SUser> users)
Called when build finished successfully.void
notifyLabelingFailed(Build build, VcsRoot root, Throwable exception, Set<SUser> users)
Called when labeling failed for the build.void
notifyResponsibleAssigned(Collection<TestName> testNames, ResponsibilityEntry entry, SProject project, Set<SUser> users)
Called when responsibility for several tests at once is assigned.void
notifyResponsibleAssigned(TestNameResponsibilityEntry oldValue, TestNameResponsibilityEntry newValue, SProject project, Set<SUser> users)
Called when responsibility for the test is assigned on certain users.void
notifyResponsibleAssigned(SBuildType buildType, Set<SUser> users)
Called when responsibility for the build type is assigned on certain users.void
notifyResponsibleChanged(Collection<TestName> testNames, ResponsibilityEntry entry, SProject project, Set<SUser> users)
Called when responsibility for several tests at once is changed.void
notifyResponsibleChanged(TestNameResponsibilityEntry oldValue, TestNameResponsibilityEntry newValue, SProject project, Set<SUser> users)
Called when responsibility for the test changed.void
notifyResponsibleChanged(SBuildType buildType, Set<SUser> users)
Called when responsibility for configuration changed.void
notifyTestsMuted(Collection<STest> tests, MuteInfo muteInfo, Set<SUser> users)
Called when a set of tests are unmuted (with same mute properties).void
notifyTestsUnmuted(Collection<STest> tests, MuteInfo muteInfo, SUser user, Set<SUser> users)
Called when a set of tests are unmuted (with same mute properties).-
Methods inherited from class jetbrains.buildServer.notification.NotificatorAdapter
notifyBuildProbablyHanging, notifyBuildProblemResponsibleAssigned, notifyBuildProblemResponsibleChanged, notifyBuildProblemsMuted, notifyBuildProblemsUnmuted, notifyQueuedBuildWaitingForApproval
-
-
-
-
Method Detail
-
getDisplayName
@NotNull public String getDisplayName()
Description copied from interface:Notificator
Notificator display name.- Specified by:
getDisplayName
in interfaceNotificator
- Overrides:
getDisplayName
in classNotificatorAdapter
- Returns:
- notificator display name.
-
notifyBuildStarted
public void notifyBuildStarted(@NotNull SRunningBuild build, @NotNull Set<SUser> users)
Description copied from interface:Notificator
Called when new build started.- Specified by:
notifyBuildStarted
in interfaceNotificator
- Overrides:
notifyBuildStarted
in classNotificatorAdapter
- Parameters:
build
- started build.users
- users to be notified.
-
notifyBuildSuccessful
public void notifyBuildSuccessful(@NotNull SRunningBuild buildId, @NotNull Set<SUser> users)
Description copied from interface:Notificator
Called when build finished successfully.- Specified by:
notifyBuildSuccessful
in interfaceNotificator
- Overrides:
notifyBuildSuccessful
in classNotificatorAdapter
- Parameters:
buildId
- finished build.users
- users to be notified.
-
notifyBuildFailed
public void notifyBuildFailed(@NotNull SRunningBuild buildId, @NotNull Set<SUser> users)
Description copied from interface:Notificator
Called when build failed.- Specified by:
notifyBuildFailed
in interfaceNotificator
- Overrides:
notifyBuildFailed
in classNotificatorAdapter
- Parameters:
buildId
- finished buildusers
- users to be notified.
-
notifyBuildFailedToStart
public void notifyBuildFailedToStart(@NotNull SRunningBuild build, @NotNull Set<SUser> users)
Description copied from interface:Notificator
Called when build failed with internal error, i.e. could not actually start.- Specified by:
notifyBuildFailedToStart
in interfaceNotificator
- Overrides:
notifyBuildFailedToStart
in classNotificatorAdapter
- Parameters:
build
- failed buildusers
- users to be notified
-
notifyBuildFailing
public void notifyBuildFailing(@NotNull SRunningBuild buildId, @NotNull Set<SUser> users)
Description copied from interface:Notificator
Called when the first failed message occurred.- Specified by:
notifyBuildFailing
in interfaceNotificator
- Overrides:
notifyBuildFailing
in classNotificatorAdapter
- Parameters:
buildId
- running build.users
- users to be notified.
-
notifyResponsibleChanged
public void notifyResponsibleChanged(@NotNull SBuildType buildType, @NotNull Set<SUser> users)
Description copied from interface:Notificator
Called when responsibility for configuration changed.- Specified by:
notifyResponsibleChanged
in interfaceNotificator
- Overrides:
notifyResponsibleChanged
in classNotificatorAdapter
- Parameters:
buildType
- configuration.users
- users to be notified.
-
notifyResponsibleAssigned
public void notifyResponsibleAssigned(@NotNull SBuildType buildType, @NotNull Set<SUser> users)
Description copied from interface:Notificator
Called when responsibility for the build type is assigned on certain users.- Specified by:
notifyResponsibleAssigned
in interfaceNotificator
- Overrides:
notifyResponsibleAssigned
in classNotificatorAdapter
- Parameters:
buildType
- configuration.users
- users to be notified.
-
notifyLabelingFailed
public void notifyLabelingFailed(@NotNull Build build, @NotNull VcsRoot root, @NotNull Throwable exception, @NotNull Set<SUser> users)
Description copied from interface:Notificator
Called when labeling failed for the build.- Specified by:
notifyLabelingFailed
in interfaceNotificator
- Overrides:
notifyLabelingFailed
in classNotificatorAdapter
- Parameters:
build
- finished build.root
- problem root.exception
- cause.users
- users to be notified.
-
notifyResponsibleChanged
public void notifyResponsibleChanged(@Nullable TestNameResponsibilityEntry oldValue, @NotNull TestNameResponsibilityEntry newValue, @NotNull SProject project, @NotNull Set<SUser> users)
Description copied from interface:Notificator
Called when responsibility for the test changed.- Specified by:
notifyResponsibleChanged
in interfaceNotificator
- Overrides:
notifyResponsibleChanged
in classNotificatorAdapter
- Parameters:
oldValue
- old responsibility entry (nullable).newValue
- new responsibility entry.project
- the project.users
- users to be notified.
-
notifyResponsibleAssigned
public void notifyResponsibleAssigned(@Nullable TestNameResponsibilityEntry oldValue, @NotNull TestNameResponsibilityEntry newValue, @NotNull SProject project, @NotNull Set<SUser> users)
Description copied from interface:Notificator
Called when responsibility for the test is assigned on certain users.- Specified by:
notifyResponsibleAssigned
in interfaceNotificator
- Overrides:
notifyResponsibleAssigned
in classNotificatorAdapter
- Parameters:
oldValue
- old responsibility entry (nullable).newValue
- new responsibility entry.project
- the project.users
- users to be notified.
-
notifyResponsibleChanged
public void notifyResponsibleChanged(@NotNull Collection<TestName> testNames, @NotNull ResponsibilityEntry entry, @NotNull SProject project, @NotNull Set<SUser> users)
Description copied from interface:Notificator
Called when responsibility for several tests at once is changed.- Specified by:
notifyResponsibleChanged
in interfaceNotificator
- Overrides:
notifyResponsibleChanged
in classNotificatorAdapter
- Parameters:
testNames
- the collection of test namesentry
- new responsibility entry for each testproject
- the projectusers
- users to be notified
-
notifyResponsibleAssigned
public void notifyResponsibleAssigned(@NotNull Collection<TestName> testNames, @NotNull ResponsibilityEntry entry, @NotNull SProject project, @NotNull Set<SUser> users)
Description copied from interface:Notificator
Called when responsibility for several tests at once is assigned.- Specified by:
notifyResponsibleAssigned
in interfaceNotificator
- Overrides:
notifyResponsibleAssigned
in classNotificatorAdapter
- Parameters:
testNames
- the collection of test namesentry
- new responsibility entry for each testproject
- the projectusers
- users to be notified
-
notifyTestsMuted
public void notifyTestsMuted(@NotNull Collection<STest> tests, @NotNull MuteInfo muteInfo, @NotNull Set<SUser> users)
Description copied from interface:Notificator
Called when a set of tests are unmuted (with same mute properties). All tests are in the same project.- Specified by:
notifyTestsMuted
in interfaceNotificator
- Overrides:
notifyTestsMuted
in classNotificatorAdapter
- Parameters:
tests
- the unmuted testsmuteInfo
- the mute info on the moment of unmuteusers
- users to be notified
-
notifyTestsUnmuted
public void notifyTestsUnmuted(@NotNull Collection<STest> tests, @NotNull MuteInfo muteInfo, @Nullable SUser user, @NotNull Set<SUser> users)
Description copied from interface:Notificator
Called when a set of tests are unmuted (with same mute properties). All tests are in the same project.- Specified by:
notifyTestsUnmuted
in interfaceNotificator
- Overrides:
notifyTestsUnmuted
in classNotificatorAdapter
- Parameters:
tests
- the unmuted testsuser
- user who performed the action (if known)users
- users to be notified
-
getNotificatorType
@NotNull @NonNls public String getNotificatorType()
Description copied from interface:Notificator
Unique type of the notificator.- Returns:
- notificator unique key.
-
-