Adding interface
This commit is contained in:
parent
35586fa674
commit
15bacdbfef
6
pom.xml
6
pom.xml
|
@ -62,7 +62,11 @@
|
||||||
<artifactId>authorization-utils</artifactId>
|
<artifactId>authorization-utils</artifactId>
|
||||||
<version>[2.1.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
<version>[2.1.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.data-catalogue</groupId>
|
||||||
|
<artifactId>gcat-api</artifactId>
|
||||||
|
<version>[2.3.2, 3.0.0-SNAPSHOT)</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.glassfish.jersey.containers</groupId>
|
<groupId>org.glassfish.jersey.containers</groupId>
|
||||||
<artifactId>jersey-container-servlet</artifactId>
|
<artifactId>jersey-container-servlet</artifactId>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package org.gcube.grsf.publisher.rest;
|
package org.gcube.grsf.publisher.rest;
|
||||||
|
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.PathParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
|
@ -8,4 +9,8 @@ import javax.ws.rs.Path;
|
||||||
@Path("fishery/{source}/")
|
@Path("fishery/{source}/")
|
||||||
public class FisheryRESTAPIs extends BaseRESTAPIs {
|
public class FisheryRESTAPIs extends BaseRESTAPIs {
|
||||||
|
|
||||||
|
@PathParam("source")
|
||||||
|
protected String source;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,19 @@
|
||||||
package org.gcube.grsf.publisher.rest;
|
package org.gcube.grsf.publisher.rest;
|
||||||
|
|
||||||
|
import javax.ws.rs.Consumes;
|
||||||
|
import javax.ws.rs.DefaultValue;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
import javax.ws.rs.Path;
|
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.MediaType;
|
||||||
|
|
||||||
|
import org.gcube.gcat.api.GCatConstants;
|
||||||
|
|
||||||
|
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
|
||||||
|
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
|
@ -8,4 +21,33 @@ import javax.ws.rs.Path;
|
||||||
@Path("stock/{source}/")
|
@Path("stock/{source}/")
|
||||||
public class StockRESTAPIs extends BaseRESTAPIs {
|
public class StockRESTAPIs extends BaseRESTAPIs {
|
||||||
|
|
||||||
|
@PathParam("source")
|
||||||
|
protected String source;
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Produces(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
|
||||||
|
@StatusCodes ({
|
||||||
|
@ResponseCode ( code = 200, condition = "The request succeeded.")
|
||||||
|
})
|
||||||
|
public String list(@QueryParam(GCatConstants.LIMIT_QUERY_PARAMETER) @DefaultValue("10") int limit,
|
||||||
|
@QueryParam(GCatConstants.OFFSET_QUERY_PARAMETER) @DefaultValue("0") int offset) {
|
||||||
|
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public void create(String jsonString) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String read() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue