org.aludratest.service.flatfile
Interface FlatFileInteraction

All Superinterfaces:
Action, Interaction
All Known Implementing Classes:
DefaultFlatFileAction

public interface FlatFileInteraction
extends Interaction

Interaction interface of the FlatFileService.

Author:
Volker Bergmann

Method Summary
 void addRowType(RowTypeData rowType, Object readerId)
          Adds a RowType to a BeanFlatFileReader.
 void closeReader(Object readerId)
          Closes the reader.
 void closeWriter(Object writerId)
          Closes the writer.
 Object createReader(String filePath)
          Creates a reader for reading JavaBeans.
 Object createWriter(String filePath, boolean overwrite)
          Creates a writer for persisting FlatFileBeans or JavaBean data structures.
 void delete(String filePath)
          Deletes a file.
 FlatFileBeanData readRow(Object readerId)
          Reads a flat file row and provides it as Java object.
 void waitUntilExists(String elementType, String filePath)
          Polls the file system until a file at the given path is found or a timeout occurs.
 void waitUntilNotExists(String filePath)
          Polls the file system until no file is found at the given path.
 void writeRow(Object bean, Object writerId)
          Writes an object as flat file row.
 
Methods inherited from interface org.aludratest.service.Action
createAttachments, createDebugAttachments, setSystemConnector
 

Method Detail

waitUntilExists

void waitUntilExists(String elementType,
                     String filePath)
Polls the file system until a file at the given path is found or a timeout occurs.

Parameters:
elementType -
filePath - the full path of the requested file

waitUntilNotExists

void waitUntilNotExists(String filePath)
Polls the file system until no file is found at the given path.

Parameters:
filePath -

delete

void delete(String filePath)
Deletes a file.

Parameters:
filePath - the path of the file to delete

createWriter

Object createWriter(String filePath,
                    boolean overwrite)
Creates a writer for persisting FlatFileBeans or JavaBean data structures.

Parameters:
filePath - the path of the file to write
overwrite - flag that indicates whether pre-existing files may be overwritten
Returns:
the id of the created writer

writeRow

void writeRow(Object bean,
              Object writerId)
Writes an object as flat file row.

Parameters:
bean - a FlatFileBean to write
writerId - the id of the writer

closeWriter

void closeWriter(Object writerId)
Closes the writer.

Parameters:
writerId - the id of the writer

createReader

Object createReader(String filePath)
Creates a reader for reading JavaBeans.

Parameters:
filePath - the path of the file to read
Returns:
the id of the created reader

addRowType

void addRowType(RowTypeData rowType,
                Object readerId)
Adds a RowType to a BeanFlatFileReader.

Parameters:
rowType - a RowTypeData to be applied by the flat file reader
readerId - the id of the reader

readRow

FlatFileBeanData readRow(Object readerId)
Reads a flat file row and provides it as Java object.

Parameters:
readerId - the id of the reader
Returns:
a FlatFileBean holding the content of the parsed flat file row

closeReader

void closeReader(Object readerId)
Closes the reader.

Parameters:
readerId - the id of the reader


Copyright © 2015 aludratest.org. All rights reserved.