public class JCRNodeFinder extends Object implements NodeFinder
| Modifier and Type | Field and Description |
|---|---|
protected org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator |
hierarchyCreator
The hierarchy creator.
|
protected org.exoplatform.services.jcr.RepositoryService |
jcrService
The jcr service.
|
protected org.exoplatform.services.jcr.ext.app.SessionProviderService |
sessionProviderService
The session provider service.
|
| 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)
Instantiates a new JCR node finder.
|
| 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)
jcrService - the jcr servicesessionProviderService - the session provider servicehierarchyCreator - the hierarchy creatorpublic javax.jcr.Item getItem(javax.jcr.Session userSession,
String path,
boolean symlinkTarget)
throws javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
getItem 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
findItem 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 NodeFindersession - the sessionuuid - StringCollection of nodesjavax.jcr.PathNotFoundException - the path not found exceptionjavax.jcr.RepositoryException - the repository exceptionpublic 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 nodeException - the exceptionCopyright © 2003–2017 eXo Platform SAS. All rights reserved.