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 Detail

      • 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

        String[] getMimeTypes()
        Returns all mime types handled by this importer.
        Returns:
        all mime types handled by this importer.