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