From e237d2447499472a828eec86d58b9f3c664053fb Mon Sep 17 00:00:00 2001 From: "luca.frosini" Date: Wed, 23 Nov 2016 17:14:32 +0000 Subject: [PATCH] Changed updateResource method signature git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-api@134638 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../resourceregistry/api/EntityManagement.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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 abb8462..bfca92a 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/api/EntityManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/api/EntityManagement.java @@ -45,7 +45,19 @@ public interface EntityManagement { public String readResource(UUID uuid, String resourceType) throws ResourceNotFoundException, ResourceRegistryException; - public String updateResource(String resourceType, String jsonRepresentation) + /** + * Update a resource means update ConsistsOf relations and related Facets + * presents in the jsonRepresentation argument. All existent ConsistsOf + * relations and related Facets are keep as they are. All IsRelatedTo + * relations and related resources (if any) are ignored. + * + * @param resourceUUID + * @param jsonRepresentation + * @return + * @throws ResourceNotFoundException + * @throws ResourceRegistryException + */ + public String updateResource(UUID resourceUUID, String jsonRepresentation) throws ResourceNotFoundException, ResourceRegistryException; public boolean deleteResource(UUID uuid) throws ResourceNotFoundException, @@ -69,7 +81,6 @@ public interface EntityManagement { public boolean detachResource(UUID isRelatedToUUID) throws ResourceRegistryException; - /* Context toggle methods */ public boolean addResourceToContext(UUID uuid) throws ResourceNotFoundException, ContextNotFoundException,