com.liferay.portlet.wiki.engines
Interface WikiEngine

All Known Implementing Classes:
FrikiEngine, HtmlEngine, JSPWikiEngine, TextEngine

public interface WikiEngine

View Source

Author:
Jorge Ferrer

Method Summary
 java.lang.String convert(com.liferay.portlet.wiki.model.WikiPage page, javax.portlet.PortletURL portletURL)
          Convert the content of the given page to HTML using the portletURL to build links.
 java.util.Map<java.lang.String,java.lang.Boolean> getOutgoingLinks(com.liferay.portlet.wiki.model.WikiPage page)
          Get a map with the links included in the given page.
 void setInterWikiConfiguration(java.lang.String interWikiConfiguration)
          Set the configuraton to support quick links to other wikis.
 void setMainConfiguration(java.lang.String mainConfiguration)
          Set the main wiki configuraiton as a String.
 boolean validate(long nodeId, java.lang.String content)
          Validate the content of a wiki page for this engine.
 

Method Detail

convert

java.lang.String convert(com.liferay.portlet.wiki.model.WikiPage page,
                         javax.portlet.PortletURL portletURL)
                         throws com.liferay.portlet.wiki.PageContentException
Convert the content of the given page to HTML using the portletURL to build links.

Parameters:
page - a wiki page
portletURL - a portlet URL
Returns:
HTML string
Throws:
com.liferay.portlet.wiki.PageContentException - when there is an error parsing the page content

getOutgoingLinks

java.util.Map<java.lang.String,java.lang.Boolean> getOutgoingLinks(com.liferay.portlet.wiki.model.WikiPage page)
                                                                   throws com.liferay.portlet.wiki.PageContentException
Get a map with the links included in the given page. The key of each map entry is the title of the linked page. The value is a Boolean object that indicates if the linked page exists or not.

Parameters:
page - WikiPage to examine
Returns:
a map of links
Throws:
com.liferay.portlet.wiki.PageContentException

setInterWikiConfiguration

void setInterWikiConfiguration(java.lang.String interWikiConfiguration)
Set the configuraton to support quick links to other wikis. The format of the configuration is specific to the wiki engine.

Parameters:
interWikiConfiguration -

setMainConfiguration

void setMainConfiguration(java.lang.String mainConfiguration)
Set the main wiki configuraiton as a String. The format of the configuration is specific to the wiki engine.

Parameters:
mainConfiguration -

validate

boolean validate(long nodeId,
                 java.lang.String content)
Validate the content of a wiki page for this engine.

Parameters:
nodeId -
content -
Returns:
true if the content is valid