@Path(value="shops/{shopId}/customers")
@Produces(value="application/vnd.epages.v1+json, application/json")
public class CustomerResource
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private CustomerService |
customerService |
private ShopRequestContextService |
shopService |
Constructor and Description |
---|
CustomerResource(CustomerService customerService,
ShopRequestContextService shopService) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
get(java.lang.String shopId,
GUID customerId) |
javax.ws.rs.core.Response |
get(java.lang.String shopId,
PagerStartsFromOneBeanParam pager) |
javax.ws.rs.core.Response |
patch(java.lang.String shopId,
GUID customerId,
JsonPatch jsonPatch) |
javax.ws.rs.core.Response |
post(java.lang.String shopId,
Customer customer) |
private final CustomerService customerService
private final ShopRequestContextService shopService
@Inject public CustomerResource(CustomerService customerService, ShopRequestContextService shopService)
@GET @RolesAllowed(value="customers_read") public javax.ws.rs.core.Response get(@PathParam(value="shopId") java.lang.String shopId, @BeanParam PagerStartsFromOneBeanParam pager)
@POST @RolesAllowed(value="customers_write") @Consumes(value="application/json") public javax.ws.rs.core.Response post(@PathParam(value="shopId") java.lang.String shopId, @NotNull Customer customer)
@GET @Path(value="{customerId}") @RolesAllowed(value="customers_read") public javax.ws.rs.core.Response get(@PathParam(value="shopId") java.lang.String shopId, @PathParam(value="customerId") GUID customerId)