Class LowLevelProblemMutingServiceImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.mute.LowLevelProblemMutingServiceImpl
-
- All Implemented Interfaces:
LowLevelProblemMutingService
public class LowLevelProblemMutingServiceImpl extends Object implements LowLevelProblemMutingService
- Author:
- Leonid Bushuev from JetBrains
-
-
Constructor Summary
Constructors Constructor Description LowLevelProblemMutingServiceImpl(DBFunctionsProvider db, NumericIdSequences idSequences, ServerExtensionHolder extensionsHolder, ProjectManager projectManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearMuteInfoCache()Resets cache of mute informationMuteInfocopyMuteInfo(MuteInfo muteInfo, SProject newProject)Creates a copy of mute info in another project.STestManagergetTestManager()UserModelgetUserModel()BuildProblemMutermakeBuildProblemMuter(BuildPromotionEx buildPromotion)Makes a new build problem muting service.TestRunMutermakeTestRunMuter(BuildPromotionEx buildPromotion)Makes a new test run muting service.MuteInfomuteProblemsInBT(long userId, String comment, boolean unmuteWhenFixed, Date unmuteByTime, String projectId, Set<String> buildTypes, Set<Integer> problems)Mutes the specified build problems in the build configuration scope.MuteInfomuteProblemsInBuild(long userId, String comment, String projectId, long buildId, Set<Integer> problems)Mutes the build problems in a specified build only.voidmuteProblemsInBuild(long buildId, Set<Integer> problems)Mutes the build problems in a specified build only.MuteInfomuteProblemsInProject(long userId, String comment, boolean unmuteWhenFixed, Date unmuteByTime, SProject project, Set<Integer> problems)Mutes specified build problems in the project scope.MuteInfomuteProblemsInProject(long userId, String comment, boolean unmuteWhenFixed, Date unmuteByTime, SProject project, UnmutePreference handleExistingMutesPreference, Set<Integer> problems)Mutes specified build problems in the project scope.MuteInfomuteTestsInBT(long userId, String comment, boolean unmuteWhenFixed, Date unmuteByTime, String projectId, Set<String> buildTypes, Set<Long> tests, boolean removePreviousMutes)Mutes the specified tests in the build configuration scope.MuteInfomuteTestsInBuild(long userId, String comment, String projectId, long buildId, Set<Long> tests)Mutes the tests in a specified build only.MuteInfomuteTestsInProject(long userId, String comment, boolean unmuteWhenFixed, Date unmuteByTime, SProject project, Set<Long> tests)Mutes specified tests in the project scope.MuteInfomuteTestsInProject(long userId, String comment, boolean unmuteWhenFixed, Date unmuteByTime, SProject project, UnmutePreference handleExistingMutesPreference, Set<Long> tests)Mutes specified tests in the project scope.Collection<Integer>retrieveMuteProblems(Integer muteId)voidretrieveMutesOfOneTestInBuilds(long testNameId, Collection<Long> relatedBuildIds, MutingInBuildInfoConsumer consumer)Retrieves mutes of runs of one test in given builds.voidretrieveMutesWithTimeOut(MutingInfoConsumer consumer)Retrieves current mutes that already not actual because of the auto-unmuting time.Collection<Long>retrieveMuteTests(Integer muteId)Map<Integer,MuteInfo>retrieveProblemMutesForBuild(long buildId)Map<Integer,MuteInfo>retrieveProblemMutesForBuild(DBFunctions dbf, long buildId)voidretrieveProblemsCurrentMuteInfos(Set<String> projectIds, Set<String> buildTypeIds, MutingInfoConsumer consumer)Retrieves information about currently muted build problems for the specified projects and build configurations.Map<Long,MuteInfo>retrieveTestMutesForBuild(long buildId)Retrieves the information about tests muting in the specified build.Map<Long,Map<Long,MuteInfo>>retrieveTestMutesForBuilds(Collection<Long> buildIds)Retrieves the information about muted tests in the specified builds.voidretrieveTestsCurrentMuteInfos(Set<String> projectIds, Set<String> buildTypeIds, MutingInfoConsumer consumer)Retrieves information about currently muted tests for the specified projects and build configurations.voidsetEventDispatcher(EventDispatcher<BuildServerListener> eventDispatcher)voidsetTestManager(STestManager testManager)voidsetUserModel(UserModel userModel)voidunmuteProblems(long buildId, Set<Integer> problems)Mutes the build problems in a specified build only.voidunmuteProblems(Set<String> projectIds, Set<String> buildTypeIds, Collection<Integer> problems)Unmutes the specified build problems in the specified project and specified build configurations.voidunmuteProblemsByMuteInfo(Collection<Integer> muteInfoIds)Unmutes build problems associated with the given mute infos.voidunmuteTests(Set<String> projectIds, Set<String> buildTypeIds, Collection<Long> testNameIds)Unmutes the specified tests in the specied project and specified build configurations.voidunmuteTestsByMuteInfo(Collection<Integer> muteInfoIds)Unmutes tests associated with the given mute infos.
-
-
-
Constructor Detail
-
LowLevelProblemMutingServiceImpl
public LowLevelProblemMutingServiceImpl(@NotNull DBFunctionsProvider db, @NotNull NumericIdSequences idSequences, @NotNull ServerExtensionHolder extensionsHolder, @NotNull ProjectManager projectManager)
-
-
Method Detail
-
setUserModel
public void setUserModel(@NotNull UserModel userModel)
-
setEventDispatcher
public void setEventDispatcher(@NotNull EventDispatcher<BuildServerListener> eventDispatcher)
-
getUserModel
@NotNull public UserModel getUserModel()
-
setTestManager
public void setTestManager(@NotNull STestManager testManager)
-
getTestManager
@NotNull public STestManager getTestManager()
-
muteTestsInProject
@NotNull public MuteInfo muteTestsInProject(long userId, @Nullable String comment, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull SProject project, @NotNull Set<Long> tests)
Description copied from interface:LowLevelProblemMutingServiceMutes specified tests in the project scope. Existing mutes on given tests in the descendent projects and build configurations are removed.- Specified by:
muteTestsInProjectin interfaceLowLevelProblemMutingService- Parameters:
userId- user who muting the tests.comment- a user's comment.unmuteWhenFixed- unmute the test automatically when it is fixed everywhere.unmuteByTime- unmute the test automatically on a certain date.tests- ids of tests to mute. @return identifier of the just created mute-info.
-
muteTestsInProject
@NotNull public MuteInfo muteTestsInProject(long userId, @Nullable String comment, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull SProject project, @NotNull UnmutePreference handleExistingMutesPreference, @NotNull Set<Long> tests)
Description copied from interface:LowLevelProblemMutingServiceMutes specified tests in the project scope.- Specified by:
muteTestsInProjectin interfaceLowLevelProblemMutingService- Parameters:
userId- user who muting the tests.comment- a user's comment.unmuteWhenFixed- unmute the test automatically when it is fixed everywhere.unmuteByTime- unmute the test automatically on a certain date.tests- ids of tests to mute. @return identifier of the just created mute-info.
-
copyMuteInfo
@NotNull public MuteInfo copyMuteInfo(@NotNull MuteInfo muteInfo, @NotNull SProject newProject)
Description copied from interface:LowLevelProblemMutingServiceCreates a copy of mute info in another project. Does not process parent or sub projects anyhow.- Specified by:
copyMuteInfoin interfaceLowLevelProblemMutingService- Parameters:
muteInfo- mute info to copynewProject- project where a copy of mute info should be created- Returns:
- a copy of mute info
-
muteTestsInBT
@NotNull public MuteInfo muteTestsInBT(long userId, @Nullable String comment, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull String projectId, @NotNull Set<String> buildTypes, @NotNull Set<Long> tests, boolean removePreviousMutes)
Description copied from interface:LowLevelProblemMutingServiceMutes the specified tests in the build configuration scope.- Specified by:
muteTestsInBTin interfaceLowLevelProblemMutingService- Parameters:
userId- user who muting the tests.comment- a user's comment.unmuteWhenFixed- unmute the test automatically when it is fixed everywhere.unmuteByTime- unmute the test automatically on a certain date.projectId- project the specified build types are belong.buildTypes- build types where tests to mute.tests- tests to mute.removePreviousMutes- if true then removes mutes data currently associated with specified project, build configurations and tests; otherwise does not try to find and remove this data (useful when we know for sure that project and build types are new, for instance, just copied)- Returns:
- identifier of the just created mute-info.
-
muteTestsInBuild
@NotNull public MuteInfo muteTestsInBuild(long userId, @Nullable String comment, @NotNull String projectId, long buildId, @NotNull Set<Long> tests)
Description copied from interface:LowLevelProblemMutingServiceMutes the tests in a specified build only. Note: does not process the build status, dependent builds, etc.- Specified by:
muteTestsInBuildin interfaceLowLevelProblemMutingService- Parameters:
userId- the user who is performing the actioncomment- the commentprojectId- the project idbuildId- the build idtests- the list of test ids- Returns:
- identifier of the just created mute-info.
-
muteProblemsInBuild
@NotNull public MuteInfo muteProblemsInBuild(long userId, @Nullable String comment, @NotNull String projectId, long buildId, @NotNull Set<Integer> problems)
Description copied from interface:LowLevelProblemMutingServiceMutes the build problems in a specified build only. Note: does not process the build status, dependent builds, etc.- Specified by:
muteProblemsInBuildin interfaceLowLevelProblemMutingService- Parameters:
userId- the user who is performing the actioncomment- the commentprojectId- the project idbuildId- the build idproblems- the list of buidld problems ids- Returns:
- identifier of the just created mute-info.
-
muteProblemsInBuild
public void muteProblemsInBuild(long buildId, @NotNull Set<Integer> problems)Description copied from interface:LowLevelProblemMutingServiceMutes the build problems in a specified build only. Note: does not process the build status, dependent builds, etc.- Specified by:
muteProblemsInBuildin interfaceLowLevelProblemMutingService- Parameters:
buildId- the build idproblems- the list of buidld problems ids
-
unmuteProblems
public void unmuteProblems(long buildId, @NotNull Set<Integer> problems)Description copied from interface:LowLevelProblemMutingServiceMutes the build problems in a specified build only. Note: does not process the build status, dependent builds, etc.- Specified by:
unmuteProblemsin interfaceLowLevelProblemMutingService- Parameters:
buildId- the build idproblems- the list of buidld problems ids
-
muteProblemsInProject
@NotNull public MuteInfo muteProblemsInProject(long userId, @Nullable String comment, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull SProject project, @NotNull Set<Integer> problems)
Description copied from interface:LowLevelProblemMutingServiceMutes specified build problems in the project scope.- Specified by:
muteProblemsInProjectin interfaceLowLevelProblemMutingService- Parameters:
userId- user who is muting.comment- user's comment.unmuteWhenFixed- unmute problem automatically when it is fixed everywhere.unmuteByTime- unmute problem automatically on a certain date.problems- identities of build problems to mute.- Returns:
- identifier of the just created mute-info.
-
muteProblemsInProject
@NotNull public MuteInfo muteProblemsInProject(long userId, @Nullable String comment, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull SProject project, @NotNull UnmutePreference handleExistingMutesPreference, @NotNull Set<Integer> problems)
Description copied from interface:LowLevelProblemMutingServiceMutes specified build problems in the project scope.- Specified by:
muteProblemsInProjectin interfaceLowLevelProblemMutingService- Parameters:
userId- user who is muting.comment- user's comment.unmuteWhenFixed- unmute problem automatically when it is fixed everywhere.unmuteByTime- unmute problem automatically on a certain date.problems- identities of build problems to mute.- Returns:
- identifier of the just created mute-info.
-
muteProblemsInBT
@NotNull public MuteInfo muteProblemsInBT(long userId, @Nullable String comment, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull String projectId, @NotNull Set<String> buildTypes, @NotNull Set<Integer> problems)
Description copied from interface:LowLevelProblemMutingServiceMutes the specified build problems in the build configuration scope.- Specified by:
muteProblemsInBTin interfaceLowLevelProblemMutingService- Parameters:
userId- user who is muting.comment- user's comment.unmuteWhenFixed- unmute problem automatically when it is fixed everywhere.unmuteByTime- unmute problem automatically on a certain date.projectId- project where the specified build types belong.buildTypes- build types where to mute.problems- build problems to mute.- Returns:
- identifier of the just created mute-info.
-
unmuteTests
public void unmuteTests(@NotNull Set<String> projectIds, @NotNull Set<String> buildTypeIds, @NotNull Collection<Long> testNameIds)Description copied from interface:LowLevelProblemMutingServiceUnmutes the specified tests in the specied project and specified build configurations.- Specified by:
unmuteTestsin interfaceLowLevelProblemMutingServicebuildTypeIds- build configuration ids.testNameIds- test name identifiers to unmute.
-
unmuteTestsByMuteInfo
public void unmuteTestsByMuteInfo(@NotNull Collection<Integer> muteInfoIds)Description copied from interface:LowLevelProblemMutingServiceUnmutes tests associated with the given mute infos.- Specified by:
unmuteTestsByMuteInfoin interfaceLowLevelProblemMutingService- Parameters:
muteInfoIds- identifiers of mute info records.
-
unmuteProblems
public void unmuteProblems(@NotNull Set<String> projectIds, @NotNull Set<String> buildTypeIds, @NotNull Collection<Integer> problems)Description copied from interface:LowLevelProblemMutingServiceUnmutes the specified build problems in the specified project and specified build configurations.- Specified by:
unmuteProblemsin interfaceLowLevelProblemMutingServicebuildTypeIds- build configuration ids.problems- build problem identities to unmute.
-
unmuteProblemsByMuteInfo
public void unmuteProblemsByMuteInfo(@NotNull Collection<Integer> muteInfoIds)Description copied from interface:LowLevelProblemMutingServiceUnmutes build problems associated with the given mute infos.- Specified by:
unmuteProblemsByMuteInfoin interfaceLowLevelProblemMutingService- Parameters:
muteInfoIds- identifiers of mute info records.
-
clearMuteInfoCache
public void clearMuteInfoCache()
Description copied from interface:LowLevelProblemMutingServiceResets cache of mute information- Specified by:
clearMuteInfoCachein interfaceLowLevelProblemMutingService
-
retrieveTestsCurrentMuteInfos
public void retrieveTestsCurrentMuteInfos(@NotNull Set<String> projectIds, @NotNull Set<String> buildTypeIds, @NotNull MutingInfoConsumer consumer)Description copied from interface:LowLevelProblemMutingServiceRetrieves information about currently muted tests for the specified projects and build configurations.For each mute entry it call the consumer's method:
MutingInfoConsumer.consumeTestMutedInProject(java.lang.Long, java.lang.String, jetbrains.buildServer.serverSide.mute.MuteInfo)if the entry is project-related,MutingInfoConsumer.consumeTestMutedInBuildType(java.lang.Long, java.lang.String, jetbrains.buildServer.serverSide.mute.MuteInfo)if the entry is build-configuration-related.
- Specified by:
retrieveTestsCurrentMuteInfosin interfaceLowLevelProblemMutingServicebuildTypeIds- build configurations id (should relate the project id).consumer- consumer that will consume and process MuteInfo entries.
-
retrieveProblemsCurrentMuteInfos
public void retrieveProblemsCurrentMuteInfos(@NotNull Set<String> projectIds, @NotNull Set<String> buildTypeIds, @NotNull MutingInfoConsumer consumer)Description copied from interface:LowLevelProblemMutingServiceRetrieves information about currently muted build problems for the specified projects and build configurations.- Specified by:
retrieveProblemsCurrentMuteInfosin interfaceLowLevelProblemMutingServicebuildTypeIds- build configurations id (should relate the project id).consumer- consumer that will consume and process MuteInfo entries.
-
retrieveMutesWithTimeOut
public void retrieveMutesWithTimeOut(@NotNull MutingInfoConsumer consumer)Description copied from interface:LowLevelProblemMutingServiceRetrieves current mutes that already not actual because of the auto-unmuting time.- Specified by:
retrieveMutesWithTimeOutin interfaceLowLevelProblemMutingService- Parameters:
consumer- consumer that will consume and process MuteInfo entries.
-
retrieveTestMutesForBuild
@NotNull public Map<Long,MuteInfo> retrieveTestMutesForBuild(long buildId)
Description copied from interface:LowLevelProblemMutingServiceRetrieves the information about tests muting in the specified build.- Specified by:
retrieveTestMutesForBuildin interfaceLowLevelProblemMutingService- Parameters:
buildId- build the information is needed for.- Returns:
- map of TestId -> MuteInfo; contains only test runs that are muted.
-
retrieveTestMutesForBuilds
@NotNull public Map<Long,Map<Long,MuteInfo>> retrieveTestMutesForBuilds(@NotNull Collection<Long> buildIds)
Description copied from interface:LowLevelProblemMutingServiceRetrieves the information about muted tests in the specified builds.- Specified by:
retrieveTestMutesForBuildsin interfaceLowLevelProblemMutingService- Returns:
- map of build id to map of TestId -> MuteInfo; contains only test runs that are muted.
-
retrieveProblemMutesForBuild
@NotNull public Map<Integer,MuteInfo> retrieveProblemMutesForBuild(long buildId)
- Specified by:
retrieveProblemMutesForBuildin interfaceLowLevelProblemMutingService
-
retrieveProblemMutesForBuild
@NotNull public Map<Integer,MuteInfo> retrieveProblemMutesForBuild(@NotNull DBFunctions dbf, long buildId)
- Specified by:
retrieveProblemMutesForBuildin interfaceLowLevelProblemMutingService
-
retrieveMutesOfOneTestInBuilds
public void retrieveMutesOfOneTestInBuilds(long testNameId, Collection<Long> relatedBuildIds, MutingInBuildInfoConsumer consumer)Description copied from interface:LowLevelProblemMutingServiceRetrieves mutes of runs of one test in given builds.- Specified by:
retrieveMutesOfOneTestInBuildsin interfaceLowLevelProblemMutingService- Parameters:
testNameId- identifier of test name.relatedBuildIds- set of related buildsconsumer- consumer to consume the retrieved info.
-
retrieveMuteTests
@NotNull public Collection<Long> retrieveMuteTests(@NotNull Integer muteId)
-
retrieveMuteProblems
@NotNull public Collection<Integer> retrieveMuteProblems(@NotNull Integer muteId)
-
makeTestRunMuter
@NotNull public TestRunMuter makeTestRunMuter(@NotNull BuildPromotionEx buildPromotion)
Description copied from interface:LowLevelProblemMutingServiceMakes a new test run muting service.Warning! - the client should release all references to this service when the build is finished, to avoid memory leaks.
- Specified by:
makeTestRunMuterin interfaceLowLevelProblemMutingService- Parameters:
buildPromotion- build promotion- Returns:
- the service.
-
makeBuildProblemMuter
@NotNull public BuildProblemMuter makeBuildProblemMuter(@NotNull BuildPromotionEx buildPromotion)
Description copied from interface:LowLevelProblemMutingServiceMakes a new build problem muting service.Warning! - the client should release all references to this service when the build is finished, to avoid memory leaks.
- Specified by:
makeBuildProblemMuterin interfaceLowLevelProblemMutingService- Parameters:
buildPromotion- build promotion
-
-