Class DefaultDelegatingJiraVelocityManager

java.lang.Object
com.atlassian.jira.template.velocity.DefaultDelegatingJiraVelocityManager
All Implemented Interfaces:
DelegatingJiraVelocityManager, com.atlassian.velocity.VelocityManager

public class DefaultDelegatingJiraVelocityManager extends Object implements DelegatingJiraVelocityManager
If FF 'com.atlassian.jira.email.templates.readFromJiraHome' is enabled, this manager delegates all the methods to jiraEmailVelocityManager which is reading email templates from Jira Home Data directory. If method invocation throws any exception, or if the FF is disabled, then we delegate to standard JiraVelocityManager which is reading templates from resources in classpath.
  • Constructor Details

  • Method Details

    • getBody

      public String getBody(String templateDirectory, String template, Map<String,Object> contextParameters)
      Specified by:
      getBody in interface com.atlassian.velocity.VelocityManager
    • getBody

      public String getBody(String templateDirectory, String template, String baseurl, Map<String,Object> contextParameters)
      Specified by:
      getBody in interface com.atlassian.velocity.VelocityManager
    • getEncodedBody

      public String getEncodedBody(String templateDirectory, String template, String encoding, Map<String,Object> contextParameters)
      Specified by:
      getEncodedBody in interface com.atlassian.velocity.VelocityManager
    • getEncodedBody

      public String getEncodedBody(String templateDirectory, String template, String baseurl, String encoding, Map<String,Object> contextParameters)
      Specified by:
      getEncodedBody in interface com.atlassian.velocity.VelocityManager
    • getEncodedBody

      public String getEncodedBody(String templateDirectory, String template, String baseurl, String encoding, org.apache.velocity.context.Context context)
      Specified by:
      getEncodedBody in interface com.atlassian.velocity.VelocityManager
    • getEncodedBodyForContent

      public String getEncodedBodyForContent(String content, String baseurl, Map<String,Object> contextParameters)
      Specified by:
      getEncodedBodyForContent in interface com.atlassian.velocity.VelocityManager
    • getDateFormat

      public DateFormat getDateFormat()
      Specified by:
      getDateFormat in interface com.atlassian.velocity.VelocityManager
    • writeEncodedBodyForContent

      public void writeEncodedBodyForContent(Writer writer, String contentFragment, org.apache.velocity.context.Context context) throws IOException
      Specified by:
      writeEncodedBodyForContent in interface com.atlassian.velocity.VelocityManager
      Throws:
      IOException
    • writeEncodedBody

      public void writeEncodedBody(Writer writer, String templateDirectory, String template, String encoding, org.apache.velocity.context.Context context) throws IOException
      Specified by:
      writeEncodedBody in interface com.atlassian.velocity.VelocityManager
      Throws:
      IOException