public class JCRNodeFinder extends Object implements NodeFinder
| Modifier and Type | Field and Description |
|---|---|
protected org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator |
hierarchyCreator |
protected org.exoplatform.services.jcr.RepositoryService |
jcrService |
protected org.exoplatform.services.jcr.ext.app.SessionProviderService |
sessionProviderService |
| Constructor and Description |
|---|
JCRNodeFinder(org.exoplatform.services.jcr.RepositoryService jcrService,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator) |
| Modifier and Type | Method and Description |
|---|---|
String |
cleanName(String name)
Align given name to current repository conventions by removing or escaping forbidden characters.
|
javax.jcr.Item |
findItem(javax.jcr.Session userSession,
String path)
Find JCR item by given path, if the path points to a symlink this method return a target node of the
link.
|
Collection<javax.jcr.Node> |
findLinked(javax.jcr.Session session,
String uuid)
Find nodes linked to given node.
|
javax.jcr.Item |
getItem(javax.jcr.Session userSession,
String path,
boolean symlinkTarget)
Return JCR item by given path.
|
javax.jcr.Node |
getUserNode(String userName)
Return user home node of given user.
|
protected final org.exoplatform.services.jcr.RepositoryService jcrService
protected final org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService
protected final org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator
public JCRNodeFinder(org.exoplatform.services.jcr.RepositoryService jcrService,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator)
public javax.jcr.Item getItem(javax.jcr.Session userSession,
String path,
boolean symlinkTarget)
throws javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
NodeFindergetItem in interface NodeFinderuserSession - Sessionpath - StringsymlinkTarget - boolean, if true and found item is a symlink node, return the symlink target
node, if false just return the item obtained from the sessionjavax.jcr.PathNotFoundException - if item not found by given pathjavax.jcr.RepositoryException - if repository error eccurspublic javax.jcr.Item findItem(javax.jcr.Session userSession,
String path)
throws javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
NodeFinderfindItem in interface NodeFinderuserSession - Sessionpath - Stringjavax.jcr.PathNotFoundException - if item not found by given pathjavax.jcr.RepositoryException - if repository error eccurspublic Collection<javax.jcr.Node> findLinked(javax.jcr.Session session, String uuid) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
findLinked in interface NodeFinderuuid - StringCollection of nodesjavax.jcr.PathNotFoundExceptionjavax.jcr.RepositoryExceptionpublic String cleanName(String name)
cleanName in interface NodeFindername - StringString cleaned namepublic javax.jcr.Node getUserNode(String userName) throws Exception
getUserNode in interface NodeFinderuserName - String with user name in organizationNode user home nodeExceptionCopyright © 2003–2016 eXo Platform SAS. All rights reserved.