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 javax.xml.namespace.QName;
08:
09: import org.geotools.feature.FeatureCollection;
10:
11: /**
12: * Event carrying information about a change that happened/that is about to
13: * occur. The feature collection may be an in-memory one, or may be based on a
14: * real data store with a filter.
15: */
16: public class TransactionEvent {
17: private TransactionEventType type;
18: private FeatureCollection affectedFeatures;
19: private QName layerName;
20:
21: public TransactionEvent(TransactionEventType type, QName layerName,
22: FeatureCollection affectedFeatures) {
23: this .type = type;
24: this .layerName = layerName;
25: this .affectedFeatures = affectedFeatures;
26: }
27:
28: /**
29: * The type of change occurring
30: */
31: public TransactionEventType getType() {
32: return type;
33: }
34:
35: /**
36: * A collection of the features that are being manipulated. Accessible and usable only
37: * when the event is being thrown, if you store the event and try to access the collection later
38: * there is no guarantee it will still be usable.
39: */
40: public FeatureCollection getAffectedFeatures() {
41: return affectedFeatures;
42: }
43:
44: public QName getLayerName() {
45: return layerName;
46: }
47: }
|