Class SubAreaController

java.lang.Object
app.valuationcontrol.webservice.model.subarea.SubAreaController

@RestController public class SubAreaController extends Object
  • Constructor Details

    • SubAreaController

      public SubAreaController(EntityService entityService, AuditLog auditLog, Events events)
      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)