Liferay 6.1.2-ce-ga3

com.liferay.portlet.wiki.engines.antlrwiki
Class CreoleWikiEngine

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

public class CreoleWikiEngine
extends Object
implements WikiEngine


Constructor Summary
CreoleWikiEngine()
           
 
Method Summary
protected  Creole10Parser build(String creoleCode)
           
 String convert(WikiPage page, PortletURL viewPageURL, PortletURL editPageURL, String attachmentURLPrefix)
          Convert the content of the given page to HTML using the view and edit URLs to build links.
 Map<String,Boolean> getOutgoingLinks(WikiPage page)
          Get a map with the links included in the given page.
protected  WikiPageNode parse(String creoleCode)
           
 void setInterWikiConfiguration(String interWikiConfiguration)
          Set the configuraton to support quick links to other wikis.
 void setMainConfiguration(String mainConfiguration)
          Set the main wiki configuraiton as a String.
 boolean validate(long nodeId, String content)
          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

CreoleWikiEngine

public CreoleWikiEngine()
Method Detail

convert

public String convert(WikiPage page,
                      PortletURL viewPageURL,
                      PortletURL editPageURL,
                      String attachmentURLPrefix)
Description copied from interface: WikiEngine
Convert the content of the given page to HTML using the view and edit URLs to build links.

Specified by:
convert in interface WikiEngine
Parameters:
page - the wiki page
viewPageURL - the URL to view the page
editPageURL - the URL to edit the page
attachmentURLPrefix - the URL prefix to use for attachments to the page
Returns:
HTML string

getOutgoingLinks

public Map<String,Boolean> getOutgoingLinks(WikiPage page)
                                     throws 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 - the page
Returns:
a map of links
Throws:
PageContentException - if a page content exception occurred

setInterWikiConfiguration

public void setInterWikiConfiguration(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(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,
                        String content)
Description copied from interface: WikiEngine
Validate the content of a wiki page for this engine.

Specified by:
validate in interface WikiEngine
Parameters:
nodeId - the ID of the wiki page node
content - the page content
Returns:
true if the content is valid

build

protected Creole10Parser build(String creoleCode)

parse

protected WikiPageNode parse(String creoleCode)

Liferay 6.1.2-ce-ga3