Class CostCenterController
java.lang.Object
org.cardanofoundation.lob.app.organisation.resource.CostCenterController
@RestController
@RequestMapping("/api/v1")
@CrossOrigin(origins="http://localhost:3000")
@ConditionalOnProperty(value="lob.organisation.enabled",
havingValue="true",
matchIfMissing=true)
public class CostCenterController
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Set<CostCenterView>> getAllCostCenters(String orgId) org.springframework.http.ResponseEntity<CostCenterView> insertCostCenters(String orgId, @Valid CostCenterUpdate costCenterUpdate) org.springframework.http.ResponseEntity<?> insertCostCentersCsv(String orgId, org.springframework.web.multipart.MultipartFile file) org.springframework.http.ResponseEntity<CostCenterView> updateCostCenters(String orgId, @Valid CostCenterUpdate costCenterUpdate)
-
Constructor Details
-
CostCenterController
public CostCenterController()
-
-
Method Details
-
getAllCostCenters
@GetMapping(value="/organisations/{orgId}/cost-centers", produces="application/json") public org.springframework.http.ResponseEntity<Set<CostCenterView>> getAllCostCenters(@PathVariable("orgId") String orgId) -
insertCostCenters
@PostMapping(value="/organisations/{orgId}/cost-centers", produces="application/json", consumes="application/json") @PreAuthorize("hasRole(@securityConfig.getManagerRole()) or hasRole(@securityConfig.getAdminRole()) or hasRole(@securityConfig.getAccountantRole())") public org.springframework.http.ResponseEntity<CostCenterView> insertCostCenters(@PathVariable("orgId") String orgId, @Valid @RequestBody @Valid CostCenterUpdate costCenterUpdate) -
updateCostCenters
@PutMapping(value="/organisations/{orgId}/cost-centers", produces="application/json", consumes="application/json") @PreAuthorize("hasRole(@securityConfig.getManagerRole()) or hasRole(@securityConfig.getAdminRole()) or hasRole(@securityConfig.getAccountantRole())") public org.springframework.http.ResponseEntity<CostCenterView> updateCostCenters(@PathVariable("orgId") String orgId, @Valid @RequestBody @Valid CostCenterUpdate costCenterUpdate) -
insertCostCentersCsv
@PostMapping(value="/organisations/{orgId}/cost-centers", produces="application/json", consumes="multipart/form-data") @PreAuthorize("hasRole(@securityConfig.getManagerRole()) or hasRole(@securityConfig.getAdminRole()) or hasRole(@securityConfig.getAccountantRole())") public org.springframework.http.ResponseEntity<?> insertCostCentersCsv(@PathVariable("orgId") String orgId, @RequestParam("file") org.springframework.web.multipart.MultipartFile file)
-