Start shaping ResourcesInContext collection. Rename few path params.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@169755 82a268e6-3cf1-43bd-a215-b396298e98cfmaster
parent
18cba050f6
commit
162881f1ff
@ -1,12 +0,0 @@
|
||||
package org.gcube.resourcemanagement.manager.io.rs;
|
||||
|
||||
/**
|
||||
* REST paths exposed by the webapp for RMResource.
|
||||
*
|
||||
* @author Manuele Simi (ISTI - CNR)
|
||||
*
|
||||
*/
|
||||
public class RMResourcePath {
|
||||
public static final String ROOT = "resource";
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.gcube.resourcemanagement.manager.io.rs;
|
||||
|
||||
/**
|
||||
* Paths and parameters for the ResourcesInContext collection of resources.
|
||||
*
|
||||
* @author Manuele Simi (ISTI - CNR)
|
||||
*
|
||||
*/
|
||||
public class ResourcesInContextPath {
|
||||
public static final String ROOT = "resource";
|
||||
public static final String CONTEXT_UUID_PARAM = "ContextUUID";
|
||||
public static final String RESOURCE_UUID_PARAM = "ResourceUUID";
|
||||
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package org.gcube.resourcemanagement.manager.webapp.rs;
|
||||
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
import org.gcube.resourcemanagement.manager.io.rs.RMResourcePath;
|
||||
|
||||
/**
|
||||
* Methods for {@link org.gcube.informationsystem.model.entity.Resource} operations.
|
||||
*
|
||||
* @author Manuele Simi (ISTI-CNR)
|
||||
*
|
||||
*/
|
||||
@Path(RMResourcePath.ROOT)
|
||||
public class RMResource {
|
||||
|
||||
@PUT
|
||||
public void addToContext() {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package org.gcube.resourcemanagement.manager.webapp.rs;
|
||||
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import org.gcube.common.gxrest.response.outbound.GXOutboundSuccessResponse;
|
||||
|
||||
import static org.gcube.resourcemanagement.manager.io.rs.RMContextPath.CONTEXT_UUID_PARAM;
|
||||
import static org.gcube.resourcemanagement.manager.io.rs.ResourcesInContextPath.*;
|
||||
|
||||
|
||||
/**
|
||||
* Methods for {@link org.gcube.informationsystem.model.entity.Resource} operations.
|
||||
*
|
||||
* @author Manuele Simi (ISTI-CNR)
|
||||
*
|
||||
*/
|
||||
@Path(ROOT)
|
||||
public class ResourcesInContext {
|
||||
|
||||
|
||||
@PUT
|
||||
@Path("{" + CONTEXT_UUID_PARAM + "}/{"+ RESOURCE_UUID_PARAM +"}")
|
||||
public Response addToContext(@PathParam(CONTEXT_UUID_PARAM) String contextUUID,
|
||||
@PathParam(CONTEXT_UUID_PARAM) String resourceUUID) {
|
||||
|
||||
return GXOutboundSuccessResponse.newCREATEResponse(null).build();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue