X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Ftypicals%2FITypicalSynchronizationRule.java;fp=bundles%2Forg.simantics.modeling%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Ftypicals%2FITypicalSynchronizationRule.java;h=d94096d3db95069cdf959e4002aa1297731f2fcd;hb=969bd23cab98a79ca9101af33334000879fb60c5;hp=0000000000000000000000000000000000000000;hpb=866dba5cd5a3929bbeae85991796acb212338a08;p=simantics%2Fplatform.git 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 index 000000000..d94096d3d --- /dev/null +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/ITypicalSynchronizationRule.java @@ -0,0 +1,26 @@ +package org.simantics.modeling.typicals; + +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.exception.DatabaseException; + +/** + * Represents a single or composed synchronization operation from a typical + * template diagram element to an instance of the same element. + * + * @author Tuukka Lehtonen + */ +public interface ITypicalSynchronizationRule { + + /** + * @param graph + * @param template the template source of synchronization + * @param instance the target instance of synchronization + * @param info + * @return true if synchronization made changes to the database + * @throws DatabaseException + */ + boolean synchronize(WriteGraph graph, Resource template, Resource instance, TypicalInfo info) + throws DatabaseException; + +}