@@ -45,10 +45,10 @@ public AWSZTSHealthNotificationTask(ZTSClientNotification ztsClientNotification,
45
45
RolesProvider rolesProvider ,
46
46
String userDomainPrefix ,
47
47
String serverName ,
48
- NotificationToEmailConverterCommon notificationToEmailConverterCommon ) {
48
+ NotificationConverterCommon notificationConverterCommon ) {
49
49
DomainRoleMembersFetcher domainRoleMembersFetcher = new DomainRoleMembersFetcher (rolesProvider , USER_DOMAIN_PREFIX );
50
50
this .notificationCommon = new NotificationCommon (domainRoleMembersFetcher , userDomainPrefix );
51
- this .awsZTSHealthNotificationToEmailConverter = new AWSZTSHealthNotificationToEmailConverter (notificationToEmailConverterCommon );
51
+ this .awsZTSHealthNotificationToEmailConverter = new AWSZTSHealthNotificationToEmailConverter (notificationConverterCommon );
52
52
this .awsztsHealthNotificationToMetricConverter = new AWSZTSHealthNotificationToMetricConverter ();
53
53
this .ztsClientNotification = ztsClientNotification ;
54
54
this .serverName = serverName ;
@@ -98,20 +98,20 @@ public static class AWSZTSHealthNotificationToEmailConverter implements Notifica
98
98
private static final String EMAIL_TEMPLATE_NOTIFICATION_AWS_ZTS_HEALTH = "messages/aws-zts-health.html" ;
99
99
private static final String AWS_ZTS_HEALTH_SUBJECT = "athenz.notification.email.aws.zts.health.subject" ;
100
100
101
- private final NotificationToEmailConverterCommon notificationToEmailConverterCommon ;
101
+ private final NotificationConverterCommon notificationConverterCommon ;
102
102
private final String emailAwsZtsHealthBody ;
103
103
104
- public AWSZTSHealthNotificationToEmailConverter (NotificationToEmailConverterCommon notificationToEmailConverterCommon ) {
105
- this .notificationToEmailConverterCommon = notificationToEmailConverterCommon ;
106
- emailAwsZtsHealthBody = notificationToEmailConverterCommon .readContentFromFile (getClass ().getClassLoader (), EMAIL_TEMPLATE_NOTIFICATION_AWS_ZTS_HEALTH );
104
+ public AWSZTSHealthNotificationToEmailConverter (NotificationConverterCommon notificationConverterCommon ) {
105
+ this .notificationConverterCommon = notificationConverterCommon ;
106
+ emailAwsZtsHealthBody = notificationConverterCommon .readContentFromFile (getClass ().getClassLoader (), EMAIL_TEMPLATE_NOTIFICATION_AWS_ZTS_HEALTH );
107
107
}
108
108
109
109
String getAwsZtsHealthBody (Map <String , String > metaDetails ) {
110
110
if (metaDetails == null ) {
111
111
return null ;
112
112
}
113
113
114
- return notificationToEmailConverterCommon .generateBodyFromTemplate (
114
+ return notificationConverterCommon .generateBodyFromTemplate (
115
115
metaDetails ,
116
116
emailAwsZtsHealthBody ,
117
117
NOTIFICATION_DETAILS_AFFECTED_ZTS ,
@@ -121,9 +121,9 @@ String getAwsZtsHealthBody(Map<String, String> metaDetails) {
121
121
122
122
@ Override
123
123
public NotificationEmail getNotificationAsEmail (Notification notification ) {
124
- String subject = notificationToEmailConverterCommon .getSubject (AWS_ZTS_HEALTH_SUBJECT );
124
+ String subject = notificationConverterCommon .getSubject (AWS_ZTS_HEALTH_SUBJECT );
125
125
String body = getAwsZtsHealthBody (notification .getDetails ());
126
- Set <String > fullyQualifiedEmailAddresses = notificationToEmailConverterCommon .getFullyQualifiedEmailAddresses (notification .getRecipients ());
126
+ Set <String > fullyQualifiedEmailAddresses = notificationConverterCommon .getFullyQualifiedEmailAddresses (notification .getRecipients ());
127
127
return new NotificationEmail (subject , body , fullyQualifiedEmailAddresses );
128
128
}
129
129
}
0 commit comments