Class AreaController

java.lang.Object
app.valuationcontrol.webservice.model.area.AreaController

@RestController public class AreaController extends Object
  • Constructor Details

    • AreaController

      public AreaController(AuditLog auditlog, EntityService entityService, Events events)
      Initializes the Area controller and establish link to database
  • Method Details

    • createArea

      @PostMapping("/api/model/{modelId}/area") @PreAuthorize("authentication.principal.hasModelRole(#existingModel,\'EDITOR\')") public org.springframework.http.ResponseEntity<Long> createArea(@PathVariable("modelId") Model existingModel, @Valid @RequestBody @Valid AreaData area, Principal principal)
    • 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

      @DeleteMapping("/api/model/{modelId}/area/{areaId}") @PreAuthorize("authentication.principal.hasModelRole(#model,\'EDITOR\')") public org.springframework.http.ResponseEntity<String> deleteArea(@PathVariable("modelId") Model model, @PathVariable("areaId") Area area, Principal principal)