Package org.opencustomer.connector.mail.messages

Examples of org.opencustomer.connector.mail.messages.StatusEmail


                if(user.getPerson() != null && user.getPerson().getEmail() != null) {
                    if(log.isDebugEnabled())
                        log.debug("generate status mail for: " + user.getUserName());
                   
                    try {
                        StatusEmail mail = new StatusEmail();
                        mail.addRecipient(user);
                        List<JobVO> jobs = new JobDAO().getByUser(user, startDate.getTime(), endDate.getTime());
                        List<EventVO> events = new EventDAO().getByTimePeriod(user.getCalendar(), startDate.getTime(), endDate.getTime(), user);
                        if(!jobs.isEmpty() || !events.isEmpty()) {
                            if(log.isDebugEnabled())
                                log.debug(jobs.size() + "jobs found");
                            for(JobVO job : jobs)
                                mail.addJobs(job);
                           
                            if(log.isDebugEnabled())
                                log.debug(events.size() + "events found");
                            for(EventVO event : events)
                                mail.addEvents(event);
                           
                            if(log.isDebugEnabled())
                                log.debug("sending status mail for: " + user.getUserName());
                            new MailService().send(mail);
                        } else {
View Full Code Here

TOP

Related Classes of org.opencustomer.connector.mail.messages.StatusEmail

Copyright © 2018 www.massapicom. 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.