Added support for delete propagation constraint
This commit is contained in:
parent
0a5b831301
commit
7e010594a6
|
@ -20,6 +20,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.exceptions.AvailableInAnotherContextException;
|
||||
|
@ -364,8 +365,10 @@ 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<HostingNode, EService> activates = new ActivatesImpl<>(hostingNode, eService, propagationConstraint);
|
||||
|
||||
try {
|
||||
|
|
|
@ -305,7 +305,7 @@ public class HostingNodeManager {
|
|||
|
||||
networkingFacet.setAdditionalProperty("Port", containerConfiguration.port());
|
||||
IsIdentifiedBy<HostingNode, NetworkingFacet> isIdentifiedBy = new IsIdentifiedByImpl<>(hostingNode,
|
||||
networkingFacet, null);
|
||||
networkingFacet);
|
||||
hostingNode.addFacet(isIdentifiedBy);
|
||||
|
||||
List<CPUFacet> cpuFacets = getCPUFacets();
|
||||
|
|
Loading…
Reference in New Issue