diff --git a/components/org.wso2.carbon.identity.governance/src/main/java/org/wso2/carbon/identity/governance/service/notification/NotificationTemplateManager.java b/components/org.wso2.carbon.identity.governance/src/main/java/org/wso2/carbon/identity/governance/service/notification/NotificationTemplateManager.java index 7259d3bb84..abf5eca938 100644 --- a/components/org.wso2.carbon.identity.governance/src/main/java/org/wso2/carbon/identity/governance/service/notification/NotificationTemplateManager.java +++ b/components/org.wso2.carbon.identity.governance/src/main/java/org/wso2/carbon/identity/governance/service/notification/NotificationTemplateManager.java @@ -42,6 +42,24 @@ default NotificationTemplate getNotificationTemplate(String notificationChannel, return null; } + /** + * Return the notification template from the tenant registry which matches the given channel and template name. + * + * @param notificationChannel Notification Channel Name (Eg: SMS or EMAIL). + * @param templateType Display name of the template. + * @param locale Locale. + * @param tenantDomain Tenant Domain. + * @param applicationUuid Application UUID. + * @return Return {@link org.wso2.carbon.identity.governance.model.NotificationTemplate} object. + * @throws NotificationTemplateManagerException If an error occurred while getting the notification template. + */ + default NotificationTemplate getNotificationTemplate(String notificationChannel, String templateType, String locale, + String tenantDomain, String applicationUuid) + throws NotificationTemplateManagerException { + + return null; + } + /** * Add the notification template to the registry. * @@ -55,6 +73,19 @@ default void addNotificationTemplate(NotificationTemplate notificationTemplate, } + /** + * Add the notification template to the registry. + * + * @param notificationTemplate Notification template. + * @param tenantDomain Tenant domain. + * @param applicationUuid Application UUID. + * @throws NotificationTemplateManagerException If an error occurred while adding the notification template. + */ + default void addNotificationTemplate(NotificationTemplate notificationTemplate, String tenantDomain, + String applicationUuid) throws NotificationTemplateManagerException { + + } + /** * Add a new notification template to the registry to the corresponding notification channel root directory. * @@ -91,4 +122,19 @@ default List getDefaultNotificationTemplates(String notifi return null; } + + /** + * Add a new notification template to the registry to the corresponding notification channel root directory. + * + * @param displayName Notification template display name. + * @param notificationChannel Notification channel (Eg: SMS, EMAIL). + * @param tenantDomain Tenant domain. + * @param applicationUuid Application UUID. + * @throws NotificationTemplateManagerException If an error occurred while adding the template to the registry. + */ + default void addNotificationTemplateType(String displayName, String notificationChannel, + String tenantDomain, String applicationUuid) + throws NotificationTemplateManagerException { + + } }