Class MCRPostUploadFileProcessor

java.lang.Object
org.mycore.frontend.fileupload.MCRPostUploadFileProcessor
Direct Known Subclasses:
MCRGoobiMetsPostUploadProcessor

public abstract class MCRPostUploadFileProcessor extends Object
Modifies a uploaded file before it will be written to the destination Derivate.
  • Constructor Details

    • MCRPostUploadFileProcessor

      public MCRPostUploadFileProcessor()
  • Method Details

    • isProcessable

      public abstract boolean isProcessable(String path)
      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 derivate
      tempFileContent - the actual path to the temporary file
      tempFileSupplier - 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