- if("Move".equalsIgnoreCase(mode)){
- subject = "Policy has been Moved to Other Scope : "+entityItem.getPolicyName();
- message = POLICY_WATCHING_MESSAGE + PolicyController.getSmtpApplicationName() + " has been Moved to Other Scope" + '\n' + '\n' + '\n'+ "Scope + Policy Name : " + policyName + '\n' + ACTIVE_VERSION +entityItem.getActiveVersion()
- + '\n' + '\n' + "Moved By : " +entityItem.getModifiedBy() + '\n' + "Moved Time : " +dateFormat.format(date) + '\n' + '\n' + '\n' + '\n' + EMAIL_MESSAGE_POSTSCRIPT;
- }
- String policyFileName = entityItem.getPolicyName();
- String checkPolicyName = policyName;
- if(checkPolicyName.endsWith(".xml") || checkPolicyName.contains(".")){
- checkPolicyName = checkPolicyName.substring(0, checkPolicyName.indexOf('.'));
- }
- if(policyFileName.contains("/")){
- policyFileName = policyFileName.substring(0, policyFileName.indexOf('/'));
- policyFileName = policyFileName.replace("/", File.separator);
- }
- if(policyFileName.contains("\\")){
- policyFileName = policyFileName.substring(0, policyFileName.indexOf('\\'));
- policyFileName = policyFileName.replace("\\", "\\\\");
+ if ("Move".equalsIgnoreCase(mode)) {
+ subject = "Policy has been Moved to Other Scope : " + entityItem.getPolicyName();
+ message = POLICY_WATCHING_MESSAGE + PolicyController.getSmtpApplicationName()
+ + " has been Moved to Other Scope" + '\n' + '\n' + '\n' + SCOPE_POLICY_NAME + policyName + '\n'
+ + ACTIVE_VERSION + entityItem.getActiveVersion() + '\n' + '\n' + "Moved By : "
+ + entityItem.getModifiedBy() + '\n' + "Moved Time : " + dateFormat.format(date) + '\n' + '\n'
+ + '\n' + '\n' + EMAIL_MESSAGE_POSTSCRIPT;