Package org.nuxeo.ecm.platform.io.impl
Class IOManagerImpl
java.lang.Object
org.nuxeo.ecm.platform.io.impl.IOManagerImpl
- All Implemented Interfaces:
Serializable,IOManager
IOManager implementation
- Author:
- Anahide Tchertchian
- See Also:
-
Field Summary
FieldsFields inherited from interface org.nuxeo.ecm.platform.io.api.IOManager
DOCUMENTS_ADAPTER_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdapter(String name, IOResourceAdapter adapter) Adds an adapter with given name and definition.copyDocumentsAndResources(String repo, Collection<DocumentRef> sources, DocumentLocation targetLocation, Collection<String> ioAdapters) Copy documents and resources to another location (on a same machine).voidexportDocumentsAndResources(OutputStream out, String repo, String format, Collection<String> ioAdapters, DocumentReader customDocReader) voidexportDocumentsAndResources(OutputStream out, String repo, Collection<DocumentRef> sources, boolean recurse, String format, Collection<String> ioAdapters) Export documents and resources.getAdapter(String name) Returns the adapter with given name.voidimportDocumentsAndResources(InputStream in, String repo, DocumentRef root) Import document and resources described by given input stream at given document location.voidimportDocumentsAndResources(InputStream in, String repo, DocumentRef root, DocumentWriter customDocWriter) voidimportFromStream(InputStream in, DocumentLocation targetLocation, String docReaderFactoryClassName, Map<String, Object> rFactoryParams, String docWriterFactoryClassName, Map<String, Object> wFactoryParams) voidremoveAdapter(String name) Removes adapter with given name.
-
Field Details
-
adaptersRegistry
-
-
Constructor Details
-
IOManagerImpl
public IOManagerImpl()
-
-
Method Details
-
getAdapter
Description copied from interface:IOManagerReturns the adapter with given name.- Specified by:
getAdapterin interfaceIOManager
-
addAdapter
Description copied from interface:IOManagerAdds an adapter with given name and definition.- Specified by:
addAdapterin interfaceIOManager
-
removeAdapter
Description copied from interface:IOManagerRemoves adapter with given name.- Specified by:
removeAdapterin interfaceIOManager
-
exportDocumentsAndResources
public void exportDocumentsAndResources(OutputStream out, String repo, String format, Collection<String> ioAdapters, DocumentReader customDocReader) throws IOException - Throws:
IOException
-
exportDocumentsAndResources
public void exportDocumentsAndResources(OutputStream out, String repo, Collection<DocumentRef> sources, boolean recurse, String format, Collection<String> ioAdapters) throws IOException Description copied from interface:IOManagerExport documents and resources.- Specified by:
exportDocumentsAndResourcesin interfaceIOManager- Parameters:
out- stream that can be turned into a zip holding a group of file for each additional resources types.repo- TODOsources- locations of documents to export.recurse- recurse into sources childrenformat- export format. XXX see what format is actually accepted.ioAdapters- list of adapters to use for additional resources.- Throws:
IOException
-
importDocumentsAndResources
public void importDocumentsAndResources(InputStream in, String repo, DocumentRef root) throws IOException Description copied from interface:IOManagerImport document and resources described by given input stream at given document location.- Specified by:
importDocumentsAndResourcesin interfaceIOManager- 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
-
importDocumentsAndResources
public void importDocumentsAndResources(InputStream in, String repo, DocumentRef root, DocumentWriter customDocWriter) throws IOException - Throws:
IOException
-
copyDocumentsAndResources
public Collection<DocumentRef> copyDocumentsAndResources(String repo, Collection<DocumentRef> sources, DocumentLocation targetLocation, Collection<String> ioAdapters) Description copied from interface:IOManagerCopy documents and resources to another location (on a same machine).- Specified by:
copyDocumentsAndResourcesin interfaceIOManager- 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.
-
importFromStream
public void importFromStream(InputStream in, DocumentLocation targetLocation, String docReaderFactoryClassName, Map<String, Object> rFactoryParams, String docWriterFactoryClassName, Map<String, Object> wFactoryParams) - Specified by:
importFromStreamin interfaceIOManager
-