#8842 - add notification templates html files to application properties

This commit is contained in:
Bernaldo Mihasi 2023-06-21 13:09:20 +03:00
parent 741179a53f
commit d996acdcc4
2 changed files with 10 additions and 4 deletions

View File

@ -60,20 +60,20 @@ public class NotificationManager {
case DMP_MODIFIED: case DMP_MODIFIED:
case DATASET_MODIFIED: case DATASET_MODIFIED:
subjectTemplate = this.environment.getProperty("notification.modified.subject"); subjectTemplate = this.environment.getProperty("notification.modified.subject");
contentTemplate = mailService.getMailTemplateContent("classpath:templates/notifications/modifiedNotification.html"); contentTemplate = mailService.getMailTemplateContent(this.environment.getProperty("notification.modified.template"));
break; break;
case DMP_PUBLISH: case DMP_PUBLISH:
subjectTemplate = this.environment.getProperty("notification.publish.subject"); subjectTemplate = this.environment.getProperty("notification.publish.subject");
contentTemplate = mailService.getMailTemplateContent("classpath:templates/notifications/publishNotification.html"); contentTemplate = mailService.getMailTemplateContent(this.environment.getProperty("notification.publish.template"));
break; break;
case DMP_FINALISED: case DMP_FINALISED:
subjectTemplate = this.environment.getProperty("notification.finalised.subject"); subjectTemplate = this.environment.getProperty("notification.finalised.subject");
contentTemplate = mailService.getMailTemplateContent("classpath:templates/notifications/finalisedNotification.html"); contentTemplate = mailService.getMailTemplateContent(this.environment.getProperty("notification.finalised.template"));
break; break;
case DMP_MODIFIED_FINALISED: case DMP_MODIFIED_FINALISED:
case DATASET_MODIFIED_FINALISED: case DATASET_MODIFIED_FINALISED:
subjectTemplate = this.environment.getProperty("notification.modifiedFinalised.subject"); subjectTemplate = this.environment.getProperty("notification.modifiedFinalised.subject");
contentTemplate = mailService.getMailTemplateContent("classpath:templates/notifications/modifiedFinalisedNotification.html"); contentTemplate = mailService.getMailTemplateContent(this.environment.getProperty("notification.modified_finalised.template"));
break; break;
} }

View File

@ -63,6 +63,12 @@ email.merge=file:templates/email/emailMergeConfirmation.html
email.unlink=classpath:templates/email/emailUnlinkConfirmation.html email.unlink=classpath:templates/email/emailUnlinkConfirmation.html
email.dataset.template=file:templates/email/emailAdmin.html email.dataset.template=file:templates/email/emailAdmin.html
##################NOTIFICATION FILE TEMPLATES OVERRIDES CONFIGURATIONS##########
notification.finalised.template=classpath:templates/notifications/finalisedNotification.html
notification.modified_finalised.template=classpath:templates/notifications/modifiedFinalisedNotification.html
notification.modified.template=classpath:templates/notifications/modifiedNotification.html
notification.publish.template=classpath:templates/notifications/publishNotification.html
#############LOGIN CONFIGURATIONS######### #############LOGIN CONFIGURATIONS#########
#############GENERIC LOGIN CONFIGURATIONS######### #############GENERIC LOGIN CONFIGURATIONS#########
autouser.root.email= autouser.root.email=