com.atlassian.bamboo.plan.vcsRevision
Class PlanVcsRevisionHistoryServiceImpl

java.lang.Object
  extended by com.atlassian.bamboo.plan.vcsRevision.PlanVcsRevisionHistoryServiceImpl
All Implemented Interfaces:
PlanVcsRevisionHistoryService

public class PlanVcsRevisionHistoryServiceImpl
extends java.lang.Object
implements PlanVcsRevisionHistoryService


Constructor Summary
PlanVcsRevisionHistoryServiceImpl(PlanVcsRevisionHistoryManager planVcsRevisionHistoryManager)
           
 
Method Summary
 void cleanupUnusedEntriesForPlan(PlanKey planKey)
          Removes history entries that are not used in change detection process.
 void clearRevisionHistoryForPlan(PlanKey planKey)
          Removes all history entries for the plan.
 java.lang.String getLastVcsRevisionKey(PlanKey planKey)
          The string value representing the last vcs revision checked for relevant changes.
 java.lang.String getLastVcsRevisionKeyBeforeBuildNumber(PlanKey planKey, int buildNumber)
          Return the last revision checked for relevant changes before given build.
 void markBuildStarted(BuildContext buildContext)
          Saves the information on started build in the plan's vcs revision history.
 void markChangeDetectionCompleted(PlanKey planKey, int buildNumber, java.lang.String vcsRevisionKey)
          Saves the information on change detection result in the plan's vcs revision history.
 void revertVcsRevisionForResult(PlanResultKey planResultKey)
          Removes history entry corresponding to ResultsSummary identified by the key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlanVcsRevisionHistoryServiceImpl

public PlanVcsRevisionHistoryServiceImpl(@NotNull
                                         PlanVcsRevisionHistoryManager planVcsRevisionHistoryManager)
Method Detail

getLastVcsRevisionKey

@Nullable
public java.lang.String getLastVcsRevisionKey(@NotNull
                                                       PlanKey planKey)
Description copied from interface: PlanVcsRevisionHistoryService
The string value representing the last vcs revision checked for relevant changes. Will be null if nothing has been built. The value is parseable by the individual repositories.

Specified by:
getLastVcsRevisionKey in interface PlanVcsRevisionHistoryService
Returns:
last revision key for which change detection has been performed

getLastVcsRevisionKeyBeforeBuildNumber

@Nullable
public java.lang.String getLastVcsRevisionKeyBeforeBuildNumber(@NotNull
                                                                        PlanKey planKey,
                                                                        int buildNumber)
Description copied from interface: PlanVcsRevisionHistoryService
Return the last revision checked for relevant changes before given build. Can be null. The value is parseable by the individual repositories.

Specified by:
getLastVcsRevisionKeyBeforeBuildNumber in interface PlanVcsRevisionHistoryService
Returns:
last revision key checked before a buildNumber

markBuildStarted

public void markBuildStarted(@NotNull
                             BuildContext buildContext)
Description copied from interface: PlanVcsRevisionHistoryService
Saves the information on started build in the plan's vcs revision history. Updates previousVcsRevisionKey in BuildContext

Specified by:
markBuildStarted in interface PlanVcsRevisionHistoryService

markChangeDetectionCompleted

public void markChangeDetectionCompleted(@NotNull
                                         PlanKey planKey,
                                         int buildNumber,
                                         java.lang.String vcsRevisionKey)
Description copied from interface: PlanVcsRevisionHistoryService
Saves the information on change detection result in the plan's vcs revision history.

Specified by:
markChangeDetectionCompleted in interface PlanVcsRevisionHistoryService

revertVcsRevisionForResult

public void revertVcsRevisionForResult(@NotNull
                                       PlanResultKey planResultKey)
Description copied from interface: PlanVcsRevisionHistoryService
Removes history entry corresponding to ResultsSummary identified by the key. This allows the change detection to trigger another build for the same changeset.

Specified by:
revertVcsRevisionForResult in interface PlanVcsRevisionHistoryService

clearRevisionHistoryForPlan

public void clearRevisionHistoryForPlan(@NotNull
                                        PlanKey planKey)
Description copied from interface: PlanVcsRevisionHistoryService
Removes all history entries for the plan. In effect the next build will behave similar to initial build.

Specified by:
clearRevisionHistoryForPlan in interface PlanVcsRevisionHistoryService

cleanupUnusedEntriesForPlan

public void cleanupUnusedEntriesForPlan(@NotNull
                                        PlanKey planKey)
Description copied from interface: PlanVcsRevisionHistoryService
Removes history entries that are not used in change detection process.

Specified by:
cleanupUnusedEntriesForPlan in interface PlanVcsRevisionHistoryService


Copyright © 2011 Atlassian. All Rights Reserved.