Package de.xima.fc.interfaces.file
Interface IConsumingFileHandler
-
- All Known Implementing Classes:
ConsumingFileHandlerImpl
public interface IConsumingFileHandler
Utility methods for working with file consuming actions implementingIConsuming
. Contains methods for retrieving the files from previous actions and files from uploaded files.- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Attachment>
getAttachmentsFromUploadElements(IUploadConsuming consuming, Aktion action)
Same asgetAttachmentsFromUploadElements(List, Aktion)
, but takes the arguments from the givenIUploadConsuming
belonging to the given action.List<Attachment>
getAttachmentsFromUploadElements(List<String> uploadElements, Aktion action)
Returns a list of all attachments for the given upload elements.File
getDirWithUploadElements(IUploadConsuming consuming, Aktion action)
Same asgetDirWithUploadElements(IUploadConsuming, Aktion)
, but takes the parameters from the givenIUploadConsuming
corresponding to the given action.File
getDirWithUploadElements(List<String> uploadElements, Aktion action)
Similar togetFilesFromUploadElements(List, Aktion)
, but returns aFile
for the directory which contains all the uploaded elements.Map<? super Object,File>
getFileOrDirsFromPreviousActions(IConsuming consuming, Aktion action)
For each previous action as specified byIConsuming.getActionUUIDs()
, find the file or directory created by that action and returns them.List<File>
getFilesFromPreviousActions(IConsuming consuming, Aktion action)
Returns all files from previous actions as specified by theIConsuming.getActionUUIDs()
.List<File>
getFilesFromUploadElements(IUploadConsuming consuming, Aktion action)
Same asgetFilesFromUploadElements(List, Aktion)
, but takes the parameters from the givenIUploadConsuming
corresponding to the given action.List<File>
getFilesFromUploadElements(List<String> uploadElements, Aktion action)
Returns a list of all files from the given upload elements.
-
-
-
Method Detail
-
getFileOrDirsFromPreviousActions
Map<? super Object,File> getFileOrDirsFromPreviousActions(IConsuming consuming, Aktion action)
For each previous action as specified byIConsuming.getActionUUIDs()
, find the file or directory created by that action and returns them. Actions that did not create a file or directory are omitted.- Parameters:
consuming
- TheIConsuming
belonging to the given action.action
- A file consuming action whose files to get.- Returns:
- A map from the ID of each previous action to the file or directory created by that action.
-
getFilesFromPreviousActions
List<File> getFilesFromPreviousActions(IConsuming consuming, Aktion action)
Returns all files from previous actions as specified by theIConsuming.getActionUUIDs()
. This method does not return anyFile.isDirectory()
s. Instead, it recursively walks all directories and only returns the files they contain.- Parameters:
consuming
- TheIProcessing
for the given action.action
- Action for which to get the files.wfpc
- The current workflow processing context.- Returns:
- All files without directories from the specified previous actions.
-
getAttachmentsFromUploadElements
List<Attachment> getAttachmentsFromUploadElements(IUploadConsuming consuming, Aktion action) throws Exception
Same asgetAttachmentsFromUploadElements(List, Aktion)
, but takes the arguments from the givenIUploadConsuming
belonging to the given action.- Throws:
Exception
- See Also:
getAttachmentsFromUploadElements(List, Aktion)
-
getAttachmentsFromUploadElements
List<Attachment> getAttachmentsFromUploadElements(List<String> uploadElements, Aktion action) throws Exception
Returns a list of all attachments for the given upload elements. If no file was uploaded for a certain upload element, the attachment is omitted in the returned list.- Parameters:
uploadElements
- Upload elements the given action required. Must contain theFormElement.getAlias()
of the form upload element.action
- The current action that is being processed.- Returns:
- List of attachments.
- Throws:
Exception
-
getFilesFromUploadElements
List<File> getFilesFromUploadElements(IUploadConsuming consuming, Aktion action) throws Exception
Same asgetFilesFromUploadElements(List, Aktion)
, but takes the parameters from the givenIUploadConsuming
corresponding to the given action.- Throws:
Exception
- See Also:
getFilesFromUploadElements(List, Aktion)
-
getFilesFromUploadElements
List<File> getFilesFromUploadElements(List<String> uploadElements, Aktion action) throws Exception
Returns a list of all files from the given upload elements. Upload elements with no uploaded file are skipped.- Parameters:
uploadElements
- Upload elements the given action required. Must contain theFormElement.getAlias()
of the form upload element.action
- The current action that is being processed.- Returns:
- List of uploaded files.
- Throws:
Exception
-
getDirWithUploadElements
File getDirWithUploadElements(IUploadConsuming consuming, Aktion action) throws Exception
Same asgetDirWithUploadElements(IUploadConsuming, Aktion)
, but takes the parameters from the givenIUploadConsuming
corresponding to the given action.- Throws:
Exception
- See Also:
getDirWithUploadElements(List, Aktion)
-
getDirWithUploadElements
File getDirWithUploadElements(List<String> uploadElements, Aktion action) throws Exception
Similar togetFilesFromUploadElements(List, Aktion)
, but returns aFile
for the directory which contains all the uploaded elements.- Parameters:
uploadElements
- Upload elements the given action required. Must contain theFormElement.getAlias()
of the form upload element.action
- The current action that is being processed.- Returns:
- Directory with all the uploaded files.
- Throws:
Exception
- See Also:
getDirWithUploadElements(IUploadConsuming, Aktion)
-
-