Class FileService
java.lang.Object
org.imixs.archive.export.services.FileService
The FileService is used to write a file into a local directory or on a FTP
Server. The service is used by the SchedulerService.
Depending on the environment variable
EXPORT_FTP_HOST a file is
written/read from a FTP server or a local directory.
The variable EXPORT_PATH defines the root path to write/read files.- Version:
- 1.0
- Author:
- rsoika
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.imixs.workflow.FileDatareadFileData(String fileName, String path) Reads a fileData from a given export path (optional on a FTP Server)..voidwriteFileData(org.imixs.workflow.FileData fileData, String path) This method write a single file to the export path (optional on a FTP Server).
-
Field Details
-
FTP_ERROR
- See Also:
-
-
Constructor Details
-
FileService
public FileService()
-
-
Method Details
-
writeFileData
This method write a single file to the export path (optional on a FTP Server). The method verifies if the file already exists and compares the Checksum. If the file content (equals checksum) has not changed, the method returns with no action.- Parameters:
fileData- - the File Data objectpath- - optional sub directory- Throws:
ExportException
-
readFileData
public org.imixs.workflow.FileData readFileData(String fileName, String path) throws ExportException Reads a fileData from a given export path (optional on a FTP Server)..- Parameters:
path-- Throws:
ExportException
-