Class WatchlistApiController
java.lang.Object
com.bluebell.greenhouse.planter.controllers.watchlist.WatchlistApiController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> deleteWatchlist(WatchlistRequestContext context) Deletes an existingWatchlist.org.springframework.http.ResponseEntity<WatchlistDTO> getWatchlist(WatchlistRequestContext context) org.springframework.http.ResponseEntity<List<WatchlistDTO>> org.springframework.http.ResponseEntity<WatchlistDTO> postCreateWatchlist(@Valid CreateUpdateWatchlistDTO data, AuthenticatedUserRef userRef) Creates a newWatchlist.org.springframework.http.ResponseEntity<WatchlistDTO> putUpdateWatchlist(@Valid CreateUpdateWatchlistDTO data, WatchlistRequestContext context) Updates an existingWatchlist.
-
Constructor Details
-
WatchlistApiController
public WatchlistApiController()
-
-
Method Details
-
getWatchlistsForCurrentUser
@GetMapping("/get-for-current-user") public org.springframework.http.ResponseEntity<List<WatchlistDTO>> getWatchlistsForCurrentUser(@AuthenticatedUser AuthenticatedUserRef userRef) - Parameters:
userRef-AuthenticatedUserRef- Returns:
ResponseEntity
-
getWatchlist
@GetMapping("/get") public org.springframework.http.ResponseEntity<WatchlistDTO> getWatchlist(@ResolvedWatchlist WatchlistRequestContext context) - Parameters:
context-WatchlistRequestContext- Returns:
ResponseEntity
-
postCreateWatchlist
@PostMapping("/create-watchlist") public org.springframework.http.ResponseEntity<WatchlistDTO> postCreateWatchlist(@Valid @RequestBody @Valid CreateUpdateWatchlistDTO data, @AuthenticatedUser AuthenticatedUserRef userRef) Creates a newWatchlist.- Parameters:
data-CreateUpdateWatchlistDTOuserRef-AuthenticatedUserRef- Returns:
ResponseEntity
-
putUpdateWatchlist
@PutMapping("/update-watchlist") public org.springframework.http.ResponseEntity<WatchlistDTO> putUpdateWatchlist(@Valid @RequestBody @Valid CreateUpdateWatchlistDTO data, @ResolvedWatchlist WatchlistRequestContext context) Updates an existingWatchlist.- Parameters:
data-CreateUpdateWatchlistDTOcontext-WatchlistRequestContext- Returns:
ResponseEntity
-
deleteWatchlist
@DeleteMapping("/delete-watchlist") public org.springframework.http.ResponseEntity<Void> deleteWatchlist(@ResolvedWatchlist WatchlistRequestContext context) Deletes an existingWatchlist.- Parameters:
context-WatchlistRequestContext- Returns:
ResponseEntity
-