Class UCSBDatesController
java.lang.Object
edu.ucsb.cs156.example.controllers.ApiController
edu.ucsb.cs156.example.controllers.UCSBDatesController
@RequestMapping("/api/ucsbdates")
@RestController
public class UCSBDatesController
extends ApiController
This is a REST controller for UCSBDates
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList all UCSB datesdeleteUCSBDate(Long id) Delete a UCSBDateGet a single date by idpostUCSBDate(String quarterYYYYQ, String name, LocalDateTime localDateTime) Create a new dateupdateUCSBDate(Long id, @Valid UCSBDate incoming) Update a single dateMethods inherited from class ApiController
genericMessage, getCurrentUser, handleGenericException
-
Constructor Details
-
UCSBDatesController
public UCSBDatesController()
-
-
Method Details
-
allUCSBDates
-
getById
-
postUCSBDate
@PreAuthorize("hasRole('ROLE_ADMIN')") @PostMapping("/post") public UCSBDate postUCSBDate(@RequestParam String quarterYYYYQ, @RequestParam String name, @RequestParam("localDateTime") @DateTimeFormat(iso=DATE_TIME) LocalDateTime localDateTime) throws com.fasterxml.jackson.core.JsonProcessingException Create a new date- Parameters:
quarterYYYYQ- the quarter in the format YYYYQname- the name of the datelocalDateTime- the date- Returns:
- the saved ucsbdate
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
deleteUCSBDate
-
updateUCSBDate
-