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 ACTIVE_VERSION = "Active Version : ";
private static final String SCOPE_POLICY_NAME = "Scope + Policy Name : ";
private static final String DELETED_TIME = "Deleted Time : ";
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'
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'
}
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()
}
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()
}
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'
}
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'
}
if("SwitchVersion".equalsIgnoreCase(mode)){
subject = "Policy has been SwitchedVersion : "+entityItem.getPolicyName();
}
if("SwitchVersion".equalsIgnoreCase(mode)){
subject = "Policy has been SwitchedVersion : "+entityItem.getPolicyName();
String policyFileName = findPolicyFileName(entityItem);
String query = "from WatchPolicyNotificationTable where policyName like:policyFileName";
List<Object> watchList = findWatchList(policyNotificationDao, policyFileName, query);
String policyFileName = findPolicyFileName(entityItem);
String query = "from WatchPolicyNotificationTable where policyName like:policyFileName";
List<Object> watchList = findWatchList(policyNotificationDao, policyFileName, query);
composeAndSendMail(mode, policyNotificationDao, subject, message, checkPolicyName, watchList);
}
composeAndSendMail(mode, policyNotificationDao, subject, message, checkPolicyName, watchList);
}