TemplateRenderer.render
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.atlassian.templaterenderer.TemplateRenderer.render(Showing top 15 results out of 315)

origin: com.atlassian.plugins.rest/atlassian-rest-module

public void render(final Object model, final String template) throws IOException {
  final Map<String, Object> context = Maps.newHashMap();
  context.put("it", model);
  context.put("renderer", this);
  context.put("httpContext", httpContext);
  context.put("request", httpServletRequest);
  context.put("response", httpServletResponse);
  templateRenderer.render(getAbsolutePath(model.getClass(), template), context, writer);
}
origin: com.atlassian.support/stp

public static String render(TemplateRenderer renderer, String template, Map<String, Object> map)
    throws RenderingException, IOException
{
  Map<String, Object> context = new HashMap<String, Object>();
  context.putAll(map);
  StringWriter writer = new StringWriter();
  renderer.render(template, context, writer);
  return writer.toString();
}
origin: com.atlassian.applinks/applinks-plugin

@Override
protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
  final Map<String, Object> params = new HashMap<String, Object>();
  params.put("serverName", internalHostApplication.getName());
  resp.setContentType("text/html");
  templateRenderer.render("templates/host/refapp/config.vm", params, resp.getWriter());
}
origin: com.atlassian.webhooks/atlassian-webhooks-plugin

private void renderNoAdminPrivileges(HttpServletResponse response) throws IOException
{
  response.setContentType(TEXT_HTML_CHARSET_UTF_8);
  response.setStatus(HttpServletResponse.SC_FORBIDDEN);
  templateRenderer.render(NO_ADMIN_PRIVILEGES_TEMPLATE_PATH, response.getWriter());
}
origin: com.atlassian.analytics/analytics-client

  @Override
  public void doGet(final HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException
  {
    if (!eventReportPermissionManager.hasPermission(userManager.getRemoteUserKey(request)))
    {
      loginPageRedirector.redirectToLogin(request, response);
      return;
    }

    final Map<String, Object> context = ImmutableMap.<String, Object>of(
        "capturing", false,
        "ondemand", onDemandDetector.isOnDemand());

    renderer.render("templates/event-checklist.vm", context, response.getWriter());
  }
}
origin: com.atlassian.templaterenderer/atlassian-template-renderer-api

public void render(String s, Plugin plugin, Map<String, Object> stringObjectMap, Writer writer) throws IOException {
  getRenderer(plugin).render(s, stringObjectMap, writer);
}
origin: com.atlassian.qunit/atlassian-qunit-plugin

private void showRoot(HttpServletRequest req, HttpServletResponse resp) throws IOException
{
  Map<String, List<String>> plugins = findTestJsPaths();
  resp.setContentType("text/html;charset=UTF-8");
  final PrintWriter out = resp.getWriter();
  final Map<String, Object> ctx = new HashMap<String, Object>();
  ctx.put("plugins", plugins);
  ctx.put("ourContextPath", getContextPath(req));
  ctx.put("resources", resources);
  resources.require("com.atlassian.qunit.atlassian-qunit-plugin:main-page-css");
  renderer.render("com/atlassian/qunit/test/vm/root.vm", ctx, out);
}
origin: com.atlassian.support/stp

private String generateMailBody() throws RenderingException, IOException
{
  Map<String, Object> context = new HashMap<String, Object>();
  context.put("description", request.getDescription());
  context.put("contactEmail", request.getFromAddress());
  context.put("priority", String.valueOf(request.getPriority()));
  StringWriter writer = new StringWriter();
  templateRenderer.render(getTemplateFile(), context, writer);
  return writer.toString();
}
origin: com.atlassian.analytics/analytics-client

public void doGet(final HttpServletRequest request, final HttpServletResponse response)
    throws IOException, ServletException
{
  if (!userPermissionsHelper.isRequestUserSystemAdmin(request))
  {
    loginPageRedirector.redirectToLogin(request, response);
    return;
  }
  final Map<String, Object> context = getDummyEventsContext(request);
  context.put("String", String.class);
  context.put("application-name", "Bitbucket");
  // The content-type needs to be set so that Sitemesh will decorate responses generated by Velocity correctly.
  response.setContentType("text/html; charset=UTF-8");
  renderer.render("templates/events-logged.vm", context, response.getWriter());
}
origin: com.atlassian.applinks/applinks-plugin-core

private void printRedirectWarningMessage(final String redirectUrl, final HttpServletResponse response) throws IOException
{
  response.setContentType("text/html");
  final Map<String, Object> context = buildMessageContext(redirectUrl);
  templateRenderer.render(REDIRECT_WARNING_TEMPLATE, context, response.getWriter());
}
origin: com.atlassian.plugins/base-hipchat-integration-plugin

private void render(String template, Map<String, Object> context, HttpServletResponse resp)
    throws ServletException {
  resp.setContentType(CONTENT_TYPE);
  try {
    templateRenderer.render(template, context, resp.getWriter());
  } catch (IOException e) {
    throw new ServletException(e);
  }
}
origin: com.atlassian.plugins/base-hipchat-integration-plugin

  private void render(HttpServletResponse response,
            Map<String, Object> context) throws IOException, ServletException {
    response.setContentType("text/html;charset=UTF-8");

    context.put("soyTemplateRenderer", soyTemplateRenderer);
    context.put("pageBuilderService", pageBuilderService);

    try {
      templateRenderer.render("feature/invites/invite-hipchat.vm", context, response.getWriter());
    } catch (IOException e) {
      throw new ServletException(e);
    }
  }
}
origin: com.atlassian.applinks/applinks-common

private void printRedirectWarningMessage(final HttpServletResponse response) throws IOException {
  response.setContentType("text/html");
  final Map<String, Object> context = buildMessageContext();
  templateRenderer.render(REDIRECT_WARNING_TEMPLATE, context, response.getWriter());
}
origin: com.atlassian.webhooks/atlassian-webhooks-plugin

private void render(HttpServletResponse response) throws IOException
{
  response.setContentType(TEXT_HTML_CHARSET_UTF_8);
  templateRenderer.render(WEBHOOKS_ADMIN_TEMPLATE_PATH, contextBuilder.buildContext(), response.getWriter());
}
origin: com.atlassian.applinks/applinks-plugin

@Override
protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
  final Map<String, Object> params = new HashMap<String, Object>();
  params.put("serverName", internalHostApplication.getName());
  resp.setContentType("text/html");
  templateRenderer.render("templates/host/refapp/config.vm", params, resp.getWriter());
}
com.atlassian.templaterendererTemplateRendererrender

Javadoc

Renders the template to the writer, using the given context and adding an I18nResolver, WebResourceManager and WebResourceUrlProvider.

Popular methods of TemplateRenderer

  • renderFragment
    Renders the template to the writer, using the given context and adding an I18nResolver, WebResourceM
  • resolve
    Check whether the given template exists or not

Popular classes and methods

  • startActivity (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with val. Returns one of the three values 1, 0, or -1. The method behaves a
  • GridBagLayout (java.awt)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • JFileChooser (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Join (org.hibernate.mapping)

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)