com.atlassian.bamboo.build.artifact
Class DefaultArtifactLink

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by com.atlassian.bamboo.build.artifact.DefaultArtifactLink
All Implemented Interfaces:
ArtifactLink, BambooObject, java.lang.Cloneable

public class DefaultArtifactLink
extends BambooEntityObject
implements ArtifactLink

This class is a simple POJO representing artifact links.


Field Summary
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Constructor Summary
protected DefaultArtifactLink()
          Default constructor for use with Hibernate
  DefaultArtifactLink(java.lang.String label, ResultsSummary buildResultsSummary)
           
 
Method Summary
 ResultsSummary getBuildResultsSummary()
           
 java.io.File getFile()
          Accessor for the actual file handle of the artifact.
 java.lang.String getFilePathSuffix()
           
 java.lang.String getLabel()
          Label of the Artifact
 long getSize()
           
 java.lang.String getSizeDescription()
          Returns a human-readable version of the file size, where the input represents a specific number of bytes.
 java.lang.String getUrl()
          URL of the artifact relative to AdministrationConfiguration.getBaseUrl()
 java.lang.String getUrlSuffix()
           
 boolean isExists()
          If the artifact link exists
protected  void setBuildResultsSummary(ResultsSummary resultsSummary)
           
protected  void setFilePathSuffix(java.lang.String filePathSuffix)
           
protected  void setLabel(java.lang.String label)
           
protected  void setSize(long size)
           
protected  void setUrlSuffix(java.lang.String urlSuffix)
           
 
Methods inherited from class com.atlassian.bamboo.core.BambooEntityObject
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
 

Constructor Detail

DefaultArtifactLink

protected DefaultArtifactLink()
Default constructor for use with Hibernate


DefaultArtifactLink

public DefaultArtifactLink(java.lang.String label,
                           ResultsSummary buildResultsSummary)
Method Detail

getLabel

public java.lang.String getLabel()
Description copied from interface: ArtifactLink
Label of the Artifact

Specified by:
getLabel in interface ArtifactLink
Returns:
label

setLabel

protected void setLabel(java.lang.String label)

getUrl

@Nullable
public java.lang.String getUrl()
Description copied from interface: ArtifactLink
URL of the artifact relative to AdministrationConfiguration.getBaseUrl()

Specified by:
getUrl in interface ArtifactLink
Returns:
url

getUrlSuffix

public java.lang.String getUrlSuffix()

setUrlSuffix

protected void setUrlSuffix(java.lang.String urlSuffix)

getFilePathSuffix

public java.lang.String getFilePathSuffix()

setFilePathSuffix

protected void setFilePathSuffix(java.lang.String filePathSuffix)

getSize

public long getSize()

setSize

protected void setSize(long size)

isExists

public boolean isExists()
Description copied from interface: ArtifactLink
If the artifact link exists

Specified by:
isExists in interface ArtifactLink
Returns:
true if the artifact exists, false otherwise

getFile

@Nullable
public java.io.File getFile()
Description copied from interface: ArtifactLink
Accessor for the actual file handle of the artifact.

Specified by:
getFile in interface ArtifactLink
Returns:
a File object pointing to either the file or directory of this artifact

getSizeDescription

public java.lang.String getSizeDescription()
Description copied from interface: ArtifactLink
Returns a human-readable version of the file size, where the input represents a specific number of bytes.

Specified by:
getSizeDescription in interface ArtifactLink
Returns:
size description

getBuildResultsSummary

public ResultsSummary getBuildResultsSummary()
Specified by:
getBuildResultsSummary in interface ArtifactLink
Returns:
ResultsSummary which this artifact link belongs to. May be null if still not associated with ResultsSummary

setBuildResultsSummary

protected void setBuildResultsSummary(ResultsSummary resultsSummary)


Copyright © 2010 Atlassian. All Rights Reserved.