Package jetbrains.buildServer
Class UserChangeInfo
- java.lang.Object
-
- jetbrains.buildServer.UserChangeInfo
-
- All Implemented Interfaces:
Comparable<UserChangeInfo>
public class UserChangeInfo extends Object implements Comparable<UserChangeInfo>
information about modification
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUserChangeInfo.BuildTypeChangeStatusDescribes the status of the change in the particular build configuration
-
Constructor Summary
Constructors Constructor Description UserChangeInfo(VcsModification modification, List<Long> usersId, PersonalChangeDescriptor personalChangeDescriptor)Construct the object in initial state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBuildType(BuildType type)Add information about this build configuration to the changeintcompareTo(UserChangeInfo o)List<Build>getAllInstances()Returns list of build instance representatives for each build configuration where this change has been first included.List<BuildType>getBuildTypes()UserChangeStatusgetChangeStatus()Return status of this change (calculated across all build configurations)BuildgetCurrentBuild(BuildType type)Returns last build for the specified configuration, which contains the change.UserChangeInfo.BuildTypeChangeStatusgetDetails(BuildType buildType)Returns details object which describes status of the change in this particular build configuration.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.BuildgetFirstRunIn(BuildType type)Returns build instance, according to affected configuration, null if change is pending for the configurationBuildgetFixedIn(BuildType type)Returns first successful build for the specified configuration, which contains the change.VcsModificationgetModification()Returns modification set that contains this change.PersonalChangeDescriptorgetPersonalChangeDescriptor()Info about personal change and its statusList<Long>getUserIds()Returns the list of user ids whose version control names are matched with the specified configuration user namebooleanisBuildResultsAvailable()Returns true if there is at least one started or finished build with this changebooleanisChangeCanceled()booleanisChangeFinished()booleanisChangeSuccessful()booleanisSuspicious()Returnstrueif the change is suspicious.booleanisSuspicious(BuildType type)Return if the change is suspicious for the specified configuration.voidremoveType(BuildType type)Remove information about this build configuration from the changevoidsetChangeStatus(UserChangeStatus changeStatus)Set status of this change (calculated across all build configurations)voidsetCurrent(BuildType type, Build instance)Set current build of the change in corresponding build configurationvoidsetFirstRunIn(BuildType type, Build instance)Set the first build which contains this change in given build configurationvoidsetFixedIn(BuildType type, Build instance)voidsortBuildTypes()Resort build configurations, related to the changeStringtoString()
-
-
-
Constructor Detail
-
UserChangeInfo
public UserChangeInfo(VcsModification modification, List<Long> usersId, PersonalChangeDescriptor personalChangeDescriptor)
Construct the object in initial state. Used internally.- Parameters:
modification- corresponding VCS modificationusersId- users who participated in changepersonalChangeDescriptor- 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.
-
isBuildResultsAvailable
public boolean isBuildResultsAvailable()
Returns true if there is at least one started or finished build with this change- Returns:
- see above
-
getDetailsMap
public 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 configurationinstance- build instance, may be null
-
setCurrent
public void setCurrent(BuildType type, Build instance)
Set current build of the change in corresponding build configuration- Parameters:
type- build configurationinstance- current build in this build configuration- See Also:
UserChangeInfo.BuildTypeChangeStatus.getCurrentBuild()
-
getBuildTypes
@NotNull public 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.nullif 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.nullif 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 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.
-
compareTo
public int compareTo(UserChangeInfo o)
- Specified by:
compareToin interfaceComparable<UserChangeInfo>
-
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()
Returnstrueif 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:
trueif change included to the build, which failed or has not been run yet for specified configuration.
-
getUserIds
public List<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
-
-