Class BuildChain

    • Method Detail

      • getLatestTopPromotion

        @Nullable
        public BuildPromotion getLatestTopPromotion()
        Returns:
        the latest top build promotion of this build chain or null, if chain does not have build promotions
      • getId

        @NotNull
        public String getId()
      • getTopBuildTypes

        @NotNull
        public List<SBuildType> getTopBuildTypes()
      • getChainBuildTypes

        @NotNull
        public Set<SBuildType> getChainBuildTypes()
        Returns:
        all build chain build types.
      • getNotFinishedChainBuildTypes

        @NotNull
        public Set<SBuildType> getNotFinishedChainBuildTypes()
        Returns:
        all build types of the chain with running queued or not yet started builds.
      • getTriggeredChainBuildTypes

        @NotNull
        public Set<SBuildType> getTriggeredChainBuildTypes()
        Returns:
        all build types of the chain where queued or started build exists.
      • getReifiedDependencies

        @NotNull
        public Collection<BuildPromotion> getReifiedDependencies​(@NotNull
                                                                 SBuildType bt)
        For a given build configuration returns all promotions from the chain this build configuration depends on directly or transitively
        Parameters:
        bt -
        Returns:
      • getChainModificationId

        @Nullable
        public Long getChainModificationId()
      • isPersonal

        public boolean isPersonal()
      • containsTriggeredBuild

        public boolean containsTriggeredBuild​(@NotNull
                                              SBuildType buildType)
        Parameters:
        buildType -
        Returns:
        true if build chain contains queued or started build for the specified build configuration
      • containsBuildPromotion

        public boolean containsBuildPromotion​(@NotNull
                                              BuildPromotion promotion)
      • getReusedBuildPromotions

        @NotNull
        public Collection<BuildPromotion> getReusedBuildPromotions()
        Returns:
        collection of build promotions which were reused. Reused build promotions are calculated as those which have a started build and their start time is before top promotions queued time. In addition these builds should participate in more than one build chain.
      • traverseDependedOn

        public void traverseDependedOn​(@NotNull
                                       SBuildType startFrom,
                                       @NotNull
                                       DependencyConsumer<BuildTypeEx> consumer)
        Traverses all build types having direct and indirect dependencies on startFrom build type. Note, this method does not use only settings of the build configuration, because settings may not correspond to actual dependencies in build promotions. So the method traverses both: settings and build promotions dependencies.
        Parameters:
        startFrom -
        consumer -
      • setPreviousId

        public void setPreviousId​(@NotNull
                                  String prevId)
      • getPreviousId

        @NotNull
        public String getPreviousId()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object