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 PathNotFoundException, ConstraintViolationException, VersionException, LockException, 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 handledPathNotFoundException
- if no node exists at
parentPath
or if the
current session is not granted read
access.ConstraintViolationException
- if the node at
parentPath
is protectedVersionException
- if the node at
parentPath
is not
checked-outLockException
- if a lock prevents the addition of
the subtreeRepositoryException
- if another error occurspublic WorkspaceImporter(Path parentPath, WorkspaceImpl wsp, SessionContext sessionContext, int uuidBehavior, ImportConfig config) throws PathNotFoundException, ConstraintViolationException, VersionException, LockException, 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.PathNotFoundException
- if no node exists at
parentPath
or if the
current session is not granted read
access.ConstraintViolationException
- if the node at
parentPath
is protectedVersionException
- if the node at
parentPath
is not
checked-outLockException
- if a lock prevents the addition of
the subtreeRepositoryException
- if another error occursprotected NodeState resolveUUIDConflict(NodeState parent, NodeState conflicting, NodeInfo nodeInfo) throws RepositoryException
parent
- parent node stateconflicting
- conflicting node statenodeInfo
- the node infoRepositoryException
- if an error occursprotected void postProcessNode(NodeState node) throws RepositoryException
node
- the node stateRepositoryException
- if an error occursprotected void processProperty(NodeState node, PropInfo pInfo) throws RepositoryException
RepositoryException
public void start() throws RepositoryException
start
in interface Importer
RepositoryException
- on a repository errorpublic void startNode(NodeInfo nodeInfo, List<PropInfo> propInfos) throws RepositoryException
Importer.endNode(NodeInfo)
call is made with the
same node information.startNode
in interface Importer
nodeInfo
- information about the node being importedpropInfos
- information about the properties being imported
(list of PropInfo
instances)RepositoryException
- on a repository errorpublic void endNode(NodeInfo nodeInfo) throws 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.
endNode
in interface Importer
nodeInfo
- information about the node being importedRepositoryException
- on a repository errorpublic void end() throws RepositoryException
end
in interface Importer
RepositoryException
- on a repository errorCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.