Interface ProblemMutingService

  • All Known Implementing Classes:
    ProblemMutingServiceImpl, SecuredProblemMutingService

    public interface ProblemMutingService
    Provides method for muting problems. High-level interface.
    Since:
    6.5
    Author:
    Leonid Bushuev from JetBrains, Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
    • Method Detail

      • muteTestsInProject

        @NotNull
        MuteInfo muteTestsInProject​(@NotNull
                                    SUser user,
                                    @Nullable
                                    String note,
                                    boolean unmuteWhenFixed,
                                    @Nullable
                                    Date unmuteByTime,
                                    @NotNull
                                    SProject project,
                                    @NotNull
                                    Collection<STest> tests)
        Mutes specified tests in the project scope. Automatically unmutes specified tests in all specified project's subprojects and their build types recursively.
        Parameters:
        user - user who muting the tests.
        note - a user's note.
        unmuteWhenFixed - true for unmuting on test pass
        unmuteByTime - when to unmute if unmuting at specified time
        project - project to mute in
        tests - tests to mute
        Returns:
        the mute info created
        Since:
        2017.2
      • muteTestsInProject

        @NotNull
        MuteInfo muteTestsInProject​(@NotNull
                                    SUser user,
                                    @Nullable
                                    String note,
                                    boolean unmuteWhenFixed,
                                    @Nullable
                                    Date unmuteByTime,
                                    @NotNull
                                    SProject project,
                                    @NotNull
                                    UnmutePreference removeExistingPreference,
                                    @NotNull
                                    Collection<STest> tests)
        Mutes specified tests in the project scope.
        Parameters:
        user - user who muting the tests.
        note - a user's note.
        unmuteWhenFixed - true for unmuting on test pass
        unmuteByTime - when to unmute if unmuting at specified time
        project - project to mute in
        removeExistingPreference - specifies scope where existing mutes should be removed
        tests - tests to mute
        Returns:
        the mute info created
        Since:
        2024.07
      • copyMuteInfo

        void copyMuteInfo​(@NotNull
                          MuteInfo muteInfo,
                          @NotNull
                          SProject newProject)
        Creates a copy of mute info in another project.
        Parameters:
        muteInfo - mute info to copy
        newProject - project where a copy of mute info should be created
        Since:
        10.0.3
      • muteProblemsInProject

        MuteInfo muteProblemsInProject​(@NotNull
                                       SUser user,
                                       @Nullable
                                       String note,
                                       boolean unmuteWhenFixed,
                                       @Nullable
                                       Date unmuteByTime,
                                       @NotNull
                                       SProject project,
                                       @NotNull
                                       Collection<? extends BuildProblemInfo> problems)
        Mutes specified build problems in the specified project scope. Automatically unmutes specified build problems in all specified project's subprojects and their build types recursively.
        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
        Since:
        8.0
      • muteProblemsInProject

        MuteInfo muteProblemsInProject​(@NotNull
                                       SUser user,
                                       @Nullable
                                       String note,
                                       boolean unmuteWhenFixed,
                                       @Nullable
                                       Date unmuteByTime,
                                       @NotNull
                                       SProject project,
                                       @NotNull
                                       UnmutePreference removeExistingPreference,
                                       @NotNull
                                       Collection<? extends BuildProblemInfo> problems)
        Mutes specified build problems in the specified project scope.
        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 removed
        problems - build problems to mute
        Since:
        2024.07
      • muteTestsInBuildTypes

        @NotNull
        MuteInfo muteTestsInBuildTypes​(@NotNull
                                       SUser user,
                                       @Nullable
                                       String note,
                                       boolean unmuteWhenFixed,
                                       @Nullable
                                       Date unmuteByTime,
                                       @NotNull
                                       Collection<SBuildType> buildTypes,
                                       @NotNull
                                       Collection<STest> tests)
        Mutes the specified tests in the build configuration scope.
        Parameters:
        user - user who muting the tests.
        note - a user's note.
        unmuteOption - how the system should unmute it automatically.
        buildTypes - build types where to mute tests.
        tests - tests to mute.
      • muteProblemsInBuildTypes

        @NotNull
        MuteInfo muteProblemsInBuildTypes​(@NotNull
                                          SUser user,
                                          @Nullable
                                          String note,
                                          boolean unmuteWhenFixed,
                                          @Nullable
                                          Date unmuteByTime,
                                          @NotNull
                                          Collection<SBuildType> buildTypes,
                                          @NotNull
                                          Collection<? extends BuildProblemInfo> problems)
        Mutes specified build problems in the specified build configuration scope.
        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.
        Since:
        8.0
      • unmuteTests

        void unmuteTests​(@Nullable
                         SUser user,
                         @Nullable
                         String note,
                         @NotNull
                         SProject project,
                         @NotNull
                         Collection<STest> tests)
        Unmutes the specified tests in a scope where it was muted, including child projects but excluding parent ones
        Parameters:
        user - user that is unmuting tests.
        note - a user's note.
        tests - tests to unmute.
        Since:
        8.0
      • unmuteTests

        void unmuteTests​(@Nullable
                         SUser user,
                         @Nullable
                         String note,
                         @NotNull
                         SProject project,
                         @NotNull
                         UnmutePreference unmutePreference,
                         @NotNull
                         Collection<STest> tests)
        Unmutes the specified tests in a scope where it was muted
        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.
        Since:
        2018.1
      • unmuteTests

        void unmuteTests​(@Nullable
                         SUser user,
                         @Nullable
                         String note,
                         @NotNull
                         SBuildType buildType,
                         @NotNull
                         Collection<STest> tests)
        Unmutes the specified tests in one build type scope.
        Parameters:
        user - user who performs an action
        note - additional comments
        buildType - build type scope
        tests - tests to unmute
        Since:
        8.0
      • unmuteProblems

        void unmuteProblems​(@Nullable
                            SUser user,
                            @Nullable
                            String note,
                            @NotNull
                            SBuildType buildType,
                            @NotNull
                            Collection<BuildProblemInfo> problems)
        Unmutes the specified build problems in one build type scope.
        Parameters:
        user - user who performs an action
        note - additional comments
        buildType - build type scope
        problems - problems to unmute
        Since:
        8.0
      • unmuteProblems

        void unmuteProblems​(@Nullable
                            SUser user,
                            @Nullable
                            String note,
                            @NotNull
                            SProject project,
                            @NotNull
                            Collection<BuildProblemInfo> problems)
        Unmutes the specified build problems in a scope where it was muted in the specified project and it's subprojects.
        Parameters:
        user - user who is unmuting.
        note - a user's note.
        problems - problems to unmute.
        Since:
        8.0
      • unmuteProblems

        void unmuteProblems​(@Nullable
                            SUser user,
                            @Nullable
                            String note,
                            @NotNull
                            SProject project,
                            @NotNull
                            UnmutePreference unmutePreference,
                            @NotNull
                            Collection<BuildProblemInfo> problems)
        Unmutes the specified build problems in a scope where it was muted according to a given preference.
        Parameters:
        user - user who is unmuting.
        note - a user's note.
        unmutePreference - in which projects specified problems should be unmuted.
        problems - problems to unmute.
        Since:
        2024.07
      • unmuteProblems

        void unmuteProblems​(@Nullable
                            SUser user,
                            @Nullable
                            String note,
                            @NotNull
                            SBuild build,
                            @NotNull
                            Collection<BuildProblemInfo> problems)
        Unmutes the specified build problems in the specified build
        Parameters:
        user - user who is unmuting.
        note - a user's note.
        build - build where to mute
        problems - problems to unmute.
        Since:
        8.0
      • getMuteInfoTestForBuild

        @NotNull
        Map<Long,​MuteInfo> getMuteInfoTestForBuild​(@NotNull
                                                         SBuild build)
        Retrieves 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.

        Parameters:
        build - the build
        Returns:
        mute info map: test id -> mute info (means "for all test runs of a given test...")
      • getMuteInfoTestForBuilds

        @NotNull
        Map<Long,​Map<Long,​MuteInfo>> getMuteInfoTestForBuilds​(@NotNull
                                                                          Collection<Long> buildIds)
        Retrieves 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.

        Parameters:
        build - the build
        Returns:
        mute info map: build id -> map(test id -> mute info)
      • getMuteInfoProblemForBuild

        @NotNull
        Map<Integer,​MuteInfo> getMuteInfoProblemForBuild​(@NotNull
                                                               SBuild build)
        Since:
        8.0
      • getTestsCurrentMuteInfo

        @NotNull
        Map<Long,​CurrentMuteInfo> getTestsCurrentMuteInfo​(@NotNull
                                                                SProject project)
        Retrieves 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.

        Parameters:
        project - the project
        Returns:
        current mute info map: test id -> current mute info
      • getMutesOfOneTestInBuilds

        @NotNull
        Map<Long,​MuteInfo> getMutesOfOneTestInBuilds​(STest test,
                                                           Collection<Long> relatedBuildIds)
        Retrives mute info for all test runs of the specified test in given builds.
        Parameters:
        test - the test to retrieve mute info for.
        relatedBuildIds - buildIds
        Returns:
        a map of buildId -> muteInfo.
        Since:
        2019.2.1
      • getTestCurrentMuteInfo

        @Nullable
        CurrentMuteInfo getTestCurrentMuteInfo​(@NotNull
                                               String projectId,
                                               Long testNameId)
        Retrieves current actual mute info (from database) for the specified test.
        Parameters:
        projectId - project internal id
        testNameId -
        Returns:
        retrieved mute info, or null if no such project or test is not muted in the project and its build configurations.
      • getBuildProblemCurrentMuteInfo

        @Nullable
        CurrentMuteInfo getBuildProblemCurrentMuteInfo​(@NotNull
                                                       String projectId,
                                                       @NotNull
                                                       Integer problemId)
        Retrieves 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.
        Parameters:
        projectId - project internal id
        problemIdentity - build problem identity
        Returns:
        retrieved mute info, or null if no such project or problem is not muted in the project and its build configurations.
        Since:
        8.0
      • getBuildProblemEffectiveMuteInfo

        @NotNull
        Map<BuildProblemInfo,​CurrentMuteInfo> getBuildProblemEffectiveMuteInfo​(@NotNull
                                                                                     String projectId,
                                                                                     @NotNull
                                                                                     Collection<? extends BuildProblemInfo> problemInfos)
        Retrieves 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.
        Parameters:
        projectId - project internal id
        problemInfos - 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.
        Since:
        10.0.4
      • getBuildProblemEffectiveMuteInfo

        @NotNull
        Map<Integer,​CurrentMuteInfo> getBuildProblemEffectiveMuteInfo​(@NotNull
                                                                            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.
        Parameters:
        projectId - project internal id
        Returns:
        retrieved found mute info in format: Map(buildProblemId -> corresponding CurrentMuteInfo)
        Since:
        2019.2
      • getBuildProblemsCurrentMuteInfo

        @NotNull
        Map<Integer,​CurrentMuteInfo> getBuildProblemsCurrentMuteInfo​(@NotNull
                                                                           SProject project)
        Retrieves 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.
        Parameters:
        project - project
        Returns:
        see above
        Since:
        8.0
      • invalidateProjectMutesCache

        void invalidateProjectMutesCache​(@NotNull
                                         SProject project)
        Invalidates project related data in the internal cache.
        Parameters:
        projectId - project internal id.
        Since:
        8.0