approvalAdminUsername = approval.getAdmin().getUsername();
approvalAdminDN = CertTools.getSubjectDN(approval.getAdmin().getAdminInformation().getX509Certificate());
approveComment = approval.getComment();
}
Integer numAppr = Integer.valueOf(numberOfApprovalsLeft);
ApprovalNotificationParamGen paramGen = new ApprovalNotificationParamGen(requestDate, id, approvalTypeText, numAppr, approvalURL,
approveComment, requestAdminUsername, requestAdminDN, approvalAdminUsername, approvalAdminDN);
String subject = paramGen.interpolate(notificationSubject);
String message = paramGen.interpolate(notificationMsg);
List<String> toList = Arrays.asList(approvalAdminsEmail);
if (sendAdmin.getEmail() == null || sendAdmin.getEmail().length() == 0) {
logSession.log(sendAdmin, approvalRequest.getCAId(), LogConstants.MODULE_APPROVAL, new java.util.Date(), requestAdminUsername, null,
LogConstants.EVENT_ERROR_NOTIFICATION,
"Error sending notification to administrator requesting approval. Set a correct email to the administrator");