Package com.atlassian.crowd.plugin.web
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.velocity.context.ContextcreateContext(org.apache.struts2.views.velocity.VelocityManager velocityManager, org.apache.struts2.util.ValueStack stack, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Renders a template with the given context parameters.renderText(String text, Map<String, Object> params) Renders a text with the given context parameters.voidsetServletContext(jakarta.servlet.ServletContext servletContext)
-
Constructor Details
-
CrowdTemplateRenderer
public CrowdTemplateRenderer()
-
-
Method Details
-
render
Renders a template with the given context parameters.- Specified by:
renderin interfaceTemplateRenderer- Parameters:
templatePath- the path to the templatecontextParams- the context parameters- Returns:
- the rendered template
-
renderText
Renders a text with the given context parameters.- Specified by:
renderTextin interfaceTemplateRenderer- Parameters:
text- the template textparams- 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:
setServletContextin interfaceorg.springframework.web.context.ServletContextAware
-