Package com.atlassian.velocity
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 Summary
ConstructorDescriptionJiraVelocityManager
(DateTimeFormatter dateTimeFormatter) Deprecated.in 9.9: use the other, complete constructorJiraVelocityManager
(DateTimeFormatter dateTimeFormatter, VelocityEngineFactory velocityEngineFactory) -
Method Summary
Modifier and TypeMethodDescriptioncreateContextParams
(String baseurl, Map contextParameters) protected org.apache.velocity.VelocityContext
createVelocityContext
(Map params) Returns a new DateFormat.protected org.apache.velocity.app.VelocityEngine
getVe()
boolean
isTemplateAvailable
(String templateDirectory, String templateName, String encoding) Checks if the template is available and can be loaded.Methods inherited from class com.atlassian.velocity.DefaultVelocityManager
getBody, getBody, getEncodedBody, getEncodedBody, getEncodedBody, getEncodedBodyForContent, getErrorMessageForException, initVe, writeEncodedBody, writeEncodedBodyForContent
-
Constructor Details
-
JiraVelocityManager
Deprecated.in 9.9: use the other, complete constructorConstructor that looks up theVelocityEngineFactory
usingComponentAccessor
.- Parameters:
dateTimeFormatter
- the date-time formatter
-
JiraVelocityManager
public JiraVelocityManager(@Nonnull DateTimeFormatter dateTimeFormatter, @Nonnull VelocityEngineFactory velocityEngineFactory)
-
-
Method Details
-
getDateFormat
Returns a new DateFormat.- Specified by:
getDateFormat
in interfacecom.atlassian.velocity.VelocityManager
- Overrides:
getDateFormat
in classcom.atlassian.velocity.DefaultVelocityManager
- Returns:
- a new DateFormat
-
isTemplateAvailable
Checks if the template is available and can be loaded.- Parameters:
templateDirectory
- relative directory path to the templatetemplateName
- name of the templateencoding
- encoding- Returns:
true
if a template is available. Otherwisefalse
- Since:
- 9.0.0
-
createVelocityContext
- Overrides:
createVelocityContext
in classcom.atlassian.velocity.DefaultVelocityManager
-
createContextParams
- Overrides:
createContextParams
in classcom.atlassian.velocity.DefaultVelocityManager
-
getVe
protected org.apache.velocity.app.VelocityEngine getVe()- Overrides:
getVe
in classcom.atlassian.velocity.DefaultVelocityManager
-