Class AreaController
java.lang.Object
com.easy_model.webservice.model.area.AreaController
-
Constructor Summary
ConstructorsConstructorDescriptionAreaController(AuditLog auditlog, EntityService entityService, Events events) Initializes the Area controller and establish link to database -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Long> createArea(Model existingModel, @Valid AreaData area, Principal principal) org.springframework.http.ResponseEntity<String> deleteArea(Model model, Area area, Principal principal) org.springframework.http.ResponseEntity<String> swapAreaOrder(Model model, Area area, Area newArea, Principal principal) org.springframework.http.ResponseEntity<String> updateArea(Model model, Area existingArea, @Valid AreaData areaData, Principal principal)
-
Constructor Details
-
AreaController
Initializes the Area controller and establish link to database
-
-
Method Details
-
createArea
-
swapAreaOrder
@PostMapping("/api/model/{modelId}/swap/{areaId}/{newAreaId}") @PreAuthorize("authentication.principal.hasModelRole(#model,\'EDITOR\')") public org.springframework.http.ResponseEntity<String> swapAreaOrder(@PathVariable("modelId") Model model, @PathVariable("areaId") Area area, @PathVariable("newAreaId") Area newArea, Principal principal) -
updateArea
@PutMapping("api/model/{modelId}/area/{areaId}") @PreAuthorize("authentication.principal.hasModelRole(#model,\'EDITOR\')") public org.springframework.http.ResponseEntity<String> updateArea(@PathVariable("modelId") Model model, @PathVariable("areaId") Area existingArea, @Valid @RequestBody @Valid AreaData areaData, Principal principal) -
deleteArea
-