Class ImporterImpl

  • All Implemented Interfaces:
    Importer

    public class ImporterImpl
    extends java.lang.Object
    implements Importer
    • Constructor Summary

      Constructors 
      Constructor Description
      ImporterImpl​(java.lang.String absPath, SessionContext sessionContext, Root root, int uuidBehavior, boolean isWorkspaceImport)
      Creates a new importer instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void end()
      Called once at the end of the content import.
      void endNode​(@NotNull NodeInfo nodeInfo)
      Called to end the import of a node.
      void start()
      Called once at the beginning of the content import.
      void startNode​(@NotNull NodeInfo nodeInfo, @NotNull java.util.List<PropInfo> propInfos)
      Called to start the import of a node.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImporterImpl

        public ImporterImpl​(java.lang.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 Detail

      • startNode

        public void startNode​(@NotNull
                              @NotNull NodeInfo nodeInfo,
                              @NotNull
                              @NotNull java.util.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