Interface IOManager

    • Method Detail

      • addAdapter

        void addAdapter​(String name,
                        IOResourceAdapter adapter)
        Adds an adapter with given name and definition.
      • removeAdapter

        void removeAdapter​(String name)
        Removes adapter with given name.
      • importDocumentsAndResources

        void importDocumentsAndResources​(InputStream in,
                                         String repo,
                                         DocumentRef root)
                                  throws IOException
        Import document and resources described by given input stream at given document location.
        Parameters:
        in - stream representing the documents and resources to import. Can be a zip file of a group of export files. The service is responsible for unzipping and redirecting import to specific import services.
        repo - the repository name.
        root - Optional location of document that must be taken as root of the import (can be null).
        Throws:
        IOException
      • exportDocumentsAndResources

        void exportDocumentsAndResources​(OutputStream out,
                                         String repo,
                                         Collection<DocumentRef> sources,
                                         boolean recurse,
                                         String format,
                                         Collection<String> ioAdapters)
                                  throws IOException
        Export documents and resources.
        Parameters:
        out - stream that can be turned into a zip holding a group of file for each additional resources types.
        repo - TODO
        sources - locations of documents to export.
        recurse - recurse into sources children
        format - export format. XXX see what format is actually accepted.
        ioAdapters - list of adapters to use for additional resources.
        Throws:
        IOException
      • copyDocumentsAndResources

        Collection<DocumentRef> copyDocumentsAndResources​(String repo,
                                                          Collection<DocumentRef> sources,
                                                          DocumentLocation targetLocation,
                                                          Collection<String> ioAdapters)
        Copy documents and resources to another location (on a same machine).
        Parameters:
        repo - the initial repository name.
        sources - locations of documents to export.
        targetLocation - location of the document where copies must be placed.
        ioAdapters - list of adapters to use for additional resources.
        Returns:
        the list of copied documents references.