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