Class PortfolioApiController
java.lang.Object
com.bluebell.greenhouse.planter.controllers.portfolio.PortfolioApiController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> deletePortfolio(PortfolioRequestContext context) Deletes anPortfoliowith the matching number.org.springframework.http.ResponseEntity<PortfolioDTO> Returns aResponseEntitycontaining aPortfolioDTO.org.springframework.http.ResponseEntity<org.springframework.core.io.ByteArrayResource> Generates a zip archive containing account reports for all accounts in the given portfolio.org.springframework.http.ResponseEntity<PortfolioDTO> postCreateNewPortfolio(@Valid CreateUpdatePortfolioDTO data, AuthenticatedUserRef userRef) Returns aPortfolio.org.springframework.http.ResponseEntity<PortfolioDTO> putUpdatePortfolio(@Valid CreateUpdatePortfolioDTO data, PortfolioRequestContext context) Returns an updatedPortfolio.
-
Constructor Details
-
PortfolioApiController
public PortfolioApiController()
-
-
Method Details
-
getPortfolioForPortfolioNumber
@GetMapping("/get") public org.springframework.http.ResponseEntity<PortfolioDTO> getPortfolioForPortfolioNumber(@ResolvedPortfolio PortfolioRequestContext context) Returns aResponseEntitycontaining aPortfolioDTO.- Parameters:
context-PortfolioRequestContext- Returns:
ResponseEntity
-
getPortfolioReport
@GetMapping(value="/get-report", produces="application/zip") public org.springframework.http.ResponseEntity<org.springframework.core.io.ByteArrayResource> getPortfolioReport(@ResolvedPortfolio PortfolioRequestContext context) throws IOException Generates a zip archive containing account reports for all accounts in the given portfolio.- Parameters:
context-PortfolioRequestContext- Returns:
ResponseEntitywithByteArrayResourcefor download- Throws:
IOException- io file exception
-
postCreateNewPortfolio
@PostMapping("/create-portfolio") public org.springframework.http.ResponseEntity<PortfolioDTO> postCreateNewPortfolio(@Valid @RequestBody @Valid CreateUpdatePortfolioDTO data, @AuthenticatedUser AuthenticatedUserRef userRef) Returns aPortfolio.- Parameters:
data-CreateUpdatePortfolioDTOuserRef-AuthenticatedUserRef- Returns:
ResponseEntity
-
putUpdatePortfolio
@PutMapping("/update-portfolio") public org.springframework.http.ResponseEntity<PortfolioDTO> putUpdatePortfolio(@Valid @RequestBody @Valid CreateUpdatePortfolioDTO data, @ResolvedPortfolio PortfolioRequestContext context) Returns an updatedPortfolio.- Parameters:
data-CreateUpdatePortfolioDTOcontext-PortfolioRequestContext- Returns:
ResponseEntity
-
deletePortfolio
@DeleteMapping("/delete-portfolio") public org.springframework.http.ResponseEntity<Void> deletePortfolio(@ResolvedPortfolio PortfolioRequestContext context) Deletes anPortfoliowith the matching number.- Parameters:
context-PortfolioRequestContext- Returns:
ResponseEntity
-