1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package mocks;
17
18 import org.apache.log4j.Logger;
19 import org.kuali.rice.kew.mail.EmailBody;
20 import org.kuali.rice.kew.mail.EmailFrom;
21 import org.kuali.rice.kew.mail.EmailSubject;
22 import org.kuali.rice.kew.mail.EmailTo;
23 import org.kuali.rice.kew.mail.service.impl.DefaultEmailService;
24
25
26
27
28
29
30
31
32 public class MockDefaultEmailServiceImpl extends DefaultEmailService {
33 private static final Logger LOG = Logger.getLogger(MockDefaultEmailServiceImpl.class);
34
35
36
37
38 @Override
39 public void sendEmail(EmailFrom from, EmailTo to, EmailSubject subject, EmailBody body, boolean htmlMessage) {
40 String toValue = (to == null) ? "" : to.getToAddress();
41 String fromValue = (from == null) ? "" : from.getFromAddress();
42 String subjectValue = (subject == null) ? "" : subject.getSubject();
43 String bodyValue = (body == null) ? "" : body.getBody();
44 LOG.debug("WILL NOT send e-mail message with to '" + toValue + "'... from '" + fromValue + "'... subject '" + subjectValue + "'... and body '" + bodyValue);
45 }
46 }