Class SubAreaController
java.lang.Object
app.valuationcontrol.webservice.model.subarea.SubAreaController
-
Constructor Summary
ConstructorsConstructorDescriptionSubAreaController(EntityService entityService, AuditLog auditLog, Events events) Initializes the Area controller and establish link to database -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Long> addSubArea(Model model, Area area, @Valid SubAreaData subAreaData, Principal principal) org.springframework.http.ResponseEntity<String> deleteArea(Model model, Area area, SubArea subArea, Principal principal) org.springframework.http.ResponseEntity<String> org.springframework.http.ResponseEntity<String> updateSubArea(Model model, Area area, SubArea subArea, @Valid SubAreaData subAreaData, Principal principal)
-
Constructor Details
-
SubAreaController
Initializes the Area controller and establish link to database
-
-
Method Details
-
addSubArea
@PostMapping("/api/model/{modelId}/area/{areaId}/subarea") @PreAuthorize("authentication.principal.hasModelRole(#model,\'EDITOR\')") public org.springframework.http.ResponseEntity<Long> addSubArea(@PathVariable("modelId") Model model, @PathVariable("areaId") Area area, @Valid @RequestBody @Valid SubAreaData subAreaData, Principal principal) -
updateSubArea
@PutMapping("/api/model/{modelId}/area/{areaId}/subarea/{subAreaId}") @PreAuthorize("authentication.principal.hasModelRole(#model,\'EDITOR\')") public org.springframework.http.ResponseEntity<String> updateSubArea(@PathVariable("modelId") Model model, @PathVariable("areaId") Area area, @PathVariable("subAreaId") SubArea subArea, @Valid @RequestBody @Valid SubAreaData subAreaData, Principal principal) -
swapSubAreas
@PostMapping("/api/model/{modelId}/area/{areaId}/swap/{subAreaId1}/{subAreaId2}") @PreAuthorize("authentication.principal.hasModelRole(#model,\'EDITOR\')") public org.springframework.http.ResponseEntity<String> swapSubAreas(@PathVariable("modelId") Model model, @PathVariable("areaId") Area area, @PathVariable("subAreaId1") SubArea subArea1, @PathVariable("subAreaId2") SubArea subArea2, Principal principal) -
deleteArea
@DeleteMapping("/api/model/{modelId}/area/{areaId}/subarea/{subAreaId}") @PreAuthorize("authentication.principal.hasModelRole(#model,\'EDITOR\')") public org.springframework.http.ResponseEntity<String> deleteArea(@PathVariable("modelId") Model model, @PathVariable("areaId") Area area, @PathVariable("subAreaId") SubArea subArea, Principal principal)
-