WIP: Add Coffee management plugin for HackerBook training#1
Closed
Damans227 wants to merge 38 commits into
Closed
Conversation
added 28 commits
November 26, 2025 19:24
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
added 6 commits
November 26, 2025 19:24
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
2b3a85c to
5fb8b1c
Compare
added 4 commits
November 26, 2025 19:28
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
Signed-off-by: Daman Arora <daman.arora@shapeblue.com>
nvazquez
reviewed
Nov 27, 2025
nvazquez
left a comment
There was a problem hiding this comment.
Thanks @Damans227 - looking good so far, please consider adding unit tests
| </dependency> | ||
| </dependencies> | ||
| <properties> | ||
| <maven.compiler.source>11</maven.compiler.source> |
There was a problem hiding this comment.
Can you revisit these properties? We are currently using JDK 17
|
|
||
| @Override | ||
| public void create() { | ||
| coffee = coffeeManager.createCoffee(this); |
There was a problem hiding this comment.
I think coffee can be defined as a local variable to this method and not outside of it
Owner
Author
There was a problem hiding this comment.
The coffee field needs to be an instance variable because it's set in create() and then accessed in execute(). If coffee were a local variable in create(), then execute() wouldn't have access to it.
| } else if (ids != null && !ids.isEmpty()) { | ||
| response.setDisplayText("Successfully removed " + ids.size() + " coffee orders"); | ||
| } else { | ||
| response.setDisplayText("Coffee removal completed"); |
There was a problem hiding this comment.
I think these lines could be extracted into a method to set the display text based on the id and ids parameters
| description = "the ID of the coffee order") | ||
| private Long id; | ||
|
|
||
| @Parameter(name = "size", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR implements a Coffee management plugin as part of the HackerBook training exercise, demonstrating CloudStack's plugin architecture from API layer to database persistence.
Features:
CreateCoffee,ListCoffees,UpdateCoffee,RemoveCoffeeSupported Operations:
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?