Commit Graph

18 Commits

Author SHA1 Message Date
sampadawagde 73d9fdb53b JAVA-5223: Fix formatting of POMs 2021-05-06 17:14:43 +05:30
Steven van Beelen e49ea9e334 Use new Axon BOM
Use the Axon BOM to set the versions for the Axon dependencies

#BAEL-4947
2021-04-30 14:47:24 +02:00
johnA1331 f76865cc4d Update README.md 2021-04-29 05:26:24 +08:00
Steven van Beelen af4e82b089 Update previous complete test endpoints
The test endpoints used to create an order, add a product, confirm the
order and ship it are not embracing the asynchronous approach of the
CommandGateway. Make sure that all commands are composed with one
another and return the completable future for Spring to resolve

#BAEL-4767
2021-03-19 11:54:20 +01:00
Steven van Beelen 2b351eda7a Rename API in line with adjusted approach
Change PlaceOrderCommand/OrderPlacedEvent to
CreateOrderCommand/OrderCreatedEvent. Placed suggests it is already
placed, meaning products cannot be changed. However with the new
OrderLine member and its operations it's no longer correct to state the
order placed upon creation. Furthermore, the OrderedProduct is no longer
 a single product, but contains several. Renaming this to Order is more
 in line with what this query model resembles

#BAEL-4767
2021-03-19 11:35:31 +01:00
Steven van Beelen 70189df008 Update http file for testing
Add additional operations to the order-api.http file to simplify testing

#BAEL-4767
2021-03-19 11:24:08 +01:00
Steven van Beelen 68276b8041 Allow all operations on the Controller
Add post mappings to allow single creation of an Order, influencing all
aspects of an Order

#BAEL-4767
2021-03-19 11:23:46 +01:00
Steven van Beelen b578c885e4 Add aggregate test cases
Add test cases to reach a 100% coverage of all message handling
functions of the OrderAggregate and OrderLine member. Added, upgrade to
JUnit 5

#BAEL-4767
2021-03-19 11:09:48 +01:00
Steven van Beelen 41d47f8aa6 Update Projection
Add event handlers to update the products map of the OrderedProduct
model

#BAEL-4767
2021-03-19 11:08:42 +01:00
Steven van Beelen 886368a4c3 Update Command Model
Adjust the OrderAggregate to contain an OrderLine aggregate member. The
OrderLine is added as soon as a Product is added through the
AddProductCommand. The OrderLine member is capable of handling the
increment and decrement product count commands, to increase/decrease the
 number of instances for that OrderLine. Decreasing the count below 1
 will publish the ProductRemovedEvent from within the OrderLine.
 Additional business validation is added to unsure a given Product isn't
  added twice (adding a second should go through increment) and that the
   products aren't adjusted as soon as the product is confirmed.

#BAEL-4767
2021-03-19 11:07:26 +01:00
Steven van Beelen ef1167b037 Update Exception API
- Introduce a DuplicateOrderLineException to signal whenever somebody
wants to add the same product twice instead of using the increment
command.
- Introduce OrderAlreadyConfirmedException to signal whenever the order
is confirmed, so that adding products and incrementing/decrementing
their count is not possible once the order has been confirmed

#BAEL-4767
2021-03-19 11:04:12 +01:00
Steven van Beelen 2b2aff5ceb Update Query API
Change the OrderedProduct model such that it contains a map of products
having the count as its value, instead of a single product.

#BAEL-4767
2021-03-19 11:01:19 +01:00
Steven van Beelen a9812052df Update Event API
- Adjust OrderPlacedEvent to only construct the order
- Introduce ProductAddedEvent to be able to add several products
to a order
- Introduce ProductCountIncrementedEvent to increase the number of
product instances for a given Order
- Introduce ProductCountDecrementedEvent to increase the number of
product instances for a given Order
- Introduce ProductRemovedEvent to signal whenever all the product count
 drops below 1

#BAEL-4767
2021-03-19 10:59:26 +01:00
Steven van Beelen 10c0f2302e Update Command API
- Adjust PlaceOrderCommand to only construct the order
- Introduce AddProductCommand to be able to add several products to an
order
- Introduce IncrementProductCountCommand to increase the number of
product instances for a given Order
- Introduce DecrementProductCountCommand to increase the number of
product instances for a given Order

#BAEL-4767
2021-03-19 10:57:51 +01:00
Steven van Beelen b585b6eb7b Update Axon version
Update Axon version to 4.4.7 (current most recent)

#BAEL-4767
2021-03-19 10:53:34 +01:00
amit.pandey 1f4a4e24ec pom formatting 2020-03-15 18:22:24 +05:30
catalin-burcea 153a3923f0 [BAEL-18783] - Fix formatting of POMs 2019-12-06 11:40:56 +02:00
Eric Martin 3225470df5 Merge pull request #8125 from eugenp/revert-8119-BAEL-3275-2
Revert "BAEL-3275: Using blocking queue for pub-sub"
2019-10-31 20:43:47 -05:00