Constructor and Description |
---|
WorkspaceImporter(Path parentPath,
WorkspaceImpl wsp,
SessionContext sessionContext,
int uuidBehavior)
Creates a new
WorkspaceImporter instance. |
WorkspaceImporter(Path parentPath,
WorkspaceImpl wsp,
SessionContext sessionContext,
int uuidBehavior,
ImportConfig config)
Creates a new
WorkspaceImporter instance. |
Modifier and Type | Method and Description |
---|---|
void |
end()
Called once at the end of the content import.
|
void |
endNode(NodeInfo nodeInfo)
Called to end the import of a node.
|
protected void |
postProcessNode(NodeState node)
Post-process imported node (initialize properties with special
semantics etc.)
|
protected void |
processProperty(NodeState node,
PropInfo pInfo) |
protected NodeState |
resolveUUIDConflict(NodeState parent,
NodeState conflicting,
NodeInfo nodeInfo) |
void |
start()
Called once at the beginning of the content import.
|
void |
startNode(NodeInfo nodeInfo,
List<PropInfo> propInfos)
Called to start the import of a node.
|
public WorkspaceImporter(Path parentPath, WorkspaceImpl wsp, SessionContext sessionContext, int uuidBehavior) throws javax.jcr.PathNotFoundException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.RepositoryException
WorkspaceImporter
instance.parentPath
- target path where to add the imported subtreewsp
- the workspace to operate onsessionContext
- the session contextuuidBehavior
- flag that governs how incoming UUIDs are handledjavax.jcr.PathNotFoundException
- if no node exists at
parentPath
or if the
current session is not granted read
access.javax.jcr.nodetype.ConstraintViolationException
- if the node at
parentPath
is protectedjavax.jcr.version.VersionException
- if the node at
parentPath
is not
checked-outjavax.jcr.lock.LockException
- if a lock prevents the addition of
the subtreejavax.jcr.RepositoryException
- if another error occurspublic WorkspaceImporter(Path parentPath, WorkspaceImpl wsp, SessionContext sessionContext, int uuidBehavior, ImportConfig config) throws javax.jcr.PathNotFoundException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.RepositoryException
WorkspaceImporter
instance.parentPath
- target path where to add the imported subtreewsp
- the workspace to operate onsessionContext
- the session contextuuidBehavior
- flag that governs how incoming UUIDs are handledconfig
- import configuration.javax.jcr.PathNotFoundException
- if no node exists at
parentPath
or if the
current session is not granted read
access.javax.jcr.nodetype.ConstraintViolationException
- if the node at
parentPath
is protectedjavax.jcr.version.VersionException
- if the node at
parentPath
is not
checked-outjavax.jcr.lock.LockException
- if a lock prevents the addition of
the subtreejavax.jcr.RepositoryException
- if another error occursprotected NodeState resolveUUIDConflict(NodeState parent, NodeState conflicting, NodeInfo nodeInfo) throws javax.jcr.RepositoryException
parent
- parent node stateconflicting
- conflicting node statenodeInfo
- the node infojavax.jcr.RepositoryException
- if an error occursprotected void postProcessNode(NodeState node) throws javax.jcr.RepositoryException
node
- the node statejavax.jcr.RepositoryException
- if an error occursprotected void processProperty(NodeState node, PropInfo pInfo) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void start() throws javax.jcr.RepositoryException
public void startNode(NodeInfo nodeInfo, List<PropInfo> propInfos) throws javax.jcr.RepositoryException
Importer.endNode(NodeInfo)
call is made with the
same node information.public void endNode(NodeInfo nodeInfo) throws javax.jcr.RepositoryException
Importer.startNode(NodeInfo, List)
call with the stame 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.
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.