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
Constructors Constructor Description ArtifactDefinitionImpl()
ArtifactDefinitionImpl(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull String
getCopyPattern()
Get artifact copy pattern@NotNull List<String>
getCopyPatterns()
Get artifact copy patterns@NotNull List<String>
getExclusionPatterns()
Get artifact exclusion patternsString
getLocation()
Get artifact location@NotNull String
getName()
Get artifact name@NotNull Job
getProducerJob()
Get Buildable that is a producer of artifact@Nullable Chain
getRoot()
Returns the versioned root of the object.@NotNull List<ArtifactSubscription>
getSubscriptions()
Get List of ArtifactSubscriptions on this ArtifactDefinition.boolean
hasSubscriptions()
boolean
isHttpCompressionOn()
boolean
isRequired()
boolean
isSharedArtifact()
Get value of "SharedArtifact" flag.void
setCopyPattern(@NotNull String copyPattern)
Set copy patternvoid
setCopyPatterns(@NotNull List<String> copyPatterns)
Set copy patternsvoid
setExclusionPatterns(@Nullable List<String> exclusionPatterns)
Set exclusion patternsvoid
setHttpCompressionOn(boolean httpCompressionOn)
Sets "httpCompressionOn" flagvoid
setLocation(@Nullable String location)
Set artifact locationvoid
setName(@NotNull String name)
Set labelvoid
setProducerJob(@NotNull Job producerJob)
Set Buildable that is a producer of artifactvoid
setRequired(boolean requiredArtifact)
void
setSharedArtifact(boolean sharedArtifact)
Set "SharedArtifact" flagvoid
setSubscriptions(@NotNull List<ArtifactSubscription> subscriptions)
Set subscriptions on this artifact definition.-
Methods inherited from class com.atlassian.bamboo.hibernate.HibernateBambooEntityObject
getId, setId
-
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, equals, getCreationDate, getCurrentDate, getLastModificationDate, hashCode, setClock, setCreationDate, setLastModificationDate
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Methods inherited from interface com.atlassian.bamboo.plan.artifact.ImmutableArtifactDefinitionBase
getId
-
-
-
-
Constructor Detail
-
ArtifactDefinitionImpl
public ArtifactDefinitionImpl()
-
ArtifactDefinitionImpl
public ArtifactDefinitionImpl(String name, String location, String copyPattern)
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
public ArtifactDefinitionImpl(Job producerJob, String name, String location, String copyPattern)
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 Detail
-
getCopyPattern
@NotNull public @NotNull String getCopyPattern()
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact copy pattern- Specified by:
getCopyPattern
in interfaceImmutableArtifactDefinitionBase
- Returns:
- Ant-compatible copy pattern
-
setCopyPattern
public void setCopyPattern(@NotNull @NotNull String copyPattern)
Description copied from interface:ArtifactDefinitionBase
Set copy pattern- Specified by:
setCopyPattern
in interfaceArtifactDefinitionBase
- Parameters:
copyPattern
- new value of copy pattern
-
setCopyPatterns
public void setCopyPatterns(@NotNull @NotNull List<String> copyPatterns)
Description copied from interface:ArtifactDefinitionBase
Set copy patterns- Specified by:
setCopyPatterns
in interfaceArtifactDefinitionBase
- Parameters:
copyPatterns
- new copy patterns
-
getCopyPatterns
@NotNull public @NotNull List<String> getCopyPatterns()
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact copy patterns- Specified by:
getCopyPatterns
in interfaceImmutableArtifactDefinitionBase
- Returns:
- Ant-compatible copy patterns
-
getExclusionPatterns
@NotNull public @NotNull List<String> getExclusionPatterns()
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact exclusion patterns- Specified by:
getExclusionPatterns
in interfaceImmutableArtifactDefinitionBase
- Returns:
- Ant-compatible exclusion patterns
-
setExclusionPatterns
public void setExclusionPatterns(@Nullable @Nullable List<String> exclusionPatterns)
Description copied from interface:ArtifactDefinitionBase
Set exclusion patterns- Specified by:
setExclusionPatterns
in interfaceArtifactDefinitionBase
-
getName
@NotNull public @NotNull String getName()
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact name- Specified by:
getName
in interfaceImmutableArtifactDefinitionBase
- Specified by:
getName
in interfaceNameProvider
- Returns:
- Artifact name
-
setName
public void setName(@NotNull @NotNull String name)
Description copied from interface:ArtifactDefinitionBase
Set label- Specified by:
setName
in interfaceArtifactDefinitionBase
- Parameters:
name
- new value of label
-
getLocation
public String getLocation()
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact location- Specified by:
getLocation
in interfaceImmutableArtifactDefinitionBase
- Returns:
- artifact's contents path or null if none specified (then build root is supposed to be used)
-
setLocation
public void setLocation(@Nullable @Nullable String location)
Description copied from interface:ArtifactDefinitionBase
Set artifact location- Specified by:
setLocation
in interfaceArtifactDefinitionBase
- Parameters:
location
- new artifact location
-
isSharedArtifact
public boolean isSharedArtifact()
Description copied from interface:ImmutableArtifactDefinitionBase
Get value of "SharedArtifact" flag.- Specified by:
isSharedArtifact
in interfaceImmutableArtifactDefinitionBase
- Returns:
- true if ArtifactDefinition is marked as "SharedArtifact"
-
setSharedArtifact
public void setSharedArtifact(boolean sharedArtifact)
Description copied from interface:ArtifactDefinitionBase
Set "SharedArtifact" flag- Specified by:
setSharedArtifact
in interfaceArtifactDefinitionBase
- Parameters:
sharedArtifact
- new value of "SharedArtifact" flag
-
isRequired
public boolean isRequired()
- Specified by:
isRequired
in interfaceImmutableArtifactDefinitionBase
- Returns:
- true if artifact is required for successful build completion
-
setRequired
public void setRequired(boolean requiredArtifact)
- Specified by:
setRequired
in interfaceArtifactDefinitionBase
- Parameters:
requiredArtifact
- if build should fail if can't publish artifact
-
isHttpCompressionOn
public boolean isHttpCompressionOn()
- Specified by:
isHttpCompressionOn
in 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:ArtifactDefinitionBase
Sets "httpCompressionOn" flag- Specified by:
setHttpCompressionOn
in interfaceArtifactDefinitionBase
- Parameters:
httpCompressionOn
- new value of "httpCompressionOn" flag
-
getProducerJob
@NotNull public @NotNull Job getProducerJob()
Description copied from interface:ArtifactDefinition
Get Buildable that is a producer of artifact- Specified by:
getProducerJob
in interfaceArtifactDefinition
- Specified by:
getProducerJob
in interfaceImmutableArtifactDefinition
- Returns:
Job
object
-
setProducerJob
public void setProducerJob(@NotNull @NotNull Job producerJob)
Description copied from interface:ArtifactDefinition
Set Buildable that is a producer of artifact- Specified by:
setProducerJob
in interfaceArtifactDefinition
- Parameters:
producerJob
- new value of producer job
-
getSubscriptions
@NotNull public @NotNull List<ArtifactSubscription> getSubscriptions()
Description copied from interface:ArtifactDefinition
Get List of ArtifactSubscriptions on this ArtifactDefinition.- Specified by:
getSubscriptions
in interfaceArtifactDefinition
- Specified by:
getSubscriptions
in interfaceImmutableArtifactDefinition
- Returns:
- List of
ArtifactSubscription
objects
-
hasSubscriptions
public boolean hasSubscriptions()
- Specified by:
hasSubscriptions
in interfaceImmutableArtifactDefinition
- Returns:
- true if this artifact has any subscriptions
-
setSubscriptions
public void setSubscriptions(@NotNull @NotNull List<ArtifactSubscription> subscriptions)
Description copied from interface:ArtifactDefinition
Set subscriptions on this artifact definition.- Specified by:
setSubscriptions
in interfaceArtifactDefinition
- Parameters:
subscriptions
- non null list ofArtifactSubscription
objects
-
getRoot
@Nullable public @Nullable Chain getRoot()
Description copied from interface:VersionedEntityComponent
Returns the versioned root of the object.- Specified by:
getRoot
in interfaceVersionedEntityComponent<Chain>
- Returns:
- the root of the object
-
-