Package edu.ucsb.cs.scaffold.controller
Class ConceptsYamlController
java.lang.Object
edu.ucsb.cs.scaffold.controller.ApiController
edu.ucsb.cs.scaffold.controller.ConceptsYamlController
Download and upload a course's entire concept-graph content (concepts, subconcepts, prerequisite
edges, and practice problems) as a YAML file. See docs/yaml-format.md for the format.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String> downloadConceptsYaml(Long courseId) uploadConceptsYaml(Long courseId, org.springframework.web.multipart.MultipartFile file) Methods inherited from class edu.ucsb.cs.scaffold.controller.ApiController
genericMessage, getCurrentUser, handleEntityNotFoundException, handleForbiddenException, handleIllegalArgument, handleUnsupportedOperation
-
Constructor Details
-
ConceptsYamlController
public ConceptsYamlController()
-
-
Method Details
-
downloadConceptsYaml
@PreAuthorize("@CourseSecurity.hasManagePermissions(#root, #courseId)") @GetMapping("/api/concepts/yaml/download") public org.springframework.http.ResponseEntity<String> downloadConceptsYaml(@RequestParam Long courseId) throws EntityNotFoundException, IOException - Throws:
EntityNotFoundExceptionIOException
-
uploadConceptsYaml
@PreAuthorize("@CourseSecurity.hasManagePermissions(#root, #courseId)") @PostMapping(value="/api/concepts/yaml/upload", consumes="multipart/form-data") public org.springframework.http.ResponseEntity<Map<String,Object>> uploadConceptsYaml(@RequestParam Long courseId, @RequestParam("file") org.springframework.web.multipart.MultipartFile file) throws EntityNotFoundException, IOException - Throws:
EntityNotFoundExceptionIOException
-