resource-registry/src/main/java/org/gcube/informationsystem/resourceregistry/instances/model/ERManagement.java

54 lines
2.1 KiB
Java
Raw Normal View History

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;
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextException;
2021-02-16 17:17:40 +01:00
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.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
*/
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
}