Fixing REST APIs
This commit is contained in:
parent
be5ec42502
commit
f0a14878ca
|
@ -24,13 +24,13 @@ import com.webcohesion.enunciate.metadata.rs.StatusCodes;
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
@Path(FisheryRESTAPIs.COLLECTION_PATH + "/" )
|
@Path(FisheryRESTAPIs.COLLECTION_PATH)
|
||||||
public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
||||||
|
|
||||||
@PathParam("source")
|
@PathParam("source")
|
||||||
protected String source;
|
protected String source;
|
||||||
|
|
||||||
public static final String COLLECTION_PATH = "fishery/{source}";
|
public static final String COLLECTION_PATH = "fishery";
|
||||||
public static final String RECORD_ID_PARAMETER = "fishery_record_id";
|
public static final String RECORD_ID_PARAMETER = "fishery_record_id";
|
||||||
|
|
||||||
public FisheryRESTAPIs() {
|
public FisheryRESTAPIs() {
|
||||||
|
@ -38,7 +38,7 @@ public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @pathExample /fishery/grsf
|
* @pathExample /fishery
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Produces(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
|
@Produces(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
|
||||||
|
@ -73,7 +73,7 @@ public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @pathExample /fishery/grsf
|
* @pathExample /fishery
|
||||||
*/
|
*/
|
||||||
@POST
|
@POST
|
||||||
@Consumes(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
|
@Consumes(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
|
||||||
|
@ -86,7 +86,7 @@ public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @pathExample /fishery/grsf/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
* @pathExample /fishery/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||||
|
@ -100,7 +100,7 @@ public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @pathExample /fishery/grsf/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
* @pathExample /fishery/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
||||||
*/
|
*/
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||||
|
@ -115,7 +115,7 @@ public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @pathExample /fishery/grsf/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
* @pathExample /fishery/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
||||||
*/
|
*/
|
||||||
@PATCH
|
@PATCH
|
||||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||||
|
@ -130,7 +130,7 @@ public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @pathExample /fishery/grsf/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
* @pathExample /fishery/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
||||||
*/
|
*/
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||||
|
@ -145,7 +145,7 @@ public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @pathExample /fishery/grsf/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
* @pathExample /fishery/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
||||||
*/
|
*/
|
||||||
@PURGE
|
@PURGE
|
||||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||||
|
|
|
@ -24,13 +24,13 @@ import com.webcohesion.enunciate.metadata.rs.StatusCodes;
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
@Path(StockRESTAPIs.COLLECTION_PATH + "/")
|
@Path(StockRESTAPIs.COLLECTION_PATH)
|
||||||
public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
||||||
|
|
||||||
@PathParam("source")
|
@PathParam("source")
|
||||||
protected String source;
|
protected String source;
|
||||||
|
|
||||||
public static final String COLLECTION_PATH = "stock/{source}";
|
public static final String COLLECTION_PATH = "stock";
|
||||||
public static final String RECORD_ID_PARAMETER = "stock_record_id";
|
public static final String RECORD_ID_PARAMETER = "stock_record_id";
|
||||||
|
|
||||||
public StockRESTAPIs() {
|
public StockRESTAPIs() {
|
||||||
|
@ -38,7 +38,7 @@ public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @pathExample /stock/grsf
|
* @pathExample /stock
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Produces(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
|
@Produces(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
|
||||||
|
@ -73,7 +73,7 @@ public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @pathExample /stock/grsf
|
* @pathExample /stock
|
||||||
*/
|
*/
|
||||||
@POST
|
@POST
|
||||||
@Consumes(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
|
@Consumes(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
|
||||||
|
@ -86,7 +86,7 @@ public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @pathExample /stock/grsf/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
* @pathExample /stock/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||||
|
@ -100,7 +100,7 @@ public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @pathExample /stock/grsf/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
* @pathExample /stock/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
||||||
*/
|
*/
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||||
|
@ -115,7 +115,7 @@ public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @pathExample /stock/grsf/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
* @pathExample /stock/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
||||||
*/
|
*/
|
||||||
@PATCH
|
@PATCH
|
||||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||||
|
@ -130,7 +130,7 @@ public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @pathExample /stock/grsf/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
* @pathExample /stock/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
||||||
*/
|
*/
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||||
|
@ -145,7 +145,7 @@ public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @pathExample /stock/grsf/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
* @pathExample /stock/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
||||||
*/
|
*/
|
||||||
@PURGE
|
@PURGE
|
||||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||||
|
|
|
@ -24,7 +24,7 @@ import com.webcohesion.enunciate.metadata.rs.StatusCodes;
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
@Path(TraceabilityUnitRESTAPIs.COLLECTION_PATH + "/")
|
@Path(TraceabilityUnitRESTAPIs.COLLECTION_PATH)
|
||||||
public class TraceabilityUnitRESTAPIs extends BaseRESTAPIs<TraceabilityUnit>{
|
public class TraceabilityUnitRESTAPIs extends BaseRESTAPIs<TraceabilityUnit>{
|
||||||
|
|
||||||
public static final String COLLECTION_PATH = "traceability-unit";
|
public static final String COLLECTION_PATH = "traceability-unit";
|
||||||
|
|
Loading…
Reference in New Issue