Package de.xima.fc.interfaces.file
Interface IProvidingFileHandler
-
- All Known Implementing Classes:
ProvidingFileHandlerImpl
public interface IProvidingFileHandlerUtility methods for actions implementingIProvidingandIAttachableFile. Contains methods such as attaching files to the form record or saving files to the file system.- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAttachment(File file)Attaches the given file to the current form record of the workflow processing context.voidattachFilesFromActionToFormRecord(long actionId)For a given action, attaches the files produced by that action to the current form record.voidattachFilesFromCurrentActionToFormRecord(Aktion action)For a workflow action that provides files, takes the files it produces and attaches those files to the current form record.FilegetExportDirectory(String exportDirectory, boolean useProcessId)Returns the export directory for aIProviding.voidsaveFilesFromActionToFileSystem(long actionId, File outputDir)For a given action, saves the files produced by that action to the file system.voidsaveFileToFileSystem(File srcFile, File outputDir)Saves the given file to the file system, ie. copies it to the given directory.
-
-
-
Method Detail
-
addAttachment
void addAttachment(File file) throws IOException
Attaches the given file to the current form record of the workflow processing context. The file is attached with theUserMgmtUtils.SYSTEMuser.- Parameters:
file- File to be attached to the form record. Must not be a directory.- Throws:
IOException- When the file data could not be read.
-
attachFilesFromActionToFormRecord
void attachFilesFromActionToFormRecord(long actionId) throws IOExceptionFor a given action, attaches the files produced by that action to the current form record.- Parameters:
actionId-Aktion.getId()of the action whose files are to be attached.- Throws:
IOException
-
attachFilesFromCurrentActionToFormRecord
void attachFilesFromCurrentActionToFormRecord(Aktion action) throws IOException
For a workflow action that provides files, takes the files it produces and attaches those files to the current form record.- Parameters:
action- The current action whose files are to be attached.- Throws:
IOException
-
getExportDirectory
File getExportDirectory(String exportDirectory, boolean useProcessId) throws IOException
Returns the export directory for aIProviding. When enabled, creates a sub directory with the name of the current process ID.- Parameters:
exportDirectory- Base export directory.useProcessId- Whether a sub directory with the process ID is created.- Returns:
- The export directory.
nullif the given export directory is blank. - Throws:
IOException- When the directory could not be created.
-
saveFilesFromActionToFileSystem
void saveFilesFromActionToFileSystem(long actionId, File outputDir) throws IOExceptionFor a given action, saves the files produced by that action to the file system.- Parameters:
actionId-Aktion.getId()of the action whose files are to be saved.outputDir- The directory to which the files are saved.- Throws:
IOException
-
saveFileToFileSystem
void saveFileToFileSystem(File srcFile, File outputDir) throws IOException
Saves the given file to the file system, ie. copies it to the given directory.- Parameters:
srcFile- File to be saved to the file system.outputDir- Directory to which the file is saved.- Throws:
IOException- When the file cannot be copied.
-
-