com.atlassian.bamboo.plan.artifact
Class ArtifactDefinitionImpl

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by com.atlassian.bamboo.plan.artifact.ArtifactDefinitionImpl
All Implemented Interfaces:
BambooIdProvider, BambooObject, ArtifactDefinition, ArtifactDefinitionBase, ImmutableArtifactDefinition, ImmutableArtifactDefinitionBase, NameProvider, java.lang.Cloneable

public class ArtifactDefinitionImpl
extends BambooEntityObject
implements ArtifactDefinition


Field Summary
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Constructor Summary
ArtifactDefinitionImpl()
           
ArtifactDefinitionImpl(ArtifactDefinition sourceArtifact, Job newProducerJob, boolean sharedArtifact)
          Constructor used for cloning artifact definitions while a job is being cloned.
ArtifactDefinitionImpl(java.lang.String name, java.lang.String location, java.lang.String copyPattern)
          Create a build artifact identified in the UI by the label.
 
Method Summary
 java.lang.String getCopyPattern()
          Get artifact copy pattern
 java.lang.String getLocation()
          Get artifact location
 java.lang.String getName()
          Get artifact name
 Job getProducerJob()
          Get Buildable that is a producer of artifact
 java.util.List<ArtifactSubscription> getSubscriptions()
          Get List of ArtifactSubscriptions on this ArtifactDefinition.
 boolean isSharedArtifact()
          Get value of "SharedArtifact" flag.
 void setCopyPattern(java.lang.String copyPattern)
          Set copy pattern
 void setLocation(java.lang.String location)
          Set artifact location
 void setName(java.lang.String name)
          Set label
 void setProducerJob(Job producerJob)
          Set Buildable that is a producer of artifact
 void setSharedArtifact(boolean sharedArtifact)
          Set "SharedArtifact" flag
 void setSubscriptions(java.util.List<ArtifactSubscription> subscriptions)
          Set subscriptions on this artifact definition.
 
Methods inherited from class com.atlassian.bamboo.core.BambooEntityObject
equals, getId, hashCode, setId
 
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getLastModificationDate, 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.plan.artifact.ImmutableArtifactDefinitionBase
getId
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
 

Constructor Detail

ArtifactDefinitionImpl

public ArtifactDefinitionImpl()

ArtifactDefinitionImpl

public ArtifactDefinitionImpl(java.lang.String name,
                              java.lang.String location,
                              java.lang.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 label
location - Directory to which copy pattern applies
copyPattern - The ANT style copy pattern, relative to the source code directory

ArtifactDefinitionImpl

public ArtifactDefinitionImpl(ArtifactDefinition sourceArtifact,
                              Job newProducerJob,
                              boolean sharedArtifact)
Constructor used for cloning artifact definitions while a job is being cloned. Does not copy subscriptions.

Parameters:
sourceArtifact - artifact definition to be copied
newProducerJob - job that will produce artifacts according to the cloned definition
Method Detail

getCopyPattern

@NotNull
public java.lang.String getCopyPattern()
Description copied from interface: ImmutableArtifactDefinitionBase
Get artifact copy pattern

Specified by:
getCopyPattern in interface ImmutableArtifactDefinitionBase
Returns:
Ant-compatible copy pattern

setCopyPattern

public void setCopyPattern(@NotNull
                           java.lang.String copyPattern)
Description copied from interface: ArtifactDefinitionBase
Set copy pattern

Specified by:
setCopyPattern in interface ArtifactDefinitionBase
Parameters:
copyPattern - new value of copy pattern

getName

@NotNull
public java.lang.String getName()
Description copied from interface: ImmutableArtifactDefinitionBase
Get artifact name

Specified by:
getName in interface ImmutableArtifactDefinitionBase
Specified by:
getName in interface NameProvider
Returns:
Artifact name

setName

public void setName(@NotNull
                    java.lang.String name)
Description copied from interface: ArtifactDefinitionBase
Set label

Specified by:
setName in interface ArtifactDefinitionBase
Parameters:
name - new value of label

getLocation

public java.lang.String getLocation()
Description copied from interface: ImmutableArtifactDefinitionBase
Get artifact location

Specified by:
getLocation in interface ImmutableArtifactDefinitionBase
Returns:
artifact's contents path or null if none specified (then build root is supposed to be used)

setLocation

public void setLocation(@Nullable
                        java.lang.String location)
Description copied from interface: ArtifactDefinitionBase
Set artifact location

Specified by:
setLocation in interface ArtifactDefinitionBase
Parameters:
location - new artifact location

isSharedArtifact

public boolean isSharedArtifact()
Description copied from interface: ImmutableArtifactDefinitionBase
Get value of "SharedArtifact" flag.

Specified by:
isSharedArtifact in interface ImmutableArtifactDefinitionBase
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 interface ArtifactDefinitionBase
Parameters:
sharedArtifact - new value of "SharedArtifact" flag

getProducerJob

@NotNull
public Job getProducerJob()
Description copied from interface: ArtifactDefinition
Get Buildable that is a producer of artifact

Specified by:
getProducerJob in interface ArtifactDefinition
Specified by:
getProducerJob in interface ImmutableArtifactDefinition
Returns:
Job object

setProducerJob

public void setProducerJob(@NotNull
                           Job producerJob)
Description copied from interface: ArtifactDefinition
Set Buildable that is a producer of artifact

Specified by:
setProducerJob in interface ArtifactDefinition
Parameters:
producerJob - new value of producer job

getSubscriptions

@NotNull
public java.util.List<ArtifactSubscription> getSubscriptions()
Description copied from interface: ArtifactDefinition
Get List of ArtifactSubscriptions on this ArtifactDefinition.

Specified by:
getSubscriptions in interface ArtifactDefinition
Specified by:
getSubscriptions in interface ImmutableArtifactDefinition
Returns:
List of ArtifactSubscription objects

setSubscriptions

public void setSubscriptions(@NotNull
                             java.util.List<ArtifactSubscription> subscriptions)
Description copied from interface: ArtifactDefinition
Set subscriptions on this artifact definition.

Specified by:
setSubscriptions in interface ArtifactDefinition
Parameters:
subscriptions - non null list of ArtifactSubscription objects


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.