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
ImportUUIDBehavior
public 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 javax.jcr.RepositoryException
IMPORT_UUID_COLLISION_REPLACE_EXISTING
.parent
- parent nodenodeName
- the namejavax.jcr.RepositoryException
- if an error occursprotected NodeImpl createNode(NodeImpl parent, Name nodeName, Name nodeTypeName, Name[] mixinNames, NodeId id) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected void createProperty(NodeImpl node, PropInfo pInfo, QPropertyDefinition def) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected NodeImpl resolveUUIDConflict(NodeImpl parent, NodeId conflictingId, NodeInfo nodeInfo) 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.