From 0048c34f9df2cb585474c79fe9afa41fc13aa2b8 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Thu, 2 Feb 2023 21:09:22 +0100 Subject: [PATCH] Add "delete" propagation constraint property --- .../resourceregistry/resourcemanager/EServiceManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/gcube/smartgears/connector/resourceregistry/resourcemanager/EServiceManager.java b/src/main/java/org/gcube/smartgears/connector/resourceregistry/resourcemanager/EServiceManager.java index 2ebc725..ca288c4 100644 --- a/src/main/java/org/gcube/smartgears/connector/resourceregistry/resourcemanager/EServiceManager.java +++ b/src/main/java/org/gcube/smartgears/connector/resourceregistry/resourcemanager/EServiceManager.java @@ -21,6 +21,7 @@ import org.gcube.informationsystem.model.reference.entities.Resource; import org.gcube.informationsystem.model.reference.properties.Header; import org.gcube.informationsystem.model.reference.properties.PropagationConstraint; import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.AddConstraint; +import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.DeleteConstraint; import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.RemoveConstraint; import org.gcube.informationsystem.model.reference.relations.ConsistsOf; import org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache; @@ -370,6 +371,7 @@ public class EServiceManager { HostingNode hostingNode = ((HostingNodeManager) applicationContext.container().properties().lookup(Constants.HOSTING_NODE_MANAGER_PROPERTY).value()).getHostingNode(); PropagationConstraint propagationConstraint = new PropagationConstraintImpl(); + propagationConstraint.setDeleteConstraint(DeleteConstraint.cascade); propagationConstraint.setRemoveConstraint(RemoveConstraint.cascade); propagationConstraint.setAddConstraint(AddConstraint.propagate); Activates activates = new ActivatesImpl<>(hostingNode, eService, propagationConstraint);