Class ArtifactItem
- java.lang.Object
-
- com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<ArtifactItemProperties>
-
- com.atlassian.bamboo.specs.builders.task.ArtifactItem
-
public class ArtifactItem extends EntityPropertiesBuilder<ArtifactItemProperties>
Represents an artifact or group of artifacts, obtained using one of the following methods.- declared in the job (as local or shared artifact)
- subscribed by the job (from a job from a previous stage)
- downloaded using Artifact Downloader task (from another plan)
// all artifacts from a current plan new ArtifactItem() // an artifact from a current plan new ArtifactItem() .artifact("name") // an artifact from another plan new ArtifactItem() .sourcePlan(new PlanIdentifier("PROJ", "PLAN")) .artifact("name")
-
-
Constructor Summary
Constructors Constructor Description ArtifactItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArtifactItemallArtifacts()Specify that all downloaded artifacts shall be taken.ArtifactItemartifact(@NotNull java.lang.String artifactName)Specify that only one downloaded artifact shall be taken.protected ArtifactItemPropertiesbuild()ArtifactItemsourcePlan(@NotNull PlanIdentifier planIdentifier)Specify from which plan a downloaded artifact shall be taken.java.lang.StringtoString()
-
-
-
Method Detail
-
sourcePlan
public ArtifactItem sourcePlan(@NotNull @NotNull PlanIdentifier planIdentifier)
Specify from which plan a downloaded artifact shall be taken. Note that by using few Artifact Downloader tasks you can download several artifacts having the same name. This is to distinguish them. In case a source plan is not specified, the current plan will be used.- Parameters:
planIdentifier- a project-plan key, e.g. "MYPROJECT-MYPLAN"- Returns:
- ArtifactItem this
-
artifact
public ArtifactItem artifact(@NotNull @NotNull java.lang.String artifactName)
Specify that only one downloaded artifact shall be taken.- Parameters:
artifactName- name of the downloaded artifact- Returns:
- ArtifactItem this
-
allArtifacts
public ArtifactItem allArtifacts()
Specify that all downloaded artifacts shall be taken.- Returns:
- ArtifactItem this
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
build
protected ArtifactItemProperties build()
- Specified by:
buildin classEntityPropertiesBuilder<ArtifactItemProperties>
-
-