jetbrains.buildServer.vcs
Interface SVcsModification

All Superinterfaces:
java.lang.Comparable<VcsModification>, Modification, VcsModification

public interface SVcsModification
extends VcsModification

Server side vcs modification class.


Method Summary
 java.util.Map<java.lang.String,java.lang.String> getAttributes()
          Returns modification's attributes or empty map if modification doesn't have any.
 java.util.Map<SBuildType,RelationType> getBuildTypeRelations()
           
 java.util.List<java.lang.Long> getCommitterIds()
          Returns ids of TeamCity users mapped to this VCS modification by VCS username.
 java.util.Collection<SUser> getCommitters()
           
 java.util.Collection<SVcsModification> getDuplicates()
          Returns duplicates of this VCS modification, (the given modification is not included)
 java.util.List<FilteredVcsChange> getFilteredChanges(BuildPromotion buildPromotion)
          Returns list of changed files filtered according to checkout rules of the specified build promotion
 java.util.List<FilteredVcsChange> getFilteredChanges(SBuild build)
          Returns list of changed files filtered according to checkout rules of the specified build
 java.util.List<FilteredVcsChange> getFilteredChanges(SBuildType buildType)
          Returns list of changed files filtered according to checkout rules of the specified build configuration
 java.util.Map<SBuildType,SBuild> getFirstBuilds()
          For non-personal builds, returns map of build configuration -> build where this modification was included for the first time.
 int getNumberOfRelatedConfigurations()
          Returns number of build configurations where this modification appeared.
 java.util.Collection<SVcsModification> getParentModifications()
          Returns parent modifications of this VCS modification.
 java.util.Collection<java.lang.String> getParentRevisions()
          Returns parent revisions for modifications from dag-based VCSes as they were reported by a VCS plugin.
 PersonalChangeDescriptor getPersonalChangeInfo()
          For personal changes, returns personal change information details.
 java.util.Date getRegistrationDate()
          Returns date of this VCS modification registration in the TeamCity server database.
 java.util.Collection<SBuildType> getRelatedConfigurations()
          Returns collection of build configurations where this modification appeared.
 java.util.Collection<Issue> getRelatedIssues()
          Returns the collection of issues related to this modification (fixed bugs, introduced features, etc).
 java.util.Collection<SProject> getRelatedProjects()
           
 VcsRootInstance getVcsRoot()
          For non-personal modifications returns VCS root where this modification occurred.
 boolean hasRelation(SBuildType buildType, RelationType relation)
          Returns true if the given buildType has relation of the specified type
 boolean isCommitter(User user)
          Returns if the specified user is committer for the modification.
 boolean isHasRelatedIssues()
          Returns whether the modification has related issues (fixed bugs, introduced features, etc).
 void setDescription(java.lang.String newDescription)
          Set and store new description for the modification in the database.
 
Methods inherited from interface jetbrains.buildServer.vcs.VcsModification
findChangeByPath, getChangeCount, getChanges, getDisplayVersion, getId, getVersion, getVersionControlName, isPersonal
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface jetbrains.buildServer.vcs.Modification
getDescription, getUserName, getVcsDate
 

Method Detail

getVcsRoot

@NotNull
VcsRootInstance getVcsRoot()
                           throws VcsRootNotFoundException
For non-personal modifications returns VCS root where this modification occurred. For personal modifications throws UnsupportedOperationException because personal modification can be from several VCS roots simultaneously.

Returns:
vcs root instance.
Throws:
VcsRootNotFoundException

isCommitter

boolean isCommitter(@NotNull
                    User user)
Returns if the specified user is committer for the modification.

Parameters:
user - specified user.
Returns:
if the specified user is committer for the modification.

getCommitterIds

@NotNull
java.util.List<java.lang.Long> getCommitterIds()
Returns ids of TeamCity users mapped to this VCS modification by VCS username.

Returns:
ids of the committers to this change.

getCommitters

@NotNull
java.util.Collection<SUser> getCommitters()
Returns:
collection of TeamCity users mapped to this VCS modification by VCS username.
Since:
6.5

getRelatedConfigurations

@NotNull
java.util.Collection<SBuildType> getRelatedConfigurations()
Returns collection of build configurations where this modification appeared.

Returns:
collection of build configurations

getBuildTypeRelations

