Class DefaultArtifactLinkManager
- java.lang.Object
-
- com.atlassian.bamboo.build.artifact.DefaultArtifactLinkManager
-
- All Implemented Interfaces:
ArtifactLinkManager
public class DefaultArtifactLinkManager extends Object implements ArtifactLinkManager
-
-
Constructor Summary
Constructors Constructor Description DefaultArtifactLinkManager(ArtifactLinkDao artifactLinkDao, ArtifactDao artifactDao, ArtifactManager artifactManager, com.atlassian.plugin.PluginAccessor pluginAccessor, AdministrationConfigurationAccessor administrationConfigurationAccessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull ArtifactLink
addArtifactLink(@NotNull BuildResultsSummary producerResult, @NotNull ArtifactDefinitionContext artifactDefinitionContext, @NotNull String publisherPluginKey)
Create ArtifactLink object and add it to the BuildResultsSummary.@NotNull Collection<ArtifactLink>
addArtifactLinks(@NotNull BuildResultsSummary producerResult, @NotNull ArtifactPublishingResult publishingResult)
Create ArtifactLink object and add it to the BuildResultsSummary.@NotNull Collection<ArtifactLink>
findArtifactLinksByChainResultKey(@NotNull PlanResultKey chainResultKey)
@NotNull com.google.common.collect.Multimap<String,Artifact>
findArtifactsByChainResultKey(@NotNull PlanResultKey chainResultKey)
Gets all theArtifact
s for the givenPlanResultKey
@Nullable ArtifactLinkDataProvider
getArtifactLinkDataProvider(@NotNull Artifact artifact)
@Nullable ArtifactLinkDataProvider
getArtifactLinkDataProvider(@NotNull ArtifactLink artifactLink)
@NotNull Collection<ArtifactLink>
getArtifactLinks(@NotNull ResultsSummary resultsSummary, @Nullable String linkType)
@NotNull Collection<ArtifactLink>
getArtifactLinksForLinkType(@NotNull ResultsSummary resultsSummary, @NotNull String linkType)
void
removeArtifactLink(long artifactLinkId)
Remove an artifact link.void
removeArtifactLink(@NotNull ArtifactLink artifactLink)
Remove an artifact link.void
removeArtifactLinks(@NotNull ChainResultsSummary chainResultsSummary)
Remove all artifact links from the ChainResultsSummary.void
removeArtifactLinks(@NotNull BuildResultsSummary buildResultsSummary)
Remove all artifact links from the BuildResultsSummary.void
removeProducedArtifactLinks(@NotNull BuildResultsSummary buildResultsSummary)
Remove all artifacts produced by a job in a build.
-
-
-
Constructor Detail
-
DefaultArtifactLinkManager
public DefaultArtifactLinkManager(ArtifactLinkDao artifactLinkDao, ArtifactDao artifactDao, ArtifactManager artifactManager, com.atlassian.plugin.PluginAccessor pluginAccessor, AdministrationConfigurationAccessor administrationConfigurationAccessor)
-
-
Method Detail
-
addArtifactLink
@NotNull public @NotNull ArtifactLink addArtifactLink(@NotNull @NotNull BuildResultsSummary producerResult, @NotNull @NotNull ArtifactDefinitionContext artifactDefinitionContext, @NotNull @NotNull String publisherPluginKey)
Description copied from interface:ArtifactLinkManager
Create ArtifactLink object and add it to the BuildResultsSummary.- Specified by:
addArtifactLink
in interfaceArtifactLinkManager
- Parameters:
producerResult
- ResultsSummary object representing build that produced the artifactartifactDefinitionContext
- artifact definition contextpublisherPluginKey
- the plugin key of the artifact handler used to publish the artifact- Returns:
- ArtifactLink object which has been added to BuildResultsSummary
-
addArtifactLinks
@NotNull public @NotNull Collection<ArtifactLink> addArtifactLinks(@NotNull @NotNull BuildResultsSummary producerResult, @NotNull @NotNull ArtifactPublishingResult publishingResult)
Description copied from interface:ArtifactLinkManager
Create ArtifactLink object and add it to the BuildResultsSummary.- Specified by:
addArtifactLinks
in interfaceArtifactLinkManager
- Parameters:
producerResult
- ResultsSummary object representing build that produced the artifactpublishingResult
- the artifact publishing result- Returns:
- ArtifactLink objects which has been added to BuildResultsSummary
-
removeArtifactLink
public void removeArtifactLink(long artifactLinkId) throws IOException
Description copied from interface:ArtifactLinkManager
Remove an artifact link.- Specified by:
removeArtifactLink
in interfaceArtifactLinkManager
- Throws:
IOException
-
removeArtifactLink
public void removeArtifactLink(@NotNull @NotNull ArtifactLink artifactLink) throws IOException
Description copied from interface:ArtifactLinkManager
Remove an artifact link.- Specified by:
removeArtifactLink
in interfaceArtifactLinkManager
- Throws:
IOException
-
removeProducedArtifactLinks
public void removeProducedArtifactLinks(@NotNull @NotNull BuildResultsSummary buildResultsSummary) throws IOException
Description copied from interface:ArtifactLinkManager
Remove all artifacts produced by a job in a build.- Specified by:
removeProducedArtifactLinks
in interfaceArtifactLinkManager
- Throws:
IOException
-
removeArtifactLinks
public void removeArtifactLinks(@NotNull @NotNull BuildResultsSummary buildResultsSummary)
Description copied from interface:ArtifactLinkManager
Remove all artifact links from the BuildResultsSummary.- Specified by:
removeArtifactLinks
in interfaceArtifactLinkManager
-
removeArtifactLinks
public void removeArtifactLinks(@NotNull @NotNull ChainResultsSummary chainResultsSummary) throws IOException
Description copied from interface:ArtifactLinkManager
Remove all artifact links from the ChainResultsSummary.- Specified by:
removeArtifactLinks
in interfaceArtifactLinkManager
- Throws:
IOException
-
getArtifactLinksForLinkType
@NotNull public @NotNull Collection<ArtifactLink> getArtifactLinksForLinkType(@NotNull @NotNull ResultsSummary resultsSummary, @NotNull @NotNull String linkType)
Description copied from interface:ArtifactLinkManager
- Specified by:
getArtifactLinksForLinkType
in interfaceArtifactLinkManager
- Returns:
- artifactLinks
-
getArtifactLinks
@NotNull public @NotNull Collection<ArtifactLink> getArtifactLinks(@NotNull @NotNull ResultsSummary resultsSummary, @Nullable @Nullable String linkType)
Description copied from interface:ArtifactLinkManager
- Specified by:
getArtifactLinks
in interfaceArtifactLinkManager
- Returns:
- artifactLinks
-
getArtifactLinkDataProvider
@Nullable public @Nullable ArtifactLinkDataProvider getArtifactLinkDataProvider(@NotNull @NotNull ArtifactLink artifactLink)
- Specified by:
getArtifactLinkDataProvider
in interfaceArtifactLinkManager
- Returns:
-
getArtifactLinkDataProvider
@Nullable public @Nullable ArtifactLinkDataProvider getArtifactLinkDataProvider(@NotNull @NotNull Artifact artifact)
- Specified by:
getArtifactLinkDataProvider
in interfaceArtifactLinkManager
-
findArtifactsByChainResultKey
@NotNull public @NotNull com.google.common.collect.Multimap<String,Artifact> findArtifactsByChainResultKey(@NotNull @NotNull PlanResultKey chainResultKey)
Description copied from interface:ArtifactLinkManager
Gets all theArtifact
s for the givenPlanResultKey
- Specified by:
findArtifactsByChainResultKey
in interfaceArtifactLinkManager
-
findArtifactLinksByChainResultKey
@NotNull public @NotNull Collection<ArtifactLink> findArtifactLinksByChainResultKey(@NotNull @NotNull PlanResultKey chainResultKey)
- Specified by:
findArtifactLinksByChainResultKey
in interfaceArtifactLinkManager
-
-