Package de.xima.fc.bl.fdv.file
Class ConsumingFileHandlerImpl
- java.lang.Object
-
- de.xima.fc.bl.fdv.file.ConsumingFileHandlerImpl
-
- All Implemented Interfaces:
IConsumingFileHandler
public class ConsumingFileHandlerImpl extends Object implements IConsumingFileHandler
-
-
Constructor Summary
Constructors Constructor Description ConsumingFileHandlerImpl(IWorkflowProcessingContext wfpc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Attachment>getAttachmentsFromUploadElements(IUploadConsuming consuming, Aktion action)Same asIConsumingFileHandler.getAttachmentsFromUploadElements(List, Aktion), but takes the arguments from the givenIUploadConsumingbelonging to the given action.List<Attachment>getAttachmentsFromUploadElements(List<String> uploadElements, Aktion action)Returns a list of all attachments for the given upload elements.FilegetDirWithUploadElements(IUploadConsuming consuming, Aktion action)Same asIConsumingFileHandler.getDirWithUploadElements(IUploadConsuming, Aktion), but takes the parameters from the givenIUploadConsumingcorresponding to the given action.FilegetDirWithUploadElements(List<String> uploadElements, Aktion action)Similar toIConsumingFileHandler.getFilesFromUploadElements(List, Aktion), but returns aFilefor 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 asIConsumingFileHandler.getFilesFromUploadElements(List, Aktion), but takes the parameters from the givenIUploadConsumingcorresponding to the given action.List<File>getFilesFromUploadElements(List<String> uploadElements, Aktion action)Returns a list of all files from the given upload elements.
-
-
-
Constructor Detail
-
ConsumingFileHandlerImpl
public ConsumingFileHandlerImpl(IWorkflowProcessingContext wfpc)
-
-
Method Detail
-
getFileOrDirsFromPreviousActions
public Map<? super Object,File> getFileOrDirsFromPreviousActions(IConsuming consuming, Aktion action)
Description copied from interface:IConsumingFileHandlerFor 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.- Specified by:
getFileOrDirsFromPreviousActionsin interfaceIConsumingFileHandler- Parameters:
consuming- TheIConsumingbelonging 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
public List<File> getFilesFromPreviousActions(IConsuming consuming, Aktion action)
Description copied from interface:IConsumingFileHandlerReturns 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.- Specified by:
getFilesFromPreviousActionsin interfaceIConsumingFileHandler- Parameters:
consuming- TheIProcessingfor the given action.action- Action for which to get the files.- Returns:
- All files without directories from the specified previous actions.
-
getAttachmentsFromUploadElements
public List<Attachment> getAttachmentsFromUploadElements(IUploadConsuming consuming, Aktion action) throws Exception
Description copied from interface:IConsumingFileHandlerSame asIConsumingFileHandler.getAttachmentsFromUploadElements(List, Aktion), but takes the arguments from the givenIUploadConsumingbelonging to the given action.- Specified by:
getAttachmentsFromUploadElementsin interfaceIConsumingFileHandler- Throws:
Exception- See Also:
IConsumingFileHandler.getAttachmentsFromUploadElements(List, Aktion)
-
getAttachmentsFromUploadElements
public List<Attachment> getAttachmentsFromUploadElements(List<String> uploadElements, Aktion action) throws Exception
Description copied from interface:IConsumingFileHandlerReturns 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.- Specified by:
getAttachmentsFromUploadElementsin interfaceIConsumingFileHandler- 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
public List<File> getFilesFromUploadElements(IUploadConsuming consuming, Aktion action) throws Exception
Description copied from interface:IConsumingFileHandlerSame asIConsumingFileHandler.getFilesFromUploadElements(List, Aktion), but takes the parameters from the givenIUploadConsumingcorresponding to the given action.- Specified by:
getFilesFromUploadElementsin interfaceIConsumingFileHandler- Throws:
Exception- See Also:
IConsumingFileHandler.getFilesFromUploadElements(List, Aktion)
-
getFilesFromUploadElements
public List<File> getFilesFromUploadElements(List<String> uploadElements, Aktion action) throws Exception
Description copied from interface:IConsumingFileHandlerReturns a list of all files from the given upload elements. Upload elements with no uploaded file are skipped.- Specified by:
getFilesFromUploadElementsin interfaceIConsumingFileHandler- 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
public File getDirWithUploadElements(IUploadConsuming consuming, Aktion action) throws Exception
Description copied from interface:IConsumingFileHandlerSame asIConsumingFileHandler.getDirWithUploadElements(IUploadConsuming, Aktion), but takes the parameters from the givenIUploadConsumingcorresponding to the given action.- Specified by:
getDirWithUploadElementsin interfaceIConsumingFileHandler- Throws:
Exception- See Also:
IConsumingFileHandler.getDirWithUploadElements(List, Aktion)
-
getDirWithUploadElements
public File getDirWithUploadElements(List<String> uploadElements, Aktion action) throws Exception
Description copied from interface:IConsumingFileHandlerSimilar toIConsumingFileHandler.getFilesFromUploadElements(List, Aktion), but returns aFilefor the directory which contains all the uploaded elements.- Specified by:
getDirWithUploadElementsin interfaceIConsumingFileHandler- 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:
IConsumingFileHandler.getDirWithUploadElements(IUploadConsuming, Aktion)
-
-