org.xwiki.wysiwyg.server.wiki
Interface LinkService


@Role
public interface LinkService

The service used to create links.

Version:
$Id: 34b586ba4f7cf9a38b65dc947b53fd244011863a $

Method Summary
 EntityConfig getEntityConfig(EntityReference origin, ResourceReference destination)
          Creates an entity link configuration object (URL, link reference) for a link with the specified origin and destination.
 ResourceReference parseLinkReference(String linkReference, EntityReference baseReference)
          Parses the given link reference and extracts a reference to the linked resource.
 

Method Detail

getEntityConfig

EntityConfig getEntityConfig(EntityReference origin,
                             ResourceReference destination)
Creates an entity link configuration object (URL, link reference) for a link with the specified origin and destination. The link reference in the returned EntityConfig is relative to the link origin.

Parameters:
origin - the origin of the link
destination - the destination of the link
Returns:
the link configuration object that can be used to insert the link in the origin page

parseLinkReference

ResourceReference parseLinkReference(String linkReference,
                                     EntityReference baseReference)
Parses the given link reference and extracts a reference to the linked resource. The returned resource reference is resolved relative to the given base entity reference.

Parameters:
linkReference - a serialized link reference
baseReference - the entity reference used to resolve the linked resource reference
Returns:
a reference to the linked resource


Copyright © 2004-2012 XWiki. All Rights Reserved.