@Component public class JcrRecurser extends Object
Modifier and Type | Field and Description |
---|---|
protected Set<String> |
matchingNodes |
protected String |
path |
protected String |
pathDelim |
protected org.springmodules.jcr.JcrTemplate |
template |
Constructor and Description |
---|
JcrRecurser()
Constructor.
|
JcrRecurser(Set<String> matchingNodes)
Constructor.
|
JcrRecurser(String path)
Constructor.
|
JcrRecurser(String path,
Set<String> matchingNodes)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addMatchingNode(String nodeName)
Add matching node.
|
Set<String> |
getMatchingNodeSet()
Gets matching names.
|
String |
getPath()
Gets relative path from root to start recursing.
|
String |
getPathDelim()
Gets path delimiter.
|
javax.jcr.Node |
getStartNode(javax.jcr.Node root)
Gets start node.
|
org.springmodules.jcr.JcrTemplate |
getTemplate()
Gets JCR template.
|
void |
recurse(JcrNodeCallback callback)
Recurses through all nodes processing the callback
when a matching node is found.
|
protected void |
recurseNodes(javax.jcr.Session session,
org.springmodules.jcr.JcrConstants jcrConstants,
javax.jcr.Node node,
JcrNodeCallback callback)
Recurse nodes.
|
void |
setMatchingNodeSet(Set<String> matchingNodes)
Sets matching names.
|
void |
setPath(String path)
Sets relative path from root to start recursing.
|
void |
setPathDelim(String pathDelim)
Sets path delimiter.
|
void |
setTemplate(org.springmodules.jcr.JcrTemplate template)
Sets JCR template.
|
@Autowired protected org.springmodules.jcr.JcrTemplate template
protected String path
protected String pathDelim
public JcrRecurser()
public JcrRecurser(String path)
path
- Relative path from root to start recursing.public JcrRecurser(Set<String> matchingNodes)
matchingNodes
- Set
of node names to match for callbacks.public org.springmodules.jcr.JcrTemplate getTemplate()
public void setTemplate(org.springmodules.jcr.JcrTemplate template)
public String getPath()
public void setPath(String path)
public String getPathDelim()
public void setPathDelim(String pathDelim)
public Set<String> getMatchingNodeSet()
JcrNodeCallback
will be
run. If no specific node names are specified,
all nodes will be processed.public void setMatchingNodeSet(Set<String> matchingNodes)
JcrNodeCallback
will be
run. If no specific node names are specified,
all nodes will be processed.public void addMatchingNode(String nodeName)
public void recurse(JcrNodeCallback callback)
public javax.jcr.Node getStartNode(javax.jcr.Node root) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
protected void recurseNodes(javax.jcr.Session session, org.springmodules.jcr.JcrConstants jcrConstants, javax.jcr.Node node, JcrNodeCallback callback) throws IOException, javax.jcr.RepositoryException
IOException
javax.jcr.RepositoryException
Copyright © 2008-2014 Spring by Example. All Rights Reserved.