1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kew.impl.mail;
17
18 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
19 import org.kuali.rice.kew.api.action.ActionItem;
20 import org.kuali.rice.kew.api.mail.ImmediateEmailReminderQueue;
21 import org.kuali.rice.kew.mail.service.ActionListEmailService;
22 import org.kuali.rice.kew.service.KEWServiceLocator;
23
24
25
26
27
28
29 public class ImmediateEmailReminderQueueImpl implements ImmediateEmailReminderQueue {
30
31 private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger
32 .getLogger(ImmediateEmailReminderQueueImpl.class);
33
34 private ActionListEmailService actionListEmailService;
35
36 public void sendReminder(ActionItem actionItem, Boolean skipOnApprovals) {
37 if (actionItem == null) {
38 throw new RiceIllegalArgumentException("actionItem was null");
39 }
40
41 if (skipOnApprovals == null) {
42 skipOnApprovals = false;
43 }
44
45 getActionListEmailService().sendImmediateReminder(actionItem, skipOnApprovals);
46 }
47
48 private ActionListEmailService getActionListEmailService() {
49 if (actionListEmailService == null)
50 actionListEmailService = (ActionListEmailService) KEWServiceLocator.getService(KEWServiceLocator.ACTION_LIST_EMAIL_SERVICE);
51
52 return actionListEmailService;
53 }
54
55
56
57
58 public void setActionListEmailService(ActionListEmailService actionListEmailService) {
59 this.actionListEmailService = actionListEmailService;
60 }
61
62 }