@PublicApi
public interface ArtifactDefinitionManager
Modifier and Type | Method and Description |
---|---|
Map<ArtifactDefinition,ArtifactDefinition> |
cloneArtifactDefinitions(Job sourcePlan,
Job targetPlan)
|
Map<ArtifactDefinition,ArtifactDefinition> |
cloneArtifactDefinitions(Job sourcePlan,
Job targetPlan,
boolean preserveSharedFlag)
|
ArtifactDefinition |
findArtifactDefinition(ImmutablePlan plan,
String label)
Get artifact definition associated with a plan of a given label
|
ArtifactDefinition |
findArtifactDefinition(long id)
Get artifact definition of specified id
|
ArtifactDefinition |
findArtifactDefinitionByChain(ImmutablePlan plan,
String label) |
List<ArtifactDefinition> |
findArtifactDefinitionsByPlan(ImmutablePlan plan)
Get list of artifact definitions associated with a specific plan.
|
List<ArtifactDefinition> |
findSharedArtifactsByChain(ImmutableChain chain)
Find all shared artifacts that exist for a particular chain (looks through all jobs).
|
com.google.common.collect.Multimap<? extends ImmutableJob,ArtifactDefinition> |
getArtifactDefinitionsByJob(ImmutableChain chain,
com.google.common.base.Predicate<ArtifactDefinitionBase> predicate)
Returns
ArtifactDefinition grouped by Job where definitions are defined |
boolean |
isArtifactDefinitionNameUniqueInChain(ArtifactDefinition artifactDefinition)
Test if artifact definition's name is unique within a chain that producer plan belongs to.
|
boolean |
isArtifactDefinitionNameUniqueInJob(ArtifactDefinition artifactDefinition)
Test if artifact definition's name is unique within a producer job.
|
void |
removeArtifactDefinition(ArtifactDefinition artifactDefinition)
Remove artifact definition.
|
void |
removeArtifactDefinitionsByPlan(ImmutablePlan plan)
Remove all artifact definitions associated with a plan.
|
void |
removeArtifactDefinitionsByPlan(Plan plan)
Deprecated.
since 6.2 use
removeArtifactDefinitionsByPlan(ImmutablePlan) instead |
void |
saveArtifactDefinition(ArtifactDefinition artifactDefinition)
Save/update artifact definition.
|
void |
saveArtifactDefinitions(Collection<ArtifactDefinition> artifactDefinitions)
Save all artifact definitions in a collection.
|
@Nullable ArtifactDefinition findArtifactDefinition(long id)
id
- id of artifact definition@Nullable ArtifactDefinition findArtifactDefinition(@NotNull ImmutablePlan plan, @NotNull String label)
plan
- plan which associated artifact definition should be retrievedlabel
- label to search among plan's artifact definitions@Nullable ArtifactDefinition findArtifactDefinitionByChain(@NotNull ImmutablePlan plan, @NotNull String label)
@NotNull List<ArtifactDefinition> findArtifactDefinitionsByPlan(@NotNull ImmutablePlan plan)
plan
- plan which associated artifact definitions should be retrieved@NotNull List<ArtifactDefinition> findSharedArtifactsByChain(@NotNull ImmutableChain chain)
chain
- chain which associated artifact definitions should be retrievedvoid removeArtifactDefinition(@NotNull ArtifactDefinition artifactDefinition)
artifactDefinition
- ArtifactDefinition
to be removed@Deprecated void removeArtifactDefinitionsByPlan(@NotNull Plan plan)
removeArtifactDefinitionsByPlan(ImmutablePlan)
insteadplan
- plan which associated artifact definitions should be removedvoid removeArtifactDefinitionsByPlan(@NotNull ImmutablePlan plan)
plan
- plan which associated artifact definitions should be removedvoid saveArtifactDefinition(@NotNull ArtifactDefinition artifactDefinition)
artifactDefinition
- object to be saved/updatedvoid saveArtifactDefinitions(@NotNull Collection<ArtifactDefinition> artifactDefinitions)
artifactDefinitions
- collection of objects to be saved/updated@NotNull Map<ArtifactDefinition,ArtifactDefinition> cloneArtifactDefinitions(@NotNull Job sourcePlan, @NotNull Job targetPlan, boolean preserveSharedFlag)
Buildable
plan based according to definitions associated with
input Buildable
plan. This method does not persist the objects.sourcePlan
- plan which associated artifact definitions should be clonedtargetPlan
- plan for which artifacts should be createdpreserveSharedFlag
- false will degrade all the artifacts to job level artifacts@NotNull Map<ArtifactDefinition,ArtifactDefinition> cloneArtifactDefinitions(@NotNull Job sourcePlan, @NotNull Job targetPlan)
Buildable
plan based according to definitions associated with input Buildable
plan.
This method does not persist the objects. SharedArtifact flags are copied.sourcePlan
- plan which associated artifact definitions should be clonedtargetPlan
- plan for which artifacts should be createdboolean isArtifactDefinitionNameUniqueInJob(@NotNull ArtifactDefinition artifactDefinition)
artifactDefinition
- artifact definition to be validatedboolean isArtifactDefinitionNameUniqueInChain(@NotNull ArtifactDefinition artifactDefinition)
ImmutableArtifactDefinitionBase.isSharedArtifact()
returns true.
If ImmutableArtifactDefinitionBase.isSharedArtifact()
returns false this method will always return true.artifactDefinition
- artifact definition to be validated@NotNull com.google.common.collect.Multimap<? extends ImmutableJob,ArtifactDefinition> getArtifactDefinitionsByJob(@NotNull ImmutableChain chain, com.google.common.base.Predicate<ArtifactDefinitionBase> predicate)
ArtifactDefinition
grouped by Job
where definitions are definedchain
- predicate
- for filtering definition typesCopyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.