org.exoplatform.wiki.service.wysiwyg
Interface LinkService

All Known Implementing Classes:
DefaultLinkService

@Role
public interface LinkService

The LinkService manage 2 different type of link, the EntityConfig and the link reference.


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

Method Detail

getEntityConfig

org.xwiki.gwt.wysiwyg.client.wiki.EntityConfig getEntityConfig(org.xwiki.gwt.wysiwyg.client.wiki.EntityReference origin,
                                                               org.xwiki.gwt.wysiwyg.client.wiki.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

org.xwiki.gwt.wysiwyg.client.wiki.ResourceReference parseLinkReference(String linkReference,
                                                                       org.xwiki.gwt.wysiwyg.client.wiki.EntityReference baseReference)
Parses the given link reference and extracts a reference to the linked entity. The returned entity reference is resolved relative to the given base entity reference.

Parameters:
linkReference - a link reference pointing to an entity of the specified type
baseReference - the entity reference used to resolve the linked entity reference
Returns:
a reference to the linked entity


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.