@Path(value="/stocks") public class StockServiceResource extends Object implements StockService
| Constructor and Description |
|---|
StockServiceResource()
Creates new instance of
StockServiceResource class. |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createStock(Stock stock)
Creates new stock.
|
javax.ws.rs.core.Response |
deleteStock(long id)
Deletes the stock
|
Stock |
getStock(long id)
Retrieves the stock by it's id.
|
List<Stock> |
getStocks(int startIndex,
int size)
Retrieves the stock list.
|
void |
updateStock(long id,
Stock stock)
Updates the stock.
|
public StockServiceResource()
StockServiceResource class.@Path(value="/") public javax.ws.rs.core.Response createStock(Stock stock)
createStock in interface StockServicestock - the stock to create@Path(value="/{id}")
public void updateStock(long id,
Stock stock)
updateStock in interface StockServiceid - stock idstock - the stock to update@Path(value="/{id}")
public Stock getStock(long id)
getStock in interface StockServiceid - the stock id@Path(value="/") public List<Stock> getStocks(int startIndex, int size)
getStocks in interface StockServicestartIndex - the starting indexsize - the number stocks to retrieve@Path(value="/{id}")
public javax.ws.rs.core.Response deleteStock(long id)
deleteStock in interface StockServiceid - the stock idCopyright © 2015 JBoss by Red Hat. All rights reserved.