Package jetbrains.buildServer.vcs.impl
Interface VcsModificationEx
-
- All Superinterfaces:
ChangeDescriptor,Comparable<VcsModification>,Modification,SVcsModification,VcsModification
- All Known Implementing Classes:
AbstractVcsModification,DBVcsModification,DuplicateVcsModification,MockVcsModification,MockVcsModificationWithId,PersonalVcsModificationImpl
public interface VcsModificationEx extends SVcsModification, ChangeDescriptor
- Author:
- Sergey.Anchipolevsky Date: 06.09.2007
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconsumeEdgeRelations(BiConsumer<Integer,RelatedConfigurations> consumer)voidconsumeRelations(BiConsumer<String,RelationType> consumer)Calls the specified consumer, pass it buildType internalId and relation as argumentsvoidconsumeRelations(BuildTypeIds btIds, BiConsumer<String,RelationType> consumer)Same asconsumeRelations(BiConsumer)but calls the consumer only if a build type id belogs to the ids specified as the first argumentBuildTypeIdsvoiddetachedFromConfigurations(Collection<String> btIds)StringgetCommiterName()Returns user who last updated this modification (e.g.byte[]getContentAfter(VcsChangeInfo change)byte[]getContentBefore(VcsChangeInfo change)VcsModificationContextgetContext()List<FilteredVcsChange>getFilteredChanges(CheckoutRules rules)Returns list of changed files filtered according to given checkout rules.Set<String>getReachableVcsBranches()BuildTypeIdsgetRelatedBuildTypeIds()List<String>getRelatedConfigurationIds(boolean ignoreOverridden)Returns configurations ids this modification is related to.RelationTypegetRelation(String buildTypeId)List<RelationType>getRelationTypes()booleanisDuplicateOf(SVcsModification modification)booleanisRelatedTo(int parentNum, SBuildType buildType, Predicate<RelationType> relationPredicate)Returns true if the edge from the parentNum-th parent to this commit has a relation to the specified buildType accepted by the given predicatebooleanisRelatedTo(String buildTypeId, Predicate<RelationType> relationPredicate)booleanisRelatedTo(SBuildType buildType)booleanisRelatedTo(SBuildType buildType, boolean ignoreOverridden)booleanisRelatedTo(SBuildType buildType, Predicate<RelationType> relationPredicate)Returns true if this modification has a relation accepted by the specified relation predicate to the given buildTypevoidprocessRelations(BiProcessor<String,RelationType> processor)Same asconsumeRelations(BiConsumer)but allows to stop processing at any point of time.booleanrelatedConfigurationsLoaded()voidresetEdgeRelations()Resets edge relations of this modification.voidresetRelatedConfigurations()-
Methods inherited from interface jetbrains.buildServer.serverSide.ChangeDescriptor
getAssociatedData, getDate, getDescription, getRelatedVcsChange, getType
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface jetbrains.buildServer.vcs.Modification
getDescription, getUserName, getVcsDate
-
Methods inherited from interface jetbrains.buildServer.vcs.SVcsModification
getAttributes, getBuildTypeRelations, getCommitDate, getCommitterIds, getCommitters, getDuplicates, getFilteredChanges, getFilteredChanges, getFilteredChanges, getFirstBuilds, getNumberOfRelatedConfigurations, getParentModifications, getParentRevisions, getPersonalChangeInfo, getRegistrationDate, getRelatedConfigurations, getRelatedIssues, getRelatedProjects, getVcsRoot, hasRelation, isCommitter, isHasRelatedIssues, relatedToBuildConfigurationsAccessibleTo, setDescription
-
Methods inherited from interface jetbrains.buildServer.vcs.VcsModification
findChangeByPath, getChangeCount, getChanges, getDisplayVersion, getId, getVersion, getVersionControlName, isPersonal
-
-
-
-
Method Detail
-
getContentBefore
@NotNull byte[] getContentBefore(@NotNull VcsChangeInfo change) throws VcsException- Throws:
VcsException
-
getContentAfter
@NotNull byte[] getContentAfter(@NotNull VcsChangeInfo change) throws VcsException- Throws:
VcsException
-
getRelatedConfigurationIds
@NotNull List<String> getRelatedConfigurationIds(boolean ignoreOverridden)
Returns configurations ids this modification is related to.- Parameters:
ignoreOverridden- if true does not return configurations where this modification was attached via overridden root- Returns:
- sorted list of build configuration ids
-
isRelatedTo
boolean isRelatedTo(@NotNull SBuildType buildType, boolean ignoreOverridden)
-
isRelatedTo
boolean isRelatedTo(@NotNull SBuildType buildType)- Parameters:
buildType- build configuration- Returns:
- true if this modification is attached to specified build configuration.
- Since:
- 7.1
-
isRelatedTo
boolean isRelatedTo(@NotNull SBuildType buildType, @NotNull Predicate<RelationType> relationPredicate)Returns true if this modification has a relation accepted by the specified relation predicate to the given buildType- Parameters:
buildType- buildType of interestrelationPredicate- relation predicate- Returns:
- see above
- Since:
- 10.0.5
-
isRelatedTo
boolean isRelatedTo(@NotNull String buildTypeId, @NotNull Predicate<RelationType> relationPredicate)
-
getRelationTypes
@NotNull List<RelationType> getRelationTypes()
- Returns:
- all types of relations of build configurations associated with this change
- Since:
- 2020.2
-
isRelatedTo
boolean isRelatedTo(int parentNum, @NotNull SBuildType buildType, @NotNull Predicate<RelationType> relationPredicate)Returns true if the edge from the parentNum-th parent to this commit has a relation to the specified buildType accepted by the given predicate
-
resetRelatedConfigurations
void resetRelatedConfigurations()
-
resetEdgeRelations
void resetEdgeRelations()
Resets edge relations of this modification. Next call toisRelatedTo(int, SBuildType, Predicate)will load them from db.
-
detachedFromConfigurations
void detachedFromConfigurations(@NotNull Collection<String> btIds)
-
getFilteredChanges
@NotNull List<FilteredVcsChange> getFilteredChanges(@NotNull CheckoutRules rules)
Returns list of changed files filtered according to given checkout rules.- Parameters:
rules- checkout rules to filter by.- Returns:
- list of filtered changed files.
-
consumeRelations
void consumeRelations(@NotNull BiConsumer<String,RelationType> consumer)Calls the specified consumer, pass it buildType internalId and relation as arguments- Parameters:
consumer- consumer to call
-
consumeRelations
void consumeRelations(@NotNull BuildTypeIds btIds, @NotNull BiConsumer<String,RelationType> consumer)Same asconsumeRelations(BiConsumer)but calls the consumer only if a build type id belogs to the ids specified as the first argumentBuildTypeIds- Parameters:
consumer- consumer to call- Since:
- 2021.2
-
processRelations
void processRelations(@NotNull BiProcessor<String,RelationType> processor)Same asconsumeRelations(BiConsumer)but allows to stop processing at any point of time.- Parameters:
processor-- Since:
- 2021.1.1
-
getRelation
@Nullable RelationType getRelation(@NotNull String buildTypeId)
-
consumeEdgeRelations
void consumeEdgeRelations(@NotNull BiConsumer<Integer,RelatedConfigurations> consumer)
-
relatedConfigurationsLoaded
boolean relatedConfigurationsLoaded()
- Returns:
- true if build configurations related to this change are loaded into the change internal cache
-
getRelatedBuildTypeIds
BuildTypeIds getRelatedBuildTypeIds()
-
isDuplicateOf
boolean isDuplicateOf(@NotNull SVcsModification modification)- Parameters:
modification-- Returns:
- true if this modification is a duplicate of another one
- Since:
- 2020.1
-
getCommiterName
@NotNull String getCommiterName()
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)
- Since:
- 2020.1.3
-
getContext
VcsModificationContext getContext()
-
-