com.liferay.portlet.wiki.engines.friki
Class FrikiEngine

java.lang.Object
  extended by com.liferay.portlet.wiki.engines.friki.FrikiEngine
All Implemented Interfaces:
WikiEngine

public class FrikiEngine
extends java.lang.Object
implements WikiEngine

View Source

Author:
Jorge Ferrer

Constructor Summary
FrikiEngine()
           
 
Method Summary
protected  java.util.Map<java.lang.String,java.lang.String> buildRemoteNamesMap(java.lang.String names)
           
protected  java.lang.String convert(NodeFilter filter, java.lang.String content)
           
 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.
protected  NodeFilter getFilter(long nodeId)
           
protected  NodeFilter getFilter(javax.portlet.PortletURL portletURL, long nodeId)
           
 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 newContent)
          Validate the content of a wiki page for this engine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrikiEngine

public FrikiEngine()
Method Detail

convert

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

Specified by:
convert in interface WikiEngine
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

public java.util.Map<java.lang.String,java.lang.Boolean> getOutgoingLinks(com.liferay.portlet.wiki.model.WikiPage page)
                                                                   throws com.liferay.portlet.wiki.PageContentException
Description copied from interface: WikiEngine
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.

Specified by:
getOutgoingLinks in interface WikiEngine
Parameters:
page - WikiPage to examine
Returns:
a map of links
Throws:
com.liferay.portlet.wiki.PageContentException

setInterWikiConfiguration

public void setInterWikiConfiguration(java.lang.String interWikiConfiguration)
Description copied from interface: WikiEngine
Set the configuraton to support quick links to other wikis. The format of the configuration is specific to the wiki engine.

Specified by:
setInterWikiConfiguration in interface WikiEngine

setMainConfiguration

public void setMainConfiguration(java.lang.String mainConfiguration)
Description copied from interface: WikiEngine
Set the main wiki configuraiton as a String. The format of the configuration is specific to the wiki engine.

Specified by:
setMainConfiguration in interface WikiEngine

validate

public boolean validate(long nodeId,
                        java.lang.String newContent)
Description copied from interface: WikiEngine
Validate the content of a wiki page for this engine.

Specified by:
validate in interface WikiEngine
Returns:
true if the content is valid

buildRemoteNamesMap

protected java.util.Map<java.lang.String,java.lang.String> buildRemoteNamesMap(java.lang.String names)

convert

protected java.lang.String convert(NodeFilter filter,
                                   java.lang.String content)
                            throws java.io.IOException
Throws:
java.io.IOException

getFilter

protected NodeFilter getFilter(long nodeId)

getFilter

protected NodeFilter getFilter(javax.portlet.PortletURL portletURL,
                               long nodeId)