Class UserChangeInfo

  • All Implemented Interfaces:
    java.lang.Comparable<UserChangeInfo>

    public class UserChangeInfo
    extends java.lang.Object
    implements java.lang.Comparable<UserChangeInfo>
    information about modification
    • Constructor Detail

      • UserChangeInfo

        public UserChangeInfo​(VcsModification modification,
                              java.util.List<java.lang.Long> usersId,
                              PersonalChangeDescriptor personalChangeDescriptor)
        Construct the object in initial state. Used internally.
        Parameters:
        modification - corresponding VCS modification
        usersId - users who participated in change
        personalChangeDescriptor - information about personal build
    • Method Detail

      • setChangeStatus

        public void setChangeStatus​(UserChangeStatus changeStatus)
        Set status of this change (calculated across all build configurations)
        Parameters:
        changeStatus - new status for the change
      • getChangeStatus

        public UserChangeStatus getChangeStatus()
        Return status of this change (calculated across all build configurations)
        Returns:
        see above
      • getModification

        public VcsModification getModification()
        Returns modification set that contains this change.
        Returns:
        detected modification.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isBuildResultsAvailable

        public boolean isBuildResultsAvailable()
        Returns true if there is at least one started or finished build with this change
        Returns:
        see above
      • getDetailsMap

        public java.util.Map<BuildType,​UserChangeInfo.BuildTypeChangeStatus> getDetailsMap()
        Returns a map from build configuration to the details object which describes status of the change in this particular build configuration. This includes information about the first build with change, if the change successful in this build configuration etc.
        Returns:
        see above
      • getDetails

        public UserChangeInfo.BuildTypeChangeStatus getDetails​(BuildType buildType)
        Returns details object which describes status of the change in this particular build configuration. This includes information about the first build with change, if the change successful in this build configuration etc.
        Parameters:
        buildType - build configuration
        Returns:
        see above
      • setFirstRunIn

        public void setFirstRunIn​(BuildType type,
                                  @Nullable
                                  Build instance)
        Set the first build which contains this change in given build configuration
        Parameters:
        type - build configuration
        instance - build instance, may be null
      • setFixedIn

        public void setFixedIn​(BuildType type,
                               @Nullable
                               Build instance)
      • getBuildTypes

        @NotNull
        public java.util.List<BuildType> getBuildTypes()
        Returns:
        ordered (using the native order) list of build configurations affected by the change.
      • getFirstRunIn

        @Nullable
        public Build getFirstRunIn​(BuildType type)
        Returns build instance, according to affected configuration, null if change is pending for the configuration
        Parameters:
        type - build configuration
        Returns:
        build instance, according to affected configuration, null if change is pending for the configuration
      • getFixedIn

        @Nullable
        public Build getFixedIn​(BuildType type)
        Returns first successful build for the specified configuration, which contains the change. null if configuration is still failing or pending.
        Parameters:
        type - build configuration
        Returns:
        first successful build after change has been made.
      • getCurrentBuild

        @Nullable
        public Build getCurrentBuild​(BuildType type)
        Returns last build for the specified configuration, which contains the change. null if configuration is still pending.
        Parameters:
        type - build configuration
        Returns:
        last build for the specified configuration after change has been made; returns null if getFixedIn returns not null
      • getAllInstances

        public java.util.List<Build> getAllInstances()
        Returns list of build instance representatives for each build configuration where this change has been first included.
        Returns:
        list, containing the first build instance for each affected configuration, run with this changes, if it exists.
      • removeType

        public void removeType​(BuildType type)
        Remove information about this build configuration from the change
        Parameters:
        type - build configuration to remove
      • addBuildType

        public void addBuildType​(@NotNull
                                 BuildType type)
        Add information about this build configuration to the change
        Parameters:
        type - build configuration to add
      • sortBuildTypes

        public void sortBuildTypes()
        Resort build configurations, related to the change
      • isSuspicious

        public boolean isSuspicious()
        Returns true if the change is suspicious.
        Returns:
        true if change is change is failed or not checked yet
      • isSuspicious

        public boolean isSuspicious​(BuildType type)
        Return if the change is suspicious for the specified configuration.
        Parameters:
        type - build configuration
        Returns:
        true if change included to the build, which failed or has not been run yet for specified configuration.
      • getUserIds

        public java.util.List<java.lang.Long> getUserIds()
        Returns the list of user ids whose version control names are matched with the specified configuration user name
        Returns:
        list of user ids, whose version control name is matched with the user name for the change.
      • getPersonalChangeDescriptor

        public PersonalChangeDescriptor getPersonalChangeDescriptor()
        Info about personal change and its status
        Returns:
        personal change info if change is personal, null otherwise
      • isChangeFinished

        public boolean isChangeFinished()
        Returns:
        true in case of all builds of this change finished, false otherwise
      • isChangeCanceled

        public boolean isChangeCanceled()
        Returns:
        true in case of at least one build of this change canceled, false otherwise
      • isChangeSuccessful

        public boolean isChangeSuccessful()
        Returns:
        true in case of all builds of the change successful, false otherwise