public interface LinkManager
Modifier and Type | Method and Description |
---|---|
javax.jcr.Node |
createLink(javax.jcr.Node parent,
javax.jcr.Node target)
Creates a new link with "exo:symlink" type.
|
javax.jcr.Node |
createLink(javax.jcr.Node parent,
String linkType,
javax.jcr.Node target)
Creates a new link with a given type.
|
javax.jcr.Node |
createLink(javax.jcr.Node parent,
String linkType,
javax.jcr.Node target,
String linkName)
Creates a new link with given type and name.
|
javax.jcr.Node |
createLink(javax.jcr.Node parent,
String linkType,
javax.jcr.Node target,
String linkName,
String linkTitle)
Creates a new link with given type, name and title.
|
List<javax.jcr.Node> |
getAllLinks(javax.jcr.Node targetNode,
String linkType)
Gets all links of a target node by a given link type.
|
List<javax.jcr.Node> |
getAllLinks(javax.jcr.Node targetNode,
String linkType,
SessionProvider sessionProvider)
Gets all links of a target node by a given link type.
|
javax.jcr.Node |
getTarget(javax.jcr.Node link)
Gets the target node of a given link using the user session.
|
javax.jcr.Node |
getTarget(javax.jcr.Node link,
boolean system)
Gets the target node of a given link.
|
String |
getTargetPrimaryNodeType(javax.jcr.Node link)
Gets the primary nodetype of a target node by a given link.
|
boolean |
isLink(javax.jcr.Item item)
Checks if a given item is link.
|
boolean |
isTargetReachable(javax.jcr.Node link)
Checks if the target node of a given link can be reached using the user session.
|
boolean |
isTargetReachable(javax.jcr.Node link,
boolean system)
Checks if the target node of a given link can be reached using the user session.
|
javax.jcr.Node |
updateLink(javax.jcr.Node link,
javax.jcr.Node target)
Updates a link node.
|
void |
updateSymlink(javax.jcr.Node link)
Updates information for a symlink, including "exo:title", "exo:dateCreated", "exo:dateModified", "publication:liveDate" and "exo:index".
|
javax.jcr.Node createLink(javax.jcr.Node parent, String linkType, javax.jcr.Node target) throws javax.jcr.RepositoryException
parent
- The parent node that contains the new link.linkType
- The primary nodetype of the link that must be sub-type of
"exo:symlink". Its default value is "exo:symlink".target
- Target of the link.javax.jcr.RepositoryException
- if the link cannot be created for any reason.javax.jcr.Node createLink(javax.jcr.Node parent, javax.jcr.Node target) throws javax.jcr.RepositoryException
parent
- The parent node that contains the new link.target
- Target of the link.javax.jcr.RepositoryException
- if the link cannot be created for any reason.javax.jcr.Node createLink(javax.jcr.Node parent, String linkType, javax.jcr.Node target, String linkName) throws javax.jcr.RepositoryException
parent
- The parent node that contains the new link.linkType
- The primary nodetype of the link that must be sub-type of
"exo:symlink". Its default value is "exo:symlink".target
- Target of the link.linkName
- Name of the link.javax.jcr.RepositoryException
- if the link cannot be created for any reason.javax.jcr.Node createLink(javax.jcr.Node parent, String linkType, javax.jcr.Node target, String linkName, String linkTitle) throws javax.jcr.RepositoryException
parent
- The parent node that contains the new link.linkType
- The primary nodetype of the link that must be sub-type of
"exo:symlink". Its default value is "exo:symlink".target
- Target of the link.linkName
- Name of the link.linkTitle
- Title of the link.javax.jcr.RepositoryException
- if the link cannot be created for any reason.javax.jcr.Node updateLink(javax.jcr.Node link, javax.jcr.Node target) throws javax.jcr.RepositoryException
link
- The link node to be updated.target
- Target of the link node.javax.jcr.RepositoryException
- if the link cannot be updated for any reason.javax.jcr.Node getTarget(javax.jcr.Node link, boolean system) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
link
- The node of "exo:symlink" type.system
- Indicates whether the target node must be retrieved using a
system or user session. In case the target and the
link are not in the same workspace, the system session will be used.javax.jcr.ItemNotFoundException
- if the target node cannot be found.javax.jcr.RepositoryException
- if an unexpected error occurs while retrieving
the target node.javax.jcr.Node getTarget(javax.jcr.Node link) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
link
- The node of "exo:symlink" type.javax.jcr.ItemNotFoundException
- if the target node cannot be found.javax.jcr.RepositoryException
- if an unexpected error occurs while retrieving
the target nodeboolean isTargetReachable(javax.jcr.Node link) throws javax.jcr.RepositoryException
link
- The node of "exo:symlink" type.javax.jcr.RepositoryException
- if an unexpected error occurs.boolean isTargetReachable(javax.jcr.Node link, boolean system) throws javax.jcr.RepositoryException
link
- The node of "exo:symlink" type.system
- The boolean value which indicates if the system session is needed.javax.jcr.RepositoryException
- if an unexpected error occurs.boolean isLink(javax.jcr.Item item) throws javax.jcr.RepositoryException
item
- The item to be checked.javax.jcr.RepositoryException
- if an unexpected error occursString getTargetPrimaryNodeType(javax.jcr.Node link) throws javax.jcr.RepositoryException
link
- The given link.javax.jcr.RepositoryException
- if an unexpected error occurs.List<javax.jcr.Node> getAllLinks(javax.jcr.Node targetNode, String linkType) throws Exception
targetNode
- The target node.linkType
- The given link type.Exception
List<javax.jcr.Node> getAllLinks(javax.jcr.Node targetNode, String linkType, SessionProvider sessionProvider) throws Exception
targetNode
- The target node.linkType
- The given link type.sessionProvider
- The session provider.Exception
Copyright © 2003-2017 eXo Platform SAS. All Rights Reserved.