public class RenderingServiceImpl extends Object implements RenderingService, org.picocontainer.Startable
| Constructor and Description |
|---|
RenderingServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getComponent(Type clazz) |
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.
|
void |
start() |
void |
stop() |
String |
updateContentOfSection(String markup,
String sourceSyntax,
String sectionIndex,
String newSectionContent)
Updates content of the selected section.
|
public org.xwiki.context.Execution getExecution()
throws org.xwiki.component.manager.ComponentLookupException,
org.xwiki.component.manager.ComponentRepositoryException
RenderingServicegetExecution in interface RenderingServiceorg.xwiki.component.manager.ComponentLookupExceptionorg.xwiki.component.manager.ComponentRepositoryExceptionpublic org.xwiki.component.manager.ComponentManager getComponentManager()
RenderingServicegetComponentManager in interface RenderingServicepublic <T> T getComponent(Type clazz)
public String render(String markup, String sourceSyntax, String targetSyntax, boolean supportSectionEdit) throws org.xwiki.rendering.converter.ConversionException, org.xwiki.component.manager.ComponentLookupException
RenderingServicerender in interface RenderingServicemarkup - 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.org.xwiki.rendering.converter.ConversionExceptionorg.xwiki.component.manager.ComponentLookupExceptionpublic String getContentOfSection(String markup, String sourceSyntax, String sectionIndex) throws Exception
RenderingServicegetContentOfSection in interface RenderingServicemarkup - The wiki page markup.sourceSyntax - The syntax used by the wiki page.sectionIndex - The index of the section.Exceptionpublic String updateContentOfSection(String markup, String sourceSyntax, String sectionIndex, String newSectionContent) throws Exception
RenderingServiceupdateContentOfSection in interface RenderingServicemarkup - The wiki page markup.sourceSyntax - The syntax used by the wiki page.sectionIndex - The section index.newSectionContent - New content of the section.Exceptionpublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic org.xwiki.rendering.block.XDOM parse(String markup, String sourceSyntax) throws org.xwiki.rendering.converter.ConversionException
RenderingServiceparse in interface RenderingServicemarkup - The markup to parse.sourceSyntax - The syntax to use.org.xwiki.rendering.converter.ConversionExceptionpublic String getCssURL()
RenderingServicegetCssURL in interface RenderingServicepublic void setCssURL(String cssURL)
RenderingServicesetCssURL in interface RenderingServicecssURL - The CSS URL.Copyright © 2003–2017 eXo Platform SAS. All rights reserved.