Class PlanVcsRevisionHistoryManagerImpl
- java.lang.Object
-
- com.atlassian.bamboo.plan.vcsRevision.PlanVcsRevisionHistoryManagerImpl
-
- All Implemented Interfaces:
PlanVcsRevisionHistoryManager
public class PlanVcsRevisionHistoryManagerImpl extends Object implements PlanVcsRevisionHistoryManager
-
-
Constructor Summary
Constructors Constructor Description PlanVcsRevisionHistoryManagerImpl(PlanVcsRevisionHistoryDao planVcsRevisionHistoryDao)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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 Detail
-
PlanVcsRevisionHistoryManagerImpl
public PlanVcsRevisionHistoryManagerImpl(PlanVcsRevisionHistoryDao planVcsRevisionHistoryDao)
-
-
Method Detail
-
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
public void markBuildStartedNewTx(@NotNull @NotNull BuildContext buildContext)
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
public void clearRevisionHistoryForPlanNewTx(@NotNull @NotNull PlanKey planKey)
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
public void cleanupUnusedEntriesForPlan(@NotNull @NotNull PlanKey planKey)
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
-
-