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