diff options
author | burdziak <olaf.burdziakowski@nokia.com> | 2019-01-21 15:36:51 +0100 |
---|---|---|
committer | burdziak <olaf.burdziakowski@nokia.com> | 2019-01-21 15:36:51 +0100 |
commit | 918a6ce5f0470634e5e36c67d332b6654eaa2ca8 (patch) | |
tree | 183abee6ad7460a97fd81de8067f094dd9b32171 | |
parent | 1aeb1d9da9b06a38e6b9760085cb0fc51b8faf18 (diff) |
Improved snar issues
Change-Id: Iaaf16a8e7e30174509cfb40702185c9b2fc2961a
Issue-ID: POLICY-1432
Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
-rw-r--r-- | POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyNotificationMail.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyNotificationMail.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyNotificationMail.java index da73613fc..a1bb73354 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyNotificationMail.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyNotificationMail.java @@ -56,6 +56,7 @@ public class PolicyNotificationMail{ private static final String ACTIVE_VERSION = "Active Version : "; private static final String SCOPE_POLICY_NAME = "Scope + Policy Name : "; private static final String DELETED_TIME = "Deleted Time : "; + private static final String DELETED_BY = "Deleted By : "; private static Logger policyLogger = FlexLogger.getLogger(PolicyNotificationMail.class); @Bean @@ -102,17 +103,17 @@ public class PolicyNotificationMail{ if("DeleteAll".equalsIgnoreCase(mode)){ subject = "Policy has been Deleted : "+entityItem.getPolicyName(); message = POLICY_WATCHING_MESSAGE + PolicyController.getSmtpApplicationName() + " has been Deleted with All Versions" + '\n' + '\n' + '\n'+ SCOPE_POLICY_NAME + policyName + '\n' - + '\n' + '\n' + "Deleted By : " +entityItem.getModifiedBy() + '\n' + DELETED_TIME +dateFormat.format(date) + '\n' + '\n' + '\n' + '\n' + EMAIL_MESSAGE_POSTSCRIPT; + + '\n' + '\n' + DELETED_BY +entityItem.getModifiedBy() + '\n' + DELETED_TIME +dateFormat.format(date) + '\n' + '\n' + '\n' + '\n' + EMAIL_MESSAGE_POSTSCRIPT; } if("DeleteOne".equalsIgnoreCase(mode)){ subject = "Policy has been Deleted : "+entityItem.getPolicyName(); message = POLICY_WATCHING_MESSAGE + PolicyController.getSmtpApplicationName() + " has been Deleted" + '\n' + '\n' + '\n'+ SCOPE_POLICY_NAME + policyName + '\n' +"Policy Version : " +entityItem.getActiveVersion() - + '\n' + '\n' + "Deleted By : " +entityItem.getModifiedBy() + '\n' + DELETED_TIME +dateFormat.format(date) + '\n' + '\n' + '\n' + '\n' + EMAIL_MESSAGE_POSTSCRIPT; + + '\n' + '\n' + DELETED_BY +entityItem.getModifiedBy() + '\n' + DELETED_TIME +dateFormat.format(date) + '\n' + '\n' + '\n' + '\n' + EMAIL_MESSAGE_POSTSCRIPT; } if("DeleteScope".equalsIgnoreCase(mode)){ subject = "Scope has been Deleted : "+entityItem.getPolicyName(); message = "The Scope Which you are watching in " + PolicyController.getSmtpApplicationName() + " has been Deleted" + '\n' + '\n' + '\n'+ "Scope + Scope Name : " + policyName + '\n' - + '\n' + '\n' + "Deleted By : " +entityItem.getModifiedBy() + '\n' + DELETED_TIME +dateFormat.format(date) + '\n' + '\n' + '\n' + '\n' + EMAIL_MESSAGE_POSTSCRIPT; + + '\n' + '\n' + DELETED_BY +entityItem.getModifiedBy() + '\n' + DELETED_TIME +dateFormat.format(date) + '\n' + '\n' + '\n' + '\n' + EMAIL_MESSAGE_POSTSCRIPT; } if("SwitchVersion".equalsIgnoreCase(mode)){ subject = "Policy has been SwitchedVersion : "+entityItem.getPolicyName(); @@ -129,7 +130,9 @@ public class PolicyNotificationMail{ String policyFileName = findPolicyFileName(entityItem); String query = "from WatchPolicyNotificationTable where policyName like:policyFileName"; List<Object> watchList = findWatchList(policyNotificationDao, policyFileName, query); - if (watchList == null) return; + if (watchList == null) { + return; + } composeAndSendMail(mode, policyNotificationDao, subject, message, checkPolicyName, watchList); } |