Class SecuredProblemMutingService
- java.lang.Object
-
- jetbrains.buildServer.serverSide.mute.SecuredProblemMutingService
-
- All Implemented Interfaces:
ProblemMutingService
public class SecuredProblemMutingService extends Object implements ProblemMutingService
- Author:
- Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
-
-
Constructor Summary
Constructors Constructor Description SecuredProblemMutingService(SecurityContextEx securityContext, ProjectManager projectManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyMuteInfo(MuteInfo muteInfo, SProject newProject)Creates a copy of mute info in another project.CurrentMuteInfogetBuildProblemCurrentMuteInfo(String projectId, Integer problemIdentity)Retrieves current actual mute info (from database) for the specified build problem.Map<Integer,CurrentMuteInfo>getBuildProblemEffectiveMuteInfo(String projectId)Retrieves all current actual mute info (from database) from specified project Includes mute info in the specified project, it's build types and all it's parent projects.Map<BuildProblemInfo,CurrentMuteInfo>getBuildProblemEffectiveMuteInfo(String projectId, Collection<? extends BuildProblemInfo> problemInfo)Retrieves current actual mute info (from database) for the specified build problems.Map<Integer,CurrentMuteInfo>getBuildProblemsCurrentMuteInfo(SProject project)Retrieves current actual mute info (from database) for all muted build problems.Map<Integer,MuteInfo>getMuteInfoProblemForBuild(SBuild build)Map<Long,MuteInfo>getMuteInfoTestForBuild(SBuild build)Retrieves mute info for all test runs in the specified build.Map<Long,Map<Long,MuteInfo>>getMuteInfoTestForBuilds(Collection<Long> buildIds)Retrieves mute info for all test runs for the builds with specified ids.Map<Long,MuteInfo>getMutesOfOneTestInBuilds(STest test, Collection<Long> relatedBuildIds)Retrives mute info for all test runs of the specified test in given builds.CurrentMuteInfogetTestCurrentMuteInfo(String projectId, Long testNameId)Retrieves current actual mute info (from database) for the specified test.Map<Long,CurrentMuteInfo>getTestsCurrentMuteInfo(SProject project)Retrieves mute info for all currently muted tests in the specified project and its parents and children transitively.voidinvalidateProjectMutesCache(SProject project)Invalidates project related data in the internal cache.voidmuteProblemsInBuild(SUser user, String note, SBuild build, Collection<BuildProblemInfo> problems)MuteInfomuteProblemsInBuildTypes(SUser user, String note, boolean unmuteWhenFixed, Date unmuteByTime, Collection<SBuildType> buildTypes, Collection<? extends BuildProblemInfo> problems)Mutes specified build problems in the specified build configuration scope.MuteInfomuteProblemsInProject(SUser user, String note, boolean unmuteWhenFixed, Date unmuteByTime, SProject project, Collection<? extends BuildProblemInfo> problems)Mutes specified build problems in the specified project scope.MuteInfomuteProblemsInProject(SUser user, String note, boolean unmuteWhenFixed, Date unmuteByTime, SProject project, UnmutePreference removeExistingPreference, Collection<? extends BuildProblemInfo> problems)Mutes specified build problems in the specified project scope.voidmuteTestsInBuild(SUser user, String note, SBuild build, Collection<STest> tests)MuteInfomuteTestsInBuildTypes(SUser user, String note, boolean unmuteWhenFixed, Date unmuteByTime, Collection<SBuildType> buildTypes, Collection<STest> tests)Mutes the specified tests in the build configuration scope.MuteInfomuteTestsInProject(SUser user, String note, boolean unmuteWhenFixed, Date unmuteByTime, SProject project, Collection<STest> tests)Mutes specified tests in the project scope.MuteInfomuteTestsInProject(SUser user, String note, boolean unmuteWhenFixed, Date unmuteByTime, SProject project, UnmutePreference removeExistingPreference, Collection<STest> tests)Mutes specified tests in the project scope.voidsetBuildsManager(BuildsManager buildsManager)voidsetDelegate(ProblemMutingService delegate)voidunmuteProblems(SUser user, String note, SBuild build, Collection<BuildProblemInfo> problems)Unmutes the specified build problems in the specified buildvoidunmuteProblems(SUser user, String note, SBuildType buildType, Collection<BuildProblemInfo> problems)Unmutes the specified build problems in one build type scope.voidunmuteProblems(SUser user, String note, SProject project, Collection<BuildProblemInfo> problems)Unmutes the specified build problems in a scope where it was muted in the specified project and it's subprojects.voidunmuteProblems(SUser user, String note, SProject project, UnmutePreference unmutePreference, Collection<BuildProblemInfo> problems)Unmutes the specified build problems in a scope where it was muted according to a given preference.voidunmuteTests(SUser user, String note, SBuildType buildType, Collection<STest> tests)Unmutes the specified tests in one build type scope.voidunmuteTests(SUser user, String note, SProject project, Collection<STest> tests)Unmutes the specified tests in a scope where it was muted, including child projects but excluding parent onesvoidunmuteTests(SUser user, String note, SProject project, UnmutePreference unmutePreference, Collection<STest> tests)Unmutes the specified tests in a scope where it was muted
-
-
-
Constructor Detail
-
SecuredProblemMutingService
public SecuredProblemMutingService(@NotNull SecurityContextEx securityContext, @NotNull ProjectManager projectManager)
-
-
Method Detail
-
setDelegate
public void setDelegate(@NotNull ProblemMutingService delegate)
-
setBuildsManager
public void setBuildsManager(@NotNull BuildsManager buildsManager)
-
muteTestsInProject
@NotNull public MuteInfo muteTestsInProject(@NotNull SUser user, @Nullable String note, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull SProject project, @NotNull Collection<STest> tests)
Description copied from interface:ProblemMutingServiceMutes specified tests in the project scope. Automatically unmutes specified tests in all specified project's subprojects and their build types recursively.- Specified by:
muteTestsInProjectin interfaceProblemMutingService- Parameters:
user- user who muting the tests.note- a user's note.unmuteWhenFixed- true for unmuting on test passunmuteByTime- when to unmute if unmuting at specified timeproject- project to mute intests- tests to mute- Returns:
- the mute info created
-
muteTestsInProject
@NotNull public MuteInfo muteTestsInProject(@NotNull SUser user, @Nullable String note, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull SProject project, @NotNull UnmutePreference removeExistingPreference, @NotNull Collection<STest> tests)
Description copied from interface:ProblemMutingServiceMutes specified tests in the project scope.- Specified by:
muteTestsInProjectin interfaceProblemMutingService- Parameters:
user- user who muting the tests.note- a user's note.unmuteWhenFixed- true for unmuting on test passunmuteByTime- when to unmute if unmuting at specified timeproject- project to mute inremoveExistingPreference- specifies scope where existing mutes should be removedtests- tests to mute- Returns:
- the mute info created
-
copyMuteInfo
public void copyMuteInfo(@NotNull MuteInfo muteInfo, @NotNull SProject newProject)Description copied from interface:ProblemMutingServiceCreates a copy of mute info in another project.- Specified by:
copyMuteInfoin interfaceProblemMutingService- Parameters:
muteInfo- mute info to copynewProject- project where a copy of mute info should be created
-
muteTestsInBuildTypes
@NotNull public MuteInfo muteTestsInBuildTypes(@NotNull SUser user, @Nullable String note, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull Collection<SBuildType> buildTypes, @NotNull Collection<STest> tests)
Description copied from interface:ProblemMutingServiceMutes the specified tests in the build configuration scope.- Specified by:
muteTestsInBuildTypesin interfaceProblemMutingService- Parameters:
user- user who muting the tests.note- a user's note.buildTypes- build types where to mute tests.tests- tests to mute.
-
muteTestsInBuild
public void muteTestsInBuild(@NotNull SUser user, @Nullable String note, @NotNull SBuild build, @NotNull Collection<STest> tests)- Specified by:
muteTestsInBuildin interfaceProblemMutingService
-
muteProblemsInBuild
public void muteProblemsInBuild(@Nullable SUser user, @Nullable String note, @NotNull SBuild build, @NotNull Collection<BuildProblemInfo> problems)- Specified by:
muteProblemsInBuildin interfaceProblemMutingService
-
unmuteTests
public void unmuteTests(@Nullable SUser user, @Nullable String note, @NotNull SProject project, @NotNull UnmutePreference unmutePreference, @NotNull Collection<STest> tests)Description copied from interface:ProblemMutingServiceUnmutes the specified tests in a scope where it was muted- Specified by:
unmuteTestsin interfaceProblemMutingService- Parameters:
user- user that is unmuting tests.note- a user's note.unmutePreference- in which projects specified tests need to be unmuted.tests- tests to unmute.
-
unmuteTests
public void unmuteTests(@Nullable SUser user, @Nullable String note, @NotNull SProject project, @NotNull Collection<STest> tests)Description copied from interface:ProblemMutingServiceUnmutes the specified tests in a scope where it was muted, including child projects but excluding parent ones- Specified by:
unmuteTestsin interfaceProblemMutingService- Parameters:
user- user that is unmuting tests.note- a user's note.tests- tests to unmute.
-
unmuteTests
public void unmuteTests(@Nullable SUser user, @Nullable String note, @NotNull SBuildType buildType, @NotNull Collection<STest> tests)Description copied from interface:ProblemMutingServiceUnmutes the specified tests in one build type scope.- Specified by:
unmuteTestsin interfaceProblemMutingService- Parameters:
user- user who performs an actionnote- additional commentsbuildType- build type scopetests- tests to unmute
-
unmuteProblems
public void unmuteProblems(@Nullable SUser user, @Nullable String note, @NotNull SBuildType buildType, @NotNull Collection<BuildProblemInfo> problems)Description copied from interface:ProblemMutingServiceUnmutes the specified build problems in one build type scope.- Specified by:
unmuteProblemsin interfaceProblemMutingService- Parameters:
user- user who performs an actionnote- additional commentsbuildType- build type scopeproblems- problems to unmute
-
getMuteInfoTestForBuild
@NotNull public Map<Long,MuteInfo> getMuteInfoTestForBuild(@NotNull SBuild build)
Description copied from interface:ProblemMutingServiceRetrieves mute info for all test runs in the specified build.Warning! - this method is not just a getter, it is really a retriever that does a lot of works.
- Specified by:
getMuteInfoTestForBuildin interfaceProblemMutingService- Parameters:
build- the build- Returns:
- mute info map: test id -> mute info (means "for all test runs of a given test...")
-
getMuteInfoTestForBuilds
@NotNull public Map<Long,Map<Long,MuteInfo>> getMuteInfoTestForBuilds(@NotNull Collection<Long> buildIds)
Description copied from interface:ProblemMutingServiceRetrieves mute info for all test runs for the builds with specified ids.Warning! - this method is not just a getter, it is really a retriever that does a lot of works.
- Specified by:
getMuteInfoTestForBuildsin interfaceProblemMutingService- Returns:
- mute info map: build id -> map(test id -> mute info)
-
getMuteInfoProblemForBuild
@NotNull public Map<Integer,MuteInfo> getMuteInfoProblemForBuild(@NotNull SBuild build)
- Specified by:
getMuteInfoProblemForBuildin interfaceProblemMutingService
-
getTestsCurrentMuteInfo
@NotNull public Map<Long,CurrentMuteInfo> getTestsCurrentMuteInfo(@NotNull SProject project)
Description copied from interface:ProblemMutingServiceRetrieves mute info for all currently muted tests in the specified project and its parents and children transitively.Returns a modifiable map of current mute info for all muted tests in a project
Warning! - this method is not just a getter, it is really a retriever that does a lot of works.
- Specified by:
getTestsCurrentMuteInfoin interfaceProblemMutingService- Parameters:
project- the project- Returns:
- current mute info map: test id -> current mute info
-
getMutesOfOneTestInBuilds
@NotNull public Map<Long,MuteInfo> getMutesOfOneTestInBuilds(STest test, Collection<Long> relatedBuildIds)
Description copied from interface:ProblemMutingServiceRetrives mute info for all test runs of the specified test in given builds.- Specified by:
getMutesOfOneTestInBuildsin interfaceProblemMutingService- Parameters:
test- the test to retrieve mute info for.relatedBuildIds- buildIds- Returns:
- a map of buildId -> muteInfo.
-
getTestCurrentMuteInfo
public CurrentMuteInfo getTestCurrentMuteInfo(@NotNull String projectId, Long testNameId)
Description copied from interface:ProblemMutingServiceRetrieves current actual mute info (from database) for the specified test.- Specified by:
getTestCurrentMuteInfoin interfaceProblemMutingService- Parameters:
projectId- project internal id- Returns:
- retrieved mute info, or null if no such project or test is not muted in the project and its build configurations.
-
getBuildProblemCurrentMuteInfo
@Nullable public CurrentMuteInfo getBuildProblemCurrentMuteInfo(@NotNull String projectId, @NotNull Integer problemIdentity)
Description copied from interface:ProblemMutingServiceRetrieves current actual mute info (from database) for the specified build problem. Includes mute info in the specified project, all it's parent projects recursively and subprojects and their build types recursively.- Specified by:
getBuildProblemCurrentMuteInfoin interfaceProblemMutingService- Parameters:
projectId- project internal id- Returns:
- retrieved mute info, or null if no such project or problem is not muted in the project and its build configurations.
-
getBuildProblemEffectiveMuteInfo
@NotNull public Map<BuildProblemInfo,CurrentMuteInfo> getBuildProblemEffectiveMuteInfo(@NotNull String projectId, @NotNull Collection<? extends BuildProblemInfo> problemInfo)
Description copied from interface:ProblemMutingServiceRetrieves current actual mute info (from database) for the specified build problems. Includes mute info in the specified project, it's build types and all it's parent projects.- Specified by:
getBuildProblemEffectiveMuteInfoin interfaceProblemMutingService- Parameters:
projectId- project internal idproblemInfo- collection of build problem info- Returns:
- retrieved mute info, or null if no such project or problem is not muted in the project and its build configurations.
-
getBuildProblemEffectiveMuteInfo
@NotNull public Map<Integer,CurrentMuteInfo> getBuildProblemEffectiveMuteInfo(@NotNull String projectId)
Description copied from interface:ProblemMutingServiceRetrieves all current actual mute info (from database) from specified project Includes mute info in the specified project, it's build types and all it's parent projects.- Specified by:
getBuildProblemEffectiveMuteInfoin interfaceProblemMutingService- Parameters:
projectId- project internal id- Returns:
- retrieved found mute info in format: Map(buildProblemId -> corresponding CurrentMuteInfo)
-
getBuildProblemsCurrentMuteInfo
@NotNull public Map<Integer,CurrentMuteInfo> getBuildProblemsCurrentMuteInfo(@NotNull SProject project)
Description copied from interface:ProblemMutingServiceRetrieves current actual mute info (from database) for all muted build problems. Includes mute info in the specified project, all it's parent projects recursively and subprojects and their build types recursively.- Specified by:
getBuildProblemsCurrentMuteInfoin interfaceProblemMutingService- Parameters:
project- project- Returns:
- see above
-
muteProblemsInProject
public MuteInfo muteProblemsInProject(@NotNull SUser user, @Nullable String note, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull SProject project, @NotNull Collection<? extends BuildProblemInfo> problems)
Description copied from interface:ProblemMutingServiceMutes specified build problems in the specified project scope. Automatically unmutes specified build problems in all specified project's subprojects and their build types recursively.- Specified by:
muteProblemsInProjectin interfaceProblemMutingService- Parameters:
user- user who is muting.note- user's note.unmuteWhenFixed- unmute problem automatically when it is fixed everywhere.unmuteByTime- unmute problem automatically on a certain date.problems- build problems to mute
-
muteProblemsInProject
public MuteInfo muteProblemsInProject(@NotNull SUser user, @Nullable String note, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull SProject project, @NotNull UnmutePreference removeExistingPreference, @NotNull Collection<? extends BuildProblemInfo> problems)
Description copied from interface:ProblemMutingServiceMutes specified build problems in the specified project scope.- Specified by:
muteProblemsInProjectin interfaceProblemMutingService- Parameters:
user- user who is muting.note- user's note.unmuteWhenFixed- unmute problem automatically when it is fixed everywhere.unmuteByTime- unmute problem automatically on a certain date.removeExistingPreference- specifies scope where existing mutes should be removedproblems- build problems to mute
-
muteProblemsInBuildTypes
@NotNull public MuteInfo muteProblemsInBuildTypes(@NotNull SUser user, @Nullable String note, boolean unmuteWhenFixed, @Nullable Date unmuteByTime, @NotNull Collection<SBuildType> buildTypes, @NotNull Collection<? extends BuildProblemInfo> problems)
Description copied from interface:ProblemMutingServiceMutes specified build problems in the specified build configuration scope.- Specified by:
muteProblemsInBuildTypesin interfaceProblemMutingService- Parameters:
user- user who is muting.note- user's note.unmuteWhenFixed- unmute problem automatically when it is fixed everywhere.unmuteByTime- unmute problem automatically on a certain date.buildTypes- build types where to mute.problems- build problems to mute.
-
unmuteProblems
public void unmuteProblems(@Nullable SUser user, @Nullable String note, @NotNull SProject project, @NotNull Collection<BuildProblemInfo> problems)Description copied from interface:ProblemMutingServiceUnmutes the specified build problems in a scope where it was muted in the specified project and it's subprojects.- Specified by:
unmuteProblemsin interfaceProblemMutingService- Parameters:
user- user who is unmuting.note- a user's note.problems- problems to unmute.
-
unmuteProblems
public void unmuteProblems(@Nullable SUser user, @Nullable String note, @NotNull SProject project, @NotNull UnmutePreference unmutePreference, @NotNull Collection<BuildProblemInfo> problems)Description copied from interface:ProblemMutingServiceUnmutes the specified build problems in a scope where it was muted according to a given preference.- Specified by:
unmuteProblemsin interfaceProblemMutingService- Parameters:
user- user who is unmuting.note- a user's note.unmutePreference- in which projects specified problems should be unmuted.problems- problems to unmute.
-
unmuteProblems
public void unmuteProblems(@Nullable SUser user, @Nullable String note, @NotNull SBuild build, @NotNull Collection<BuildProblemInfo> problems)Description copied from interface:ProblemMutingServiceUnmutes the specified build problems in the specified build- Specified by:
unmuteProblemsin interfaceProblemMutingService- Parameters:
user- user who is unmuting.note- a user's note.build- build where to muteproblems- problems to unmute.
-
invalidateProjectMutesCache
public void invalidateProjectMutesCache(@NotNull SProject project)Description copied from interface:ProblemMutingServiceInvalidates project related data in the internal cache.- Specified by:
invalidateProjectMutesCachein interfaceProblemMutingService
-
-