public class DefaultTemplateManager extends Object implements TemplateManager
Modifier and Type | Field and Description |
---|---|
static String |
EMAIL_TEMPLATES |
Constructor and Description |
---|
DefaultTemplateManager(ApplicationProperties applicationProperties,
EventTypeManager eventTypeManager,
CachingJiraHomeTemplateContentLoader cachingJiraHomeTemplateContentLoader,
CustomTemplatesFeatureAvailabilityCheck customTemplatesFeatureAvailabilityCheck,
FeatureManager featureManager) |
Modifier and Type | Method and Description |
---|---|
Template |
getDefaultTemplate(EventType eventType)
Retrieve the default template for specified event type.
|
Template |
getTemplate(Long templateId) |
Template |
getTemplate(SchemeEntity notificationSchemeEntity)
Retrieve the template from the notification scheme entity.
|
String |
getTemplateContent(Long templateId,
String format) |
protected String |
getTemplatePath(Long templateId,
String format) |
Map<Long,Template> |
getTemplatesMap(String type)
Retrieve a map of templates of the specified type.
|
void |
onCacheClear(ClearCacheEvent event) |
public static final String EMAIL_TEMPLATES
public DefaultTemplateManager(ApplicationProperties applicationProperties, EventTypeManager eventTypeManager, CachingJiraHomeTemplateContentLoader cachingJiraHomeTemplateContentLoader, CustomTemplatesFeatureAvailabilityCheck customTemplatesFeatureAvailabilityCheck, FeatureManager featureManager)
public Template getTemplate(Long templateId)
getTemplate
in interface TemplateManager
public Template getTemplate(SchemeEntity notificationSchemeEntity)
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.
getTemplate
in interface TemplateManager
notificationSchemeEntity
- a notification scheme entity objectpublic Template getDefaultTemplate(EventType eventType)
eventType
- event type to retrieve the default template forpublic Map<Long,Template> getTemplatesMap(String type)
getTemplatesMap
in interface TemplateManager
type
- String specifiying the type of template to retrievepublic String getTemplateContent(Long templateId, String format)
getTemplateContent
in interface TemplateManager
@EventListener public void onCacheClear(ClearCacheEvent event)
Copyright © 2002-2022 Atlassian. All Rights Reserved.