public class XMLImporterComponent extends DefaultComponent implements XMLImporterService
XMLImporterService
Modifier and Type | Field and Description |
---|---|
protected List<AttributeConfigDescriptor> |
attributeConfigs |
protected List<DocConfigDescriptor> |
docConfigs |
lastModified
Constructor and Description |
---|
XMLImporterComponent() |
activate, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterContribution, unregisterExtension
protected List<DocConfigDescriptor> docConfigs
protected List<AttributeConfigDescriptor> attributeConfigs
public XMLImporterComponent()
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
protected ParserConfigRegistry getRegistry()
public List<DocumentModel> importDocuments(DocumentModel root, File xmlFile) throws IOException
XMLImporterService
DocumentModel
in Nuxeo from an XML or a Zip archive.importDocuments
in interface XMLImporterService
root
- target container DocumentModel
xmlFile
- source file, can be XML or Zip with XML indexIOException
public List<DocumentModel> importDocuments(DocumentModel root, File xmlFile, boolean deferSave) throws IOException
XMLImporterService
DocumentModel
in Nuxeo from an XML or a Zip archive.importDocuments
in interface XMLImporterService
root
- target container DocumentModel
xmlFile
- source file, can be XML or Zip with XML indexdeferSave
- if true, do not save docs in docsStack during processing, save them after full parse of xml docIOException
public List<DocumentModel> importDocuments(DocumentModel root, InputStream xmlStream) throws IOException
XMLImporterService
DocumentModel
in Nuxeo from an XML Stream.importDocuments
in interface XMLImporterService
root
- target container DocumentModel
xmlStream
- stream source for Xml contntIOException
public List<DocumentModel> importDocuments(DocumentModel root, InputStream xmlStream, Map<String,Object> mvelContext) throws IOException
XMLImporterService
XMLImporterService.importDocuments(DocumentModel, InputStream)
with map injected into mvel contexts used during
parsingimportDocuments
in interface XMLImporterService
root
- target container DocumentModel
xmlStream
- stream source for Xml contntmvelContext
- Context added each time a mvel expression is resolvedIOException
public List<DocumentModel> importDocuments(DocumentModel root, File source, Map<String,Object> mvelContext) throws IOException
XMLImporterService
XMLImporterService.importDocuments(DocumentModel, File)
with map injected into mvel contexts used during parsingimportDocuments
in interface XMLImporterService
root
- target container DocumentModel
source
- source file, can be XML or Zip with XML indexmvelContext
- Context added each time a mvel expression is resolvedIOException
public List<DocumentModel> importDocuments(DocumentModel root, File source, Map<String,Object> mvelContext, boolean deferSave) throws IOException
importDocuments
in interface XMLImporterService
IOException
Copyright © 2015 Nuxeo SA. All rights reserved.