com.atlassian.bamboo.build
Class DefaultArtifact

java.lang.Object
  extended by com.atlassian.bamboo.build.AbstractArtifact
      extended by com.atlassian.bamboo.build.DefaultArtifact
All Implemented Interfaces:
Artifact, ConvertibleFromConfig, java.io.Serializable, java.lang.Comparable

public class DefaultArtifact
extends AbstractArtifact
implements java.lang.Comparable

The components used to identify a build artifact that need to be kept.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.atlassian.bamboo.build.Artifact
ARTIFACT_COPY_PATTERN, ARTIFACT_LABEL, ARTIFACT_SRC_DIR
 
Constructor Summary
DefaultArtifact()
           
DefaultArtifact(java.lang.String label, java.lang.String copyPattern, java.lang.String srcDirectory)
          Create a build artifact identified in the UI by the label.
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getCopyPattern()
          What is the ANT copy style pattern used to copy the artifacts from the build directory.
 java.lang.String getLabel()
          What is the UI link label used to identify the artifact
 java.lang.String getSrcDirectory()
          The source directory relative to the build directory - e.g.
 int hashCode()
           
 void populateFromConfig(org.apache.commons.configuration.HierarchicalConfiguration config)
          Update the current object with data in the HierarchicalConfiguration
 void setCopyPattern(java.lang.String copyPattern)
           
 void setLabel(java.lang.String label)
          What label should this artifact have?
 void setSrcDirectory(java.lang.String srcDirectory)
           
 org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
          Generate a HierarchicalConfiguration from the current state of the object
 
Methods inherited from class com.atlassian.bamboo.build.AbstractArtifact
getSourceDirectoryFile
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultArtifact

public DefaultArtifact()

DefaultArtifact

public DefaultArtifact(java.lang.String label,
                       java.lang.String copyPattern,
                       java.lang.String srcDirectory)
Create a build artifact identified in the UI by the label. We use the Ant style pattern match to idetify the files that need to be copies accross into the arcive repository.

Parameters:
label - The UI text pabel
copyPattern - The ANT style copy pattern, relative to the source code directory
srcDirectory -
Method Detail

getLabel

public java.lang.String getLabel()
What is the UI link label used to identify the artifact

Specified by:
getLabel in interface Artifact
Returns:
The label

setLabel

public void setLabel(java.lang.String label)
What label should this artifact have?

Specified by:
setLabel in interface Artifact
Parameters:
label - The label

getCopyPattern

public java.lang.String getCopyPattern()
What is the ANT copy style pattern used to copy the artifacts from the build directory.

Specified by:
getCopyPattern in interface Artifact
Returns:
The pattern

setCopyPattern

public void setCopyPattern(java.lang.String copyPattern)
Specified by:
setCopyPattern in interface Artifact

getSrcDirectory

public java.lang.String getSrcDirectory()
The source directory relative to the build directory - e.g. "target/clover"

Specified by:
getSrcDirectory in interface Artifact

setSrcDirectory

public void setSrcDirectory(java.lang.String srcDirectory)
Specified by:
setSrcDirectory in interface Artifact

populateFromConfig

public void populateFromConfig(@NotNull
                               org.apache.commons.configuration.HierarchicalConfiguration config)
Description copied from interface: ConvertibleFromConfig
Update the current object with data in the HierarchicalConfiguration

Specified by:
populateFromConfig in interface ConvertibleFromConfig

toConfiguration

@NotNull
public org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
Description copied from interface: ConvertibleFromConfig
Generate a HierarchicalConfiguration from the current state of the object

Specified by:
toConfiguration in interface ConvertibleFromConfig
Returns:
Always returns an HierarchicalConfiguration. Never null

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.