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)
           
 
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 buildResultsSummary, java.lang.String artifactLabel)
          Deprecated. 
 ArtifactLink addPlanLevelArtifactLink(ChainResultsSummary planResultSummary, ArtifactDefinitionContext artifactDefinitionContext)
          Create ArtifactLink object and add it to the ChainResultsSummary.
 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, Plan plan)
          Remove all artifact links from the ChainResultsSummary.
 
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)
Method Detail

addArtifactLink

@Deprecated
@NotNull
public ArtifactLink addArtifactLink(@NotNull
                                                       BuildResultsSummary buildResultsSummary,
                                                       @NotNull
                                                       java.lang.String artifactLabel)
Deprecated. 

Description copied from interface: ArtifactLinkManager
Create ArtifactLink object and add it to the BuildResultsSummary.

Specified by:
addArtifactLink in interface ArtifactLinkManager
Parameters:
buildResultsSummary - BuildResultsSummary object where ArtifactLink has to be added
artifactLabel - Label to be used to create ArtifactLink object
Returns:
ArtifactLink object which has been added to BuildResultsSummary

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)
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)
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

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

public void removeArtifactLinks(@NotNull
                                ChainResultsSummary chainResultsSummary,
                                @Nullable
                                Plan plan)
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

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


Copyright © 2011 Atlassian. All Rights Reserved.