From ebb17ba6bfc237b01e1f2a152e2591c175c1b01c Mon Sep 17 00:00:00 2001 From: "luca.frosini" Date: Fri, 18 Nov 2016 18:35:23 +0000 Subject: [PATCH] Fixing POST and PUT methods in entity manager to be able to manage large content git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@134391 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../resourceregistry/resources/EntityManager.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/resources/EntityManager.java b/src/main/java/org/gcube/informationsystem/resourceregistry/resources/EntityManager.java index e177348..1d82ead 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/resources/EntityManager.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/resources/EntityManager.java @@ -169,13 +169,12 @@ public class EntityManager { @PUT @Path(EntityPath.CONSISTS_OF_PATH_PART + "/" + EntityPath.SOURCE_PATH_PART + "/{" + SOURCE_ID_PATH_PARAM + "}/" + EntityPath.TARGET_PATH_PART - + "/{" + TARGET_ID_PATH_PARAM + "}/{" + EntityPath.TYPE_PATH_PARAM - + "}") + + "/{" + TARGET_ID_PATH_PARAM + "}/{" + TYPE_PATH_PARAM + "}") @Produces(MediaType.APPLICATION_JSON) public String attachFacet( @PathParam(SOURCE_ID_PATH_PARAM) String resourceUUID, @PathParam(TARGET_ID_PATH_PARAM) String facetUUID, - @PathParam(EntityPath.TYPE_PATH_PARAM) String type, String json) + @PathParam(TYPE_PATH_PARAM) String type, String json) throws FacetNotFoundException, ResourceNotFoundException, ResourceRegistryException { logger.info( @@ -221,13 +220,13 @@ public class EntityManager { @Path(EntityPath.IS_RELATED_TO_PATH_PART + "/" + EntityPath.SOURCE_PATH_PART + "/{" + SOURCE_ID_PATH_PARAM + "}/" + EntityPath.TARGET_PATH_PART + "/{" + TARGET_ID_PATH_PARAM + "}/{" - + EntityPath.TYPE_PATH_PARAM + "}") + + TYPE_PATH_PARAM + "}") @Consumes({ MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) public String attachResource( @PathParam(SOURCE_ID_PATH_PARAM) String sourceResourceUUID, @PathParam(TARGET_ID_PATH_PARAM) String targetResourceUUID, - @PathParam(EntityPath.TYPE_PATH_PARAM) String type, String json) + @PathParam(TYPE_PATH_PARAM) String type, String json) throws ResourceNotFoundException, ResourceRegistryException { logger.info( "requested to attach source {} {} and target {} {} ({} Type {}) with properties {}", @@ -276,7 +275,6 @@ public class EntityManager { return entityManager.addResourceToContext(UUID.fromString(uuid)); } - /** * e.g POST * /resource-registry/add/facet/f6931232-c034-4979-9b2f-7193d3fba7df