@NotNull
java.util.Map<SBuildType,RelationType> getBuildTypeRelations()
Returns:
relations this modification has to build configurations
Since:
9.0

hasRelation

boolean hasRelation(@NotNull
                    SBuildType buildType,
                    @NotNull
                    RelationType relation)
Returns true if the given buildType has relation of the specified type

Parameters:
buildType - buildType of interest
relation - relation of interest
Returns:
see above
Since:
9.0

getRelatedProjects

@NotNull
java.util.Collection<SProject> getRelatedProjects()
Returns:
returns collection of projects where this modification appeared.
Since:
6.5.5

getNumberOfRelatedConfigurations

int getNumberOfRelatedConfigurations()
Returns number of build configurations where this modification appeared.

Returns:
number of build configurations where this modification appeared.

getFilteredChanges

@NotNull
java.util.List<FilteredVcsChange> getFilteredChanges(@NotNull
                                                             SBuildType buildType)
Returns list of changed files filtered according to checkout rules of the specified build configuration

Parameters:
buildType - build configuration
Returns:
list of filtered changed files

getFilteredChanges

@NotNull
java.util.List<FilteredVcsChange> getFilteredChanges(@NotNull
                                                             SBuild build)
Returns list of changed files filtered according to checkout rules of the specified build

Parameters:
build - build
Returns:
list of filtered changed files

getFilteredChanges

@NotNull
java.util.List<FilteredVcsChange> getFilteredChanges(@NotNull
                                                             BuildPromotion buildPromotion)
Returns list of changed files filtered according to checkout rules of the specified build promotion

Parameters:
buildPromotion - build promotion
Returns:
list of filtered changed files

getFirstBuilds

@NotNull
java.util.Map<SBuildType,SBuild> getFirstBuilds()
For non-personal builds, returns map of build configuration -> build where this modification was 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

Returns:
see above

getRelatedIssues

@NotNull
java.util.Collection<Issue> getRelatedIssues()
Returns the collection of issues related to this modification (fixed bugs, introduced features, etc).

Returns:
related issues
Since:
5.0
See Also:
isHasRelatedIssues()

isHasRelatedIssues

boolean isHasRelatedIssues()
Returns whether the modification has related issues (fixed bugs, introduced features, etc).

Returns:
true if the modification has related issues
Since:
7.0
See Also:
getRelatedIssues()

getPersonalChangeInfo

@NotNull
PersonalChangeDescriptor getPersonalChangeInfo()
For personal changes, returns personal change information details. For non-personal builds, throws exception

Returns:
see above
Throws:
java.lang.UnsupportedOperationException - when modification is not personal
Since:
5.1
See Also:
VcsModification.isPersonal()

getRegistrationDate

@NotNull
java.util.Date getRegistrationDate()
Returns date of this VCS modification registration in the TeamCity server database.

Returns:
date of VCS modification registration

getDuplicates

@NotNull
java.util.Collection<SVcsModification> getDuplicates()
Returns duplicates of this VCS modification, (the given modification is not included)

Returns:
duplicates of this VCS modification

getParentModifications

@NotNull
java.util.Collection<SVcsModification> getParentModifications()
Returns parent modifications of this VCS modification. Returns an empty list if VCS does not provide an information about parents or parents could not be found.

Returns:
see above
Since:
7.0

getParentRevisions

@NotNull
java.util.Collection<java.lang.String> getParentRevisions()
Returns parent revisions for modifications from dag-based VCSes as they were reported by a VCS plugin. For modifications from non-dag-based VCSes returns an empty collection.

Returns:
see above
Since:
7.1.2

getAttributes

@NotNull
java.util.Map<java.lang.String,java.lang.String> getAttributes()
Returns modification's attributes or empty map if modification doesn't have any.

Returns:
see above
Since:
8.0

setDescription

void setDescription(@NotNull
                    java.lang.String newDescription)
                    throws AccessDeniedException
Set and store new description for the modification in the database. This action is logged to audit, if current user is set in the authentication context. Empty descriptions are not allowed and ignored.

Parameters:
newDescription - new description for the modification
Throws:
AccessDeniedException - when the current authority holder is not committer of the change and has no explicit permission to set the change description, see jetbrains.buildServer.serverSide.auth.Permission.EDIT_VCS_MODIFICATION
Since:
10.0