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.DategetCommitDate()Returns date, when this modification was last updated (e.g.StringgetCommiterName()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.VcsModificationContextgetContext()StringgetDescription()Returns user comment made for the changeStringgetDisplayVersion()VcsModificationExgetOriginal()Collection<String>getParentRevisions()Returns parent revisions for modifications from dag-based VCSes as they were reported by a VCS plugin.StringgetUserName()Returns name of the user who did this commit (according information from VCS system)DategetVcsDate()Returns when this modification was madeStringgetVersion()booleanisCommitter(User committer)Returns if the specified user is committer for the modification.booleanisDuplicateOf(SVcsModification modification)voidsetDescription(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:ModificationReturns name of the user who did this commit (according information from VCS system)- Specified by:
getUserNamein interfaceModification- Specified by:
getUserNamein classAbstractVcsModification- Returns:
- name of the user who did this commit (according information from VCS system)
-
getDescription
@NotNull public String getDescription()
Description copied from interface:ModificationReturns user comment made for the change- Specified by:
getDescriptionin interfaceChangeDescriptor- Specified by:
getDescriptionin interfaceModification- Specified by:
getDescriptionin classAbstractVcsModification- Returns:
- user comment made for the change
-
getVcsDate
@NotNull public Date getVcsDate()
Description copied from interface:ModificationReturns when this modification was made- Specified by:
getVcsDatein interfaceModification- Specified by:
getVcsDatein classAbstractVcsModification- Returns:
- when this modification was made
-
getCommitDate
@NotNull public Date getCommitDate()
Description copied from interface:SVcsModificationReturns 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:VcsModificationExReturns 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:
getVersionin interfaceVcsModification- Specified by:
getVersionin classAbstractVcsModification
-
getDisplayVersion
public String getDisplayVersion()
- Specified by:
getDisplayVersionin interfaceVcsModification- Specified by:
getDisplayVersionin classAbstractVcsModification
-
getContext
@NotNull public VcsModificationContext getContext()
- Specified by:
getContextin interfaceVcsModificationEx- Specified by:
getContextin classAbstractVcsModification
-
setDescription
public void setDescription(@NotNull String newDescription) throws AccessDeniedExceptionDescription copied from interface:SVcsModificationSet 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:
isDuplicateOfin interfaceVcsModificationEx- Overrides:
isDuplicateOfin classAbstractVcsModification- Returns:
- true if this modification is a duplicate of another one
-
isCommitter
public boolean isCommitter(@NotNull User committer)Description copied from interface:SVcsModificationReturns 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:SVcsModificationReturns 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:SVcsModificationReturns 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:
getParentRevisionsin interfaceSVcsModification- Specified by:
getParentRevisionsin classAbstractVcsModification- Returns:
- see above
-
getAttributes
@NotNull public Map<String,String> getAttributes()
Description copied from interface:SVcsModificationReturns modification's attributes or empty map if modification doesn't have any.- Specified by:
getAttributesin interfaceSVcsModification- Overrides:
getAttributesin classAbstractVcsModification- Returns:
- see above
-
getOriginal
@NotNull public VcsModificationEx getOriginal()
-
-