2021-02-05 17:50:16 +01:00
|
|
|
package org.gcube.informationsystem.resourceregistry.instances.model;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
import org.gcube.com.fasterxml.jackson.databind.JsonNode;
|
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException;
|
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException;
|
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
2022-02-01 16:49:12 +01:00
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextException;
|
2021-10-25 11:00:54 +02:00
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException;
|
2021-02-05 17:50:16 +01:00
|
|
|
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext;
|
|
|
|
|
|
|
|
public interface ERManagement {
|
|
|
|
|
|
|
|
public boolean isHonourPropagationConstraintsInContextSharing();
|
|
|
|
|
|
|
|
public void setHonourPropagationConstraintsInContextSharing(boolean honourPropagationConstraintsInContextSharing);
|
|
|
|
|
2021-03-05 10:46:59 +01:00
|
|
|
public Map<UUID,JsonNode> getAffectedInstances();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set source security context to evaluate addToContext
|
|
|
|
* @param sourceSecurityContext the source security context
|
|
|
|
*/
|
|
|
|
public void setSourceSecurityContext(SecurityContext sourceSecurityContext);
|
|
|
|
|
|
|
|
public SecurityContext getSourceSecurityContext();
|
|
|
|
|
2021-03-05 14:41:02 +01:00
|
|
|
public void internalAddToContext()
|
2021-02-05 17:50:16 +01:00
|
|
|
throws ContextException, ResourceRegistryException;
|
|
|
|
|
2021-03-05 14:41:02 +01:00
|
|
|
public void addToContext(UUID contextUUID)
|
2021-02-16 17:17:40 +01:00
|
|
|
throws SchemaViolationException, NotFoundException, ContextException, ResourceRegistryException;
|
2021-03-05 10:46:59 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set target security context of addToContext/removeFromContext
|
|
|
|
* @param targetSecurityContext
|
|
|
|
*/
|
2021-03-01 17:09:09 +01:00
|
|
|
public void setTargetSecurityContext(SecurityContext targetSecurityContext);
|
|
|
|
|
2021-03-05 10:46:59 +01:00
|
|
|
public SecurityContext getTargetSecurityContext();
|
|
|
|
|
2021-03-05 14:41:02 +01:00
|
|
|
public void internalRemoveFromContext()
|
2021-02-05 17:50:16 +01:00
|
|
|
throws ContextException, ResourceRegistryException;
|
|
|
|
|
2021-03-05 14:41:02 +01:00
|
|
|
public void removeFromContext(UUID contextUUID)
|
2021-02-16 17:17:40 +01:00
|
|
|
throws SchemaViolationException, NotFoundException, ContextException, ResourceRegistryException;
|
2021-02-05 17:50:16 +01:00
|
|
|
|
2021-03-04 17:08:54 +01:00
|
|
|
// public void sanityCheck() throws SchemaViolationException, ResourceRegistryException;
|
2021-02-05 17:50:16 +01:00
|
|
|
|
2021-03-05 10:46:59 +01:00
|
|
|
public AvailableInAnotherContextException getSpecificAvailableInAnotherContextException(String message);
|
2021-02-05 17:50:16 +01:00
|
|
|
|
2022-06-08 16:06:56 +02:00
|
|
|
public void setForceAddToContext(Boolean forceAddToContext);
|
|
|
|
|
2021-02-05 17:50:16 +01:00
|
|
|
}
|