uk.org.ogsadai.client.toolkit.activity.files
Class FileInsert
java.lang.Object
|
+--uk.org.ogsadai.client.toolkit.activity.RequestComponent
|
+--uk.org.ogsadai.client.toolkit.activity.Activity
|
+--uk.org.ogsadai.client.toolkit.activity.files.FileWriting
|
+--uk.org.ogsadai.client.toolkit.activity.files.FileInsert
- public class FileInsert
- extends FileWriting
A file writing activity which inserts data at a particular
offset of the entire file or each line. The file resides within a
file system data service resource.
This is semantically equivalent to the file replace activity where
a zero length string is replaced by the test to be inserted.
The activity has one optional input - the output of another
activity providing the data to insert. This can be specified using
the setInput method. The activity has one output -
a dummy value representing success.
If the constructor with a text parameter is not used,
it is expected that the setInput method will be called
in order to register that the input will be taken from another
activity's output. If the constructor with a text
parameter is used, any input registered via setInput
is ignored.
- Author:
- The OGSA-DAI Project Team
|
Field Summary |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
| Fields inherited from class uk.org.ogsadai.client.toolkit.activity.files.FileWriting |
APPEND, DELETE, END, INSERT, mAction, mFilename, mLength, mMatch, mOffset, mPerLine, mRegexp, mText, NONE_SPECIFIED, PER_FILE, PER_LINE, REPLACE, START, TO_END |
| Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
|
| Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
|
|
Constructor Summary |
FileInsert(java.lang.String filename,
int offset,
boolean perLine)
Insert data obtained from another activity into a specific
position within an entire file or within each line of a file. |
FileInsert(java.lang.String filename,
int offset,
boolean perLine,
java.lang.String text)
Insert particular data into a specific position within an
entire file or within each line of a file. |
| Methods inherited from class uk.org.ogsadai.client.toolkit.activity.files.FileWriting |
actionToString, generateXML, getFilename, getLength, getMatch, getOffset, getRegexp, getText, isPerLine, lengthToString, offsetToString, setFilename, setInput, setLength, setMatch, setOffset, setPerLine, setRegexp, setText, validateParams |
| 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
FileInsert
public FileInsert(java.lang.String filename,
int offset,
boolean perLine,
java.lang.String text)
- Insert particular data into a specific position within an
entire file or within each line of a file.
- Parameters:
filename - Relative path to the the file to insert data into.offset - Non-negative offset of start of the range of bytes, or
FileWriting.BOF, or FileWriting.EOFperLine - true treats the match expression on a per-line
basis, false treats the match expression
on a per-file basistext - Text to insert.
- Throws:
java.lang.IllegalArgumentException - If filename is null,
text is null or
offset is not as specified above.
FileInsert
public FileInsert(java.lang.String filename,
int offset,
boolean perLine)
- Insert data obtained from another activity into a specific
position within an entire file or within each line of a file.
The
setInput method should be called to specify
the activity that will provide the data.
- Parameters:
filename - Relative path to the the file to insert data into.offset - Non-negative offset of start of the range of bytes, or
FileWriting.BOF, or FileWriting.EOFperLine - true treats the match expression on a per-line
basis, false treats the match expression
on a per-file basis
- Throws:
java.lang.IllegalArgumentException - If filename is null or
offset is not as specified above.