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

public abstract class AbstractDocumentModelWriter extends AbstractDocumentWriter
Author:
Bogdan Stefanescu
  • Field Details

    • session

      protected CoreSession session
    • root

      protected Path root
    • unsavedDocuments

      protected int unsavedDocuments
  • Constructor Details

    • AbstractDocumentModelWriter

      protected AbstractDocumentModelWriter(CoreSession session, String parentPath)
      Parameters:
      session - the session to the repository where to write
      parentPath - 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

      protected AbstractDocumentModelWriter(CoreSession session, String parentPath, int saveInterval)
  • Method Details

    • getTranslationMap

      public Map<DocumentLocation,DocumentLocation> getTranslationMap()
    • saveIfNeeded

      protected void saveIfNeeded()
    • close

      public void close()
      Description copied from interface: DocumentWriter
      Closes the writer.
    • createDocument

      protected DocumentModel createDocument(ExportedDocument xdoc, Path toPath)
      Creates a new document given its path.

      The parent of this document is assumed to exist.

      Parameters:
      xdoc - the document containing
      toPath - the path of the doc to create
    • beforeCreateDocument

      protected void beforeCreateDocument(DocumentModel doc)
      Since:
      8.4
    • updateDocument

      protected DocumentModel updateDocument(ExportedDocument xdoc, DocumentModel doc)
      Updates an existing document.
    • beforeSaveDocument

      protected void beforeSaveDocument(DocumentModel doc)
      Since:
      8.4
    • getSaveInterval

      public int getSaveInterval()
    • setSaveInterval

      public void setSaveInterval(int saveInterval)
    • loadFacetsInfo

      protected boolean loadFacetsInfo(DocumentModel docModel, org.dom4j.Document doc)
    • loadSystemInfo

      protected void loadSystemInfo(DocumentModel docModel, org.dom4j.Document doc)
    • loadSchemas

      protected void loadSchemas(ExportedDocument xdoc, DocumentModel docModel, org.dom4j.Document doc)
    • loadSchema

      protected static void loadSchema(ExportedDocument xdoc, Schema schema, DocumentModel doc, org.dom4j.Element schemaElement)
    • getFieldClass

      protected static Class<?> getFieldClass(Type fieldType)