01: /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
02: * This code is licensed under the GPL 2.0 license, availible at the root
03: * application directory.
04: */
05: package org.geoserver.wfs;
06:
07: import org.opengis.util.CodeList;
08: import org.opengis.util.SimpleEnumerationType;
09: import java.util.ArrayList;
10: import java.util.List;
11:
12: public class TransactionEventType extends SimpleEnumerationType {
13: private static final long serialVersionUID = -4218786755116808448L;
14: private static final List VALUES = new ArrayList(5);
15:
16: /**
17: * Notification of inserted features, before insertion occurs (collection
18: * contains newly inserted features). Depending on the operation, only pre
19: * or post insert will be issued
20: */
21: public static final TransactionEventType PRE_INSERT = new TransactionEventType(
22: "PreInsert", "Features just inserted");
23:
24: /**
25: * Notification of inserted features, after insertion occurs (collection
26: * contains newly inserted features). Depending on the operation, only pre
27: * or post insert will be issued
28: */
29: public static final TransactionEventType POST_INSERT = new TransactionEventType(
30: "PostInsert", "Features just inserted");
31:
32: /**
33: * Notification of updated features, before update occurs (collection
34: * contains original values)
35: */
36: public static final TransactionEventType PRE_UPDATE = new TransactionEventType(
37: "PreUpdate", "Feature values before update");
38:
39: /**
40: * Notification of updated features, after update occurs (collection
41: * contains updated features)
42: */
43: public static final TransactionEventType POST_UPDATE = new TransactionEventType(
44: "PostUpdate", "Feature values after update");
45:
46: /**
47: * Notification of deleted features, before deletion occurs (collection
48: * contains features that will be deleted)
49: */
50: public static final TransactionEventType PRE_DELETE = new TransactionEventType(
51: "PostDelete", "Features just deleted");
52:
53: protected TransactionEventType(String name, String description) {
54: super (VALUES, name, description);
55: }
56:
57: public CodeList[] family() {
58: synchronized (VALUES) {
59: return (TransactionEventType[]) VALUES
60: .toArray(new TransactionEventType[VALUES.size()]);
61: }
62: }
63: }
|