Class DefaultArtifactLink
- java.lang.Object
-
- com.atlassian.core.bean.EntityObject
-
- com.atlassian.bamboo.core.BambooEntityObject
-
- com.atlassian.bamboo.build.artifact.DefaultArtifactLink
-
- All Implemented Interfaces:
ArtifactLink
,BambooIdProvider
,BambooObject
,Cloneable
@Entity public class DefaultArtifactLink extends BambooEntityObject implements ArtifactLink
This class is a simple POJO representing artifact links.
-
-
Field Summary
-
Fields inherited from interface com.atlassian.bamboo.build.artifact.ArtifactLink
BASE_URL, SYSTEM_LINK_TYPE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultArtifactLink()
DefaultArtifactLink(@NotNull ArtifactDefinitionContext artifactDefinitionContext, @NotNull BuildResultsSummary producerResult, @NotNull ArtifactHandlerPublishingResult publishingResult)
protected
DefaultArtifactLink(String name, boolean sharedArtifact, @NotNull BuildResultsSummary producerResult, String linkType, Long size)
DefaultArtifactLink(String name, boolean sharedArtifact, @NotNull ResultsSummary planResultsSummary, @Nullable BuildResultsSummary producerJobResult, String linkType, Long size)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultArtifactLink
createForExport(long artifactLinkId, ResultsSummary buildResultsSummary, Optional<? extends BuildResultsSummary> producerJobResult, MutableArtifact artifact)
Create DefaultArtifactLink for use in export mapper@NotNull MutableArtifact
getArtifact()
ResultsSummary
getBuildResultsSummary()
@NotNull String
getLabel()
Label of the Artifact@NotNull String
getLinkType()
Type of artifact link@Nullable BuildResultsSummary
getProducerJobResult()
long
getSize()
Returns a file size in bytesList<ConsumedSubscription>
getSubscriptions()
boolean
isSharedArtifact()
Indicates if the artifact is a shared artifact.void
setArtifact(MutableArtifact artifact)
protected void
setBuildResultsSummary(ResultsSummary resultsSummary)
void
setProducerJobResult(@Nullable BuildResultsSummary producerJobResult)
protected void
setSubscriptions(List<ConsumedSubscription> subscriptions)
-
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, equals, getCreationDate, getCurrentDate, getId, getLastModificationDate, hashCode, setClock, setCreationDate, setId, setLastModificationDate
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
-
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
-
-
-
Constructor Detail
-
DefaultArtifactLink
public DefaultArtifactLink(@NotNull @NotNull ArtifactDefinitionContext artifactDefinitionContext, @NotNull @NotNull BuildResultsSummary producerResult, @NotNull @NotNull ArtifactHandlerPublishingResult publishingResult)
-
DefaultArtifactLink
protected DefaultArtifactLink(String name, boolean sharedArtifact, @NotNull @NotNull BuildResultsSummary producerResult, String linkType, Long size)
-
DefaultArtifactLink
protected DefaultArtifactLink()
-
DefaultArtifactLink
public DefaultArtifactLink(String name, boolean sharedArtifact, @NotNull @NotNull ResultsSummary planResultsSummary, @Nullable @Nullable BuildResultsSummary producerJobResult, String linkType, Long size)
-
-
Method Detail
-
createForExport
public static DefaultArtifactLink createForExport(long artifactLinkId, ResultsSummary buildResultsSummary, Optional<? extends BuildResultsSummary> producerJobResult, MutableArtifact artifact)
Create DefaultArtifactLink for use in export mapper
-
getLinkType
@NotNull public @NotNull String getLinkType()
Description copied from interface:ArtifactLink
Type of artifact link- Specified by:
getLinkType
in interfaceArtifactLink
- Returns:
- linkType
-
getLabel
@NotNull public @NotNull String getLabel()
Description copied from interface:ArtifactLink
Label of the Artifact- Specified by:
getLabel
in interfaceArtifactLink
- Returns:
- label
-
getSize
public long getSize()
Description copied from interface:ArtifactLink
Returns a file size in bytes- Specified by:
getSize
in interfaceArtifactLink
- Returns:
- file size in bytes
-
getBuildResultsSummary
public ResultsSummary getBuildResultsSummary()
- Specified by:
getBuildResultsSummary
in interfaceArtifactLink
- Returns:
ResultsSummary
which this artifact link belongs to. May be null if still not associated with ResultsSummary
-
setBuildResultsSummary
protected void setBuildResultsSummary(ResultsSummary resultsSummary)
-
getProducerJobResult
@Nullable public @Nullable BuildResultsSummary getProducerJobResult()
- Specified by:
getProducerJobResult
in interfaceArtifactLink
- Returns:
ResultsSummary
of the Job that produced this artifact. May be null if still not associated with ResultsSummary or if it has been removed but artifact still exists.
-
setProducerJobResult
public void setProducerJobResult(@Nullable @Nullable BuildResultsSummary producerJobResult)
-
isSharedArtifact
public boolean isSharedArtifact()
Description copied from interface:ArtifactLink
Indicates if the artifact is a shared artifact.- Specified by:
isSharedArtifact
in interfaceArtifactLink
- Returns:
- true if artifact is a shared artifact.
-
getSubscriptions
public List<ConsumedSubscription> getSubscriptions()
- Specified by:
getSubscriptions
in interfaceArtifactLink
-
setSubscriptions
protected void setSubscriptions(List<ConsumedSubscription> subscriptions)
-
getArtifact
@NotNull public @NotNull MutableArtifact getArtifact()
- Specified by:
getArtifact
in interfaceArtifactLink
-
setArtifact
public void setArtifact(MutableArtifact artifact)
-
-