]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.common/src/org/simantics/db/common/utils/CommonDBUtils.java
Set resources immutable
[simantics/platform.git] / bundles / org.simantics.db.common / src / org / simantics / db / common / utils / CommonDBUtils.java
index dcd3939a4f2e64d73ed288a1856b471c1ab8fd46..747e43cf1a24f1e9b2fe0c34500c285894e501cf 100644 (file)
@@ -318,6 +318,11 @@ public class CommonDBUtils {
        return xs.isClusterLoaded(clusterUID);
     }
     
+    public static void setImmutable(ReadGraph graph, Resource resource, boolean value) throws DatabaseException {
+        XSupport xs = graph.getService(XSupport.class);
+        xs.setImmutable(resource, value);
+    }
+
     public static Type getSCLType(ReadGraph graph, RuntimeEnvironment runtimeEnvironment, String typeText) throws DatabaseException {
         try {
             return Environments.getType(runtimeEnvironment.getEnvironment(), typeText);