Ejemplo n.º 1
0
 @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);
 }
Ejemplo n.º 2
0
 @RequestMapping(value = "/template", method = RequestMethod.GET)
 @ResponseBody
 public String getTemplate() {
   this.context.restrictPublicUser();
   ProductData result = this.productReadService.generateTemplate();
   return apiJsonSerializerService.serialize(result);
 }
Ejemplo n.º 3
0
 @RequestMapping(method = RequestMethod.GET)
 @ResponseBody
 public String getAll() {
   this.context.restrictPublicUser();
   Collection<ProductData> result = this.productReadService.retriveAll();
   return apiJsonSerializerService.serialize(result);
 }