Package jetbrains.buildServer
Class UserChangeInfo
- java.lang.Object
-
- jetbrains.buildServer.UserChangeInfo
-
- All Implemented Interfaces:
java.lang.Comparable<UserChangeInfo>
public class UserChangeInfo extends java.lang.Object implements java.lang.Comparable<UserChangeInfo>
information about modification
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UserChangeInfo.BuildTypeChangeStatus
Describes the status of the change in the particular build configuration
-
Constructor Summary
Constructors Constructor Description UserChangeInfo(VcsModification modification, java.util.List<java.lang.Long> usersId, PersonalChangeDescriptor personalChangeDescriptor)
Construct the object in initial state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBuildType(BuildType type)
Add information about this build configuration to the changeint
compareTo(UserChangeInfo o)
java.util.List<Build>
getAllInstances()
Returns list of build instance representatives for each build configuration where this change has been first included.java.util.List<BuildType>
getBuildTypes()
UserChangeStatus
getChangeStatus()
Return status of this change (calculated across all build configurations)Build
getCurrentBuild(BuildType type)
Returns last build for the specified configuration, which contains the change.UserChangeInfo.BuildTypeChangeStatus
getDetails(BuildType buildType)
Returns details object which describes status of the change in this particular build configuration.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.Build
getFirstRunIn(BuildType type)
Returns build instance, according to affected configuration, null if change is pending for the configurationBuild
getFixedIn(BuildType type)
Returns first successful build for the specified configuration, which contains the change.VcsModification
getModification()
Returns modification set that contains this change.PersonalChangeDescriptor
getPersonalChangeDescriptor()
Info about personal change and its statusjava.util.List<java.lang.Long>
getUserIds()
Returns the list of user ids whose version control names are matched with the specified configuration user nameboolean
isBuildResultsAvailable()
Returns true if there is at least one started or finished build with this changeboolean
isChangeCanceled()
boolean
isChangeFinished()
boolean
isChangeSuccessful()
boolean
isSuspicious()
Returnstrue
if the change is suspicious.boolean
isSuspicious(BuildType type)
Return if the change is suspicious for the specified configuration.void
removeType(BuildType type)
Remove information about this build configuration from the changevoid
setChangeStatus(UserChangeStatus changeStatus)
Set status of this change (calculated across all build configurations)void
setCurrent(BuildType type, Build instance)
Set current build of the change in corresponding build configurationvoid
setFirstRunIn(BuildType type, Build instance)
Set the first build which contains this change in given build configurationvoid
setFixedIn(BuildType type, Build instance)
void
sortBuildTypes()
Resort build configurations, related to the changejava.lang.String
toString()
-
-
-
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 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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.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 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 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.
-
compareTo
public int compareTo(UserChangeInfo o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<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()
Returnstrue
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
-
-