|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.client.toolkit.activity.RequestComponent | +--uk.org.ogsadai.client.toolkit.activity.Activity | +--uk.org.ogsadai.client.toolkit.activity.files.DirectoryAccess
Lists names of all files and subdirectories in a given directory.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private java.lang.String[] |
mDirectories
subdirectories |
private java.lang.String[] |
mFiles
file names |
private java.lang.String |
mPath
relative path of the directory |
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
|
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
|
Constructor Summary | |
DirectoryAccess()
Construct a new activity instance. |
|
DirectoryAccess(java.lang.String path)
Construct a new activity instance which accesses the given directory. |
Method Summary | |
protected java.lang.String |
generateXML()
Generates the XML representing the activity. |
java.lang.String[] |
getFileNames()
Returns the names of all files in the accessed directory. |
ActivityOutput |
getOutput()
Gets the activity's only output. |
java.lang.String |
getPath()
Gets the relative path name of the directory that is being accessed. |
java.lang.String[] |
getSubDirectories()
Returns the names of all subdirectories of the accessed directory. |
private void |
parseData()
Parses the output data and populates the String arrays with directory and file names. |
void |
setPath(java.lang.String path)
Set the relative path name of the directory to access. |
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
addInput, addOutput, addOutputs, getDataResourceID, getInputParameters, getOutputParameters, getOutputs, replaceSpecialCharacters, setDataResourceID, setInput |
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
getDataService, getName, getSession, setDataService, setSession |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private java.lang.String mPath
private java.lang.String[] mDirectories
private java.lang.String[] mFiles
Constructor Detail |
public DirectoryAccess()
public DirectoryAccess(java.lang.String path)
path
- directory to accessMethod Detail |
public void setPath(java.lang.String path)
path
- relative pathpublic java.lang.String getPath()
public java.lang.String[] getSubDirectories() throws NoActivityOutputException, DataFormatException
NoActivityOutputException
- if there is no output data or the data has not yet been
processed to this output or the activity that generates
this output has not yet been executed.
DataFormatException
- if the output from the activity cannot be parsedpublic java.lang.String[] getFileNames() throws NoActivityOutputException, DataFormatException
NoActivityOutputException
- if there is no output data or the data has not yet been
processed to this output or the activity that generates
this output has not yet been executed.
DataFormatException
- if the output from the activity cannot be parsedpublic ActivityOutput getOutput()
protected java.lang.String generateXML()
RequestComponent
generateXML
in class Activity
private void parseData() throws NoActivityOutputException, DataFormatException
NoActivityOutputException
- if there is no output data or the data has not yet been
processed to this output or the activity that generates
this output has not yet been executed.
DataFormatException
- if the data cannot be parsed
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |