Package org.nuxeo.ecm.core.io.impl
Class AbstractDocumentModelWriter
java.lang.Object
org.nuxeo.ecm.core.io.impl.AbstractDocumentWriter
org.nuxeo.ecm.core.io.impl.AbstractDocumentModelWriter
- All Implemented Interfaces:
DocumentWriter
- Direct Known Subclasses:
DocumentModelInjector
,DocumentModelUpdater
,DocumentModelWriter
- Author:
- Bogdan Stefanescu
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractDocumentModelWriter
(CoreSession session, String parentPath) protected
AbstractDocumentModelWriter
(CoreSession session, String parentPath, int saveInterval) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
void
close()
Closes the writer.protected DocumentModel
createDocument
(ExportedDocument xdoc, Path toPath) Creates a new document given its path.protected static Class<?>
getFieldClass
(Type fieldType) int
protected boolean
loadFacetsInfo
(DocumentModel docModel, org.dom4j.Document doc) protected static void
loadSchema
(ExportedDocument xdoc, Schema schema, DocumentModel doc, org.dom4j.Element schemaElement) protected void
loadSchemas
(ExportedDocument xdoc, DocumentModel docModel, org.dom4j.Document doc) protected void
loadSystemInfo
(DocumentModel docModel, org.dom4j.Document doc) protected void
void
setSaveInterval
(int saveInterval) protected DocumentModel
updateDocument
(ExportedDocument xdoc, DocumentModel doc) Updates an existing document.Methods inherited from class org.nuxeo.ecm.core.io.impl.AbstractDocumentWriter
createCompactFormat, createPrettyPrint, write, write, write
-
Field Details
-
session
-
root
-
unsavedDocuments
protected int unsavedDocuments
-
-
Constructor Details
-
AbstractDocumentModelWriter
- Parameters:
session
- the session to the repository where to writeparentPath
- where to write the tree. this document will be used as the parent of all top level documents passed as input. Note that you may have
-
AbstractDocumentModelWriter
-
-
Method Details
-
getTranslationMap
-
saveIfNeeded
protected void saveIfNeeded() -
close
public void close()Description copied from interface:DocumentWriter
Closes the writer. -
createDocument
Creates a new document given its path.The parent of this document is assumed to exist.
- Parameters:
xdoc
- the document containingtoPath
- the path of the doc to create
-
beforeCreateDocument
- Since:
- 8.4
-
updateDocument
Updates an existing document. -
beforeSaveDocument
- Since:
- 8.4
-
getSaveInterval
public int getSaveInterval() -
setSaveInterval
public void setSaveInterval(int saveInterval) -
loadFacetsInfo
-
loadSystemInfo
-
loadSchemas
-
loadSchema
protected static void loadSchema(ExportedDocument xdoc, Schema schema, DocumentModel doc, org.dom4j.Element schemaElement) -
getFieldClass
-