Interface ContentImporter


  • @ProviderType
    public interface ContentImporter
    The ContentImporter service

    This interface is not intended to be implemented by bundles. It is implemented by this bundle and may be used by client bundles.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void importContent​(javax.jcr.Node parent, java.lang.String filename, java.io.InputStream contentStream, ImportOptions importOptions, ContentImportListener importListener)
      Import content into the repository by parsing the provided content stream.
      void importContent​(javax.jcr.Node parent, java.lang.String name, java.lang.String contentType, java.io.InputStream contentStream, ImportOptions importOptions, ContentImportListener importListener)
      Import content into the repository by parsing the provided content stream.
    • Method Detail

      • importContent

        void importContent​(javax.jcr.Node parent,
                           java.lang.String filename,
                           java.io.InputStream contentStream,
                           ImportOptions importOptions,
                           ContentImportListener importListener)
                    throws javax.jcr.RepositoryException,
                           java.io.IOException
        Import content into the repository by parsing the provided content stream.
        Parameters:
        parent - the root node for the imported content
        filename - the name of the imported content. Becomes the node name (without extension). The file extension determines the content type.
        contentStream - the content stream to be imported
        importOptions - (optional) additional options to control the import
        importListener - (optional) listener to receive callbacks for each change in the import
        Throws:
        javax.jcr.RepositoryException - If anything goes wrong accessing the JCR repository
        java.io.IOException - If anything goes wrong reading or writing the content
      • importContent

        void importContent​(javax.jcr.Node parent,
                           java.lang.String name,
                           java.lang.String contentType,
                           java.io.InputStream contentStream,
                           ImportOptions importOptions,
                           ContentImportListener importListener)
                    throws javax.jcr.RepositoryException,
                           java.io.IOException
        Import content into the repository by parsing the provided content stream.
        Parameters:
        parent - the root node for the imported content
        name - the name of the imported content. Becomes the node name. If null, imports in PARENT_NODE import mode.
        contentType - the content type of the content stream
        contentStream - the content stream to be imported
        importOptions - (optional) additional options to control the import
        importListener - (optional) listener to receive callbacks for each change in the import
        Throws:
        javax.jcr.RepositoryException - If anything goes wrong accessing the JCR repository
        java.io.IOException - If anything goes wrong reading or writing the content