@Path(value="shops/{shopId}/categories")
@RolesAllowed(value={"sf","admin"})
public final class CategoryResource
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private CategoryService |
service |
Constructor and Description |
---|
CategoryResource(CategoryService service) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
get(java.lang.String shopId,
GUID categoryId,
java.util.Locale locale)
Returns the category identified by the provided category id.
|
javax.ws.rs.core.Response |
getRootCategories(java.lang.String shopId,
java.util.Locale locale)
Returns the root categories of the shop.
|
private final CategoryService service
@Inject public CategoryResource(CategoryService service)
@GET @Produces(value="application/vnd.epages.v1+json") public javax.ws.rs.core.Response getRootCategories(@PathParam(value="shopId") java.lang.String shopId, @QueryParam(value="locale") java.util.Locale locale)
shopId
- The id of the shop.locale
- The ISO 639-1 for language code and ISO 3166-1 for country code. (Example: de_DE).@GET @Path(value="/{categoryId}") @Produces(value="application/vnd.epages.v1+json") public javax.ws.rs.core.Response get(@PathParam(value="shopId") java.lang.String shopId, @PathParam(value="categoryId") GUID categoryId, @QueryParam(value="locale") java.util.Locale locale)
shopId
- The id of the shop.categoryId
- The category id (GUID)locale
- The ISO 639-1 for language code and ISO 3166-1 for country code. (Example: de_DE).