Class UCSBOrganizationController

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

@RequestMapping("/api/ucsborganization") @RestController public class UCSBOrganizationController extends ApiController
This is a REST controller for UCSBOrganization
  • Constructor Details

    • UCSBOrganizationController

      public UCSBOrganizationController()
  • Method Details

    • allUCSBOrganization

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("/all") public Iterable<UCSBOrganization> allUCSBOrganization()
      List all UCSB Organizations
      Returns:
      an iterable of UCSBOrganization
    • postUCSBOrganization

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/post") public UCSBOrganization postUCSBOrganization(@RequestParam String orgCode, @RequestParam String orgTranslationShort, @RequestParam String orgTranslation, @RequestParam boolean inactive) throws com.fasterxml.jackson.core.JsonProcessingException
      Create a new organization
      Parameters:
      orgCode - the ucsb organization code
      orgTranslationShort - the ucsb organization translation short
      orgTranslation - the ucsb organization translation
      inactive - inactive boolean
      Returns:
      the saved ucsborganization
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException