|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dna.jcr.JcrTools
public class JcrTools

Utility methods for working with JCR nodes.
| Constructor Summary | |
|---|---|
JcrTools()
|
|
| Method Summary | |
|---|---|
javax.jcr.Node |
findOrCreateChild(javax.jcr.Node parent,
String name)
Get or create a node with the specified node under the specified parent node. |
javax.jcr.Node |
findOrCreateChild(javax.jcr.Node parent,
String name,
String nodeType)
Get or create a node with the specified node and node type under the specified parent node. |
javax.jcr.Node |
findOrCreateNode(javax.jcr.Node parentNode,
String path,
String defaultNodeType,
String finalNodeType)
Get or create a node at the specified path. |
javax.jcr.Node |
findOrCreateNode(javax.jcr.Session session,
String path)
Get or create a node at the specified path. |
javax.jcr.Node |
findOrCreateNode(javax.jcr.Session session,
String path,
String nodeType)
Get or create a node at the specified path and node type. |
javax.jcr.Node |
findOrCreateNode(javax.jcr.Session session,
String path,
String defaultNodeType,
String finalNodeType)
Get or create a node at the specified path. |
javax.jcr.Node |
getNode(javax.jcr.Node node,
String relativePath,
boolean required)
Get the node under a specified node at a location defined by the specified relative path. |
String |
getReadable(javax.jcr.Node node)
Get the readable string form for a specified node. |
int |
removeAllChildren(javax.jcr.Node node)
Remove all children from the specified node |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JcrTools()
| Method Detail |
|---|
public int removeAllChildren(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node -
javax.jcr.RepositoryException
IllegalArgumentException - if the node argument is null
public javax.jcr.Node getNode(javax.jcr.Node node,
String relativePath,
boolean required)
throws javax.jcr.RepositoryException
node - a parent node from which to obtain a node relative to. may not be nullrelativePath - the path of the desired node. may not be nullrequired - true if node is required to exist under the given node.
javax.jcr.RepositoryException
IllegalArgumentException - if the node, relativePath or problems argument is nullpublic String getReadable(javax.jcr.Node node)
node - the node to obtain the readable string form. may be null
public javax.jcr.Node findOrCreateNode(javax.jcr.Session session,
String path)
throws javax.jcr.RepositoryException
session - the JCR session. may not be nullpath - the path of the desired node to be found or created. may not be null
javax.jcr.RepositoryException
IllegalArgumentException - if either the session or path argument is null
public javax.jcr.Node findOrCreateNode(javax.jcr.Session session,
String path,
String nodeType)
throws javax.jcr.RepositoryException
session - the JCR session. may not be nullpath - the path of the desired node to be found or created. may not be nullnodeType - the node type. may be null
javax.jcr.RepositoryException
IllegalArgumentException - if either the session or path argument is null
public javax.jcr.Node findOrCreateNode(javax.jcr.Session session,
String path,
String defaultNodeType,
String finalNodeType)
throws javax.jcr.RepositoryException
session - the JCR session. may not be nullpath - the path of the desired node to be found or created. may not be nulldefaultNodeType - the default node type. may be nullfinalNodeType - the optional final node type. may be null
javax.jcr.RepositoryException
IllegalArgumentException - if either the session or path argument is null
public javax.jcr.Node findOrCreateNode(javax.jcr.Node parentNode,
String path,
String defaultNodeType,
String finalNodeType)
throws javax.jcr.RepositoryException
parentNode - the parent node. may not be nullpath - the path of the desired child node. may not be nulldefaultNodeType - the default node type. may be nullfinalNodeType - the optional final node type. may be null
javax.jcr.RepositoryException
IllegalArgumentException - if either the parentNode or path argument is null
public javax.jcr.Node findOrCreateChild(javax.jcr.Node parent,
String name)
throws javax.jcr.RepositoryException
parent - the parent node. may not be nullname - the name of the child node. may not be null
javax.jcr.RepositoryException
IllegalArgumentException - if either the parent or name argument is null
public javax.jcr.Node findOrCreateChild(javax.jcr.Node parent,
String name,
String nodeType)
throws javax.jcr.RepositoryException
parent - the parent node. may not be nullname - the name of the child node. may not be nullnodeType - the node type. may be null
javax.jcr.RepositoryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||