public class RssDetectionServiceImpl extends Object implements RssDetectionService
Constructor and Description |
---|
RssDetectionServiceImpl(@NotNull AdministrationConfigurationAccessor administrationConfigurationAccessor,
@NotNull AuthorCreatorService authorCreatorService,
@NotNull BambooSpecsManager bambooSpecsManager,
@NotNull CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager,
@NotNull CustomVariableContext customVariableContext,
@NotNull ExtendedAuthorManager extendedAuthorManager,
@NotNull FeatureManager featureManager,
@NotNull I18nBeanFactory i18nBeanFactory,
@NotNull RepositoryStoredSpecsService repositoryStoredSpecsService,
@NotNull SpecsConsumerFactory specsConsumerFactory,
@NotNull VcsRepositoryManager vcsRepositoryManager) |
Modifier and Type | Method and Description |
---|---|
@NotNull ErrorCollection |
canEnqueue(long repositoryId)
Checks whether Bamboo can enqueue RSS detection for the given repository.
|
@NotNull ErrorCollection |
canEnqueue(@NotNull VcsRepositoryData vcsRepositoryData)
Checks whether Bamboo can enqueue RSS detection for the given repository.
|
void |
cleanUnfinishedSpecsAndInitService()
Init the service and clean up any stale scan states after Bamboo restart.
|
@NotNull Future<Boolean> |
enqueue(long repositoryId,
@NotNull VcsBranch vcsBranch)
Enqueue RSS detection for repository with the given ID and branch.
|
@NotNull Future<Boolean> |
enqueue(long repositoryId,
@NotNull VcsBranch vcsBranch,
boolean force)
Enqueue RSS detection for repository with the given ID and branch.
|
@NotNull Future<Boolean> |
enqueue(long repositoryId,
@NotNull VcsBranch vcsBranch,
boolean force,
@NotNull SpecsConsumer specsConsumer)
Enqueue RSS detection for repository with the given ID and given branch.
|
@NotNull List<String> |
getEnqueuedBranchesForRepository(long repositoryId)
Returns list of branches that are currently enqueued (i.e.
|
boolean |
isInProgress(long repositoryId,
@NotNull VcsBranch vcsBranch) |
void |
postConstruct() |
void |
reportFailedSpecsScan(long repositoryId,
@NotNull VcsBranch vcsBranch,
@NotNull String errorMessage,
boolean specsNotFound) |
boolean |
runRssDetection(long repositoryId,
@NotNull VcsBranch vcsBranch,
boolean forced,
@NotNull SpecsConsumer specsConsumer)
Runs Repository-stored Specs detection for the given repository.
|
@NotNull Future<Boolean> |
shutdown()
Shut down the RSS detection service and the underlying thread pool.
|
@Inject public RssDetectionServiceImpl(@NotNull @NotNull AdministrationConfigurationAccessor administrationConfigurationAccessor, @NotNull @NotNull AuthorCreatorService authorCreatorService, @NotNull @NotNull BambooSpecsManager bambooSpecsManager, @NotNull @NotNull CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager, @NotNull @NotNull CustomVariableContext customVariableContext, @NotNull @NotNull ExtendedAuthorManager extendedAuthorManager, @NotNull @NotNull FeatureManager featureManager, @NotNull @NotNull I18nBeanFactory i18nBeanFactory, @NotNull @NotNull RepositoryStoredSpecsService repositoryStoredSpecsService, @NotNull @NotNull SpecsConsumerFactory specsConsumerFactory, @NotNull @NotNull VcsRepositoryManager vcsRepositoryManager)
@PostConstruct public void postConstruct()
@NotNull public @NotNull Future<Boolean> enqueue(long repositoryId, @NotNull @NotNull VcsBranch vcsBranch)
RssDetectionService
DefaultSpecsConsumer
to import Specs execution results.enqueue
in interface RssDetectionService
repositoryId
- ID of the linked repositoryvcsBranch
- branch of the repository@NotNull public @NotNull Future<Boolean> enqueue(long repositoryId, @NotNull @NotNull VcsBranch vcsBranch, boolean force)
RssDetectionService
DefaultSpecsConsumer
to import Specs execution results.enqueue
in interface RssDetectionService
repositoryId
- ID of the linked repositoryvcsBranch
- branch of the repositoryforce
- if true, specs import is executed even if no new commits are found in the repository@NotNull public @NotNull Future<Boolean> enqueue(long repositoryId, @NotNull @NotNull VcsBranch vcsBranch, boolean force, @NotNull @NotNull SpecsConsumer specsConsumer)
RssDetectionService
specsConsumer
to import Specs execution results.enqueue
in interface RssDetectionService
repositoryId
- ID of the linked repositoryvcsBranch
- optional VCS branch to checkoutforce
- if true, specs import is executed even if no new commits are found in the repositoryspecsConsumer
- strategy used to import Specs execution results (plans, deployments, etc)public boolean isInProgress(long repositoryId, @NotNull @NotNull VcsBranch vcsBranch)
isInProgress
in interface RssDetectionService
public void cleanUnfinishedSpecsAndInitService()
RssDetectionService
cleanUnfinishedSpecsAndInitService
in interface RssDetectionService
@NotNull public @NotNull List<String> getEnqueuedBranchesForRepository(long repositoryId)
RssDetectionService
getEnqueuedBranchesForRepository
in interface RssDetectionService
repositoryId
- ID of the linked repository@NotNull public @NotNull Future<Boolean> shutdown()
RssDetectionService
shutdown
in interface RssDetectionService
@NotNull public @NotNull ErrorCollection canEnqueue(long repositoryId)
RssDetectionService
This method will not attempt to connect to the repository. It will only validate repository's configuration and global Bamboo settings.
canEnqueue
in interface RssDetectionService
repositoryId
- ID of the repository@NotNull public @NotNull ErrorCollection canEnqueue(@NotNull @NotNull VcsRepositoryData vcsRepositoryData)
RssDetectionService
This method will not attempt to connect to the repository. It will only validate repository's configuration and global Bamboo settings.
canEnqueue
in interface RssDetectionService
vcsRepositoryData
- repository to checkpublic boolean runRssDetection(long repositoryId, @NotNull @NotNull VcsBranch vcsBranch, boolean forced, @NotNull @NotNull SpecsConsumer specsConsumer) throws IOException, RepositoryException
IOException
RepositoryException
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.