Package com.atlassian.bamboo.specs
Class BambooSpecsManagerImpl
- java.lang.Object
-
- com.atlassian.bamboo.specs.BambooSpecsManagerImpl
-
- All Implemented Interfaces:
BambooSpecsManager
public class BambooSpecsManagerImpl extends Object implements BambooSpecsManager
-
-
Constructor Summary
Constructors Constructor Description BambooSpecsManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
detachPlanFromRss(long planId)
Detach plan from RSS.Optional<VcsBambooSpecsSource>
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>
findDeploymentProjectsInOtherStates(VcsLocationBambooSpecsState specsState)
Returns ids pf RSS-managed deployment projects that have been updated in RSS runs other than the one supplied.Optional<VcsLocationBambooSpecsState>
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.Optional<VcsBambooSpecsSource>
findSourceById(long specsStateId)
FindVcsBambooSpecsSource
by id.@NotNull List<String>
findSpecsBranches(long rootVcsRepositoryId, @NotNull String searchTerm)
Get all branches fromVcsLocationBambooSpecsState
for given repository which match the search term@NotNull List<VcsLocationBambooSpecsState>
getUnfinishedSpecsScans()
Get allVcsLocationBambooSpecsState
that are in unfinished statelong
removeOrphanedSpecStatesNoTx()
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.
-
-
-
Method Detail
-
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
public void save(VcsLocationBambooSpecsState vcsLocationBambooSpecsState)
Description copied from interface:BambooSpecsManager
Save newVcsLocationBambooSpecsState
entity.- Specified by:
save
in interfaceBambooSpecsManager
-
save
public void save(VcsBambooSpecsSource vcsBambooSpecsSource)
Description copied from interface:BambooSpecsManager
Save newVcsBambooSpecsSource
entity.- Specified by:
save
in interfaceBambooSpecsManager
-
findSourceById
public Optional<VcsBambooSpecsSource> findSourceById(long specsStateId)
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
@NotNull public @NotNull List<VcsLocationBambooSpecsState> 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
public Optional<VcsBambooSpecsSource> findBambooSpecsSourceForPlan(long planId)
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
-
-