|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.ram.common.data.Artifact
com.ibm.ram.common.data.FolderArtifact
com.ibm.ram.client.RAMFolderArtifact
public class RAMFolderArtifact
Represents a Folder Artifact of an asset. A folder artifact if a collection of children Folder, File, or URL artifacts. LocalFolderArtifact is an instance of a FolderArtifact defined on the local OS. To create a subclass of RAMFolderArtifact, do not directly create a subclass. Instead, use LocalFolderArtifact.
LocalFolderArtifact| Field Summary |
|---|
| Fields inherited from class com.ibm.ram.common.data.Artifact |
|---|
FILE_DELIM, TYPE_FILE, TYPE_FOLDER, TYPE_URL |
| Constructor Summary | |
|---|---|
|
RAMFolderArtifact(java.lang.String folderName)
Create a folder artifact to be added to a FolderArtifact of an Asset. |
protected |
RAMFolderArtifact(java.lang.String folderPath,
java.lang.String folderName)
Creates and folder artifact with no children This is usful to create fodler artifacts |
| Method Summary | |
|---|---|
void |
addArtifact(Artifact artifact)
Add an new artifact as a child of this folder artifact. |
void |
addArtifact(java.lang.String relativePath,
Artifact artifactimpl)
Add an artifact relative to this folder artifact. |
Artifact[] |
computeArtifactsAsFlatList(IProgressMonitor monitor)
Normalize the list of children artifacts as a flat list. |
protected java.lang.String |
getArtifactFullPath(java.lang.String path,
java.lang.String artifactName)
|
RAMAsset |
getAsset()
Return the asset this Artifact belongs to. |
Artifact |
getChild(java.lang.String path)
Returns a child artifact from a given path or null if it does not exist |
Artifact[] |
getChildren()
|
long |
getCreationDate()
|
java.lang.String |
getLabel()
|
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. |
boolean |
hasChildren()
|
boolean |
removeArtifact(Artifact artifact)
Remove a child artifact. |
boolean |
removeArtifact(java.lang.String relativePath)
Remove an artifact relative to this folder artifact paths should have no leading or trailing slashes |
void |
setAsset(RAMAsset asset)
|
void |
setChildren(Artifact[] children)
|
void |
setCreationDate(long creationDate)
The date the artifact was cerated. |
void |
setLabel(java.lang.String label)
|
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. |
| Methods inherited from class com.ibm.ram.common.data.FolderArtifact |
|---|
getType |
| Methods inherited from class com.ibm.ram.common.data.Artifact |
|---|
getChecksum, getMimeType, setChecksum, setMimeType, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected RAMFolderArtifact(java.lang.String folderPath,
java.lang.String folderName)
public RAMFolderArtifact(java.lang.String folderName)
| Method Detail |
|---|
public void addArtifact(Artifact artifact)
throws RAMRuntimeException
artifact -
RAMRuntimeException
public void addArtifact(java.lang.String relativePath,
Artifact artifactimpl)
relativePath - artifact - public boolean removeArtifact(Artifact artifact)
artifact -
RAMRuntimeExceptionpublic boolean removeArtifact(java.lang.String relativePath)
relativePath -
protected java.lang.String getArtifactFullPath(java.lang.String path,
java.lang.String artifactName)
public Artifact getChild(java.lang.String path)
path - use / for a delimiter. Do not include a leading or
trailing slash.public Artifact[] getChildren()
getChildren in class FolderArtifactpublic boolean hasChildren()
hasChildren in class FolderArtifactpublic Artifact[] computeArtifactsAsFlatList(IProgressMonitor monitor)
monitor -
public java.lang.String getPath()
Artifact
getPath in class Artifactpublic void setPath(java.lang.String path)
Artifact
setPath in class Artifactpublic RAMAsset getAsset()
public void setAsset(RAMAsset asset)
public java.lang.String getName()
Artifact
getName in class Artifactpublic void setName(java.lang.String name)
Artifact
setName in class Artifactpublic long getCreationDate()
getCreationDate in class Artifactpublic long getSize()
Artifact
getSize in class Artifactpublic void setChildren(Artifact[] children)
setChildren in class FolderArtifactchildren - The list of child artifacts.public java.lang.String getLabel()
getLabel in class Artifactpublic ArtifactReference getReference()
getReference in class Artifactpublic void setCreationDate(long creationDate)
Artifact
setCreationDate in class Artifactpublic void setLabel(java.lang.String label)
setLabel in class Artifactlabel - The label to set.public void setReference(ArtifactReference reference)
setReference in class Artifactreference - The reference to set.public void setSize(long size)
Artifact
setSize in class Artifactpublic void setType(java.lang.String type)
Artifact
setType in class ArtifactArtifact.TYPE_FILE,
Artifact.TYPE_FOLDER,
Artifact.TYPE_URL
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||