Skip to content

Commit

Permalink
GH-467 - Javadoc on order and user account module events.
Browse files Browse the repository at this point in the history
  • Loading branch information
odrotbohm committed Dec 4, 2024
1 parent 90e97c8 commit 816f1d3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/main/java/org/salespointframework/order/OrderEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
*/
public class OrderEvents {

/**
* Signals the processing of an {@link Order} having been completed, i.e. goods having been sent our, services
* delivered etc. A completed {@link Order} might still be canceled later on.
*
* @author Oliver Drotbohm
* @see OrderCanceled
*/
@Value(staticConstructor = "of")
public static class OrderCompleted implements DomainEvent {

Expand All @@ -41,6 +48,12 @@ public String toString() {
}
}

/**
* Signals an order having been paid. In other words, the step in an {@link Order}'s lifecycle in which we receive the
* customer's money for a particular order.
*
* @author Oliver Drotbohm
*/
@Value(staticConstructor = "of")
public static class OrderPaid implements DomainEvent {

Expand All @@ -56,6 +69,12 @@ public String toString() {
}
}

/**
* Signals an {@link Order} being canceled. Likely to cause other modules in the system to take action to compensate
* for a previously handled {@link OrderCompleted}.
*
* @author Oliver Drotbohm
*/
@Value(staticConstructor = "of")
public static class OrderCanceled implements DomainEvent {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ public String toString() {
}

/**
* Signals a new {@link UserAccount} having been created. The actual account can be looked up via
* {@link UserAccountManagement}.
*
* @author Oliver Drotbohm
*/
@Value(staticConstructor = "of")
Expand Down

0 comments on commit 816f1d3

Please sign in to comment.