Modifier and Type | Field and Description |
---|---|
private InventoryMgmtEJB |
ejb |
private static org.apache.commons.logging.Log |
log |
private Request |
request |
private UriInfo |
uriInfo |
Constructor and Description |
---|
CategoriesResource() |
Modifier and Type | Method and Description |
---|---|
Response |
deleteCategory(int id)
This method responds to DELETE method calls to (root)/{id} URIs to
delete a specific category.
|
Response |
findCategoriesByName(String name,
int offset,
int limit)
This method will respond to a GET of the base resource URI to
return categories based on query parameters.
|
Response |
getCategory(int id)
This method will respond to a GET method for (root)/{id} URIs to get
a specific category.
|
private static final org.apache.commons.logging.Log log
@Inject private InventoryMgmtEJB ejb
@GET @Path(value="") @Produces(value="application/xml") public Response findCategoriesByName(@QueryParam(value="name") @DefaultValue(value="") String name, @QueryParam(value="offset") @DefaultValue(value="0") int offset, @QueryParam(value="limit") @DefaultValue(value="0") int limit)
name
- offset
- limit
- @GET @Path(value="{id}") @Produces(value="application/xml") public Response getCategory(@PathParam(value="id") int id)
id
- Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.