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
ConstructorDescriptionArtifactDefinitionImpl
(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 String
Get artifact copy patternGet artifact copy patternsGet artifact exclusion patternsGet artifact location@NotNull String
getName()
Get artifact name@NotNull Job
Get Buildable that is a producer of artifact@Nullable Chain
getRoot()
Returns the versioned root of the object.@NotNull List<ArtifactSubscription>
Get List of ArtifactSubscriptions on this ArtifactDefinition.boolean
boolean
boolean
boolean
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
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 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:ImmutableArtifactDefinitionBase
Get artifact copy pattern- Specified by:
getCopyPattern
in interfaceImmutableArtifactDefinitionBase
- Returns:
- Ant-compatible copy pattern
-
setCopyPattern
Description copied from interface:ArtifactDefinitionBase
Set copy pattern- Specified by:
setCopyPattern
in interfaceArtifactDefinitionBase
- Parameters:
copyPattern
- new value of copy pattern
-
setCopyPatterns
Description copied from interface:ArtifactDefinitionBase
Set copy patterns- Specified by:
setCopyPatterns
in interfaceArtifactDefinitionBase
- Parameters:
copyPatterns
- new copy patterns
-
getCopyPatterns
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact copy patterns- Specified by:
getCopyPatterns
in interfaceImmutableArtifactDefinitionBase
- Returns:
- Ant-compatible copy patterns
-
getExclusionPatterns
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact exclusion patterns- Specified by:
getExclusionPatterns
in interfaceImmutableArtifactDefinitionBase
- Returns:
- Ant-compatible exclusion patterns
-
setExclusionPatterns
Description copied from interface:ArtifactDefinitionBase
Set exclusion patterns- Specified by:
setExclusionPatterns
in interfaceArtifactDefinitionBase
-
getName
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact name- Specified by:
getName
in interfaceImmutableArtifactDefinitionBase
- Specified by:
getName
in interfaceNameProvider
- Returns:
- Artifact name
-
setName
Description copied from interface:ArtifactDefinitionBase
Set label- Specified by:
setName
in interfaceArtifactDefinitionBase
- Parameters:
name
- new value of label
-
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
Description copied from interface:ArtifactDefinitionBase
Set artifact location- Specified by:
setLocation
in interfaceArtifactDefinitionBase
- Parameters:
location
- new artifact location
-
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
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
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
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
Description copied from interface:ArtifactDefinition
Set subscriptions on this artifact definition.- Specified by:
setSubscriptions
in interfaceArtifactDefinition
- Parameters:
subscriptions
- non null list ofArtifactSubscription
objects
-
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
-