org.exoplatform.wiki.rendering
Interface RenderingService

All Known Implementing Classes:
RenderingServiceImpl

public interface RenderingService

The RenderingService is used to render a wiki page from its markup to something readable such as html It used a specific syntax to be able to read the markup


Method Summary
 org.xwiki.component.manager.ComponentManager getComponentManager()
          Get the Component Manager
 String getContentOfSection(String markup, String sourceSyntax, String sectionIndex)
          Get the content of a section
 String getCssURL()
          Get the CSS url
 org.xwiki.context.Execution getExecution()
          Get the current execution instance
 org.xwiki.rendering.block.XDOM parse(String markup, String sourceSyntax)
          Parse the markup of the page based on the syntax
 String render(String markup, String sourceSyntax, String targetSyntax, boolean supportSectionEdit)
          Render a wiki page from its markup to html by using the right syntax
 void setCssURL(String cssURL)
          Set the CSS url
 String updateContentOfSection(String markup, String sourceSyntax, String sectionIndex, String newSectionContent)
          Update the content of the selected section
 

Method Detail

getExecution

org.xwiki.context.Execution getExecution()
                                         throws org.xwiki.component.manager.ComponentLookupException,
                                                org.xwiki.component.manager.ComponentRepositoryException
Get 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()
Get the Component Manager

Returns:
The Component Manager

render

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

Parameters:
markup - The markup of the page
sourceSyntax - The syntax used by the wiki page
targetSyntax - The target syntax to apply
supportSectionEdit - True if we support the section edit or false if not
Returns:
The result rendered
Throws:
Exception

getContentOfSection

String getContentOfSection(String markup,
                           String sourceSyntax,
                           String sectionIndex)
                           throws Exception
Get the content of a section

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

updateContentOfSection

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

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

parse

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

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

getCssURL

String getCssURL()
Get the CSS url

Returns:
the CSS url

setCssURL

void setCssURL(String cssURL)
Set the CSS url

Parameters:
cssURL - CSS url to set


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