public class

VelocityTemplateCache

extends Object
implements Startable
java.lang.Object
   ↳ com.atlassian.jira.template.velocity.VelocityTemplateCache

Class Overview

Caches per-template information so that we only calculate it at most once.

Summary

Public Constructors
VelocityTemplateCache()
Creates a new VelocityDirectiveCache backed by a DefaultDirectiveChecker.
VelocityTemplateCache(DirectiveChecker directiveChecker)
Creates a new VelocityDirectiveCache backed by the supplied DirectiveChecker.
Public Methods
boolean isDirectivePresent(String directiveName, Template template)
Determines whether a directive with a specified name is present on a template instance.
@EventListener void onClearCaches(ClearCacheEvent clearCacheEvent)
Clears the cache upon receiving a ClearCacheEvent.
void start()
This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.extension.Startable

Public Constructors

public VelocityTemplateCache ()

Creates a new VelocityDirectiveCache backed by a DefaultDirectiveChecker.

public VelocityTemplateCache (DirectiveChecker directiveChecker)

Creates a new VelocityDirectiveCache backed by the supplied DirectiveChecker.

Parameters
directiveChecker the DirectiveChecker to use

Public Methods

public boolean isDirectivePresent (String directiveName, Template template)

Determines whether a directive with a specified name is present on a template instance.

Parameters
directiveName The name of the directive to look for.
template The template where we will search for the directive.
Returns
  • true, if the directive has been defined on the template; otherwise, false.

@EventListener public void onClearCaches (ClearCacheEvent clearCacheEvent)

Clears the cache upon receiving a ClearCacheEvent.

Parameters
clearCacheEvent a ClearCacheEvent

public void start ()

This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.

Throws
Exception