@RequestMapping(value = "/{productId}", method = RequestMethod.GET) @ResponseBody public String getProduct(@PathVariable("productId") final Long productId) { this.context.restrictPublicUser(); ProductData result = this.productReadService.retriveOne(productId); return apiJsonSerializerService.serialize(result); }
@RequestMapping(value = "/template", method = RequestMethod.GET) @ResponseBody public String getTemplate() { this.context.restrictPublicUser(); ProductData result = this.productReadService.generateTemplate(); return apiJsonSerializerService.serialize(result); }
@RequestMapping(method = RequestMethod.GET) @ResponseBody public String getAll() { this.context.restrictPublicUser(); Collection<ProductData> result = this.productReadService.retriveAll(); return apiJsonSerializerService.serialize(result); }