Class JiraVelocityManager

java.lang.Object
com.atlassian.velocity.DefaultVelocityManager
com.atlassian.velocity.JiraVelocityManager
All Implemented Interfaces:
com.atlassian.velocity.VelocityManager

public class JiraVelocityManager extends com.atlassian.velocity.DefaultVelocityManager
  • Constructor Details

    • JiraVelocityManager

      @Deprecated public JiraVelocityManager(@Nonnull DateTimeFormatter dateTimeFormatter)
      Deprecated.
      in 9.9: use the other, complete constructor
      Constructor that looks up the VelocityEngineFactory using ComponentAccessor.
      Parameters:
      dateTimeFormatter - the date-time formatter
    • JiraVelocityManager

      public JiraVelocityManager(@Nonnull DateTimeFormatter dateTimeFormatter, @Nonnull VelocityEngineFactory velocityEngineFactory)
  • Method Details

    • getDateFormat

      public DateFormat getDateFormat()
      Returns a new DateFormat.
      Specified by:
      getDateFormat in interface com.atlassian.velocity.VelocityManager
      Overrides:
      getDateFormat in class com.atlassian.velocity.DefaultVelocityManager
      Returns:
      a new DateFormat
    • isTemplateAvailable

      public boolean isTemplateAvailable(String templateDirectory, String templateName, String encoding)
      Checks if the template is available and can be loaded.
      Parameters:
      templateDirectory - relative directory path to the template
      templateName - name of the template
      encoding - encoding
      Returns:
      true if a template is available. Otherwise false
      Since:
      9.0.0
    • createVelocityContext

      protected org.apache.velocity.VelocityContext createVelocityContext(Map params)
      Overrides:
      createVelocityContext in class com.atlassian.velocity.DefaultVelocityManager
    • createContextParams

      protected Map<String,?> createContextParams(String baseurl, Map contextParameters)
      Overrides:
      createContextParams in class com.atlassian.velocity.DefaultVelocityManager
    • getVe

      protected org.apache.velocity.app.VelocityEngine getVe()
      Overrides:
      getVe in class com.atlassian.velocity.DefaultVelocityManager