@Internal public class BambooFreemarkerManager extends org.apache.struts2.views.freemarker.FreemarkerManager implements com.atlassian.bamboo.template.TemplateRenderer, org.springframework.web.context.ServletContextAware
FreemarkerManager that automatically detects the alternative syntax| Modifier and Type | Field and Description |
|---|---|
static String |
PARAM_BAMBOO_PERMISSION_MANAGER |
static String |
PARAM_BASE_URL |
static String |
PARAM_BUILD_UTILS |
static String |
PARAM_CONTEXT |
static String |
PARAM_I18N_BEAN |
static String |
PARAM_JIRA_ISSUE_UTILS |
static String |
PARAM_STATIC_RESOURCE_PREFIX |
static String |
PARAM_WEB_RESOURCE_MANAGER |
altMapWrapper, ATTR_TEMPLATE_MODEL, cacheBeanWrapper, config, CONFIG_SERVLET_CONTEXT_KEY, contentType, debug, DEFAULT_CONTENT_TYPE, encoding, EXPIRATION_DATE, INITPARAM_CONTENT_TYPE, INITPARAM_DEBUG, INITPARAM_NOCACHE, INITPARAM_TEMPLATE_PATH, KEY_APPLICATION, KEY_APPLICATION_PRIVATE, KEY_EXCEPTION, KEY_HASHMODEL_PRIVATE, KEY_INCLUDE, KEY_JSP_TAGLIBS, KEY_REQUEST, KEY_REQUEST_PARAMETERS, KEY_REQUEST_PARAMETERS_STRUTS, KEY_REQUEST_PRIVATE, KEY_SESSION, mruMaxStrongSize, nocache, noCharsetInContentType, tagLibraries, templatePath, templateUpdateDelay, wrapper| Constructor and Description |
|---|
BambooFreemarkerManager() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.struts2.views.freemarker.ScopesHashModel |
buildTemplateModel(com.opensymphony.xwork2.util.ValueStack stack,
@Nullable Object action,
javax.servlet.ServletContext servletContext,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
freemarker.template.ObjectWrapper wrapper) |
void |
clearCaches() |
protected freemarker.template.Configuration |
createConfiguration(javax.servlet.ServletContext servletContext) |
protected freemarker.cache.TemplateLoader |
createTemplateLoader(javax.servlet.ServletContext servletContext,
String ignore) |
void |
init(javax.servlet.ServletContext servletContext) |
void |
populateContext(org.apache.struts2.views.freemarker.ScopesHashModel model,
com.opensymphony.xwork2.util.ValueStack stack,
Object action,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
@Nullable String |
render(@Nullable String templatePath,
@Nullable Map<String,Object> contextParams) |
void |
render(String templatePath,
@Nullable Map<String,Object> contextParams,
@NotNull Writer writer)
Render the given template to the given writer
|
@NotNull String |
renderPage(@NotNull String templatePath,
Map<String,Object> params)
Render the resource found at the path
|
@NotNull String |
renderText(@NotNull String text,
Map<String,Object> params)
Render Freemarker markup.
|
@NotNull String |
renderWithoutActionContext(@Nullable String templatePath,
@NotNull Map<String,Object> contextParams)
Renders the resource found at the path.
|
void |
setEncoding(String encoding) |
void |
setHomeLocator(@Nullable BambooHomeLocator homeLocator) |
void |
setI18nBeanFactory(@Nullable I18nBeanFactory i18nBeanFactory) |
void |
setOsgiServiceProxyFactory(OsgiServiceProxyFactory osgiServiceProxyFactory) |
void |
setPluginAccessor(@Nullable com.atlassian.plugin.PluginAccessor pluginAccessor) |
void |
setServletContext(javax.servlet.ServletContext servletContext) |
addSetting, buildScopesHashModel, configureTemplateLoader, createObjectWrapper, getConfig, getConfiguration, getContentType, getDebug, getFreemarkerVersion, getNocache, getNoCharsetInContentType, getTemplatePath, getWrapper, loadSettings, setCacheBeanWrapper, setContainer, setFileManagerFactory, setMruMaxStrongSize, setTemplateUpdateDelay, setThemeTemplateLoader, setWrapperAltMappublic static final String PARAM_BASE_URL
public static final String PARAM_CONTEXT
public static final String PARAM_I18N_BEAN
public static final String PARAM_JIRA_ISSUE_UTILS
public static final String PARAM_WEB_RESOURCE_MANAGER
public static final String PARAM_STATIC_RESOURCE_PREFIX
public static final String PARAM_BAMBOO_PERMISSION_MANAGER
public static final String PARAM_BUILD_UTILS
public void init(javax.servlet.ServletContext servletContext)
throws freemarker.template.TemplateException
init in class org.apache.struts2.views.freemarker.FreemarkerManagerfreemarker.template.TemplateExceptionpublic void setEncoding(String encoding)
setEncoding in class org.apache.struts2.views.freemarker.FreemarkerManagerprotected freemarker.template.Configuration createConfiguration(javax.servlet.ServletContext servletContext)
throws freemarker.template.TemplateException
createConfiguration in class org.apache.struts2.views.freemarker.FreemarkerManagerfreemarker.template.TemplateExceptionprotected freemarker.cache.TemplateLoader createTemplateLoader(javax.servlet.ServletContext servletContext,
String ignore)
createTemplateLoader in class org.apache.struts2.views.freemarker.FreemarkerManagerpublic void populateContext(org.apache.struts2.views.freemarker.ScopesHashModel model,
com.opensymphony.xwork2.util.ValueStack stack,
Object action,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
populateContext in class org.apache.struts2.views.freemarker.FreemarkerManager@Nullable public @Nullable String render(@Nullable @Nullable String templatePath, @Nullable @Nullable Map<String,Object> contextParams)
render in interface com.atlassian.bamboo.template.TemplateRenderer@NotNull public @NotNull String renderPage(@NotNull @NotNull String templatePath, Map<String,Object> params)
templatePath - must not be nullparams - params to pass to the Freemarker context. May be null@NotNull public @NotNull String renderWithoutActionContext(@Nullable @Nullable String templatePath, @NotNull @NotNull Map<String,Object> contextParams)
renderWithoutActionContext in interface com.atlassian.bamboo.template.TemplateRenderertemplatePath - must not be nullcontextParams - params to pass to the Freemarker context. May be nullpublic void render(String templatePath, @Nullable @Nullable Map<String,Object> contextParams, @NotNull @NotNull Writer writer) throws IOException
render in interface com.atlassian.bamboo.template.TemplateRenderertemplatePath - The path of the templatecontextParams - The template context paramswriter - The writer to write toIOException - If an error occurred while writing to the writer@NotNull public @NotNull String renderText(@NotNull @NotNull String text, Map<String,Object> params)
renderText in interface com.atlassian.bamboo.template.TemplateRenderertext - String containing Freemarker markupparams - public void clearCaches()
public void setHomeLocator(@Nullable
@Nullable BambooHomeLocator homeLocator)
public void setPluginAccessor(@Nullable
@Nullable com.atlassian.plugin.PluginAccessor pluginAccessor)
public void setI18nBeanFactory(@Nullable
@Nullable I18nBeanFactory i18nBeanFactory)
public void setServletContext(javax.servlet.ServletContext servletContext)
setServletContext in interface org.springframework.web.context.ServletContextAwarepublic void setOsgiServiceProxyFactory(OsgiServiceProxyFactory osgiServiceProxyFactory)
public org.apache.struts2.views.freemarker.ScopesHashModel buildTemplateModel(com.opensymphony.xwork2.util.ValueStack stack,
@Nullable
@Nullable Object action,
javax.servlet.ServletContext servletContext,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
freemarker.template.ObjectWrapper wrapper)
buildTemplateModel in class org.apache.struts2.views.freemarker.FreemarkerManagerCopyright © 2025 Atlassian Software Systems Pty Ltd. All rights reserved.