Browse Source

Javadoc improvements.

peter_backlund 18 years ago
parent
commit
c8aee48b43

+ 19
- 7
dddsample/src/main/java/se/citerus/dddsample/domain/HandlingEvent.java View File

@@ -8,12 +8,20 @@ import java.util.Comparator;
8 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 26
 public final class HandlingEvent implements DomainEvent<HandlingEvent> {
19 27
 
@@ -33,6 +41,10 @@ public final class HandlingEvent implements DomainEvent<HandlingEvent> {
33 41
   private Date registrationTime;
34 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 48
   public enum Type {
37 49
     LOAD(true),
38 50
     UNLOAD(true),
@@ -45,7 +57,7 @@ public final class HandlingEvent implements DomainEvent<HandlingEvent> {
45 57
     /**
46 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 62
     private Type(final boolean carrierMovementRequired) {
51 63
       this.carrierMovementRequired = carrierMovementRequired;

+ 7
- 0
dddsample/src/main/java/se/citerus/dddsample/domain/Location.java View File

@@ -2,6 +2,13 @@ package se.citerus.dddsample.domain;
2 2
 
3 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 12
 public final class Location implements Entity<Location> {
6 13
 
7 14
   private UnLocode unLocode;

+ 1
- 1
dddsample/src/main/java/se/citerus/dddsample/domain/package.html View File

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