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
public class XMLImporterComponent extends DefaultComponent implements XMLImporterService
Main Nuxeo Runtime component managing extension points and exposingXMLImporterService
- Author:
- Tiry
-
-
Field Summary
Fields Modifier and Type Field Description protected List<AttributeConfigDescriptor>
attributeConfigs
protected List<DocConfigDescriptor>
docConfigs
-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description XMLImporterComponent()
-
Method Summary
-
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
applicationStarted, getApplicationStartedOrder
-
-
-
-
Field Detail
-
docConfigs
protected List<DocConfigDescriptor> docConfigs
-
attributeConfigs
protected List<AttributeConfigDescriptor> attributeConfigs
-
-
Method Detail
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
registerContribution
in classDefaultComponent
-
getConfigRegistry
protected ParserConfigRegistry getConfigRegistry()
-
importDocuments
public List<DocumentModel> importDocuments(DocumentModel root, File xmlFile) 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 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 IOException
Description 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 IOException
Description 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
-
-