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
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
ModifierConstructorDescriptionprotected
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
Modifier and TypeMethodDescriptionstatic DefaultArtifactLink
createForExport
(long artifactLinkId, ResultsSummary buildResultsSummary, Optional<? extends BuildResultsSummary> producerJobResult, MutableArtifact artifact) Create DefaultArtifactLink for use in export mapper@NotNull MutableArtifact
@NotNull String
getLabel()
Label of the Artifact@NotNull String
Type of artifact link@Nullable BuildResultsSummary
long
getSize()
Returns a file size in bytesboolean
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 Details
-
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 Details
-
createForExport
public static DefaultArtifactLink createForExport(long artifactLinkId, ResultsSummary buildResultsSummary, Optional<? extends BuildResultsSummary> producerJobResult, MutableArtifact artifact) Create DefaultArtifactLink for use in export mapper -
getLinkType
Description copied from interface:ArtifactLink
Type of artifact link- Specified by:
getLinkType
in interfaceArtifactLink
- Returns:
- linkType
-
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
- Specified by:
getBuildResultsSummary
in interfaceArtifactLink
- Returns:
ResultsSummary
which this artifact link belongs to. May be null if still not associated with ResultsSummary
-
setBuildResultsSummary
-
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
-
getSubscriptions
- Specified by:
getSubscriptions
in interfaceArtifactLink
-
setSubscriptions
-
getArtifact
- Specified by:
getArtifact
in interfaceArtifactLink
-
setArtifact
-