1 package org.esigate.events;
2
3
4
5
6
7
8 public class EventDefinition {
9
10
11
12
13 public static final int TYPE_DEFAULT = 1;
14
15
16
17
18 public static final int TYPE_POST = 2;
19
20 private String id;
21 private int type;
22
23
24
25
26
27
28
29
30
31 public EventDefinition(String id, int type) {
32 this.id = id;
33 this.type = type;
34 }
35
36 public String getId() {
37 return id;
38 }
39
40 public int getType() {
41 return type;
42 }
43
44 @Override
45 public String toString() {
46
47 String strType = Integer.toString(type);
48
49 if (type == TYPE_POST) {
50 strType = "Post";
51 } else if (type == TYPE_DEFAULT) {
52 strType = "Default";
53 }
54
55 return id + " (" + strType + ")";
56 }
57
58 }