Class ArtifactDefinitionImpl
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.bamboo.core.BambooEntityObject
com.atlassian.bamboo.hibernate.HibernateBambooEntityObject
com.atlassian.bamboo.plan.artifact.ArtifactDefinitionImpl
- All Implemented Interfaces:
BambooIdProvider,BambooObject,ArtifactDefinition,ArtifactDefinitionBase,ImmutableArtifactDefinition,ImmutableArtifactDefinitionBase,NameProvider,VersionedEntityComponent<Chain>,Cloneable
@Entity
public class ArtifactDefinitionImpl
extends HibernateBambooEntityObject
implements ArtifactDefinition
-
Constructor Summary
ConstructorsConstructorDescriptionArtifactDefinitionImpl(Job producerJob, String name, String location, String copyPattern) Create a build artifact identified in the UI by the label.ArtifactDefinitionImpl(ArtifactDefinition sourceArtifact, Job newProducerJob, boolean sharedArtifact, boolean required, boolean httpCompressionOn) Constructor used for cloning artifact definitions while a job is being cloned.ArtifactDefinitionImpl(String name, String location, String copyPattern) Create a build artifact identified in the UI by the label. -
Method Summary
Modifier and TypeMethodDescription@NotNull StringGet artifact copy patternGet artifact copy patternsGet artifact exclusion patternsGet artifact location@NotNull StringgetName()Get artifact name@NotNull JobGet Buildable that is a producer of artifact@Nullable ChaingetRoot()Returns the versioned root of the object.@NotNull List<ArtifactSubscription> Get List of ArtifactSubscriptions on this ArtifactDefinition.booleanbooleanbooleanbooleanGet value of "SharedArtifact" flag.voidsetCopyPattern(@NotNull String copyPattern) Set copy patternvoidsetCopyPatterns(@NotNull List<String> copyPatterns) Set copy patternsvoidsetExclusionPatterns(@Nullable List<String> exclusionPatterns) Set exclusion patternsvoidsetHttpCompressionOn(boolean httpCompressionOn) Sets "httpCompressionOn" flagvoidsetLocation(@Nullable String location) Set artifact locationvoidSet labelvoidsetProducerJob(@NotNull Job producerJob) Set Buildable that is a producer of artifactvoidsetRequired(boolean requiredArtifact) voidsetSharedArtifact(boolean sharedArtifact) Set "SharedArtifact" flagvoidsetSubscriptions(@NotNull List<ArtifactSubscription> subscriptions) Set subscriptions on this artifact definition.Methods inherited from class com.atlassian.bamboo.hibernate.HibernateBambooEntityObject
getId, setIdMethods inherited from class com.atlassian.core.bean.EntityObject
clone, equals, getCreationDate, getCurrentDate, getLastModificationDate, hashCode, setClock, setCreationDate, setLastModificationDateMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.core.BambooObject
setIdMethods inherited from interface com.atlassian.bamboo.plan.artifact.ImmutableArtifactDefinitionBase
getId
-
Constructor Details
-
ArtifactDefinitionImpl
public ArtifactDefinitionImpl() -
ArtifactDefinitionImpl
Create a build artifact identified in the UI by the label. We use the Ant style pattern match to identify the files that need to be copies across into the archive repository.- Parameters:
name- The UI text labellocation- Directory to which copy pattern appliescopyPattern- The ANT style copy pattern, relative to the source code directory
-
ArtifactDefinitionImpl
Create a build artifact identified in the UI by the label. We use the Ant style pattern match to identify the files that need to be copies across into the archive repository.- Parameters:
producerJob- producer jobname- The UI text labellocation- Directory to which copy pattern appliescopyPattern- The ANT style copy pattern, relative to the source code directory- Since:
- 5.15
-
ArtifactDefinitionImpl
public ArtifactDefinitionImpl(ArtifactDefinition sourceArtifact, Job newProducerJob, boolean sharedArtifact, boolean required, boolean httpCompressionOn) Constructor used for cloning artifact definitions while a job is being cloned. Does not copy subscriptions.- Parameters:
sourceArtifact- artifact definition to be copiednewProducerJob- job that will produce artifacts according to the cloned definition
-
-
Method Details
-
getCopyPattern
Description copied from interface:ImmutableArtifactDefinitionBaseGet artifact copy pattern- Specified by:
getCopyPatternin interfaceImmutableArtifactDefinitionBase- Returns:
- Ant-compatible copy pattern
-
setCopyPattern
Description copied from interface:ArtifactDefinitionBaseSet copy pattern- Specified by:
setCopyPatternin interfaceArtifactDefinitionBase- Parameters:
copyPattern- new value of copy pattern
-
setCopyPatterns
Description copied from interface:ArtifactDefinitionBaseSet copy patterns- Specified by:
setCopyPatternsin interfaceArtifactDefinitionBase- Parameters:
copyPatterns- new copy patterns
-
getCopyPatterns
Description copied from interface:ImmutableArtifactDefinitionBaseGet artifact copy patterns- Specified by:
getCopyPatternsin interfaceImmutableArtifactDefinitionBase- Returns:
- Ant-compatible copy patterns
-
getExclusionPatterns
Description copied from interface:ImmutableArtifactDefinitionBaseGet artifact exclusion patterns- Specified by:
getExclusionPatternsin interfaceImmutableArtifactDefinitionBase- Returns:
- Ant-compatible exclusion patterns
-
setExclusionPatterns
Description copied from interface:ArtifactDefinitionBaseSet exclusion patterns- Specified by:
setExclusionPatternsin interfaceArtifactDefinitionBase- Parameters:
exclusionPatterns-
-
getName
Description copied from interface:ImmutableArtifactDefinitionBaseGet artifact name- Specified by:
getNamein interfaceImmutableArtifactDefinitionBase- Specified by:
getNamein interfaceNameProvider- Returns:
- Artifact name
-
setName
Description copied from interface:ArtifactDefinitionBaseSet label- Specified by:
setNamein interfaceArtifactDefinitionBase- Parameters:
name- new value of label
-
getLocation
Description copied from interface:ImmutableArtifactDefinitionBaseGet artifact location- Specified by:
getLocationin interfaceImmutableArtifactDefinitionBase- Returns:
- artifact's contents path or null if none specified (then build root is supposed to be used)
-
setLocation
Description copied from interface:ArtifactDefinitionBaseSet artifact location- Specified by:
setLocationin interfaceArtifactDefinitionBase- Parameters:
location- new artifact location
-
isRequired
public boolean isRequired()- Specified by:
isRequiredin interfaceImmutableArtifactDefinitionBase- Returns:
- true if artifact is required for successful build completion
-
setRequired
public void setRequired(boolean requiredArtifact) - Specified by:
setRequiredin interfaceArtifactDefinitionBase- Parameters:
requiredArtifact- if build should fail if can't publish artifact
-
isHttpCompressionOn
public boolean isHttpCompressionOn()- Specified by:
isHttpCompressionOnin interfaceImmutableArtifactDefinitionBase- Returns:
- true if use of compression enabled to transfer artifact between server and agent (both directions)
-
setHttpCompressionOn
public void setHttpCompressionOn(boolean httpCompressionOn) Description copied from interface:ArtifactDefinitionBaseSets "httpCompressionOn" flag- Specified by:
setHttpCompressionOnin interfaceArtifactDefinitionBase- Parameters:
httpCompressionOn- new value of "httpCompressionOn" flag
-
getProducerJob
Description copied from interface:ArtifactDefinitionGet Buildable that is a producer of artifact- Specified by:
getProducerJobin interfaceArtifactDefinition- Specified by:
getProducerJobin interfaceImmutableArtifactDefinition- Returns:
Jobobject
-
setProducerJob
Description copied from interface:ArtifactDefinitionSet Buildable that is a producer of artifact- Specified by:
setProducerJobin interfaceArtifactDefinition- Parameters:
producerJob- new value of producer job
-
getSubscriptions
Description copied from interface:ArtifactDefinitionGet List of ArtifactSubscriptions on this ArtifactDefinition.- Specified by:
getSubscriptionsin interfaceArtifactDefinition- Specified by:
getSubscriptionsin interfaceImmutableArtifactDefinition- Returns:
- List of
ArtifactSubscriptionobjects
-
hasSubscriptions
public boolean hasSubscriptions()- Specified by:
hasSubscriptionsin interfaceImmutableArtifactDefinition- Returns:
- true if this artifact has any subscriptions
-
setSubscriptions
Description copied from interface:ArtifactDefinitionSet subscriptions on this artifact definition.- Specified by:
setSubscriptionsin interfaceArtifactDefinition- Parameters:
subscriptions- non null list ofArtifactSubscriptionobjects
-
getRoot
Description copied from interface:VersionedEntityComponentReturns the versioned root of the object.- Specified by:
getRootin interfaceVersionedEntityComponent<Chain>- Returns:
- the root of the object
-