mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-08-22 09:16:29 +00:00
Check service group parent type
This commit is contained in:
@@ -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<NetworkTunnelStore> {}
|
||||
public class CustomServiceGroupStore extends AbstractServiceGroupStore<NetworkTunnelStore> {
|
||||
|
||||
@Override
|
||||
public void checkComplete() throws Throwable {
|
||||
super.checkComplete();
|
||||
Validators.isType(getParent(), NetworkTunnelStore.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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<FixedServiceCreatorStore>
|
||||
implements DataStore, FixedHierarchyStore {
|
||||
|
||||
@Override
|
||||
public void checkComplete() throws Throwable {
|
||||
super.checkComplete();
|
||||
Validators.isType(getParent(),FixedServiceCreatorStore.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<? extends DataStoreEntryRef<? extends FixedChildStore>> listChildren(DataStoreEntry self)
|
||||
|
||||
Reference in New Issue
Block a user