X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FXSupportImpl.java;h=05870668616b258e648634e5ac4383a88f8277f1;hp=1e8d2731ff4bb65bc47983d5f162412882e636c7;hb=4aba159170fc72d39c2f930ea224aa71f4cdc2e7;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07 diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/XSupportImpl.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/XSupportImpl.java index 1e8d2731f..058706686 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/XSupportImpl.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/XSupportImpl.java @@ -16,6 +16,7 @@ import org.simantics.db.request.WriteTraits; import org.simantics.db.service.ClusterUID; import org.simantics.db.service.SerialisationSupport; import org.simantics.db.service.XSupport; +import org.simantics.utils.datastructures.Pair; public class XSupportImpl implements XSupport { final private boolean DEBUG = false; @@ -112,6 +113,12 @@ public class XSupportImpl implements XSupport { session.clusterSetsSupport.clear(); } } + + @Override + public Pair getServiceMode() { + return Pair.make((session.serviceMode & 1) == 1, (session.serviceMode & 2) == 2); + } + @Override public Resource convertDelayedResourceToResource(Resource resource) { return DelayedWriteGraph.convertDelayedResource(resource); @@ -162,4 +169,11 @@ public class XSupportImpl implements XSupport { public boolean rolledback() { return session.graphSession.rolledback(); } + + @Override + public boolean isClusterLoaded(ClusterUID clusterUID) throws DatabaseException { + ClusterImpl clusterImpl = session.clusterTable.getClusterByClusterUIDOrMakeProxy(clusterUID); + return clusterImpl.isLoaded(); + } + }