1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.rice.kew.mail;
18
19 import org.kuali.rice.core.api.config.property.ConfigContext;
20 import org.kuali.rice.kew.service.KEWServiceLocator;
21 import org.kuali.rice.kew.util.KEWConstants;
22 import org.quartz.Job;
23 import org.quartz.JobExecutionContext;
24 import org.quartz.JobExecutionException;
25
26
27
28
29
30
31
32 public class WeeklyEmailJob implements Job {
33
34 public void execute(JobExecutionContext ctx) throws JobExecutionException {
35 if (shouldExecute()) {
36 KEWServiceLocator.getActionListEmailService().sendWeeklyReminder();
37 }
38 }
39
40 protected boolean shouldExecute() {
41 return Boolean.valueOf(ConfigContext.getCurrentContextConfig().getProperty(KEWConstants.WEEKLY_EMAIL_ACTIVE));
42 }
43
44 }