public class RssDetectionServiceImpl extends Object implements RssDetectionService
Constructor and Description |
---|
RssDetectionServiceImpl(AdministrationConfigurationAccessor administrationConfigurationAccessor,
AuthorCreatorService authorCreatorService,
BambooSpecsManager bambooSpecsManager,
CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager,
CustomVariableContext customVariableContext,
ExtendedAuthorManager extendedAuthorManager,
FeatureManager featureManager,
I18nBeanFactory i18nBeanFactory,
RepositoryStoredSpecsService repositoryStoredSpecsService,
SpecsConsumerFactory specsConsumerFactory,
VcsRepositoryManager vcsRepositoryManager) |
Modifier and Type | Method and Description |
---|---|
ErrorCollection |
canEnqueue(long repositoryId)
Checks whether Bamboo can enqueue RSS detection for the given repository.
|
ErrorCollection |
canEnqueue(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.
|
Future<Boolean> |
enqueue(long repositoryId,
VcsBranch vcsBranch)
Enqueue RSS detection for repository with the given ID and branch.
|
Future<Boolean> |
enqueue(long repositoryId,
VcsBranch vcsBranch,
boolean force)
Enqueue RSS detection for repository with the given ID and branch.
|
Future<Boolean> |
enqueue(long repositoryId,
VcsBranch vcsBranch,
boolean force,
SpecsConsumer specsConsumer)
Enqueue RSS detection for repository with the given ID and given branch.
|
List<String> |
getEnqueuedBranchesForRepository(long repositoryId)
Returns list of branches that are currently enqueued (i.e.
|
boolean |
isInProgress(long repositoryId,
VcsBranch vcsBranch) |
void |
postConstruct() |
void |
reportFailedSpecsScan(long repositoryId,
VcsBranch vcsBranch,
String errorMessage,
boolean specsNotFound) |
boolean |
runRssDetection(long repositoryId,
VcsBranch vcsBranch,
boolean forced,
SpecsConsumer specsConsumer)
Runs Repository-stored Specs detection for the given repository.
|
Future<Boolean> |
shutdown()
Shut down the RSS detection service and the underlying thread pool.
|
@Inject public 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)
@PostConstruct public void postConstruct()
@NotNull public Future<Boolean> enqueue(long repositoryId, @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 Future<Boolean> enqueue(long repositoryId, @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 Future<Boolean> enqueue(long repositoryId, @NotNull VcsBranch vcsBranch, boolean force, @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 VcsBranch vcsBranch)
isInProgress
in interface RssDetectionService
public void cleanUnfinishedSpecsAndInitService()
RssDetectionService
cleanUnfinishedSpecsAndInitService
in interface RssDetectionService
@NotNull public List<String> getEnqueuedBranchesForRepository(long repositoryId)
RssDetectionService
getEnqueuedBranchesForRepository
in interface RssDetectionService
repositoryId
- ID of the linked repository@NotNull public Future<Boolean> shutdown()
RssDetectionService
shutdown
in interface RssDetectionService
@NotNull public 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 ErrorCollection canEnqueue(@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 VcsBranch vcsBranch, boolean forced, @NotNull SpecsConsumer specsConsumer) throws IOException, RepositoryException
IOException
RepositoryException
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.