Class CrowdTemplateRenderer

java.lang.Object
com.atlassian.crowd.plugin.web.CrowdTemplateRenderer
All Implemented Interfaces:
TemplateRenderer, org.springframework.beans.factory.Aware, org.springframework.web.context.ServletContextAware

public class CrowdTemplateRenderer extends Object implements TemplateRenderer, org.springframework.web.context.ServletContextAware
Crowd specific implementation of the Atlassian Plugin TemplateRenderer. This class supports Velocity templates and template expressions.
  • Constructor Details

    • CrowdTemplateRenderer

      public CrowdTemplateRenderer()
  • Method Details

    • render

      public String render(String templatePath, Map<String,Object> contextParams)
      Renders a template with the given context parameters.
      Specified by:
      render in interface TemplateRenderer
      Parameters:
      templatePath - the path to the template
      contextParams - the context parameters
      Returns:
      the rendered template
    • renderText

      public String renderText(String text, Map<String,Object> params)
      Renders a text with the given context parameters.
      Specified by:
      renderText in interface TemplateRenderer
      Parameters:
      text - the template text
      params - the context parameters
      Returns:
      the rendered text
    • createContext

      protected org.apache.velocity.context.Context createContext(org.apache.struts2.views.velocity.VelocityManager velocityManager, org.apache.struts2.util.ValueStack stack, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    • setServletContext

      public void setServletContext(@Nonnull jakarta.servlet.ServletContext servletContext)
      Specified by:
      setServletContext in interface org.springframework.web.context.ServletContextAware