Class IceCreamShopController

java.lang.Object
edu.ucsb.cs156.example.controllers.ApiController
edu.ucsb.cs156.example.controllers.IceCreamShopController

@RequestMapping("/api/icecreamshop") @RestController public class IceCreamShopController extends ApiController
  • Constructor Details

    • IceCreamShopController

      public IceCreamShopController()
  • Method Details

    • allIceCreamShop

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("/all") public Iterable<IceCreamShop> allIceCreamShop()
    • getById

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("") public IceCreamShop getById(@RequestParam Long id)
    • postIceCreamShop

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/post") public IceCreamShop postIceCreamShop(@RequestParam String name, @RequestParam String flavor, @RequestParam String description)
    • deleteIceCreamShop

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @DeleteMapping("") public Object deleteIceCreamShop(@RequestParam Long id)
    • updateCommons

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PutMapping("") public IceCreamShop updateCommons(@RequestParam Long id, @RequestBody @Valid @Valid IceCreamShop incoming)