public interface IProvidingFileHandler
IProviding
and IAttachableFile
. Contains methods such as
attaching files to the form record or saving files to the file system.Modifier and Type | Method and Description |
---|---|
void |
addAttachment(File file)
Attaches the given file to the current form record of the workflow processing context.
|
void |
attachFilesFromActionToFormRecord(long actionId)
For a given action, attaches the files produced by that action to the current form record.
|
void |
attachFilesFromCurrentActionToFormRecord(Aktion action)
For a workflow action that provides files, takes the files it produces and attaches those files to the current form
record.
|
File |
getExportDirectory(String exportDirectory,
boolean useProcessId)
Returns the export directory for a
IProviding . |
void |
saveFilesFromActionToFileSystem(long actionId,
File outputDir)
For a given action, saves the files produced by that action to the file system.
|
void |
saveFileToFileSystem(File srcFile,
File outputDir)
Saves the given file to the file system, ie. copies it to the given directory.
|
void addAttachment(File file) throws IOException
UserMgmtUtils.SYSTEM
user.file
- File to be attached to the form record. Must not be a directory.wfpc
- Current workflow processing context.IOException
- When the file data could not be read.void attachFilesFromActionToFormRecord(long actionId) throws IOException
actionId
- Aktion.getId()
of the action whose files are to be attached.wfpc
- The current workflow processing context.IOException
void attachFilesFromCurrentActionToFormRecord(Aktion action) throws IOException
action
- The current action whose files are to be attached.wfpc
- The current workflow processing context.IOException
File getExportDirectory(String exportDirectory, boolean useProcessId) throws IOException
IProviding
. When enabled, creates a sub directory with the name of the
current process ID.exportDirectory
- Base export directory.useProcessId
- Whether a sub directory with the process ID is created.wfpc
- The current workflow processing context.null
if the given export directory is blank.IOException
- When the directory could not be created.void saveFilesFromActionToFileSystem(long actionId, File outputDir) throws IOException
actionId
- Aktion.getId()
of the action whose files are to be saved.outputDir
- The directory to which the files are saved.wfpc
- The current workflow processing context.IOException
void saveFileToFileSystem(File srcFile, File outputDir) throws IOException
srcFile
- File to be saved to the file system.outputDir
- Directory to which the file is saved.IOException
- When the file cannot be copied.Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.