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
This commit is contained in:
parent
28e62b7b83
commit
ebb17ba6bf
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue