1
2
3
4
5 package org.abraracourcix.alipes.monitors.file;
6 import org.abraracourcix.alipes.common.Event;
7 /***
8 *
9 * An event representing all the things that could change about a file's state
10 * Java enumeration
11 * @author jdt
12 */
13 public final class FileEvent implements Event {
14 /***
15 * Enum value
16 */
17 public static final FileEvent UNKNOWN = new FileEvent("Unknown");
18 /***
19 * Enum value
20 */
21 public static final FileEvent EXISTS = new FileEvent("File exists");
22 /***
23 * Enum value
24 */
25 public static final FileEvent DOES_NOT_EXIST =
26 new FileEvent("File does not exist");
27 /***
28 * Enum value
29 */
30 public static final FileEvent DELETED =
31 new FileEvent("File has been deleted");
32 /***
33 * Enum value
34 */
35 public static final FileEvent CREATED =
36 new FileEvent("File has been created");
37 /***
38 * Enum value
39 */
40 public static final FileEvent UPDATED =
41 new FileEvent("File has been updated");
42 /***
43 * Enum value
44 */
45 public static final FileEvent IS_STALE =
46 new FileEvent("File is out of date");
47 /***
48 * Enum value
49 */
50 public static final FileEvent GONE_STALE =
51 new FileEvent("File has gone out of date");
52 /***
53 * Text describing the event
54 */
55 private String description;
56 /***
57 * The usual toString method, returning a description of the event
58 *
59 * @return the event
60 */
61 public String toString() {
62 return description;
63 }
64 /***
65 * Constructor
66 *
67 * @param description
68 * of event
69 */
70 private FileEvent(final String description) {
71 this.description = description;
72 }
73 }
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94