01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: RescheduleTaskErrorException.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.scheduler.taskmanagers.exceptions;
09:
10: import com.uwyn.rife.scheduler.exceptions.TaskManagerException;
11: import java.util.Date;
12:
13: public class RescheduleTaskErrorException extends TaskManagerException {
14: private static final long serialVersionUID = -5612314711614259305L;
15:
16: private int mId = -1;
17: private long mNewPlanned = -1;
18: private String mFrequency = null;
19:
20: public RescheduleTaskErrorException(int id, long newPlanned,
21: String frequency, Throwable cause) {
22: super ("Error while trying to reschedule the task with id '"
23: + id + "', planned at '"
24: + new Date(newPlanned).toString()
25: + "' with frequency '" + frequency + "'.", cause);
26:
27: mId = id;
28: mNewPlanned = newPlanned;
29: mFrequency = frequency;
30: }
31:
32: public RescheduleTaskErrorException(int id, long newPlanned,
33: Throwable cause) {
34: super ("Error while trying to reschedule the task with id '"
35: + id + "', planned at '"
36: + new Date(newPlanned).toString()
37: + "' with no frequency.", cause);
38:
39: mId = id;
40: mNewPlanned = newPlanned;
41: }
42:
43: public int getTaskId() {
44: return mId;
45: }
46:
47: public long getNewPlanned() {
48: return mNewPlanned;
49: }
50:
51: public String getFrequency() {
52: return mFrequency;
53: }
54: }
|