Package com.atlassian.bamboo.specs
Class BambooSpecsManagerImpl
java.lang.Object
com.atlassian.bamboo.specs.BambooSpecsManagerImpl
- All Implemented Interfaces:
BambooSpecsManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
detachPlanFromRss
(long planId) Detach plan from RSS.findBambooSpecsSourceForPlan
(long planId) FindVcsBambooSpecsSource
for a plan.@NotNull List<VcsLocationBambooSpecsState>
findByVcsLocationIdOrderBySpecsExecutionDate
(long repositoryId, @NotNull String branch, int limit) Return latestlimit
entries for given repository and its branch@NotNull Collection<Long>
Returns ids pf RSS-managed deployment projects that have been updated in RSS runs other than the one supplied.findLatestState
(long rootVcsRepositoryId, @NotNull String branch) Find latestVcsLocationBambooSpecsState
for given repository and branch@NotNull Collection<PlanKey>
findPlansInOtherStates
(VcsLocationBambooSpecsState specsState) Returns RSS-managed plans that have been updated in RSS runs other than the one supplied.findSourceById
(long specsStateId) FindVcsBambooSpecsSource
by id.findSpecsBranches
(long rootVcsRepositoryId, @NotNull String searchTerm) Get all branches fromVcsLocationBambooSpecsState
for given repository which match the search term@NotNull List<VcsLocationBambooSpecsState>
Get allVcsLocationBambooSpecsState
that are in unfinished statelong
Cleanup Bamboo Specs states DB records and log files.void
save
(VcsBambooSpecsSource vcsBambooSpecsSource) Save newVcsBambooSpecsSource
entity.void
save
(VcsLocationBambooSpecsState vcsLocationBambooSpecsState) Save newVcsLocationBambooSpecsState
entity.void
updateAfterSpecsImport
(VcsLocationBambooSpecsState vcsLocationBambooSpecsState, VcsLocationBambooSpecsState.SpecsImportState specsImportState, String logFilename) Update givenVcsLocationBambooSpecsState
with specs import results and save it.void
updateBambooSpecsSourceForPlan
(@NotNull Chain plan, @NotNull VcsBambooSpecsSource vcsBambooSpecsSource) UpdateVcsBambooSpecsSource
for a plan.
-
Constructor Details
-
BambooSpecsManagerImpl
public BambooSpecsManagerImpl()
-
-
Method Details
-
findLatestState
public Optional<VcsLocationBambooSpecsState> findLatestState(long rootVcsRepositoryId, @NotNull @NotNull String branch) Description copied from interface:BambooSpecsManager
Find latestVcsLocationBambooSpecsState
for given repository and branch- Specified by:
findLatestState
in interfaceBambooSpecsManager
-
save
Description copied from interface:BambooSpecsManager
Save newVcsLocationBambooSpecsState
entity.- Specified by:
save
in interfaceBambooSpecsManager
-
save
Description copied from interface:BambooSpecsManager
Save newVcsBambooSpecsSource
entity.- Specified by:
save
in interfaceBambooSpecsManager
-
findSourceById
Description copied from interface:BambooSpecsManager
FindVcsBambooSpecsSource
by id.- Specified by:
findSourceById
in interfaceBambooSpecsManager
-
findPlansInOtherStates
@NotNull public @NotNull Collection<PlanKey> findPlansInOtherStates(VcsLocationBambooSpecsState specsState) Description copied from interface:BambooSpecsManager
Returns RSS-managed plans that have been updated in RSS runs other than the one supplied.- Specified by:
findPlansInOtherStates
in interfaceBambooSpecsManager
-
findDeploymentProjectsInOtherStates
@NotNull public @NotNull Collection<Long> findDeploymentProjectsInOtherStates(VcsLocationBambooSpecsState specsState) Description copied from interface:BambooSpecsManager
Returns ids pf RSS-managed deployment projects that have been updated in RSS runs other than the one supplied.- Specified by:
findDeploymentProjectsInOtherStates
in interfaceBambooSpecsManager
-
findByVcsLocationIdOrderBySpecsExecutionDate
@NotNull public @NotNull List<VcsLocationBambooSpecsState> findByVcsLocationIdOrderBySpecsExecutionDate(long repositoryId, @NotNull @NotNull String branch, int limit) Description copied from interface:BambooSpecsManager
Return latestlimit
entries for given repository and its branch- Specified by:
findByVcsLocationIdOrderBySpecsExecutionDate
in interfaceBambooSpecsManager
-
updateAfterSpecsImport
public void updateAfterSpecsImport(VcsLocationBambooSpecsState vcsLocationBambooSpecsState, VcsLocationBambooSpecsState.SpecsImportState specsImportState, String logFilename) Description copied from interface:BambooSpecsManager
Update givenVcsLocationBambooSpecsState
with specs import results and save it.- Specified by:
updateAfterSpecsImport
in interfaceBambooSpecsManager
-
getUnfinishedSpecsScans
Description copied from interface:BambooSpecsManager
Get allVcsLocationBambooSpecsState
that are in unfinished state- Specified by:
getUnfinishedSpecsScans
in interfaceBambooSpecsManager
-
findSpecsBranches
@NotNull public @NotNull List<String> findSpecsBranches(long rootVcsRepositoryId, @NotNull @NotNull String searchTerm) Description copied from interface:BambooSpecsManager
Get all branches fromVcsLocationBambooSpecsState
for given repository which match the search term- Specified by:
findSpecsBranches
in interfaceBambooSpecsManager
-
removeOrphanedSpecStatesNoTx
public long removeOrphanedSpecStatesNoTx()Cleanup Bamboo Specs states DB records and log files. It's not visible at interface to avoid usage by plugin developers.- Specified by:
removeOrphanedSpecStatesNoTx
in interfaceBambooSpecsManager
- Returns:
- count of removed entries
-
findBambooSpecsSourceForPlan
Description copied from interface:BambooSpecsManager
FindVcsBambooSpecsSource
for a plan.- Specified by:
findBambooSpecsSourceForPlan
in interfaceBambooSpecsManager
-
updateBambooSpecsSourceForPlan
public void updateBambooSpecsSourceForPlan(@NotNull @NotNull Chain plan, @NotNull @NotNull VcsBambooSpecsSource vcsBambooSpecsSource) Description copied from interface:BambooSpecsManager
UpdateVcsBambooSpecsSource
for a plan.- Specified by:
updateBambooSpecsSourceForPlan
in interfaceBambooSpecsManager
-
detachPlanFromRss
public void detachPlanFromRss(long planId) Description copied from interface:BambooSpecsManager
Detach plan from RSS.- Specified by:
detachPlanFromRss
in interfaceBambooSpecsManager
-