Przeglądaj źródła

Javadoc improvements.

peter_backlund 18 lat temu
rodzic
commit
c8aee48b43

+ 19
- 7
dddsample/src/main/java/se/citerus/dddsample/domain/HandlingEvent.java Wyświetl plik

8
 import java.util.Date;
8
 import java.util.Date;
9
 
9
 
10
 /**
10
 /**
11
- * A HandlingEvent is used to register the event when, for instance, a cargo is unloaded from a carrier at a some loacation at a given time. The
12
- * HandlingEvent's are sent from different Incident Logging Applications some time after the event occured and contain information about the
13
- * {@link TrackingId}, {@link Location}, timestamp of the completion of the event, and possibly, if applicable a {@link CarrierMovement}.
14
- * <br><br>
15
- * HandlingEvent's could contain information about a {@link CarrierMovement} and if so, the event type must be either {@link Type#LOAD} or
16
- * {@link Type#UNLOAD}. All other events must be of {@link Type#RECEIVE}, {@link Type#CLAIM} or {@link Type#CUSTOMS}.
11
+ * A HandlingEvent is used to register the event when, for instance,
12
+ * a cargo is unloaded from a carrier at a some loacation at a given time.
13
+ * <p/>
14
+ * The HandlingEvent's are sent from different Incident Logging Applications
15
+ * some time after the event occured and contain information about the
16
+ * {@link TrackingId}, {@link Location}, timestamp of the completion of the event,
17
+ * and possibly, if applicable a {@link CarrierMovement}.
18
+ * <p/>
19
+ * This class is the only member, and consequently the root, of the HandlingEvent aggregate. 
20
+ * <p/>
21
+ * HandlingEvent's could contain information about a {@link CarrierMovement} and if so,
22
+ * the event type must be either {@link Type#LOAD} or {@link Type#UNLOAD}.
23
+ * <p/>
24
+ * All other events must be of {@link Type#RECEIVE}, {@link Type#CLAIM} or {@link Type#CUSTOMS}.
17
  */
25
  */
18
 public final class HandlingEvent implements DomainEvent<HandlingEvent> {
26
 public final class HandlingEvent implements DomainEvent<HandlingEvent> {
19
 
27
 
33
   private Date registrationTime;
41
   private Date registrationTime;
34
   private Cargo cargo;
42
   private Cargo cargo;
35
 
43
 
44
+  /**
45
+   * Handling event type. Either requires or prohibits a carrier movement
46
+   * association, it's never optional.
47
+   */
36
   public enum Type {
48
   public enum Type {
37
     LOAD(true),
49
     LOAD(true),
38
     UNLOAD(true),
50
     UNLOAD(true),
45
     /**
57
     /**
46
      * Private enum constructor.
58
      * Private enum constructor.
47
      *
59
      *
48
-     * @param carrierMovementRequired Required status.
60
+     * @param carrierMovementRequired whether or not a carrier movement is associated with this event type
49
      */
61
      */
50
     private Type(final boolean carrierMovementRequired) {
62
     private Type(final boolean carrierMovementRequired) {
51
       this.carrierMovementRequired = carrierMovementRequired;
63
       this.carrierMovementRequired = carrierMovementRequired;

+ 7
- 0
dddsample/src/main/java/se/citerus/dddsample/domain/Location.java Wyświetl plik

2
 
2
 
3
 import org.apache.commons.lang.Validate;
3
 import org.apache.commons.lang.Validate;
4
 
4
 
5
+/**
6
+ * A location is our model is stops on a journey, such as cargo
7
+ * origin or destination, or carrier movement endpoints.
8
+ *
9
+ * It is uniquely identified by a UN Locode.
10
+ *
11
+ */
5
 public final class Location implements Entity<Location> {
12
 public final class Location implements Entity<Location> {
6
 
13
 
7
   private UnLocode unLocode;
14
   private UnLocode unLocode;

+ 1
- 1
dddsample/src/main/java/se/citerus/dddsample/domain/package.html Wyświetl plik

1
 <html>
1
 <html>
2
 <body>
2
 <body>
3
 <p>
3
 <p>
4
-  The domain model.
4
+  The domain model. This is the heart of the application.
5
 </p>
5
 </p>
6
 </body>
6
 </body>
7
 </html>
7
 </html>