Search in sources :

Example 11 with InstantEmailTemplate

use of com.redhat.cloud.notifications.models.InstantEmailTemplate in project notifications-backend by RedHatInsights.

the class EmailTemplateMigrationServiceTest method findAndCompileInstantEmailTemplate.

private void findAndCompileInstantEmailTemplate(UUID eventTypeId) {
    InstantEmailTemplate emailTemplate = templateRepository.findInstantEmailTemplate(eventTypeId).get();
    templateService.compileTemplate(emailTemplate.getSubjectTemplate().getData(), emailTemplate.getSubjectTemplate().getName());
    templateService.compileTemplate(emailTemplate.getBodyTemplate().getData(), emailTemplate.getBodyTemplate().getName());
}
Also used : InstantEmailTemplate(com.redhat.cloud.notifications.models.InstantEmailTemplate)

Aggregations

InstantEmailTemplate (com.redhat.cloud.notifications.models.InstantEmailTemplate)11 AggregationEmailTemplate (com.redhat.cloud.notifications.models.AggregationEmailTemplate)6 Template (com.redhat.cloud.notifications.models.Template)5 EventType (com.redhat.cloud.notifications.models.EventType)4 Transactional (javax.transaction.Transactional)3 CrudTestHelpers.createInstantEmailTemplate (com.redhat.cloud.notifications.CrudTestHelpers.createInstantEmailTemplate)2 CrudTestHelpers.deleteInstantEmailTemplate (com.redhat.cloud.notifications.CrudTestHelpers.deleteInstantEmailTemplate)2 CrudTestHelpers.updateInstantEmailTemplate (com.redhat.cloud.notifications.CrudTestHelpers.updateInstantEmailTemplate)2 JsonObject (io.vertx.core.json.JsonObject)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 CrudTestHelpers.createAggregationEmailTemplate (com.redhat.cloud.notifications.CrudTestHelpers.createAggregationEmailTemplate)1 CrudTestHelpers.createTemplate (com.redhat.cloud.notifications.CrudTestHelpers.createTemplate)1 CrudTestHelpers.deleteAggregationEmailTemplate (com.redhat.cloud.notifications.CrudTestHelpers.deleteAggregationEmailTemplate)1 CrudTestHelpers.deleteTemplate (com.redhat.cloud.notifications.CrudTestHelpers.deleteTemplate)1 CrudTestHelpers.updateAggregationEmailTemplate (com.redhat.cloud.notifications.CrudTestHelpers.updateAggregationEmailTemplate)1 CrudTestHelpers.updateTemplate (com.redhat.cloud.notifications.CrudTestHelpers.updateTemplate)1 DbIsolatedTest (com.redhat.cloud.notifications.db.DbIsolatedTest)1 StatelessSessionFactory (com.redhat.cloud.notifications.db.StatelessSessionFactory)1 EmailAggregationRepository (com.redhat.cloud.notifications.db.repositories.EmailAggregationRepository)1