Interface ContentImporter

All Known Implementing Classes:
DocxContentImporter, XmlContentImporter

public interface ContentImporter
Component responsible for populating a Content from an existing file.
Contents are meant to be provided totally empty, so that it is up to the implementation to set every metadata on the Content, even the content type, the workflow id, ...
  • Method Details

    • importContent

      void importContent(File file, ModifiableWebContent content, Map<String,String> params) throws IOException
      Extracts file content and populates the given Content. Typical usage is to provide a newly created empty Content.
      Parameters:
      file - the source.
      content - the Content to be populated.
      params - in/out params to set and get additional data to and from the importer.
      Throws:
      IOException - if an error occurs processing the stream.
    • getMimeTypes

      Returns all mime types handled by this importer.
      Returns:
      all mime types handled by this importer.
    • postTreatment

      void postTreatment(ModifiablePage page, Content content, File file) throws IOException
      Post treatment after import process
      Parameters:
      page - The created page
      content - The created content
      file - The imported file
      Throws:
      IOException - if an error occurred