Interface ContentImporter

    • Method Detail

      • supports

        boolean supports​(InputStream is,
                         String name)
                  throws IOException
        Tests if the ContentImporter is able to import the corresponding stream.
        Implementing classes should first test the file extension, if possible, and if the name is provided.
        Parameters:
        is - an input stream on the file, cannot be null. The stream is closed by the caller.
        name - the file name, can be null.
        Returns:
        true if the ContentImporter can import the corresponding stream, false otherwise.
        Throws:
        IOException - if an error occurs.
      • getPriority

        int getPriority()
        Get the importer priority. A lower number means a higher priority.
        Returns:
        the importer priority.
      • importContents

        Set<StringimportContents​(InputStream is,
                                   Map<String,​Object> params)
                            throws IOException
        Import the contents from the file.
        Parameters:
        is - an input stream on the file, cannot be null. The stream is closed by the caller.
        params - input or output parameters.
        Returns:
        a Set of the imported content IDs.
        Throws:
        IOException - if an error occurs importing the contents.