Class XMLImporterComponent
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.ecm.platform.importer.xml.parser.XMLImporterComponent
- All Implemented Interfaces:
XMLImporterService
,Adaptable
,Component
,Extensible
,TimestampedService
Main Nuxeo Runtime component managing extension points and exposing
XMLImporterService
- Author:
- Tiry
-
Field Summary
Modifier and TypeFieldDescriptionprotected List<AttributeConfigDescriptor>
protected List<DocConfigDescriptor>
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ParserConfigRegistry
importDocuments
(DocumentModel root, File xmlFile) ImportsDocumentModel
in Nuxeo from an XML or a Zip archive.importDocuments
(DocumentModel root, File xmlFile, boolean deferSave) ImportsDocumentModel
in Nuxeo from an XML or a Zip archive.importDocuments
(DocumentModel root, File source, Map<String, Object> mvelContext) Same asXMLImporterService.importDocuments(DocumentModel, File)
with map injected into mvel contexts used during parsingimportDocuments
(DocumentModel root, File source, Map<String, Object> mvelContext, boolean deferSave) importDocuments
(DocumentModel root, InputStream xmlStream) ImportsDocumentModel
in Nuxeo from an XML Stream.importDocuments
(DocumentModel root, InputStream xmlStream, Map<String, Object> mvelContext) Same asXMLImporterService.importDocuments(DocumentModel, InputStream)
with map injected into mvel contexts used during parsingvoid
registerContribution
(Object contribution, String extensionPoint, ComponentInstance contributor) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterContribution, unregisterExtension
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
docConfigs
-
attributeConfigs
-
-
Constructor Details
-
XMLImporterComponent
public XMLImporterComponent()
-
-
Method Details
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
registerContribution
in classDefaultComponent
-
getConfigRegistry
-
importDocuments
Description copied from interface:XMLImporterService
ImportsDocumentModel
in Nuxeo from an XML or a Zip archive.- Specified by:
importDocuments
in interfaceXMLImporterService
- Parameters:
root
- target containerDocumentModel
xmlFile
- source file, can be XML or Zip with XML index- Throws:
IOException
-
importDocuments
public List<DocumentModel> importDocuments(DocumentModel root, File xmlFile, boolean deferSave) throws IOException Description copied from interface:XMLImporterService
ImportsDocumentModel
in Nuxeo from an XML or a Zip archive.- Specified by:
importDocuments
in interfaceXMLImporterService
- Parameters:
root
- target containerDocumentModel
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 doc- Throws:
IOException
-
importDocuments
public List<DocumentModel> importDocuments(DocumentModel root, InputStream xmlStream) throws IOException Description copied from interface:XMLImporterService
ImportsDocumentModel
in Nuxeo from an XML Stream.- Specified by:
importDocuments
in interfaceXMLImporterService
- Parameters:
root
- target containerDocumentModel
xmlStream
- stream source for Xml contnt- Throws:
IOException
-
importDocuments
public List<DocumentModel> importDocuments(DocumentModel root, InputStream xmlStream, Map<String, Object> mvelContext) throws IOExceptionDescription copied from interface:XMLImporterService
Same asXMLImporterService.importDocuments(DocumentModel, InputStream)
with map injected into mvel contexts used during parsing- Specified by:
importDocuments
in interfaceXMLImporterService
- Parameters:
root
- target containerDocumentModel
xmlStream
- stream source for Xml contntmvelContext
- Context added each time a mvel expression is resolved- Throws:
IOException
-
importDocuments
public List<DocumentModel> importDocuments(DocumentModel root, File source, Map<String, Object> mvelContext) throws IOExceptionDescription copied from interface:XMLImporterService
Same asXMLImporterService.importDocuments(DocumentModel, File)
with map injected into mvel contexts used during parsing- Specified by:
importDocuments
in interfaceXMLImporterService
- Parameters:
root
- target containerDocumentModel
source
- source file, can be XML or Zip with XML indexmvelContext
- Context added each time a mvel expression is resolved- Throws:
IOException
-
importDocuments
public List<DocumentModel> importDocuments(DocumentModel root, File source, Map<String, Object> mvelContext, boolean deferSave) throws IOException- Specified by:
importDocuments
in interfaceXMLImporterService
- Throws:
IOException
-