Interface Merger


public interface Merger
A merger, which is responsible to handle UUID collision when encountered.
  • Method Details

    • deleteBeforePartialImport

      default boolean deleteBeforePartialImport()
      Returns true if all existing objects concerned by the Archiver must be deleted before importing
      Returns:
      true if existing objects must be deleted
    • needsMerge

      boolean needsMerge(String id)
      Returns true if the object with the given id needs to be merged
      Parameters:
      id - The id
      Returns:
      true if the object with the given id needs to be merged
    • merge

      Merges the existing object with given id
      Parameters:
      id - The id
      Returns:
      What the caller must do after this method is finished.
      Throws:
      MergeException - If the merge cannot be done. This exception must propagate and stop the global import process.
    • getImportUuidBehavior

      Gets the UUID Behavior for JCR import
      See ImportUUIDBehavior and Session.importXML(String, java.io.InputStream, int)
      Returns:
      the UUID Behavior
    • jcrImportXml

      default void jcrImportXml(javax.jcr.Session session, String parentAbsPath, InputStream in) throws javax.jcr.RepositoryException, IOException
      Does a JCR import from the XML read from the given InputStream
      The save operation must be made by the caller.
      The InputStream must be closed by the caller.
      Default implementation uses Session.importXML(java.lang.String, java.io.InputStream, int)
      Parameters:
      session - The JCR Session
      parentAbsPath - the absolute path of the node below which the deserialized subgraph is added.
      in - The InputStream from which the XML to be deserialized is read.
      Throws:
      javax.jcr.RepositoryException - if another error occurs.
      IOException - if an error during an I/O operation occurs.