--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.db.event;\r
+\r
+import org.simantics.db.ChangeSet;\r
+import org.simantics.db.MetadataI;\r
+import org.simantics.db.ReadGraph;\r
+import org.simantics.db.Session;\r
+import org.simantics.db.WriteGraph;\r
+import org.simantics.db.service.TeamSupport;\r
+\r
+/**\r
+ * An event structure for {@link ChangeListener}.\r
+ * \r
+ * Informs of incoming changes in a Session, i.e. a completed transaction or an\r
+ * update external to this Session caused by a synchronize operation using\r
+ * {@link TeamSupport}.\r
+ * \r
+ * @author Tuukka Lehtonen\r
+ * @see ChangeListener\r
+ * @see Session\r
+ */\r
+public class ChangeEvent {\r
+\r
+ private final Session session;\r
+\r
+ private final ReadGraph graph;\r
+ \r
+ private final WriteGraph metadataGraph;\r
+\r
+ private final ChangeSet changes;\r
+\r
+ public ChangeEvent(Session session, ReadGraph graph, WriteGraph metadataGraph, ChangeSet changeSet) {\r
+ this.session = session;\r
+ this.graph = graph;\r
+ this.metadataGraph = metadataGraph;\r
+ this.changes = changeSet;\r
+ }\r
+\r
+ public Session getSession() {\r
+ return session;\r
+ }\r
+\r
+ public ReadGraph getGraph() {\r
+ return graph;\r
+ }\r
+\r
+ public ChangeSet getChanges() {\r
+ return changes;\r
+ }\r
+ \r
+ public MetadataI getMetadataI() {\r
+ return metadataGraph;\r
+ }\r
+ \r
+\r
+}\r