public class NodeFinderImpl extends Object implements NodeFinder
| Constructor and Description |
|---|
NodeFinderImpl(org.exoplatform.services.jcr.RepositoryService repositoryService,
LinkManager linkManager) |
| Modifier and Type | Method and Description |
|---|---|
javax.jcr.Item |
getItem(javax.jcr.Session session,
String absPath)
Gets an item at the specified absolute path.
|
javax.jcr.Item |
getItem(javax.jcr.Session session,
String absPath,
boolean giveTarget)
Gets an item at the specified absolute path.
|
javax.jcr.Item |
getItem(javax.jcr.Session session,
String absPath,
boolean giveTarget,
int fromIdx,
boolean system)
Get item by absolute path
|
javax.jcr.Item |
getItem(String workspace,
String absPath)
Gets an item at the specified absolute path.
|
javax.jcr.Item |
getItem(String workspace,
String absPath,
boolean giveTarget)
Gets an item at the specified absolute path.
|
javax.jcr.Item |
getItemGiveTargetSys(String workspace,
String absPath,
boolean giveTarget,
boolean system)
Gets an item at the specified absolute path.
|
javax.jcr.Item |
getItemSys(String workspace,
String absPath,
boolean system)
Gets an item at the specified absolute path.
|
javax.jcr.Item |
getItemTarget(javax.jcr.Session session,
String absPath,
boolean giveTarget,
boolean system)
Gets an item at the specified absolute path.
|
javax.jcr.Node |
getNode(javax.jcr.Node ancestorNode,
String relativePath)
Gets a node at the relative path related to the ancestor node.
|
javax.jcr.Node |
getNode(javax.jcr.Node ancestorNode,
String relativePath,
boolean giveTarget)
Gets a node at the relative path related to the ancestor node.
|
javax.jcr.Session |
getSession(org.exoplatform.services.jcr.core.ManageableRepository manageableRepository,
String workspace)
Get session of user in given workspace and repository
|
boolean |
itemExists(javax.jcr.Session session,
String absPath)
Checks if an item exists at the specified absolute path.
|
String |
makePath(String[] splitString,
int toIdx)
Make sub path of absolute path from 0 to toIdx index
|
public NodeFinderImpl(org.exoplatform.services.jcr.RepositoryService repositoryService,
LinkManager linkManager)
public javax.jcr.Item getItem(String workspace, String absPath, boolean giveTarget) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
getItem in interface NodeFinderworkspace - The workspace name.absPath - The absolute path.giveTarget - If the item is link and giveTarget has been
set to "true", the target node will be returned.javax.jcr.PathNotFoundException - if the specified path cannot be found.javax.jcr.RepositoryException - if another error occurs.public javax.jcr.Item getItemGiveTargetSys(String workspace, String absPath, boolean giveTarget, boolean system) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
getItemGiveTargetSys in interface NodeFinderworkspace - The workspace name.absPath - The absolute path.giveTarget - If the item is link and giveTarget has been set to "true",
the target node will be returned.system - If "true", the system session is used. If "false", the user session is used.javax.jcr.PathNotFoundException - if the specified path cannot be found.javax.jcr.RepositoryException - if another error occurs.public javax.jcr.Item getItem(String workspace, String absPath) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
getItem in interface NodeFinderworkspace - The workspace name.absPath - The absolute path.javax.jcr.PathNotFoundException - if the specified path cannot be found.javax.jcr.RepositoryException - if another error occurs.public javax.jcr.Item getItemSys(String workspace, String absPath, boolean system) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
getItemSys in interface NodeFinderworkspace - The workspace name.absPath - The absolute path.system - If "true", the system session is used. If "false", the user session is used.javax.jcr.PathNotFoundException - if the specified path cannot be found.javax.jcr.RepositoryException - if another error occurs.public javax.jcr.Node getNode(javax.jcr.Node ancestorNode,
String relativePath,
boolean giveTarget)
throws javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
getNode in interface NodeFinderancestorNode - The ancestor node.relativePath - The relative path.giveTarget - If the node is link and giveTarget has been set to "true",
the target node will be returned.javax.jcr.PathNotFoundException - if no node exists at the specified path.javax.jcr.RepositoryException - if another error occurs.public javax.jcr.Node getNode(javax.jcr.Node ancestorNode,
String relativePath)
throws javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
getNode in interface NodeFinderancestorNode - The ancestor node.relativePath - The relative path.javax.jcr.PathNotFoundException - if no node exists at the specified path.javax.jcr.RepositoryException - if another error occurs.public javax.jcr.Item getItem(javax.jcr.Session session,
String absPath,
boolean giveTarget)
throws javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
getItem in interface NodeFindersession - The session is used to get the item.absPath - The absolute path.giveTarget - If the item is link and giveTarget has been set to "true",
the target node will be returned.javax.jcr.PathNotFoundException - if the specified path cannot be found.javax.jcr.RepositoryException - if another error occurs.public javax.jcr.Item getItemTarget(javax.jcr.Session session,
String absPath,
boolean giveTarget,
boolean system)
throws javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
getItemTarget in interface NodeFindersession - The session which is used to get the item.absPath - The absolute path.giveTarget - If the item is link and giveTarget has been set to "true",
the target node will be returned.system - If "true", the system session is used. If "false", the user session is used.javax.jcr.PathNotFoundException - if the specified path cannot be found.javax.jcr.RepositoryException - if another error occurs.public javax.jcr.Item getItem(javax.jcr.Session session,
String absPath)
throws javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
getItem in interface NodeFindersession - The session that is used to get the item.absPath - The absolute path.javax.jcr.PathNotFoundException - if the specified path cannot be found.javax.jcr.RepositoryException - if another error occurs.public boolean itemExists(javax.jcr.Session session,
String absPath)
throws javax.jcr.RepositoryException
itemExists in interface NodeFindersession - The session that is used to get the item.absPath - The absolute path.javax.jcr.RepositoryException - if an error occurs.public javax.jcr.Item getItem(javax.jcr.Session session,
String absPath,
boolean giveTarget,
int fromIdx,
boolean system)
throws javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
session - The user sessionabsPath - The absolute path to nodefromIdx - The start index used to find the linkgiveTarget - Indicates if the target must be returned in case the item is a linkjavax.jcr.PathNotFoundExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.Session getSession(org.exoplatform.services.jcr.core.ManageableRepository manageableRepository,
String workspace)
throws javax.jcr.RepositoryException
manageableRepository - workspace - javax.jcr.RepositoryExceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.