com.atlassian.bamboo.build.artifact
Class DefaultArtifactLinkManager

java.lang.Object
  extended by com.atlassian.bamboo.build.artifact.DefaultArtifactLinkManager
All Implemented Interfaces:
ArtifactLinkManager

public class DefaultArtifactLinkManager
extends java.lang.Object
implements ArtifactLinkManager


Constructor Summary
DefaultArtifactLinkManager(ArtifactLinkDao artifactLinkDao, ArtifactDao artifactDao, ArtifactManager artifactManager, com.atlassian.plugin.PluginAccessor pluginAccessor, AdministrationConfigurationManager administrationConfigurationManager)
           
 
Method Summary
 ArtifactLink addArtifactLink(BuildResultsSummary producerResult, ArtifactDefinitionBase artifactDefinitionBase)
          Create ArtifactLink object and add it to the BuildResultsSummary.
 ArtifactLink addArtifactLink(BuildResultsSummary producerResult, ArtifactDefinitionContext artifactDefinitionContext)
          Create ArtifactLink object and add it to the BuildResultsSummary.
 ArtifactLink addArtifactLink(BuildResultsSummary producerResult, ArtifactDefinitionContext artifactDefinitionContext, java.lang.String publisherPluginKey)
          Create ArtifactLink object and add it to the BuildResultsSummary.
 ArtifactLink addPlanLevelArtifactLink(ChainResultsSummary planResultSummary, ArtifactDefinitionContext artifactDefinitionContext)
          Create ArtifactLink object and add it to the ChainResultsSummary.
 ArtifactLink addPlanLevelArtifactLink(ChainResultsSummary planResultSummary, ArtifactDefinitionContext artifactDefinitionContext, java.lang.String publisherPluginKey)
          Create ArtifactLink object and add it to the ChainResultsSummary.
 ArtifactLinkDataProvider getArtifactLinkDataProvider(Artifact artifact)
           
 ArtifactLinkDataProvider getArtifactLinkDataProvider(ArtifactLink artifactLink)
           
 java.util.Collection<ArtifactLink> getArtifactLinks(ResultsSummary resultsSummary, java.lang.String linkType)
          Gets all the ArtifactLinks for the given ResultsSummary and optionally ArtifactLink.getLinkType()
 java.util.Collection<ArtifactLink> getArtifactLinksForLinkType(ResultsSummary resultsSummary, java.lang.String linkType)
          Gets all the ArtifactLinks for the given ResultsSummary and ArtifactLink.getLinkType()
 void removeArtifactLink(ArtifactLink artifactLink)
          Remove an artifact link.
 void removeArtifactLink(long artifactLinkId)
          Remove an artifact link.
 void removeArtifactLinks(BuildResultsSummary buildResultsSummary)
          Remove all artifact links from the BuildResultsSummary.
 void removeArtifactLinks(ChainResultsSummary chainResultsSummary)
          Remove all artifact links from the ChainResultsSummary.
 void removeArtifactLinks(ChainResultsSummary chainResultsSummary, Plan plan)
          Deprecated. 
 void removeProducedArtifactLinks(BuildResultsSummary buildResultsSummary)
          Remove all artifacts produced by a job in a build.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultArtifactLinkManager

public DefaultArtifactLinkManager(ArtifactLinkDao artifactLinkDao,
                                  ArtifactDao artifactDao,
                                  ArtifactManager artifactManager,
                                  com.atlassian.plugin.PluginAccessor pluginAccessor,
                                  AdministrationConfigurationManager administrationConfigurationManager)
Method Detail

addArtifactLink

@NotNull
public ArtifactLink addArtifactLink(@NotNull
                                            BuildResultsSummary producerResult,
                                            @NotNull
                                            ArtifactDefinitionBase artifactDefinitionBase)
Description copied from interface: ArtifactLinkManager
Create ArtifactLink object and add it to the BuildResultsSummary.

Specified by:
addArtifactLink in interface ArtifactLinkManager
Parameters:
producerResult - ResultsSummary object representing build that produced the artifact
artifactDefinitionBase - artifact definition object
Returns:
ArtifactLink object which has been added to BuildResultsSummary

addArtifactLink

@NotNull
public ArtifactLink addArtifactLink(@NotNull
                                            BuildResultsSummary producerResult,
                                            @NotNull
                                            ArtifactDefinitionContext artifactDefinitionContext,
                                            @NotNull
                                            java.lang.String publisherPluginKey)
Description copied from interface: ArtifactLinkManager
Create ArtifactLink object and add it to the BuildResultsSummary.

Specified by:
addArtifactLink in interface ArtifactLinkManager
Parameters:
producerResult - ResultsSummary object representing build that produced the artifact
artifactDefinitionContext - artifact definition context
publisherPluginKey - the plugin key of the artifact handler used to publish the artifact
Returns:
ArtifactLink object which has been added to BuildResultsSummary

addArtifactLink

@NotNull
public ArtifactLink addArtifactLink(@NotNull
                                            BuildResultsSummary producerResult,
                                            @NotNull
                                            ArtifactDefinitionContext artifactDefinitionContext)
Description copied from interface: ArtifactLinkManager
Create ArtifactLink object and add it to the BuildResultsSummary.

