Class UCSBDiningCommonsMenuItemController

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

@RequestMapping("/api/ucsbdiningcommonsmenuitem") @RestController public class UCSBDiningCommonsMenuItemController extends ApiController
  • Constructor Details

    • UCSBDiningCommonsMenuItemController

      public UCSBDiningCommonsMenuItemController()
  • Method Details

    • allUCSBDiningCommonsMenuItems

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

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

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/post") public UCSBDiningCommonMenuItem postUCSBDiningCommonsMenuItem(@RequestParam String diningCommonsCode, @RequestParam String name, @RequestParam String station) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • deleteUCSBDiningCommonMenuItem

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

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