Class FileService

java.lang.Object
org.imixs.archive.export.services.FileService

public class FileService extends Object
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 Details

  • Constructor Details

    • FileService

      public FileService()
  • Method Details

    • writeFileData

      public void writeFileData(org.imixs.workflow.FileData fileData, String path) throws ExportException
      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 object
      path - - 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