]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/ITypicalSynchronizationRule.java
Fixed ComponentTypeCommands.setUnit to support unit == null
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / typicals / ITypicalSynchronizationRule.java
1 package org.simantics.modeling.typicals;
2
3 import org.simantics.db.Resource;
4 import org.simantics.db.WriteGraph;
5 import org.simantics.db.exception.DatabaseException;
6
7 /**
8  * Represents a single or composed synchronization operation from a typical
9  * template diagram element to an instance of the same element.
10  * 
11  * @author Tuukka Lehtonen
12  */
13 public interface ITypicalSynchronizationRule {
14
15     /**
16      * @param graph
17      * @param template the template source of synchronization
18      * @param instance the target instance of synchronization
19      * @param info
20      * @return <code>true</code> if synchronization made changes to the database
21      * @throws DatabaseException
22      */
23     boolean synchronize(WriteGraph graph, Resource template, Resource instance, TypicalInfo info)
24             throws DatabaseException;
25
26 }