Specified by:
addArtifactLink in interface ArtifactLinkManager
Parameters:
producerResult - ResultsSummary object representing build that produced the artifact
artifactDefinitionContext - artifact definition context
Returns:
ArtifactLink object which has been added to BuildResultsSummary

addPlanLevelArtifactLink

@NotNull
public ArtifactLink addPlanLevelArtifactLink(@NotNull
                                                     ChainResultsSummary planResultSummary,
                                                     @NotNull
                                                     ArtifactDefinitionContext artifactDefinitionContext,
                                                     @NotNull
                                                     java.lang.String publisherPluginKey)
Description copied from interface: ArtifactLinkManager
Create ArtifactLink object and add it to the ChainResultsSummary. ArtifactLink created with this method does not have a producer Job result specified.

Specified by:
addPlanLevelArtifactLink in interface ArtifactLinkManager
Parameters:
planResultSummary - result of a plan producing the artifact
artifactDefinitionContext - artifact definition context
publisherPluginKey - the plugin key of the artifact handler used to publish the artifact
Returns:
ArtifactLink object which has been added to BuildResultsSummary

addPlanLevelArtifactLink

@NotNull
public ArtifactLink addPlanLevelArtifactLink(@NotNull
                                                     ChainResultsSummary planResultSummary,
                                                     @NotNull
                                                     ArtifactDefinitionContext artifactDefinitionContext)
Description copied from interface: ArtifactLinkManager
Create ArtifactLink object and add it to the ChainResultsSummary. ArtifactLink created with this method does not have a producer Job result specified.

Specified by:
addPlanLevelArtifactLink in interface ArtifactLinkManager
Parameters:
planResultSummary - result of a plan producing the artifact
artifactDefinitionContext - artifact definition context
Returns:
ArtifactLink object which has been added to BuildResultsSummary

removeArtifactLink

public void removeArtifactLink(long artifactLinkId)
Description copied from interface: ArtifactLinkManager
Remove an artifact link.

Specified by:
removeArtifactLink in interface ArtifactLinkManager

removeArtifactLink

public void removeArtifactLink(@NotNull
                               ArtifactLink artifactLink)
Description copied from interface: ArtifactLinkManager
Remove an artifact link.

Specified by:
removeArtifactLink in interface ArtifactLinkManager

removeProducedArtifactLinks

public void removeProducedArtifactLinks(@NotNull
                                        BuildResultsSummary buildResultsSummary)
Description copied from interface: ArtifactLinkManager
Remove all artifacts produced by a job in a build.

Specified by:
removeProducedArtifactLinks in interface ArtifactLinkManager

removeArtifactLinks

public void removeArtifactLinks(@NotNull
                                BuildResultsSummary buildResultsSummary)
Description copied from interface: ArtifactLinkManager
Remove all artifact links from the BuildResultsSummary.

Specified by:
removeArtifactLinks in interface ArtifactLinkManager

removeArtifactLinks

@Deprecated
public void removeArtifactLinks(@NotNull
                                           ChainResultsSummary chainResultsSummary,
                                           @Nullable
                                           Plan plan)
Deprecated. 

Description copied from interface: ArtifactLinkManager
Remove all artifact links from the ChainResultsSummary.

Specified by:
removeArtifactLinks in interface ArtifactLinkManager
plan - optional, to avoid costly plan lookup

removeArtifactLinks

public void removeArtifactLinks(@NotNull
                                ChainResultsSummary chainResultsSummary)
Description copied from interface: ArtifactLinkManager
Remove all artifact links from the ChainResultsSummary.

Specified by:
removeArtifactLinks in interface ArtifactLinkManager

getArtifactLinksForLinkType

@NotNull
public java.util.Collection<ArtifactLink> getArtifactLinksForLinkType(@NotNull
                                                                              ResultsSummary resultsSummary,
                                                                              @NotNull
                                                                              java.lang.String linkType)
Description copied from interface: ArtifactLinkManager
Gets all the ArtifactLinks for the given ResultsSummary and ArtifactLink.getLinkType()

Specified by:
getArtifactLinksForLinkType in interface ArtifactLinkManager
Returns:
artifactLinks

getArtifactLinks

@NotNull
public java.util.Collection<ArtifactLink> getArtifactLinks(@NotNull
                                                                   ResultsSummary resultsSummary,
                                                                   @Nullable
                                                                   java.lang.String linkType)
Description copied from interface: ArtifactLinkManager
Gets all the ArtifactLinks for the given ResultsSummary and optionally ArtifactLink.getLinkType()

Specified by:
getArtifactLinks in interface ArtifactLinkManager
Returns:
artifactLinks

getArtifactLinkDataProvider

@Nullable
public ArtifactLinkDataProvider getArtifactLinkDataProvider(@NotNull
                                                                     ArtifactLink artifactLink)
Specified by:
getArtifactLinkDataProvider in interface ArtifactLinkManager

getArtifactLinkDataProvider

@Nullable
public ArtifactLinkDataProvider getArtifactLinkDataProvider(@NotNull
                                                                     Artifact artifact)
Specified by:
getArtifactLinkDataProvider in interface ArtifactLinkManager


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.