com.ibm.ram.common.data
Class Artifact

java.lang.Object
  extended by com.ibm.ram.common.data.Artifact
Direct Known Subclasses:
FolderArtifact, RAMArtifact, URLArtifact

public class Artifact
extends java.lang.Object

Assets are composed of a set of artifacts. Three types of Artifact classes exist: FolderArtifacts, which are collections of other artifacts; FileArtifacts, which are single files; and URLArtifacts, which are single URLs.

Since:
7.1
See Also:
an artifact representation of a URL, an artifact that includes children artifacts

Field Summary
static java.lang.String FILE_DELIM
          All artifacts use the forward slash delimiter.
static java.lang.String TYPE_FILE
          Artifact is a file type
static java.lang.String TYPE_FOLDER
          Artifact is a Folder type
static java.lang.String TYPE_URL
          Artifact is a URL type
 
Constructor Summary
Artifact()
           
 
Method Summary
 long getChecksum()
          Provides the checksum associated with this artifact.
 long getCreationDate()
           
 java.lang.String getLabel()
           
 java.lang.String getMimeType()
           
 java.lang.String getName()
          The name of the artifact
 java.lang.String getPath()
          Returns the path to the artifact from the root.
 ArtifactReference getReference()
           
 long getSize()
          The size of the artifact.
 java.lang.String getType()
          The type of the artifact.
 void setChecksum(long checksum)
          Sets the checksum for this artifact.
 void setCreationDate(long creationDate)
          The date the artifact was cerated.
 void setLabel(java.lang.String label)
           
 void setMimeType(java.lang.String mimeType)
           
 void setName(java.lang.String name)
          The name of the artifact.
 void setPath(java.lang.String path)
          The path to the artifact.
 void setReference(ArtifactReference reference)
           
 void setSize(long size)
          The size of the artifact.
 void setType(java.lang.String type)
          The artifact type.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_FOLDER

public static final java.lang.String TYPE_FOLDER
Artifact is a Folder type

Since:
7.1

TYPE_URL

public static final java.lang.String TYPE_URL
Artifact is a URL type

Since:
7.1

TYPE_FILE

public static final java.lang.String TYPE_FILE
Artifact is a file type

Since:
7.1
See Also:
Constant Field Values

FILE_DELIM

public static final java.lang.String FILE_DELIM
All artifacts use the forward slash delimiter.

Since:
7.1
See Also:
Constant Field Values
Constructor Detail

Artifact

public Artifact()
Method Detail

getName

public java.lang.String getName()
The name of the artifact

Since:
7.1

setName

public void setName(java.lang.String name)
The name of the artifact.

Since:
7.1

getType

public java.lang.String getType()
The type of the artifact.

Since:
7.1
See Also:
TYPE_FILE, TYPE_FOLDER, TYPE_URL

setType

public void setType(java.lang.String type)
The artifact type.

Since:
7.1
See Also:
TYPE_FILE, TYPE_FOLDER, TYPE_URL

getPath

public java.lang.String getPath()
Returns the path to the artifact from the root. Path of the root artifact is null. All other path are relative to the artifact root.

Since:
7.1

setPath

public void setPath(java.lang.String path)
The path to the artifact. Path of the root artifact is null. All other path are relative to the artifact root.

Since:
7.1

getSize

public long getSize()
The size of the artifact.

Since:
7.1

setSize

public void setSize(long size)
The size of the artifact.

Since:
7.1

getCreationDate

public long getCreationDate()
Returns:
Returns the creationDate.
Since:
7.1

setCreationDate

public void setCreationDate(long creationDate)
The date the artifact was cerated.

Since:
7.1

getReference

public ArtifactReference getReference()
Returns:
Returns the reference.
Since:
7.1

setReference

public void setReference(ArtifactReference reference)
Parameters:
reference - The reference to set.
Since:
7.1

getLabel

public java.lang.String getLabel()
Returns:
Returns the label.
Since:
7.1

setLabel

public void setLabel(java.lang.String label)
Parameters:
label - The label to set.
Since:
7.1

getMimeType

public java.lang.String getMimeType()
Returns:
Returns the mime type.
Since:
7.5.0.1

setMimeType

public void setMimeType(java.lang.String mimeType)
Parameters:
mimeType - The mime type to set.
Since:
7.5.0.1

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getChecksum

public long getChecksum()
Provides the checksum associated with this artifact. Folder artifacts do not have a checksum. URL artifacts have a checksum created from the the name, value and configuration of the artifact.

Returns:
Value of the checksum or -1 if none.
Since:
7.2

setChecksum

public void setChecksum(long checksum)
Sets the checksum for this artifact.

Parameters:
checksum -
Since:
7.2