@PublicApi
public interface ArtifactSubscriptionManager
Modifier and Type | Field and Description |
---|---|
static String |
BAMBOO_ARTIFACTS_PATH_VARIABLE |
Modifier and Type | Method and Description |
---|---|
long |
countSubscriptionsOfArtifact(long artifactDefinitionId) |
@NotNull List<ArtifactSubscription> |
findCurrentSubscriptionsForPlan(@NotNull ImmutableJob producerJob)
Get list of subscriptions existing in a chain for given artifact
|
@Nullable ArtifactSubscription |
findSubscription(long id)
Get artifact definition of specified id
|
@NotNull List<ArtifactSubscription> |
findSubscriptionsOfPlan(@NotNull PlanIdentifier plan)
Get list of artifact subscriptions associated with a plan
|
@NotNull List<ArtifactDefinition> |
findSubscriptionsPossibleForPlan(@NotNull ImmutableJob job)
Get list of chain level artifacts available for specified plan
|
@NotNull com.google.common.collect.Multimap<ResultsSummary,ConsumedSubscription> |
getConsumedSubscriptions(@NotNull ResultsSummary resultsSummary)
Returns list of
ConsumedSubscription ordered by order of ResultsSummary execution. |
boolean |
isSubscriptionsValid(@NotNull Job consumer,
@NotNull Chain chain,
@NotNull String stageName)
Shorter for of validateSubscriptions method
|
@NotNull List<ArtifactDefinitionContext> |
prepareArtifactDefinitionContexts(@NotNull ImmutableJob job,
@NotNull BuildContext buildContext,
SecureToken secureToken)
Helps prepare the artifact definitions
|
@NotNull List<ArtifactSubscriptionContext> |
prepareSubscriptionContexts(@NotNull ImmutableJob job,
@NotNull BuildContext parentBuildContext,
SecureToken secureToken) |
void |
removeArtifactSubscription(@NotNull ArtifactSubscription artifactSubscription)
Remove artifact subscription.
|
void |
removeArtifactSubscriptions(@NotNull Collection<ArtifactSubscription> artifactSubscriptions)
Remove all artifact subscriptions in the collection.
|
void |
removeArtifactSubscriptionsOfPlan(@NotNull ImmutablePlan plan)
Remove all artifact subscriptions for a plan
|
void |
removeArtifactSubscriptionsOfPlan(@NotNull Plan plan)
Deprecated.
since 6.2 use
removeArtifactSubscriptionsOfPlan(ImmutablePlan) instead |
void |
saveArtifactSubscription(@NotNull ArtifactSubscription artifactSubscription)
Save artifact subscription.
|
void |
saveArtifactSubscriptions(@NotNull Collection<ArtifactSubscription> artifactSubscriptions)
Save all artifact definitions in a collection.
|
void |
saveConsumedSubscription(@NotNull ArtifactSubscriptionContext artifactSubscription,
@NotNull PlanResultKey planResultKey,
@NotNull String artifactLinkType)
Store consumed subscription.
|
List<ArtifactSubscriptionSubstitutionAware> |
transformSubscriptions(@NotNull List<ArtifactSubscription> subscriptions) |
@NotNull List<ArtifactSubscription> |
validateSubscribersForMovedJob(@NotNull ImmutableJob producer,
@NotNull ImmutableChainStage producerStage)
Validate all consumer artifact subscriptions to the artifacts produced by a Job against target stage
|
@NotNull List<ArtifactSubscription> |
validateSubscriptions(@NotNull ImmutableJob consumer,
@NotNull ImmutableChain chain,
@NotNull String stageName)
Validate consumer artifact subscriptions against target chain and stage
|
@NotNull List<ArtifactSubscription> |
validateSubscriptionsForMovedJob(@NotNull ImmutableJob job,
@NotNull ImmutableChainStage targetStage)
Validate all artifact subscriptions possibly affected by moving a job.
|
@NotNull List<ArtifactSubscription> |
validateSubscriptionsForMovedStage(@NotNull ImmutableChainStage stage,
int stageIndex)
Validates all artifact subscriptions possibly affected by moving a stage.
|
static final String BAMBOO_ARTIFACTS_PATH_VARIABLE
@Nullable @Nullable ArtifactSubscription findSubscription(long id)
id
- id of artifact subscription@NotNull @NotNull List<ArtifactSubscription> findSubscriptionsOfPlan(@NotNull @NotNull PlanIdentifier plan)
plan
- plan which associated artifact subscriptions should be retrieved@NotNull @NotNull List<ArtifactDefinition> findSubscriptionsPossibleForPlan(@NotNull @NotNull ImmutableJob job)
job
- @NotNull @NotNull List<ArtifactSubscription> findCurrentSubscriptionsForPlan(@NotNull @NotNull ImmutableJob producerJob)
producerJob
- @NotNull @NotNull List<ArtifactSubscriptionContext> prepareSubscriptionContexts(@NotNull @NotNull ImmutableJob job, @NotNull @NotNull BuildContext parentBuildContext, SecureToken secureToken)
job
- parentBuildContext
- secureToken
- void removeArtifactSubscription(@NotNull @NotNull ArtifactSubscription artifactSubscription)
artifactSubscription
- ArtifactSubscription
to be removedvoid removeArtifactSubscriptions(@NotNull @NotNull Collection<ArtifactSubscription> artifactSubscriptions)
artifactSubscriptions
- collection of ArtifactSubscription
to be removed@Deprecated void removeArtifactSubscriptionsOfPlan(@NotNull @NotNull Plan plan)
removeArtifactSubscriptionsOfPlan(ImmutablePlan)
insteadvoid removeArtifactSubscriptionsOfPlan(@NotNull @NotNull ImmutablePlan plan)
void saveArtifactSubscription(@NotNull @NotNull ArtifactSubscription artifactSubscription)
artifactSubscription
- object to be savedvoid saveArtifactSubscriptions(@NotNull @NotNull Collection<ArtifactSubscription> artifactSubscriptions)
artifactSubscriptions
- collection of objects to be saved/updated@NotNull @NotNull List<ArtifactSubscription> validateSubscriptions(@NotNull @NotNull ImmutableJob consumer, @NotNull @NotNull ImmutableChain chain, @NotNull @NotNull String stageName)
consumer
- job being consumer of artifact definitionschain
- target chainstageName
- target stage@NotNull @NotNull List<ArtifactSubscription> validateSubscribersForMovedJob(@NotNull @NotNull ImmutableJob producer, @NotNull @NotNull ImmutableChainStage producerStage)
producer
- job being producer of the artifactsproducerStage
- target stage@NotNull @NotNull List<ArtifactSubscription> validateSubscriptionsForMovedJob(@NotNull @NotNull ImmutableJob job, @NotNull @NotNull ImmutableChainStage targetStage)
job
- job being movedtargetStage
- target stageArtifactSubscription
that won't qualify after the move@NotNull @NotNull List<ArtifactSubscription> validateSubscriptionsForMovedStage(@NotNull @NotNull ImmutableChainStage stage, int stageIndex)
stage
- stage being movedstageIndex
- target stage indexArtifactSubscription
that won't qualify after the moveboolean isSubscriptionsValid(@NotNull @NotNull Job consumer, @NotNull @NotNull Chain chain, @NotNull @NotNull String stageName)
consumer
- job being consumer of artifact definitionschain
- target chainstageName
- target stagevoid saveConsumedSubscription(@NotNull @NotNull ArtifactSubscriptionContext artifactSubscription, @NotNull @NotNull PlanResultKey planResultKey, @NotNull @NotNull String artifactLinkType)
artifactSubscription
- planResultKey
- @NotNull @NotNull com.google.common.collect.Multimap<ResultsSummary,ConsumedSubscription> getConsumedSubscriptions(@NotNull @NotNull ResultsSummary resultsSummary)
ConsumedSubscription
ordered by order of ResultsSummary
execution.
Artifacts whose producer does not exists are appended at the end, with null key.resultsSummary
- a job resultList<ArtifactSubscriptionSubstitutionAware> transformSubscriptions(@NotNull @NotNull List<ArtifactSubscription> subscriptions)
@NotNull @NotNull List<ArtifactDefinitionContext> prepareArtifactDefinitionContexts(@NotNull @NotNull ImmutableJob job, @NotNull @NotNull BuildContext buildContext, SecureToken secureToken)
job
- buildContext
- secureToken
- long countSubscriptionsOfArtifact(long artifactDefinitionId)
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.