@Path(value="/products") @Produces(value="application/json") public class ProductService extends Object
| Constructor and Description |
|---|
ProductService() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
getAllProducts()
This has the implementation of the REST API for fetching all the Products.
|
javax.ws.rs.core.Response |
getAllProductStatuses()
This method returns the list of products that are currently in TestGrid.
|
javax.ws.rs.core.Response |
getProduct(String id)
This has the implementation of the REST API for fetching a Product by id.
|
javax.ws.rs.core.Response |
getProductReport(String productName,
Boolean showSuccess,
String groupBy)
This method is able to get the latest report of a given product from the remote storage and return.
|
javax.ws.rs.core.Response |
getProductStatus(String productName)
This method returns the product if the requested product name exists in the TestGrid.
|
javax.ws.rs.core.Response |
isProductReportExist(String productName,
Boolean showSuccess,
String groupBy)
This method verifies the existence of the requesting report in the remote location.
|
@GET public javax.ws.rs.core.Response getAllProducts()
@GET
@Path(value="/{id}")
public javax.ws.rs.core.Response getProduct(@PathParam(value="id")
String id)
@GET @Path(value="/product-status") public javax.ws.rs.core.Response getAllProductStatuses()
The products are returned as a json response with the last build information and the last failed build information
@GET
@Path(value="/product-status/{productName}")
public javax.ws.rs.core.Response getProductStatus(@PathParam(value="productName")
String productName)
The product is returned as a json response with the last build information and the last failed build information
@HEAD
@Path(value="/reports")
public javax.ws.rs.core.Response isProductReportExist(@QueryParam(value="product-name")
String productName,
@DefaultValue(value="false") @QueryParam(value="show-success")
Boolean showSuccess,
@DefaultValue(value="SCENARIO") @QueryParam(value="group-by")
String groupBy)
@GET
@Path(value="/reports")
@Produces(value="application/octet-stream")
public javax.ws.rs.core.Response getProductReport(@QueryParam(value="product-name")
String productName,
@DefaultValue(value="false") @QueryParam(value="show-success")
Boolean showSuccess,
@DefaultValue(value="SCENARIO") @QueryParam(value="group-by")
String groupBy)
The report is returned as a html file
Copyright © 2019 WSO2. All rights reserved.