Package jetbrains.buildServer.vcs.impl
Class DuplicateVcsModification
- java.lang.Object
-
- jetbrains.buildServer.vcs.impl.AbstractVcsModification
-
- jetbrains.buildServer.vcs.impl.DuplicateVcsModification
-
- All Implemented Interfaces:
Comparable<VcsModification>
,Loggable
,ChangeDescriptor
,VcsModificationEx
,Modification
,SVcsModification
,VcsModification
public abstract class DuplicateVcsModification extends AbstractVcsModification
-
-
Constructor Summary
Constructors Constructor Description DuplicateVcsModification(VcsRootInstance vcsRootInstance, Date registrationDate, VcsModificationEx original)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getAttributes()
Returns modification's attributes or empty map if modification doesn't have any.Date
getCommitDate()
Returns date, when this modification was last updated (e.g.String
getCommiterName()
Returns user who last updated this modification (e.g.List<Long>
getCommitterIds()
Returns ids of TeamCity users mapped to this VCS modification by VCS username.VcsModificationContext
getContext()
String
getDescription()
Returns user comment made for the changeString
getDisplayVersion()
VcsModificationEx
getOriginal()
Collection<String>
getParentRevisions()
Returns parent revisions for modifications from dag-based VCSes as they were reported by a VCS plugin.String
getUserName()
Returns name of the user who did this commit (according information from VCS system)Date
getVcsDate()
Returns when this modification was madeString
getVersion()
boolean
isCommitter(User committer)
Returns if the specified user is committer for the modification.boolean
isDuplicateOf(SVcsModification modification)
void
setDescription(String newDescription)
Set and store new description for the modification in the database.-
Methods inherited from class jetbrains.buildServer.vcs.impl.AbstractVcsModification
compareTo, consumeEdgeRelations, consumeRelations, consumeRelations, describe, detachedFromConfigurations, equals, findChangeByPath, getAssociatedData, getBuildTypeRelations, getChangeCount, getChanges, getCommitters, getContentAfter, getContentBefore, getDate, getDuplicates, getFilteredChanges, getFilteredChanges, getFilteredChanges, getFilteredChanges, getFirstBuilds, getId, getNumberOfRelatedConfigurations, getParentModifications, getPersonalChangeInfo, getReachableVcsBranches, getRegistrationDate, getRelatedBuildTypeIds, getRelatedConfigurationIds, getRelatedConfigurations, getRelatedIssues, getRelatedProjects, getRelatedVcsChange, getRelation, getRelationTypes, getType, getVcsRoot, getVersionControlName, hashCode, hasRelation, isHasRelatedIssues, isPersonal, isRelatedTo, isRelatedTo, isRelatedTo, isRelatedTo, isRelatedTo, processRelations, relatedConfigurationsLoaded, relatedToBuildConfigurationsAccessibleTo, resetEdgeRelations, resetRelatedConfigurations, setEdgeRelations, setRelations, setRelations, toString
-
-
-
-
Constructor Detail
-
DuplicateVcsModification
public DuplicateVcsModification(@NotNull VcsRootInstance vcsRootInstance, @NotNull Date registrationDate, @NotNull VcsModificationEx original)
-
-
Method Detail
-
getUserName
@NotNull public String getUserName()
Description copied from interface:Modification
Returns name of the user who did this commit (according information from VCS system)- Specified by:
getUserName
in interfaceModification
- Specified by:
getUserName
in classAbstractVcsModification
- Returns:
- name of the user who did this commit (according information from VCS system)
-
getDescription
@NotNull public String getDescription()
Description copied from interface:Modification
Returns user comment made for the change- Specified by:
getDescription
in interfaceChangeDescriptor
- Specified by:
getDescription
in interfaceModification
- Specified by:
getDescription
in classAbstractVcsModification
- Returns:
- user comment made for the change
-
getVcsDate
@NotNull public Date getVcsDate()
Description copied from interface:Modification
Returns when this modification was made- Specified by:
getVcsDate
in interfaceModification
- Specified by:
getVcsDate
in classAbstractVcsModification
- Returns:
- when this modification was made
-
getCommitDate
@NotNull public Date getCommitDate()
Description copied from interface:SVcsModification
Returns date, when this modification was last updated (e.g. via git rebase) unlikeModification.getVcsDate()
, which returns date when the modification was initially authored. Is more or equal toModification.getVcsDate()
.- Returns:
- date when this modification was last updated
-
getCommiterName
@NotNull public String getCommiterName()
Description copied from interface:VcsModificationEx
Returns user who last updated this modification (e.g. via git rebase, amend, patch apply) unlikeModification.getUserName()
, which returns user who initially authored the modification.- Returns:
- name of the user who last updated this modification (according to information from VCS system)
-
getVersion
@NotNull public String getVersion()
- Specified by:
getVersion
in interfaceVcsModification
- Specified by:
getVersion
in classAbstractVcsModification
-
getDisplayVersion
public String getDisplayVersion()
- Specified by:
getDisplayVersion
in interfaceVcsModification
- Specified by:
getDisplayVersion
in classAbstractVcsModification
-
getContext
@NotNull public VcsModificationContext getContext()
- Specified by:
getContext
in interfaceVcsModificationEx
- Specified by:
getContext
in classAbstractVcsModification
-
setDescription
public void setDescription(@NotNull String newDescription) throws AccessDeniedException
Description copied from interface:SVcsModification
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, seePermission.EDIT_VCS_MODIFICATION
-
isDuplicateOf
public boolean isDuplicateOf(@NotNull SVcsModification modification)
- Specified by:
isDuplicateOf
in interfaceVcsModificationEx
- Overrides:
isDuplicateOf
in classAbstractVcsModification
- Returns:
- true if this modification is a duplicate of another one
-
isCommitter
public boolean isCommitter(@NotNull User committer)
Description copied from interface:SVcsModification
Returns if the specified user is committer for the modification.- Parameters:
committer
- specified user.- Returns:
- if the specified user is committer for the modification.
-
getCommitterIds
@NotNull public List<Long> getCommitterIds()
Description copied from interface:SVcsModification
Returns ids of TeamCity users mapped to this VCS modification by VCS username.- Returns:
- ids of the committers to this change.
-
getParentRevisions
@NotNull public Collection<String> getParentRevisions()
Description copied from interface:SVcsModification
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.- Specified by:
getParentRevisions
in interfaceSVcsModification
- Specified by:
getParentRevisions
in classAbstractVcsModification
- Returns:
- see above
-
getAttributes
@NotNull public Map<String,String> getAttributes()
Description copied from interface:SVcsModification
Returns modification's attributes or empty map if modification doesn't have any.- Specified by:
getAttributes
in interfaceSVcsModification
- Overrides:
getAttributes
in classAbstractVcsModification
- Returns:
- see above
-
getOriginal
@NotNull public VcsModificationEx getOriginal()
-
-