Draft delete method's signature in the RMContext resource.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162027 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
37b5f00beb
commit
aedbeed7de
|
@ -1,5 +1,6 @@
|
|||
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.Produces;
|
||||
|
@ -11,6 +12,9 @@ import org.gcube.common.authorization.library.provider.CalledMethodProvider;
|
|||
import org.gcube.informationsystem.model.entity.Context;
|
||||
import static org.gcube.resourcemanagement.manager.io.rs.RMContextPath.*;
|
||||
|
||||
import org.gcube.resourcemanagement.manager.io.exceptions.LocalCodeException;
|
||||
import org.gcube.resourcemanagement.manager.io.exceptions.WebCodeException;
|
||||
import org.gcube.resourcemanagement.manager.io.rs.RMCode;
|
||||
import org.gcube.resourcemanagement.manager.webapp.ResourceInitializer;
|
||||
import org.gcube.resourcemanagement.manager.webapp.context.CreateRequest;
|
||||
import org.gcube.resourcemanagement.manager.webapp.context.ResponseFromResourceRegistry;
|
||||
|
@ -52,6 +56,17 @@ public class RMContext {
|
|||
response = Response.status(Status.BAD_REQUEST)
|
||||
.entity(returned.getMessage().map(m -> m).orElse("Failed to create the context.")).build();
|
||||
}
|
||||
LocalCodeException lce = null
|
||||
throw new WebCodeException(lce);
|
||||
return response;
|
||||
}
|
||||
@DELETE
|
||||
@Produces(ResourceInitializer.APPLICATION_JSON_CHARSET_UTF_8)
|
||||
public Response delete(String json, @QueryParam(FORCE_RRURL_PARAM) String rrURL) {
|
||||
CalledMethodProvider.instance.set(String.format("DELETE /%s/%s/ID", APPLICATION_PATH, CONTEXT_ROOT));
|
||||
Response response = null;
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue