From dd430509d89628f310e9315e283f3976a20f1e72 Mon Sep 17 00:00:00 2001 From: "luca.frosini" Date: Fri, 11 Nov 2016 09:30:36 +0000 Subject: [PATCH] Added addtoContext API in entity management git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-api@134080 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../resourceregistry/api/ContextManagement.java | 1 + .../resourceregistry/api/EntityManagement.java | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/api/ContextManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/api/ContextManagement.java index ab92338..d68e799 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/api/ContextManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/api/ContextManagement.java @@ -25,4 +25,5 @@ public interface ContextManagement { public boolean delete(UUID context) throws ContextNotFoundException, ContextException; + } \ No newline at end of file diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/api/EntityManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/api/EntityManagement.java index 623e7c8..af542fd 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/api/EntityManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/api/EntityManagement.java @@ -6,6 +6,7 @@ package org.gcube.informationsystem.resourceregistry.api; import java.util.UUID; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; +import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextNotFoundException; import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.EntityException; import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.FacetNotFoundException; import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.ResourceNotFoundException; @@ -44,9 +45,8 @@ public interface EntityManagement { public String readResource(UUID uuid, String resourceType) throws ResourceNotFoundException, ResourceRegistryException; - public boolean deleteResource(UUID uuid) - throws ResourceNotFoundException, ResourceRegistryException, - ResourceRegistryException; + public boolean deleteResource(UUID uuid) throws ResourceNotFoundException, + ResourceRegistryException, ResourceRegistryException; /* Relations Methods */ @@ -66,4 +66,11 @@ public interface EntityManagement { public boolean detachResource(UUID relatedToUUID) throws ResourceRegistryException; + public boolean addResourceToContext(UUID uuid) + throws ResourceNotFoundException, ContextNotFoundException, + ResourceRegistryException; + + public boolean addFacetToContext(UUID uuid) throws FacetNotFoundException, + ContextNotFoundException, ResourceRegistryException; + }