uk.org.ogsadai.activity.files
Class DirectoryAccessActivity
java.lang.Object
|
+--uk.org.ogsadai.activity.Activity
|
+--uk.org.ogsadai.activity.files.AbstractFileActivity
|
+--uk.org.ogsadai.activity.files.DirectoryAccessActivity
- public class DirectoryAccessActivity
- extends AbstractFileActivity
An activity which returns a comma-separated list of the files contained within a directory. For information on this activity see the OGSA-DAI user doc: OGSA-DAI/doc/interaction/activities/files/directoryAccessActivity.html
- Author:
- The OGSA-DAI Project Team
Field Summary |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private java.lang.String |
mDirectory
The path of the directory to be accessed, relative to mTopDir , or "" if the directory to be accessed is the same as mTopDir . |
private java.io.File |
mFile
The File object representing the directory to be accessed. |
private BlockWriter |
mOutput
Activity output - list of file and directory names |
Method Summary |
void |
initialise()
Gets the data resource accessor for the files data resource according to whether the users credentials permit this access. |
void |
processBlock()
Performs an iteration of the processing of an activity. |
Methods inherited from class uk.org.ogsadai.activity.Activity |
cleanUp, connectsTo, createOutputPipe, getActivityConfiguration, getActivityName, getCause, getName, getObservableStatus, getProperties, getSession, getStatus, hasActivityConfiguration, hasProperties, process, processFirst, setActivityName, setCompleted, setError |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT_NOTICE
private static final java.lang.String COPYRIGHT_NOTICE
-
Copyright statement
- See Also:
- Constant Field Values
mDirectory
private java.lang.String mDirectory
-
The path of the directory to be accessed, relative to
mTopDir
, or ""
if the directory to be accessed is the same as mTopDir
.
mFile
private java.io.File mFile
-
The
File
object representing the directory to be accessed.
mOutput
private BlockWriter mOutput
-
Activity output - list of file and directory names
DirectoryAccessActivity
public DirectoryAccessActivity(org.w3c.dom.Element element)
throws ActivitySpecificationException,
ActivityCreationException
initialise
public void initialise()
throws ActivitySpecificationException,
ActivityExecutionException
- Description copied from class:
AbstractFileActivity
-
Gets the data resource accessor for the files data resource according to whether the users credentials permit this access.
-
- Overrides:
initialise
in class AbstractFileActivity
-
- Throws:
ActivitySpecificationException
- If the user is not permitted to access the resource.
ActivityExecutionException
- If some internal problem occurs.
- See Also:
Activity.initialise()
processBlock
public void processBlock()
- Description copied from class:
Activity
-
Performs an iteration of the processing of an activity. This may involve reading a block of input data and writing a block of output data, or may involve some other kind of processing. When an activity is processed by the OGSA-DAI engine, this method will be invoked repeatedly until the activity either completes or stops due to an error or termination call. An implementation of this method should invoke the
setCompleted
method to indicate that processing is complete, or the setError
method if an error occurs that will prevent the processing from completing.
-
- Specified by:
processBlock
in class Activity
-