Class DocumentModelUpdater
- java.lang.Object
-
- org.nuxeo.ecm.core.io.impl.AbstractDocumentWriter
-
- org.nuxeo.ecm.core.io.impl.AbstractDocumentModelWriter
-
- org.nuxeo.ecm.core.io.impl.plugins.DocumentModelUpdater
-
- All Implemented Interfaces:
DocumentWriter
public class DocumentModelUpdater extends AbstractDocumentModelWriter
A writer that only updates existing documents. The doc ID is used to identity documents. The imported tree structure is ignored.- Author:
- Bogdan Stefanescu
-
-
Field Summary
-
Fields inherited from class org.nuxeo.ecm.core.io.impl.AbstractDocumentModelWriter
root, session, unsavedDocuments
-
-
Constructor Summary
Constructors Constructor Description DocumentModelUpdater(CoreSession session, String parentPath)
DocumentModelUpdater(CoreSession session, String parentPath, int saveInterval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentTranslationMap
write(ExportedDocument xdoc)
Writes a single document.-
Methods inherited from class org.nuxeo.ecm.core.io.impl.AbstractDocumentModelWriter
beforeCreateDocument, beforeSaveDocument, close, createDocument, getFieldClass, getSaveInterval, getTranslationMap, loadFacetsInfo, loadSchema, loadSchemas, loadSystemInfo, saveIfNeeded, setSaveInterval, updateDocument
-
Methods inherited from class org.nuxeo.ecm.core.io.impl.AbstractDocumentWriter
createCompactFormat, createPrettyPrint, write, write
-
-
-
-
Constructor Detail
-
DocumentModelUpdater
public DocumentModelUpdater(CoreSession session, String parentPath)
- 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
-
DocumentModelUpdater
public DocumentModelUpdater(CoreSession session, String parentPath, int saveInterval)
-
-
Method Detail
-
write
public DocumentTranslationMap write(ExportedDocument xdoc) throws IOException
Description copied from interface:DocumentWriter
Writes a single document.- Specified by:
write
in interfaceDocumentWriter
- Specified by:
write
in classAbstractDocumentWriter
- Parameters:
xdoc
- the document to write- Returns:
- the translation map.
- Throws:
IOException
-
-