public class DeepNodeCreator extends Object
Constructor and Description |
---|
DeepNodeCreator() |
Modifier and Type | Method and Description |
---|---|
javax.jcr.Node |
deepCreateNode(String path,
javax.jcr.Session session,
String nodeType)
Create a node, also creating parent nodes as needed
|
protected String |
getNodeType(javax.jcr.Node parent,
String childPath,
String suggestedNodeType)
Can be overridden to return a specific nodetype to use at a given path.
|
protected void |
nodeCreated(javax.jcr.Node n)
Can be overridden to customize the created nodes, add mixins etc.
|
public javax.jcr.Node deepCreateNode(String path, javax.jcr.Session session, String nodeType) throws javax.jcr.RepositoryException
path
- Path of the node to createsession
- Used to create nodesnodeType
- Node type of created nodes, can be
overridden via getNodeType(javax.jcr.Node, java.lang.String, java.lang.String)
javax.jcr.RepositoryException
- In case of problemsprotected String getNodeType(javax.jcr.Node parent, String childPath, String suggestedNodeType) throws javax.jcr.RepositoryException
parent
- the parent of the node that is being createdchildPath
- the path of the child that is being createdsuggestedNodeType
- the nodeType value passed to deepCreateNode
javax.jcr.RepositoryException
protected void nodeCreated(javax.jcr.Node n) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.