Supply API to work with the linked node or the link included in a node.

_Package org.exoplatform.services.cms.link.LinkManager_

|| *Method* || *Return* || *Prototype* || *Description* ||
| *createLink*  | {{Node}} | {{createLink(Node parent, String linkType, Node target)}} {example}{example} {{throws RepositoryException;}} | Creates a new link, add it to the parent node and returns the link {example}{example} {example}{example} @param parent: The parent node of the link {example}{example} @param linkType: The primary node type of the link must be a sub-type of {example}{example} exo:symlink, the default value is "exo:symlink" {example}{example} @param target The target of the link {example}{example} @throws RepositoryException: if the link cannot be created for any reason |
| *createLink* | {{Node}} | {{createLink(Node parent, Node target)}} {example}{example} {{throws RepositoryException;}} | Creates a new node of type exo:symlink, add it to the parent node and {example}{example} returns the link node {example}{example} {example}{example} @param parent: The parent node of the link to create {example}{example} @param target: The target of the link {example}{example} @throws RepositoryException: if the link cannot be created for any reason {example}{example}  |
| *createLink* | {{Node}} | {{createLink(Node parent, String linkType, Node target, String linkName)}} {example}{example} {{throws RepositoryException;}} | Creates a new link, add it to the parent node and returns the link {example}{example} {example}{example} @param parent: The parent node of the link {example}{example} @param linkType: The primary node type of the link must be a sub-type of {example}{example} exo:symlink, the default value is "exo:symlink" {example}{example} @param target: The target of the link {example}{example} @param linkName: The name of the link {example}{example} @return {example}{example} @throws RepositoryException: if the link cannot be created for any reason |
| *updateLink* | {{Node}} | {{updateLink(Node link, Node target)}} {example}{example} {{throws RepositoryException;}} | Updates the target node of the given link {example}{example} {example}{example} @param link: The link node to update {example}{example} @param target: The new target of the link {example}{example} @throws RepositoryException: if the link cannot be updated for any reason {example}{example}  |
| *getTarget*  | {{Node}} | {{getTarget(Node link, boolean system) throws ItemNotFoundException, }}{example}{example}{{ RepositoryException; }} | Gets the target node of the given link {example}{example} @param link: The node of type exo:symlink {example}{example} @param system: Indicates whether the target node must be retrieved using a {example}{example} session system or user session in case we cannot use the same {example}{example} session as the node link because the target and the link are not {example}{example} in the same workspace {example}{example} @throws ItemNotFoundException: if the target node cannot be found {example}{example} @throws RepositoryException: if an unexpected error occurs while retrieving {example}{example} the target node |
| *getTarget* | {{Node}} | {{getTarget(Node link)}} {example}{example}{{ throws ItemNotFoundException, RepositoryException;}} | Gets the target node of the given link using the user session {example}{example} {example}{example} @param link: The node of type exo:symlink {example}{example} @throws ItemNotFoundException: if the target node cannot be found {example}{example} @throws RepositoryException: if an unexpected error occurs while retrieving {example}{example} the target node {example}{example} {example}{example}  |
| *isTargetReachable* | {{boolean}} | {{isTargetReachable(Node link)}} {example}{example}{{ throws RepositoryException;}} | Checks if the target node of the given link can be reached using the user session {example}{example} {example}{example} @param link: The node of type exo:symlink {example}{example} @throws RepositoryException: if an unexpected error occurs |
| *isTargetReachable* | {{boolean}} | {{isTargetReachable(Node link, boolean system)}} {example}{example}{{ throws RepositoryException;}} | Checks if the target node of the given link can be reached using the user session {example}{example} {example}{example} @param link: The node of type exo:symlink {example}{example} @param system {example}{example} @throws RepositoryException if an unexpected error occurs |
| *isLink* | {{boolean}} | {{isLink(Item item)}} {example}{example}{{ throws RepositoryException;}} | Indicates whether the given item is a link {example}{example} {example}{example} @param item: the item to test {example}{example} @return <code>true</code>: if the node is a link, <code>false</code> otherwise {example}{example} @throws RepositoryException: if an unexpected error occurs |
| *getTargetPrimaryNodeType* | {{String}} | {{getTargetPrimaryNodeType(Node link)}} {example}{example}{{throws RepositoryException;}} | Gives the primary node type of the target {example}{example} {example}{example} @param link: The node of type exo:symlink {example}{example} @return: the primary node type of the target {example}{example} @throws RepositoryException: if an unexpected error occurs |
