jetbrains.buildServer.vcs
Interface ChangeStatus


public interface ChangeStatus

Holds the details data related to a single change. The information returned by this interface is not 'live', i.e. it is cached and calculated for the moment when instance of the interface is returned.

Since:
5.1
Author:
Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
See Also:
ChangeStatusProvider

Method Summary
 java.util.Map<SBuildType,BuildTypeChangeStatus> getBuildTypesStatus()
          Get status of the change in various configurations.
 SVcsModification getChange()
           If this ChangeStatus relates to a single modification, returns this modification (no merge case).
 java.util.List<SBuildType> getCompilationProblems()
          Deprecated. since 7.0
 java.util.Map<SBuildType,SBuild> getCurrentBuilds()
          Deprecated. since 7.0, use #getConfigurationsStatus to get this information
 int getFailedCount()
          Returns the number of failing builds (including those running and failing).
 int getFinishedBuildsNumber()
          Returns the number of finished builds (among first builds containing this change).
 java.util.Map<SBuildType,SBuild> getFirstBuilds()
          For non-personal builds, returns map of build configuration -> build where modifications from this change were included for the first time.
 MergedVcsModificationInfo getMergedVcsModificationInfo()
          Returns merged information about change for all duplicates.
 int getPendingBuildsTypesNumber()
          Returns the number of pending builds types.
 java.util.List<SBuildType> getPendingBuildTypes()
          Deprecated. since 7.0, get info from #getConfigurationsStatus
 java.util.List<SBuildType> getRelatedConfigurations()
          Returns collection of build configurations affected by this change.
 int getRunningBuildsNumber()
          Returns the number of running builds (among first builds containing this change).
 int getSuccessCount()
          Returns the number of successful builds.
 boolean isCanceledPersonal()
          For personal changes, returns true if one of the personal builds, included into the change, was canceled
 boolean isFailed(SBuildType buildType)
          Deprecated. since 7.0, use BuildTypeChangeStatus#isFailed to get this information
 boolean isSuccessful()
          Returns whether change status is successful for the current moment (i.e.
 boolean isSuccessful(SBuildType buildType)
          Deprecated. since 7.0, use BuildTypeChangeStatus#isSuccessful to get this information
 

Method Detail

getChange

@NotNull
SVcsModification getChange()

If this ChangeStatus relates to a single modification, returns this modification (no merge case).

If this Change Status is a merged status, this method returns the very first detected modification related to this ChangeStatus. I.e. in this case, returned modification will have a minimum ID among all duplicated modifications, related to the change.

Returns:
see above
See Also:
ChangeStatusProvider.getChangeStatus(SVcsModification), ChangeStatusProvider.getMergedChangeStatus(SVcsModification), getMergedVcsModificationInfo()

getMergedVcsModificationInfo

@NotNull
MergedVcsModificationInfo getMergedVcsModificationInfo()
Returns merged information about change for all duplicates.

Returns:
see above

getCompilationProblems

@NotNull
java.util.List<SBuildType> getCompilationProblems()
Deprecated. since 7.0

Returns the list of build types which first builds have failed with 'Compilation error'.

Returns:
build types list

getPendingBuildTypes

@NotNull
java.util.List<SBuildType> getPendingBuildTypes()
Deprecated. since 7.0, get info from #getConfigurationsStatus

Returns the list of pending builds types with this change.

Returns:
pending builds types list

getFinishedBuildsNumber

int getFinishedBuildsNumber()
Returns the number of finished builds (among first builds containing this change).

Returns:
number of finished builds

getRunningBuildsNumber

int getRunningBuildsNumber()
Returns the number of running builds (among first builds containing this change).

Returns:
number of running builds

getPendingBuildsTypesNumber

int getPendingBuildsTypesNumber()
Returns the number of pending builds types.

Returns:
number of pending builds types

getFailedCount

int getFailedCount()
Returns the number of failing builds (including those running and failing).

Returns:
number of currently failed build configurations

getSuccessCount

int getSuccessCount()
Returns the number of successful builds.

Returns:
number of build configurations, which have successful builds with this change.
See Also:
BuildTypeChangeStatus.isSuccessful()

isFailed

boolean isFailed(@NotNull
                 SBuildType buildType)
Deprecated. since 7.0, use BuildTypeChangeStatus#isFailed to get this information

Returns whether a change status for specified build type is "failed".

Parameters:
buildType - build type to ask status for
Returns:
true if there is a started failing build with given build configuration, and there were no successful builds afterwards

isSuccessful

boolean isSuccessful(@NotNull
                     SBuildType buildType)
Deprecated. since 7.0, use BuildTypeChangeStatus#isSuccessful to get this information

Returns whether a change status for specified build type is "successful", i.e. there is a finished successful build for given build configuration, which contains this change

Parameters:
buildType - build type to ask status for
Returns:
see above

isSuccessful

boolean isSuccessful()
Returns whether change status is successful for the current moment (i.e. is successful for all build types and there are no pending builds).

Returns:
see above

isCanceledPersonal

boolean isCanceledPersonal()
For personal changes, returns true if one of the personal builds, included into the change, was canceled

Returns:
see above
Since:
6.0

getFirstBuilds

@NotNull
java.util.Map<SBuildType,SBuild> getFirstBuilds()
For non-personal builds, returns map of build configuration -> build where modifications from this change were included for the first time. Cancelled and personal builds are ignored. For personal builds, returns a map from a buildType to the corresponding build which contains this personal change This method is similar to SVcsModification.getFirstBuilds(), but it works across merged modifications included to this change.

Since:
6.0
See Also:
SVcsModification.getFirstBuilds(), getBuildTypesStatus()

getCurrentBuilds

java.util.Map<SBuildType,SBuild> getCurrentBuilds()
Deprecated. since 7.0, use #getConfigurationsStatus to get this information

For each build configuration which contains this change, return a map from build configuration to current build with this change. If the change is successful for a given build type, the current build is the first successful build of the bulid configuration which contains this change. If the change is failing for a given build type, returns the last started build in the given build configuration. If the build configuration is pending, returns null.

Returns:
see above
Since:
6.0

getRelatedConfigurations

@NotNull
java.util.List<SBuildType> getRelatedConfigurations()
Returns collection of build configurations affected by this change. Configurations are sorted by project name, configuration name (case insensitive)

Returns:
see above
Since:
6.5

getBuildTypesStatus

java.util.Map<SBuildType,BuildTypeChangeStatus> getBuildTypesStatus()
Get status of the change in various configurations. Method returns a map from change-related configurations to related configuration status object. Map keys are ordered by project name, configuration name (case insensitive)

Returns:
see above
Since:
7.0
See Also:
BuildTypeChangeStatus