Interface ModificationStateCalculator

    • Method Detail

      • getFirstBuildsWithModificationIncluded

        @NotNull
        Map<SBuildType,​SBuild> getFirstBuildsWithModificationIncluded​(@NotNull
                                                                            SVcsModification modification,
                                                                            boolean includeDependentBuilds)
        For given VCS modification returns map of build configuration -> build where this modification was included for the first time. Cancelled builds are ignored.
        Parameters:
        modification - VCS modification
        includeDependentBuilds - if true snapshot dependent builds with option "Show changes from dependencies" will be added to the result
        Returns:
        see above
      • getFirstBuildsWithModificationFixed

        @NotNull
        Map<SBuildType,​SBuild> getFirstBuildsWithModificationFixed​(@NotNull
                                                                         SVcsModification modification)
        For given VCS modification returns map of build configuration -> build where this modification was fixed (included into the successful build). Cancelled builds are ignored.
        Parameters:
        modification - VCS modification
        Returns:
        see above
      • getQueuedBuilds

        @NotNull
        Map<SBuildType,​List<SQueuedBuild>> getQueuedBuilds​(Collection<SBuildType> buildTypes,
                                                                 SVcsModification modification)
        Find out queued builds of the given buildTypes which are the first candidates (per branch) for containing modification. Builds are sorted by their branch names.
        Parameters:
        buildTypes - build types, can be personal
        modification - modification to be included into the build
        Returns:
        see above
      • getLastReachableBuild

        @Nullable
        SBuild getLastReachableBuild​(@NotNull
                                     SBuildType buildType,
                                     @NotNull
                                     SVcsModification modification,
                                     @NotNull
                                     String branch)
        Returns last reachable build for non-personal modification. For non-dag-based modifications does not calculate reachability, uses result of SBuildType.getLastChangesStartedBuild(). For dag-based modifications first tries to find a last build in the default branch, if not found - in the specified branch, if not found - return the latest build among reachable ones.
        Parameters:
        buildType - buildType of interest
        modification - non-personal modification of interest
        branch - branch where to look for the last build when no build is found in the default branch
        Returns:
        see above
      • createMergedVcsModificationInfo

        @NotNull
        MergedVcsModificationInfo createMergedVcsModificationInfo​(@NotNull
                                                                  SVcsModification modification)
        Create an object which represents several duplicating modifications as a whole object. The returned object is aware of the current context permissions, i.e. returned modifications are available to the current user.
        Parameters:
        modification - modification candidate
        Returns:
        see above
        Since:
        8.1
      • findDependentPromotionsFromTargetBuildTypes

        @NotNull
        Map<SBuildType,​BuildPromotion> findDependentPromotionsFromTargetBuildTypes​(@NotNull
                                                                                         Map<SBuildType,​SBuild> buildsMap,
                                                                                         @NotNull
                                                                                         Predicate<SBuildType> targetBuildTypeFilter)
        For specified map of builds finds all promotions depending on these builds directly or transitively in the build types matched by specified predicate.
        Parameters:
        buildsMap - - map of builds
        targetBuildTypeFilter -
        Returns:
        Since:
        2017.2