Class UserRulesAwareNotificationListener
- java.lang.Object
-
- jetbrains.buildServer.notification.impl.UserRulesAwareNotificationListener
-
- All Implemented Interfaces:
NotificationEventListener
public class UserRulesAwareNotificationListener extends Object implements NotificationEventListener
- Author:
- Pavel.Sher Date: 27.10.2006
-
-
Field Summary
Fields Modifier and Type Field Description static String
BRANCH_FILTER_PROP
static String
BUILD_TAG_FILTER_PROP
static String
LOG_PER_USER_FILTERING
static String
USER_CHANGES_ONLY_PROP
-
Constructor Summary
Constructors Constructor Description UserRulesAwareNotificationListener(BuildsManager buildsManager, UserModelEx userModel, ProjectManager projectManager, NotificationRulesManager notificationRulesManager, TestHistory testsHistory, Notificator notificator, BuildProblemManager problemManager, FavoriteBuildsManager favoriteBuildManager, BranchSpecs branchSpecs, NotificationsAssociatedUserProvider notificationsAssociatedUserProvider, ApprovableBuildManager approvableBuildManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildFailed(SRunningBuild build)
Called when build finished with a failure.void
buildFailedAfterSuccess(SRunningBuild build)
Called upon first build failure after successvoid
buildFailedToStart(SRunningBuild build)
Called if build failed to start, i.e.void
buildFailing(SRunningBuild build, BuildMessage1 message)
Called when build status changed to failure.void
buildProbablyHanged(SRunningBuild build)
Called when server detected probable hanging of a buildvoid
buildProblemsMuted(MuteInfo muteInfo)
Called when a set of build problems are muted (with same mute properties).void
buildProblemsUnmuted(MuteInfo muteInfoBeforeUnmute, Collection<BuildProblemInfo> problems, SUser user)
Called when a set of build problems are unmuted (with same mute properties).void
buildStarted(SRunningBuild build)
Called when build started and changes loaded.void
buildSuccessful(SRunningBuild build)
Called when build finished successfully.void
buildSuccessfulAfterFailure(SRunningBuild build)
Called upon first successful build after a number of failed builds.Set<SUser>
getRecipientsForEvent(SBuildType buildType, NotificationRule.Event event)
void
labelingFailed(SBuild build, VcsRoot root, Throwable exception)
Labeling process failed for the specified build and root with the specified problem.void
queuedBuildRequiresApproval(SQueuedBuild queuedBuild)
Called when a build that requires approval is queued.void
responsibleChanged(SBuildType buildType, ResponsibilityEntry oldValue, ResponsibilityEntry newValue, boolean isUserAction)
Called when responsibility changes.void
responsibleChanged(SProject project, Collection<BuildProblemInfo> buildProblems, ResponsibilityEntry entry)
Called when responsibility for several build problems at once is changed.void
responsibleChanged(SProject project, Collection<TestName> testNames, ResponsibilityEntry entry, boolean isUserAction)
Called when responsibility for several tests changed.void
responsibleChanged(SProject project, TestNameResponsibilityEntry oldValue, TestNameResponsibilityEntry newValue, boolean isUserAction)
Called when test responsibility is changed.void
testsMuted(MuteInfo muteInfo)
Called when a set of tests are muted (with same mute properties).void
testsUnmuted(MuteInfo muteInfoBeforeUnmute, Collection<STest> tests, SUser user)
Called when a set of tests are unmuted (with same mute properties).String
toString()
-
-
-
Field Detail
-
BUILD_TAG_FILTER_PROP
public static final String BUILD_TAG_FILTER_PROP
- See Also:
- Constant Field Values
-
USER_CHANGES_ONLY_PROP
public static final String USER_CHANGES_ONLY_PROP
- See Also:
- Constant Field Values
-
BRANCH_FILTER_PROP
public static final String BRANCH_FILTER_PROP
- See Also:
- Constant Field Values
-
LOG_PER_USER_FILTERING
public static final String LOG_PER_USER_FILTERING
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UserRulesAwareNotificationListener
public UserRulesAwareNotificationListener(@NotNull BuildsManager buildsManager, @NotNull UserModelEx userModel, @NotNull ProjectManager projectManager, @NotNull NotificationRulesManager notificationRulesManager, @NotNull TestHistory testsHistory, @NotNull Notificator notificator, @NotNull BuildProblemManager problemManager, @NotNull FavoriteBuildsManager favoriteBuildManager, @NotNull BranchSpecs branchSpecs, @NotNull NotificationsAssociatedUserProvider notificationsAssociatedUserProvider, ApprovableBuildManager approvableBuildManager)
-
-
Method Detail
-
buildStarted
public void buildStarted(@NotNull SRunningBuild build)
Description copied from interface:NotificationEventListener
Called when build started and changes loaded.- Specified by:
buildStarted
in interfaceNotificationEventListener
- Parameters:
build
- started build.
-
buildSuccessful
public void buildSuccessful(@NotNull SRunningBuild build)
Description copied from interface:NotificationEventListener
Called when build finished successfully.- Specified by:
buildSuccessful
in interfaceNotificationEventListener
- Parameters:
build
- finished build.
-
buildSuccessfulAfterFailure
public void buildSuccessfulAfterFailure(@NotNull SRunningBuild build)
Description copied from interface:NotificationEventListener
Called upon first successful build after a number of failed builds.- Specified by:
buildSuccessfulAfterFailure
in interfaceNotificationEventListener
- Parameters:
build
- finished build.
-
buildFailed
public void buildFailed(@NotNull SRunningBuild build)
Description copied from interface:NotificationEventListener
Called when build finished with a failure.- Specified by:
buildFailed
in interfaceNotificationEventListener
- Parameters:
build
- failed build.
-
buildFailedToStart
public void buildFailedToStart(@NotNull SRunningBuild build)
Description copied from interface:NotificationEventListener
Called if build failed to start, i.e. some internal error occurred and build process did not start actually.- Specified by:
buildFailedToStart
in interfaceNotificationEventListener
- Parameters:
build
- failed build
-
buildFailedAfterSuccess
public void buildFailedAfterSuccess(@NotNull SRunningBuild build)
Description copied from interface:NotificationEventListener
Called upon first build failure after success- Specified by:
buildFailedAfterSuccess
in interfaceNotificationEventListener
- Parameters:
build
- failed build
-
labelingFailed
public void labelingFailed(@NotNull SBuild build, @NotNull VcsRoot root, @NotNull Throwable exception)
Description copied from interface:NotificationEventListener
Labeling process failed for the specified build and root with the specified problem.- Specified by:
labelingFailed
in interfaceNotificationEventListener
- Parameters:
build
- build for which labeling failed.root
- root for which labeling failed.exception
- labeling cause.
-
buildProbablyHanged
public void buildProbablyHanged(@NotNull SRunningBuild build)
Description copied from interface:NotificationEventListener
Called when server detected probable hanging of a build- Specified by:
buildProbablyHanged
in interfaceNotificationEventListener
- Parameters:
build
- hung build.
-
buildFailing
public void buildFailing(@NotNull SRunningBuild build, @Nullable BuildMessage1 message)
Description copied from interface:NotificationEventListener
Called when build status changed to failure. This event will be sent only once.- Specified by:
buildFailing
in interfaceNotificationEventListener
- Parameters:
build
- failing build.message
- is always null since 7.1
-
queuedBuildRequiresApproval
public void queuedBuildRequiresApproval(@NotNull SQueuedBuild queuedBuild)
Description copied from interface:NotificationEventListener
Called when a build that requires approval is queued. This event will be sent only once.- Specified by:
queuedBuildRequiresApproval
in interfaceNotificationEventListener
- Parameters:
queuedBuild
- queued build.
-
responsibleChanged
public void responsibleChanged(@NotNull SBuildType buildType, @NotNull ResponsibilityEntry oldValue, @NotNull ResponsibilityEntry newValue, boolean isUserAction)
Description copied from interface:NotificationEventListener
Called when responsibility changes.- Specified by:
responsibleChanged
in interfaceNotificationEventListener
- Parameters:
buildType
- configuration with changed responsibility.oldValue
- old responsibility.newValue
- new responsibility.isUserAction
- if the action was made by user.
-
responsibleChanged
public void responsibleChanged(@NotNull SProject project, @Nullable TestNameResponsibilityEntry oldValue, @NotNull TestNameResponsibilityEntry newValue, boolean isUserAction)
Description copied from interface:NotificationEventListener
Called when test responsibility is changed.- Specified by:
responsibleChanged
in interfaceNotificationEventListener
- Parameters:
project
- the project in which test responsibility has changedoldValue
- old responsibility entrynewValue
- new responsibility entryisUserAction
- true if responsibility status was changed manually via Web UI
-
responsibleChanged
public void responsibleChanged(@NotNull SProject project, @NotNull Collection<TestName> testNames, @NotNull ResponsibilityEntry entry, boolean isUserAction)
Description copied from interface:NotificationEventListener
Called when responsibility for several tests changed.- Specified by:
responsibleChanged
in interfaceNotificationEventListener
- Parameters:
project
- the projecttestNames
- collection of test namesentry
- new responsibility entry for each testisUserAction
- true if responsibility status was changed manually via Web UI
-
responsibleChanged
public void responsibleChanged(@NotNull SProject project, @NotNull Collection<BuildProblemInfo> buildProblems, @Nullable ResponsibilityEntry entry)
Description copied from interface:NotificationEventListener
Called when responsibility for several build problems at once is changed.- Specified by:
responsibleChanged
in interfaceNotificationEventListener
- Parameters:
project
- the projectbuildProblems
- build problemsentry
- the new responsibility entry
-
testsMuted
public void testsMuted(@NotNull MuteInfo muteInfo)
Description copied from interface:NotificationEventListener
Called when a set of tests are muted (with same mute properties). All tests are in the same project.- Specified by:
testsMuted
in interfaceNotificationEventListener
- Parameters:
muteInfo
- mute info
-
testsUnmuted
public void testsUnmuted(@NotNull MuteInfo muteInfoBeforeUnmute, @NotNull Collection<STest> tests, @Nullable SUser user)
Description copied from interface:NotificationEventListener
Called when a set of tests are unmuted (with same mute properties). All tests are in the same project.- Specified by:
testsUnmuted
in interfaceNotificationEventListener
- Parameters:
muteInfoBeforeUnmute
- the mute info on the moment of unmutetests
- the unmuted testsuser
- who performed the action (if known)
-
buildProblemsMuted
public void buildProblemsMuted(@NotNull MuteInfo muteInfo)
Description copied from interface:NotificationEventListener
Called when a set of build problems are muted (with same mute properties). All problems belong the same project.- Specified by:
buildProblemsMuted
in interfaceNotificationEventListener
- Parameters:
muteInfo
- mute info
-
buildProblemsUnmuted
public void buildProblemsUnmuted(@NotNull MuteInfo muteInfoBeforeUnmute, @NotNull Collection<BuildProblemInfo> problems, @Nullable SUser user)
Description copied from interface:NotificationEventListener
Called when a set of build problems are unmuted (with same mute properties). All problems belong the same project.- Specified by:
buildProblemsUnmuted
in interfaceNotificationEventListener
- Parameters:
muteInfoBeforeUnmute
- the mute info on the moment of unmuteproblems
- the unmuted problemsuser
- who performed the action (if known)
-
getRecipientsForEvent
public Set<SUser> getRecipientsForEvent(@NotNull SBuildType buildType, @NotNull NotificationRule.Event event)
-
-