|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.activity.Activity | +--uk.org.ogsadai.activity.files.AbstractFileActivity | +--uk.org.ogsadai.activity.files.FileManipulationActivity
An activity which provides the means by which to move, copy, create
and delete files from a files data service resource.
For information on this activity see the OGSA-DAI user doc:
OGSA-DAI/doc/interaction/activities/files/fileManipulationActivity.html
Field Summary | |
static int |
COPY
Indicates an action to copy a file. |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
static int |
CREATE
Indicates an action to create a new file. |
static int |
DELETE
Indicates an action to delete a file. |
private static DAILogger |
LOG
Logger object for logging in this class |
private java.lang.String |
mDestination
Represents the second operand for binary operations (copy and move). |
private java.io.File |
mDestinationFile
The File object for mDestination . |
private BlockWriter |
mOutput
Activity output - a dummy which outputs "1" to indicate completion. |
static int |
MOVE
Indicates an action to move a file. |
private java.lang.String |
mSource
Represents the first operand for binary operations (copy and move) and the file to act upon for unary operations (create and delete). |
private java.io.File |
mSourceFile
The File object for mSource . |
private int |
mType
The action to be performed. |
private java.lang.String |
mTypeName
Name of action to be performed |
static int |
NONE
Indicates lack of declaration about which action to perform. |
Fields inherited from class uk.org.ogsadai.activity.files.AbstractFileActivity |
mCredentials, mFileAccessProvider, mTopDir |
Fields inherited from class uk.org.ogsadai.activity.Activity |
mContext, mExternalInputs, mExternalOutputs, mInternalInputs, mInternalOutputs |
Constructor Summary | |
FileManipulationActivity(org.w3c.dom.Element element)
|
Method Summary | |
private void |
copy()
Copy a file, bytewise, from a source file, creating the destination file if necessary. |
private void |
create()
Create a file. |
private void |
delete()
Delete a file. |
void |
initialise()
Gets the data resource accessor for the files data resource according to whether the users credentials permit this access. |
private void |
move()
Move a file, bytewise, from a source file, creating the destination file if necessary. |
void |
processBlock()
Performs an iteration of the processing of an activity. |
java.lang.String |
toString()
Return a string representation of the action to be performed. |
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, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static final DAILogger LOG
public static final int NONE
public static final int MOVE
public static final int COPY
public static final int CREATE
public static final int DELETE
private int mType
private java.lang.String mTypeName
private BlockWriter mOutput
private java.lang.String mSource
private java.lang.String mDestination
private java.io.File mSourceFile
File
object for mSource
.
private java.io.File mDestinationFile
File
object for mDestination
.
Constructor Detail |
public FileManipulationActivity(org.w3c.dom.Element element) throws ActivitySpecificationException, ActivityCreationException
Method Detail |
public void initialise() throws ActivitySpecificationException, ActivityExecutionException
AbstractFileActivity
initialise
in class AbstractFileActivity
ActivitySpecificationException
- If the user is not permitted to access the resource.
ActivityExecutionException
- If some internal problem occurs.Activity.initialise()
public java.lang.String toString()
toString
in class java.lang.Object
public void processBlock()
Activity
setCompleted
method to indicate that
processing is complete, or the setError
method if
an error occurs that will prevent the processing from
completing.
processBlock
in class Activity
private void copy() throws ActivitySpecificationException, ActivityExecutionException
ActivitySpecificationException
- If the source file does not exist.
ActivityExecutionException
- If there was a problem accessing the file.private void move() throws ActivitySpecificationException, ActivityExecutionException
ActivitySpecificationException
- If the source file does not exist.
ActivityExecutionException
- If there was a problem accessing the file.private void delete() throws ActivitySpecificationException, ActivityExecutionException
ActivitySpecificationException
- If the file does not exist.
ActivityExecutionException
- If there was a problem deleting the file.private void create() throws ActivitySpecificationException, ActivityExecutionException
ActivitySpecificationException
- If the file already exists.
ActivityExecutionException
- If there was a problem creating the file.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |