Package org.mycore.frontend.fileupload
Class MCRPostUploadFileProcessor
java.lang.Object
org.mycore.frontend.fileupload.MCRPostUploadFileProcessor
- Direct Known Subclasses:
MCRGoobiMetsPostUploadProcessor
Modifies a uploaded file before it will be written to the destination Derivate.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
isProcessable
(String path) Checks a file if it is processable.abstract Path
processFile
(String path, Path tempFileContent, Supplier<Path> tempFileSupplier)
-
Constructor Details
-
MCRPostUploadFileProcessor
public MCRPostUploadFileProcessor()
-
-
Method Details
-
isProcessable
Checks a file if it is processable.- Parameters:
path
- to the temp file- Returns:
- true if this
MCRPostUploadFileProcessor
can process this file
-
processFile
public abstract Path processFile(String path, Path tempFileContent, Supplier<Path> tempFileSupplier) throws IOException - Parameters:
path
- the actual relative path in the derivatetempFileContent
- the actual path to the temporary filetempFileSupplier
- a supplier which creates a new temporary file which can be used for processing.- Returns:
- the
Path
of the final file, which was provided by the tempFileSupplier - Throws:
IOException
- if the processing failed
-