01: package com.technoetic.xplanner.mail;
02:
03: import java.util.*;
04:
05: import org.apache.log4j.Logger;
06: import org.quartz.JobExecutionContext;
07: import org.quartz.JobExecutionException;
08: import org.springframework.scheduling.quartz.QuartzJobBean;
09:
10: import com.technoetic.xplanner.util.TimeGenerator;
11:
12: /**
13: * User: Tomasz Siwiec
14: * Date: Nov 02, 2004
15: * Time: 9:52:55 PM
16: */
17: public class MissingTimeEntryEmailJob extends QuartzJobBean {
18: private Logger log = Logger
19: .getLogger(MissingTimeEntryEmailJob.class);
20: public static final String NAME = "emailnotificationJob";
21: public static final String GROUP = "xplanner";
22:
23: private MissingTimeEntryNotifier missingTimeEntryNotifier;
24: private TimeGenerator timeGenerator;
25: private Date date = null;
26:
27: public MissingTimeEntryNotifier getMissingTimeEntryNotifier() {
28: return missingTimeEntryNotifier;
29: }
30:
31: public void setMissingTimeEntryNotifier(
32: MissingTimeEntryNotifier missingTimeEntryNotifier) {
33: this .missingTimeEntryNotifier = missingTimeEntryNotifier;
34: }
35:
36: public TimeGenerator getTimeGenerator() {
37: return timeGenerator == null ? new TimeGenerator()
38: : timeGenerator;
39: }
40:
41: public void setTimeGenerator(TimeGenerator timeGenerator) {
42: this .timeGenerator = timeGenerator;
43: }
44:
45: protected void executeInternal(JobExecutionContext context)
46: throws JobExecutionException {
47: missingTimeEntryNotifier.execute();
48: }
49:
50: }
|