| Constructor and Description |
|---|
SessionImporter(NodeImpl importTargetNode,
SessionImpl session,
int uuidBehavior)
Creates a new
SessionImporter instance. |
SessionImporter(NodeImpl importTargetNode,
SessionImpl session,
int uuidBehavior,
ImportConfig config)
Creates a new
SessionImporter instance. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkPermission(NodeImpl parent,
Name nodeName)
make sure the editing session is allowed create nodes with a
specified node type (and ev.
|
protected NodeImpl |
createNode(NodeImpl parent,
Name nodeName,
Name nodeTypeName,
Name[] mixinNames,
NodeId id) |
protected void |
createProperty(NodeImpl node,
PropInfo pInfo,
QPropertyDefinition def) |
void |
end()
Called once at the end of the content import.
|
void |
endNode(NodeInfo nodeInfo)
Called to end the import of a node.
|
protected NodeImpl |
resolveUUIDConflict(NodeImpl parent,
NodeId conflictingId,
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 SessionImporter(NodeImpl importTargetNode, SessionImpl session, int uuidBehavior)
SessionImporter instance.importTargetNode - the target nodesession - sessionuuidBehavior - any of the constants declared by
ImportUUIDBehaviorpublic SessionImporter(NodeImpl importTargetNode, SessionImpl session, int uuidBehavior, ImportConfig config)
SessionImporter instance.importTargetNode - the target nodesession - sessionuuidBehavior - the desired uuid behavior as defined
by ImportUUIDBehavior.config - protected void checkPermission(NodeImpl parent, Name nodeName) throws RepositoryException
IMPORT_UUID_COLLISION_REPLACE_EXISTING.parent - parent nodenodeName - the nameRepositoryException - if an error occursprotected NodeImpl createNode(NodeImpl parent, Name nodeName, Name nodeTypeName, Name[] mixinNames, NodeId id) throws RepositoryException
RepositoryExceptionprotected void createProperty(NodeImpl node, PropInfo pInfo, QPropertyDefinition def) throws RepositoryException
RepositoryExceptionprotected NodeImpl resolveUUIDConflict(NodeImpl parent, NodeId conflictingId, NodeInfo nodeInfo) throws RepositoryException
RepositoryExceptionpublic void start()
throws RepositoryException
start in interface ImporterRepositoryException - 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 ImporternodeInfo - 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 ImporternodeInfo - information about the node being importedRepositoryException - on a repository errorpublic void end()
throws RepositoryException
end in interface ImporterRepositoryException - on a repository errorCopyright © 2004–2022 The Apache Software Foundation. All rights reserved.