Package com.atlassian.jira.template
Class DefaultTemplateManager
java.lang.Object
com.atlassian.jira.template.DefaultTemplateManager
- All Implemented Interfaces:
TemplateManager
A manager for the email velocity templates within the system.
Currently, the system initialises the template table by reading from the email-template-id-mappings.xml file.
Custom templates can be added to this file - ensuring that an appropriate ID is given to the new template (e.g. >= 10000).
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTemplateManager(ApplicationProperties applicationProperties, EventTypeManager eventTypeManager, CachingJiraHomeTemplateContentLoader cachingJiraHomeTemplateContentLoader, CustomTemplatesFeatureAvailabilityCheck customTemplatesFeatureAvailabilityCheck, FeatureManager featureManager) -
Method Summary
Modifier and TypeMethodDescriptiongetDefaultTemplate(EventType eventType) Retrieve the default template for specified event type.getTemplate(SchemeEntity notificationSchemeEntity) Retrieve the template from the notification scheme entity.getTemplate(Long templateId) getTemplateContent(Long templateId, String format) protected StringgetTemplatePath(Long templateId, String format) getTemplatesMap(String type) Retrieve a map of templates of the specified type.voidonCacheClear(ClearCacheEvent event)
-
Field Details
-
EMAIL_TEMPLATES
- See Also:
-
-
Constructor Details
-
DefaultTemplateManager
public DefaultTemplateManager(ApplicationProperties applicationProperties, EventTypeManager eventTypeManager, CachingJiraHomeTemplateContentLoader cachingJiraHomeTemplateContentLoader, CustomTemplatesFeatureAvailabilityCheck customTemplatesFeatureAvailabilityCheck, FeatureManager featureManager)
-
-
Method Details
-
getTemplate
- Specified by:
getTemplatein interfaceTemplateManager
-
getTemplate
Retrieve the template from the notification scheme entity.If the scheme entity is not related to a template id - return the default template for the event type. The eventTypeId corresponds to the default template id if there is no specific template association.
- Specified by:
getTemplatein interfaceTemplateManager- Parameters:
notificationSchemeEntity- a notification scheme entity object
-
getDefaultTemplate
Retrieve the default template for specified event type.- Parameters:
eventType- event type to retrieve the default template for- Returns:
- template default template for specified event type
-
getTemplatesMap
Retrieve a map of templates of the specified type.- Specified by:
getTemplatesMapin interfaceTemplateManager- Parameters:
type- String specifiying the type of template to retrieve- Returns:
- map of template IDs to template objects
-
getTemplateContent
- Specified by:
getTemplateContentin interfaceTemplateManager
-
getTemplatePath
-
onCacheClear
-