01: package org.drools.audit.event;
02:
03: /*
04: * Copyright 2005 JBoss Inc
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: /**
20: * An event logged by the WorkingMemoryLogger.
21: * It is a snapshot of the event as it was thrown by the working memory.
22: *
23: * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen </a>
24: */
25: public class LogEvent {
26:
27: public static final int INSERTED = 1;
28: public static final int UPDATED = 2;
29: public static final int RETRACTED = 3;
30:
31: public static final int ACTIVATION_CREATED = 4;
32: public static final int ACTIVATION_CANCELLED = 5;
33: public static final int BEFORE_ACTIVATION_FIRE = 6;
34: public static final int AFTER_ACTIVATION_FIRE = 7;
35:
36: public static final int RULEFLOW_CREATED = 8;
37: public static final int RULEFLOW_COMPLETED = 9;
38: public static final int RULEFLOW_GROUP_ACTIVATED = 10;
39: public static final int RULEFLOW_GROUP_DEACTIVATED = 11;
40:
41: private int type;
42:
43: /**
44: * Creates a new log event.
45: *
46: * @param type The type of the log event.
47: */
48: public LogEvent(final int type) {
49: this .type = type;
50: }
51:
52: /**
53: * Returns the type of the log event as defined in this class.
54: *
55: * @return The type of the log event.
56: */
57: public int getType() {
58: return this.type;
59: }
60:
61: }
|