org.exoplatform.wiki.rendering
Interface RenderingService

All Known Implementing Classes:
RenderingServiceImpl

public interface RenderingService

Renders a wiki page from its markup to something readable, such as HTML. It uses a specific syntax to read the markup.


Method Summary
 org.xwiki.component.manager.ComponentManager getComponentManager()
          Gets the Component Manager which provides ways to access and modify components (service) in the system.
 String getContentOfSection(String markup, String sourceSyntax, String sectionIndex)
          Gets content of a section.
 String getCssURL()
          Gets a CSS URL.
 org.xwiki.context.Execution getExecution()
          Gets the current execution instance.
 org.xwiki.rendering.block.XDOM parse(String markup, String sourceSyntax)
          Parses a wiki page markup based on the syntax.
 String render(String markup, String sourceSyntax, String targetSyntax, boolean supportSectionEdit)
          Renders a wiki page from its markup to HTML by using the right syntax.
 void setCssURL(String cssURL)
          Sets a CSS URL.
 String updateContentOfSection(String markup, String sourceSyntax, String sectionIndex, String newSectionContent)
          Updates content of the selected section.
 

Method Detail

getExecution

org.xwiki.context.Execution getExecution()
                                         throws org.xwiki.component.manager.ComponentLookupException,
                                                org.xwiki.component.manager.ComponentRepositoryException
Gets the current execution instance.

Returns:
The execution instance.
Throws:
org.xwiki.component.manager.ComponentLookupException
org.xwiki.component.manager.ComponentRepositoryException

getComponentManager

org.xwiki.component.manager.ComponentManager getComponentManager()
Gets the Component Manager which provides ways to access and modify components (service) in the system.

Returns:
The Component Manager.

render

String render(String markup,
              String sourceSyntax,
              String targetSyntax,
              boolean supportSectionEdit)
              throws Exception
Renders a wiki page from its markup to HTML by using the right syntax.

Parameters:
markup - The wiki page markup.
sourceSyntax - The syntax used by the wiki page.
targetSyntax - The target syntax to apply.
supportSectionEdit - If "true", the "Edit section" function is supported. Otherwise, this function is not supported.
Returns:
The readable content of the rendered wiki page.
Throws:
Exception

getContentOfSection

String getContentOfSection(String markup,
                           String sourceSyntax,
                           String sectionIndex)
                           throws Exception
Gets content of a section.

Parameters:
markup - The wiki page markup.
sourceSyntax - The syntax used by the wiki page.
sectionIndex - The index of the section.
Returns:
The section content.
Throws:
Exception

updateContentOfSection

String updateContentOfSection(String markup,
                              String sourceSyntax,
                              String sectionIndex,
                              String newSectionContent)
                              throws Exception
Updates content of the selected section.

Parameters:
markup - The wiki page markup.
sourceSyntax - The syntax used by the wiki page.
sectionIndex - The section index.
newSectionContent - New content of the section.
Returns:
Content of the page which includes the modified section.
Throws:
Exception

parse

org.xwiki.rendering.block.XDOM parse(String markup,
                                     String sourceSyntax)
                                     throws Exception
Parses a wiki page markup based on the syntax.

Parameters:
markup - The markup to parse.
sourceSyntax - The syntax to use.
Returns:
The XDOM object.
Throws:
Exception

getCssURL

String getCssURL()
Gets a CSS URL.

Returns:
The CSS URL.

setCssURL

void setCssURL(String cssURL)
Sets a CSS URL.

Parameters:
cssURL - The CSS URL.


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