Change UUID param for context delete to be a @PathParam.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162340 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
53f07d6d61
commit
9c3f356eb4
|
@ -3,6 +3,7 @@ package org.gcube.resourcemanagement.manager.webapp.rs;
|
|||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
@ -51,10 +52,11 @@ public class RMContext {
|
|||
* e.g. DELETE /resource-manager/context/UUID?rrURL=http://registry:port//resource-registry
|
||||
*/
|
||||
@DELETE
|
||||
@Path("{" + UUID_PARAM + "}")
|
||||
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
|
||||
public Response delete(String uuid, @QueryParam(FORCE_RRURL_PARAM) String rrURL) {
|
||||
public Response delete(@PathParam(UUID_PARAM) String uuid, @QueryParam(FORCE_RRURL_PARAM) String rrURL) {
|
||||
CalledMethodProvider.instance.set(String.format("DELETE /%s/%s/ID", APPLICATION_PATH, CONTEXT_ROOT));
|
||||
logger.info("Requested to delete context {} with id {}", Context.NAME, uuid);
|
||||
logger.info("Requested to delete context with id {}", uuid);
|
||||
logger.info("Force URL: " + rrURL);
|
||||
ResponseFromResourceRegistry returned = DeleteRequest.fromUUID(UUID.fromString(uuid)).forceURL(rrURL).submit();
|
||||
return this.buildResponse(returned,"Context successfully deleted.","Failed to delete the context.");
|
||||
|
|
Loading…
Reference in New Issue