diff --git a/ext/base/src/main/java/io/xpipe/ext/base/service/CustomServiceGroupStore.java b/ext/base/src/main/java/io/xpipe/ext/base/service/CustomServiceGroupStore.java index bb1826872..703987288 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/service/CustomServiceGroupStore.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/service/CustomServiceGroupStore.java @@ -1,5 +1,6 @@ package io.xpipe.ext.base.service; +import io.xpipe.app.util.Validators; import io.xpipe.core.store.NetworkTunnelStore; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -14,4 +15,12 @@ import lombok.extern.jackson.Jacksonized; @SuperBuilder @Jacksonized @JsonTypeName("customServiceGroup") -public class CustomServiceGroupStore extends AbstractServiceGroupStore {} +public class CustomServiceGroupStore extends AbstractServiceGroupStore { + + @Override + public void checkComplete() throws Throwable { + super.checkComplete(); + Validators.isType(getParent(), NetworkTunnelStore.class); + } + +} diff --git a/ext/base/src/main/java/io/xpipe/ext/base/service/FixedServiceGroupStore.java b/ext/base/src/main/java/io/xpipe/ext/base/service/FixedServiceGroupStore.java index 834833e6e..196d5c650 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/service/FixedServiceGroupStore.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/service/FixedServiceGroupStore.java @@ -1,12 +1,12 @@ package io.xpipe.ext.base.service; +import com.fasterxml.jackson.annotation.JsonTypeName; import io.xpipe.app.storage.DataStoreEntry; import io.xpipe.app.storage.DataStoreEntryRef; import io.xpipe.app.util.FixedHierarchyStore; +import io.xpipe.app.util.Validators; import io.xpipe.core.store.DataStore; import io.xpipe.core.store.FixedChildStore; - -import com.fasterxml.jackson.annotation.JsonTypeName; import lombok.AccessLevel; import lombok.Getter; import lombok.experimental.FieldDefaults; @@ -23,6 +23,12 @@ import java.util.List; public class FixedServiceGroupStore extends AbstractServiceGroupStore implements DataStore, FixedHierarchyStore { + @Override + public void checkComplete() throws Throwable { + super.checkComplete(); + Validators.isType(getParent(),FixedServiceCreatorStore.class); + } + @Override @SuppressWarnings("unchecked") public List> listChildren(DataStoreEntry self)