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 Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionList all UCSB OrganizationspostUCSBOrganization(String orgCode, String orgTranslationShort, String orgTranslation, boolean inactive) Create a new organizationMethods inherited from class edu.ucsb.cs156.example.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException 
- 
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 codeorgTranslationShort- the ucsb organization translation shortorgTranslation- the ucsb organization translationinactive- inactive boolean- Returns:
 - the saved ucsborganization
 - Throws:
 com.fasterxml.jackson.core.JsonProcessingException
 
 -