Examples of MailActionInfo


Examples of org.ejbca.core.model.services.actions.MailActionInfo

                    String msg = intres.getLocalizedMessage("services.errorworker.errornoemail", userDataVO.getUsername());
                    log.info(msg);
                  } else {
                    // Populate end user message
                    String message = new UserNotificationParamGen(userDataVO).interpolate(getEndUserMessage());
                    MailActionInfo mailActionInfo = new MailActionInfo(userDataVO.getEmail(), getEndUserSubject(), message);
                    userEmailQueue.add(new EmailCertData(userDataVO.getUsername(), mailActionInfo));
                  }
                }
                if (isSendToAdmins()) {
                  // Populate admin message
                  String message = new UserNotificationParamGen(userDataVO).interpolate(getAdminMessage());
                  MailActionInfo mailActionInfo = new MailActionInfo(null, getAdminSubject(), message);
                  adminEmailQueue.add(new EmailCertData(userDataVO.getUsername(), mailActionInfo));
                }
            } catch (Exception e) {
                log.error("Error running service work: ", e);
                throw new ServiceExecutionFailedException(e);
View Full Code Here

Examples of org.ejbca.core.model.services.actions.MailActionInfo

                                    log.info(msg);
                                } else {
                                    // Populate end user message
                                    log.debug("Adding to email queue for user: " + userData.getEmail());
                                    String message = new UserNotificationParamGen(userData, cert).interpolate(getEndUserMessage());
                                    MailActionInfo mailActionInfo = new MailActionInfo(userData.getEmail(), getEndUserSubject(), message);
                                    userEmailQueue.add(new EmailCertData(fingerprint, mailActionInfo));
                                }
                            }
                        } else {
                            log.debug("Trying to send notification to user, but no UserData can be found for user '" + username
                                    + "', will only send to admin if admin notifications are defined.");
                        }
                        if (isSendToAdmins()) {
                            // If we did not have any user for this, we will simply use empty values for substitution
                            if (userData == null) {
                                userData = new UserDataVO();
                                userData.setUsername(username);
                            }
                            // Populate admin message
                            log.debug("Adding to email queue for admin");
                            String message = new UserNotificationParamGen(userData, cert).interpolate(getAdminMessage());
                            MailActionInfo mailActionInfo = new MailActionInfo(null, getAdminSubject(), message);
                            adminEmailQueue.add(new EmailCertData(fingerprint, mailActionInfo));
                        }
                        if (!isSendToEndUsers() && !isSendToAdmins()) {
                            // a little bit of a kludge to make JUnit testing feasible...
                            log.debug("nobody to notify for cert with fp:" + fingerprint);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.