org.exoplatform.wiki.service.wysiwyg
Interface LinkService

All Known Implementing Classes:
DefaultLinkService

@Role
public interface LinkService

Manages 2 different link types: EntityConfig and EntityReference.


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 EntityConfig (URL and 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 a 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 EntityConfig (URL and 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 - Origin of the link.
destination - Destination of the link.
Returns:
The entity link that can be used to insert the link in the origin.

parseLinkReference

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

Parameters:
linkReference - The link reference pointing to the entity.
baseReference - The entity reference which is used for resolving the linked entity reference.
Returns:
The link reference to the entity.


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