Class ImporterImpl

java.lang.Object
org.apache.jackrabbit.oak.jcr.xml.ImporterImpl
All Implemented Interfaces:
Importer

public class ImporterImpl extends Object implements Importer
  • Constructor Details

    • ImporterImpl

      public ImporterImpl(String absPath, SessionContext sessionContext, Root root, int uuidBehavior, boolean isWorkspaceImport) throws RepositoryException
      Creates a new importer instance.
      Parameters:
      absPath - The absolute JCR paths such as passed to the JCR call.
      sessionContext - The context of the editing session
      root - The write Root, which in case of a workspace import is different from the Root associated with the editing session.
      uuidBehavior - The uuid behavior
      isWorkspaceImport - true if this is a workspace import, false otherwise.
      Throws:
      RepositoryException - If the initial validation of the path or the state of target node/session fails.
  • Method Details

    • start

      public void start() throws RepositoryException
      Description copied from interface: Importer
      Called once at the beginning of the content import.
      Specified by:
      start in interface Importer
      Throws:
      RepositoryException - on a repository error
    • startNode

      public void startNode(@NotNull @NotNull NodeInfo nodeInfo, @NotNull @NotNull List<PropInfo> propInfos) throws RepositoryException
      Description copied from interface: Importer
      Called to start the import of a node. Information about the imported node and all it's properties are passed as arguments. Possible child nodes are imported recursively using this same method until a Importer.endNode(NodeInfo) call is made with the same node information.
      Specified by:
      startNode in interface Importer
      Parameters:
      nodeInfo - information about the node being imported
      propInfos - information about the properties being imported (list of PropInfo instances)
      Throws:
      RepositoryException - on a repository error
    • endNode

      public void endNode(@NotNull @NotNull NodeInfo nodeInfo) throws RepositoryException
      Description copied from interface: Importer
      Called to end the import of a node. This method is called after a Importer.startNode(NodeInfo, List) call with the same node information and after all the possible child nodes have been imported with respective startNode/endNode calls.

      Just like XML elements, the startNode/endNode calls are guaranteed to be properly nested and complete.

      Specified by:
      endNode in interface Importer
      Parameters:
      nodeInfo - information about the node being imported
      Throws:
      RepositoryException - on a repository error
    • end

      public void end() throws RepositoryException
      Description copied from interface: Importer
      Called once at the end of the content import.
      Specified by:
      end in interface Importer
      Throws:
      RepositoryException - on a repository error