Class ImporterImpl
- java.lang.Object
-
- org.apache.jackrabbit.oak.jcr.xml.ImporterImpl
-
-
Constructor Summary
Constructors Constructor Description ImporterImpl(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 List<PropInfo> propInfos)
Called to start the import of a node.
-
-
-
Constructor Detail
-
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 sessionroot
- The writeRoot
, which in case of a workspace import is different from theRoot
associated with the editing session.uuidBehavior
- The uuid behaviorisWorkspaceImport
-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
-
start
public void start() throws RepositoryException
Description copied from interface:Importer
Called once at the beginning of the content import.- Specified by:
start
in interfaceImporter
- 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 aImporter.endNode(NodeInfo)
call is made with the same node information.- Specified by:
startNode
in interfaceImporter
- Parameters:
nodeInfo
- information about the node being importedpropInfos
- information about the properties being imported (list ofPropInfo
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 aImporter.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 interfaceImporter
- 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 interfaceImporter
- Throws:
RepositoryException
- on a repository error
-
-