Class TemplateScriptService

  • All Implemented Interfaces:
    org.xwiki.script.service.ScriptService

    @Component
    @Named("template")
    @Singleton
    public class TemplateScriptService
    extends Object
    implements org.xwiki.script.service.ScriptService
    Internal helper to manipulate wiki based templates from scripts.
    Since:
    6.2M1
    Version:
    $Id: 1309e8c1c9623ca77d48434c3ae294fea05e886c $
    • Constructor Detail

      • TemplateScriptService

        public TemplateScriptService()
    • Method Detail

      • render

        public String render​(String template)
        Execute and render passed template.

        The current transformation id is used.

        Parameters:
        template - the template name
        Returns:
        the result of the template execution and rendering
      • execute

        public void execute​(String template)
                     throws Exception
        Execute the passed template.

        The current transformation id is used.

        Parameters:
        template - the template name
        Throws:
        Exception - when failing to execute the template