Class PlanVcsRevisionHistoryManagerImpl
java.lang.Object
com.atlassian.bamboo.plan.vcsRevision.PlanVcsRevisionHistoryManagerImpl
- All Implemented Interfaces:
PlanVcsRevisionHistoryManager
public class PlanVcsRevisionHistoryManagerImpl
extends Object
implements PlanVcsRevisionHistoryManager
-
Constructor Summary
ConstructorDescriptionPlanVcsRevisionHistoryManagerImpl
(PlanVcsRevisionHistoryDao planVcsRevisionHistoryDao) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanupUnusedEntriesForPlan
(@NotNull PlanKey planKey) Removes history entries that are not used in change detection process.void
clearRevisionHistoryForPlanNewTx
(@NotNull PlanKey planKey) Removes all history entries for the plan.@NotNull Map<Long,
PlanVcsRevisionData> getLastVcsRevisionKeys
(@NotNull PlanKey planKey) Return the mapping between repository ids and strings representing the vcs revisions which were result of last performed change detection.@NotNull Map<Long,
PlanVcsRevisionData> getLastVcsRevisionKeysBeforeBuildNumber
(@NotNull PlanKey planKey, int buildNumber) Return the mapping between repository ids and strings representing the vcs revisions which were result of last change detection performed before given build.void
markBuildStartedNewTx
(@NotNull BuildContext buildContext) Saves the information on started build in the plan's vcs revision history.void
markChangeDetectionCompletedNewTx
(@NotNull PlanKey planKey, int buildNumber, @NotNull PlanVcsRevisionData planVcsRevisionData, long repositoryId) Saves the information on change detection result in the plan's vcs revision history.void
moveRevisionHistoryForPlan
(@NotNull PlanKey oldPlanKey, @NotNull PlanKey newPlanKey)
-
Constructor Details
-
PlanVcsRevisionHistoryManagerImpl
-
-
Method Details
-
getLastVcsRevisionKeys
@NotNull public @NotNull Map<Long,PlanVcsRevisionData> getLastVcsRevisionKeys(@NotNull @NotNull PlanKey planKey) Description copied from interface:PlanVcsRevisionHistoryManager
Return the mapping between repository ids and strings representing the vcs revisions which were result of last performed change detection. Will be empty if nothing has been built. The values are parseable by the individual repositories.- Specified by:
getLastVcsRevisionKeys
in interfacePlanVcsRevisionHistoryManager
- Returns:
- mapping between repository id and corresponding revision key.
-
getLastVcsRevisionKeysBeforeBuildNumber
@NotNull public @NotNull Map<Long,PlanVcsRevisionData> getLastVcsRevisionKeysBeforeBuildNumber(@NotNull @NotNull PlanKey planKey, int buildNumber) Description copied from interface:PlanVcsRevisionHistoryManager
Return the mapping between repository ids and strings representing the vcs revisions which were result of last change detection performed before given build. The value is parseable by the individual repositories.- Specified by:
getLastVcsRevisionKeysBeforeBuildNumber
in interfacePlanVcsRevisionHistoryManager
- Returns:
- mapping between repository id and corresponding revision key.
-
markBuildStartedNewTx
Description copied from interface:PlanVcsRevisionHistoryManager
Saves the information on started build in the plan's vcs revision history. Enforces new transaction. Updates previousVcsRevisionKey inBuildContext
- Specified by:
markBuildStartedNewTx
in interfacePlanVcsRevisionHistoryManager
-
markChangeDetectionCompletedNewTx
public void markChangeDetectionCompletedNewTx(@NotNull @NotNull PlanKey planKey, int buildNumber, @NotNull @NotNull PlanVcsRevisionData planVcsRevisionData, long repositoryId) Description copied from interface:PlanVcsRevisionHistoryManager
Saves the information on change detection result in the plan's vcs revision history. Enforces new transaction.- Specified by:
markChangeDetectionCompletedNewTx
in interfacePlanVcsRevisionHistoryManager
-
clearRevisionHistoryForPlanNewTx
Description copied from interface:PlanVcsRevisionHistoryManager
Removes all history entries for the plan. In effect the next build will behave similar to initial build. Enforces new transaction.- Specified by:
clearRevisionHistoryForPlanNewTx
in interfacePlanVcsRevisionHistoryManager
-
cleanupUnusedEntriesForPlan
Description copied from interface:PlanVcsRevisionHistoryManager
Removes history entries that are not used in change detection process.- Specified by:
cleanupUnusedEntriesForPlan
in interfacePlanVcsRevisionHistoryManager
-
moveRevisionHistoryForPlan
public void moveRevisionHistoryForPlan(@NotNull @NotNull PlanKey oldPlanKey, @NotNull @NotNull PlanKey newPlanKey) - Specified by:
moveRevisionHistoryForPlan
in interfacePlanVcsRevisionHistoryManager
-