]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/ITypicalSynchronizationRule.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / typicals / ITypicalSynchronizationRule.java
diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/ITypicalSynchronizationRule.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/ITypicalSynchronizationRule.java
new file mode 100644 (file)
index 0000000..d94096d
--- /dev/null
@@ -0,0 +1,26 @@
+package org.simantics.modeling.typicals;\r
+\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.WriteGraph;\r
+import org.simantics.db.exception.DatabaseException;\r
+\r
+/**\r
+ * Represents a single or composed synchronization operation from a typical\r
+ * template diagram element to an instance of the same element.\r
+ * \r
+ * @author Tuukka Lehtonen\r
+ */\r
+public interface ITypicalSynchronizationRule {\r
+\r
+    /**\r
+     * @param graph\r
+     * @param template the template source of synchronization\r
+     * @param instance the target instance of synchronization\r
+     * @param info\r
+     * @return <code>true</code> if synchronization made changes to the database\r
+     * @throws DatabaseException\r
+     */\r
+    boolean synchronize(WriteGraph graph, Resource template, Resource instance, TypicalInfo info)\r
+            throws DatabaseException;\r
+\r
+}\r