Selaa lähdekoodia

Extracted a reporting api, shared between bookingtracking and reporting.

peter_backlund 17 vuotta sitten
vanhempi
commit
fecfa49d94

+ 1
- 0
dddsample/external/pom.xml Näytä tiedosto

@@ -11,6 +11,7 @@
11 11
   <modules>
12 12
     <module>ila</module>
13 13
     <module>reporting</module>
14
+    <module>reporting-api</module>
14 15
     <module>pathfinder</module>
15 16
     <module>pathfinder-api</module>
16 17
     <module>aggregator</module>

+ 15
- 0
dddsample/external/reporting-api/pom.xml Näytä tiedosto

@@ -0,0 +1,15 @@
1
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3
+  <modelVersion>4.0.0</modelVersion>
4
+  <groupId>se.citerus.dddsample.external</groupId>
5
+  <artifactId>reporting-api</artifactId>
6
+  <parent>
7
+    <groupId>se.citerus.dddsample</groupId>
8
+    <artifactId>external</artifactId>
9
+    <version>1.2-SNAPSHOT</version>
10
+  </parent>
11
+  <packaging>jar</packaging>
12
+  <name>External: Reporting API</name>
13
+  <version>${project.parent.version}</version>
14
+  <description>Reporting API</description>
15
+</project>

+ 109
- 0
dddsample/external/reporting-api/src/main/java/se/citerus/dddsample/reporting/api/CargoDetails.java Näytä tiedosto

@@ -0,0 +1,109 @@
1
+package se.citerus.dddsample.reporting.api;
2
+
3
+import org.apache.commons.lang.builder.EqualsBuilder;
4
+import org.apache.commons.lang.builder.HashCodeBuilder;
5
+import org.apache.commons.lang.builder.ToStringBuilder;
6
+import org.apache.commons.lang.builder.ToStringStyle;
7
+
8
+import javax.xml.bind.annotation.XmlRootElement;
9
+
10
+@XmlRootElement
11
+public class CargoDetails {
12
+
13
+  private String trackingId;
14
+  private String receivedIn;
15
+  private String finalDestination;
16
+  private String arrivalDeadline;
17
+  private String eta;
18
+  private String currentStatus;
19
+  private String currentVoyage;
20
+  private String currentLocation;
21
+  private String lastUpdatedOn;
22
+
23
+  public String getTrackingId() {
24
+    return trackingId;
25
+  }
26
+
27
+  public void setTrackingId(String trackingId) {
28
+    this.trackingId = trackingId;
29
+  }
30
+
31
+  public String getReceivedIn() {
32
+    return receivedIn;
33
+  }
34
+
35
+  public void setReceivedIn(String receivedIn) {
36
+    this.receivedIn = receivedIn;
37
+  }
38
+
39
+  public String getFinalDestination() {
40
+    return finalDestination;
41
+  }
42
+
43
+  public void setFinalDestination(String finalDestination) {
44
+    this.finalDestination = finalDestination;
45
+  }
46
+
47
+  public String getArrivalDeadline() {
48
+    return arrivalDeadline;
49
+  }
50
+
51
+  public void setArrivalDeadline(String arrivalDeadline) {
52
+    this.arrivalDeadline = arrivalDeadline;
53
+  }
54
+
55
+  public String getEta() {
56
+    return eta;
57
+  }
58
+
59
+  public void setEta(String eta) {
60
+    this.eta = eta;
61
+  }
62
+
63
+  public String getCurrentStatus() {
64
+    return currentStatus;
65
+  }
66
+
67
+  public void setCurrentStatus(String currentStatus) {
68
+    this.currentStatus = currentStatus;
69
+  }
70
+
71
+  public String getCurrentVoyage() {
72
+    return currentVoyage;
73
+  }
74
+
75
+  public void setCurrentVoyage(String currentVoyage) {
76
+    this.currentVoyage = currentVoyage;
77
+  }
78
+
79
+  public String getCurrentLocation() {
80
+    return currentLocation;
81
+  }
82
+
83
+  public void setCurrentLocation(String currentLocation) {
84
+    this.currentLocation = currentLocation;
85
+  }
86
+
87
+  public String getLastUpdatedOn() {
88
+    return lastUpdatedOn;
89
+  }
90
+
91
+  public void setLastUpdatedOn(String lastUpdatedOn) {
92
+    this.lastUpdatedOn = lastUpdatedOn;
93
+  }
94
+
95
+  @Override
96
+  public boolean equals(Object that) {
97
+    return EqualsBuilder.reflectionEquals(this, that);
98
+  }
99
+
100
+  @Override
101
+  public int hashCode() {
102
+    return HashCodeBuilder.reflectionHashCode(this);
103
+  }
104
+
105
+  @Override
106
+  public String toString() {
107
+    return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
108
+  }
109
+}

+ 64
- 0
dddsample/external/reporting-api/src/main/java/se/citerus/dddsample/reporting/api/Handling.java Näytä tiedosto

@@ -0,0 +1,64 @@
1
+package se.citerus.dddsample.reporting.api;
2
+
3
+import org.apache.commons.lang.builder.EqualsBuilder;
4
+import org.apache.commons.lang.builder.HashCodeBuilder;
5
+import org.apache.commons.lang.builder.ToStringBuilder;
6
+import org.apache.commons.lang.builder.ToStringStyle;
7
+
8
+import javax.xml.bind.annotation.XmlRootElement;
9
+
10
+@XmlRootElement
11
+public class Handling {
12
+
13
+  private String type;
14
+  private String location;
15
+  private String voyage;
16
+  private String completedOn;
17
+
18
+  public String getType() {
19
+    return type;
20
+  }
21
+
22
+  public void setType(String type) {
23
+    this.type = type;
24
+  }
25
+
26
+  public String getLocation() {
27
+    return location;
28
+  }
29
+
30
+  public void setLocation(String location) {
31
+    this.location = location;
32
+  }
33
+
34
+  public String getVoyage() {
35
+    return voyage;
36
+  }
37
+
38
+  public void setVoyage(String voyage) {
39
+    this.voyage = voyage;
40
+  }
41
+
42
+  public String getCompletedOn() {
43
+    return completedOn;
44
+  }
45
+
46
+  public void setCompletedOn(String completedOn) {
47
+    this.completedOn = completedOn;
48
+  }
49
+
50
+  @Override
51
+  public boolean equals(Object that) {
52
+    return EqualsBuilder.reflectionEquals(this, that);
53
+  }
54
+
55
+  @Override
56
+  public int hashCode() {
57
+    return HashCodeBuilder.reflectionHashCode(this);
58
+  }
59
+
60
+  @Override
61
+  public String toString() {
62
+    return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
63
+  }
64
+}

+ 27
- 0
dddsample/external/reporting-api/src/main/java/se/citerus/dddsample/reporting/api/OnboardCargo.java Näytä tiedosto

@@ -0,0 +1,27 @@
1
+package se.citerus.dddsample.reporting.api;
2
+
3
+import javax.xml.bind.annotation.XmlRootElement;
4
+
5
+@XmlRootElement
6
+public class OnboardCargo {
7
+  
8
+  private String trackingId;
9
+  private String finalDestination;
10
+
11
+  public String getTrackingId() {
12
+    return trackingId;
13
+  }
14
+
15
+  public void setTrackingId(String trackingId) {
16
+    this.trackingId = trackingId;
17
+  }
18
+
19
+  public String getFinalDestination() {
20
+    return finalDestination;
21
+  }
22
+
23
+  public void setFinalDestination(String finalDestination) {
24
+    this.finalDestination = finalDestination;
25
+  }
26
+
27
+}

+ 63
- 0
dddsample/external/reporting-api/src/main/java/se/citerus/dddsample/reporting/api/VoyageDetails.java Näytä tiedosto

@@ -0,0 +1,63 @@
1
+package se.citerus.dddsample.reporting.api;
2
+
3
+import javax.xml.bind.annotation.XmlRootElement;
4
+
5
+@XmlRootElement
6
+public class VoyageDetails {
7
+
8
+  private String voyageNumber;
9
+  private String nextStop;
10
+  private String etaNextStop;
11
+  private String currentStatus;
12
+  private int delayedByMinutes;
13
+  private String lastUpdatedOn;
14
+
15
+  public String getVoyageNumber() {
16
+    return voyageNumber;
17
+  }
18
+
19
+  public void setVoyageNumber(String voyageNumber) {
20
+    this.voyageNumber = voyageNumber;
21
+  }
22
+
23
+  public String getNextStop() {
24
+    return nextStop;
25
+  }
26
+
27
+  public void setNextStop(String nextStop) {
28
+    this.nextStop = nextStop;
29
+  }
30
+
31
+  public String getEtaNextStop() {
32
+    return etaNextStop;
33
+  }
34
+
35
+  public void setEtaNextStop(String etaNextStop) {
36
+    this.etaNextStop = etaNextStop;
37
+  }
38
+
39
+  public String getCurrentStatus() {
40
+    return currentStatus;
41
+  }
42
+
43
+  public void setCurrentStatus(String currentStatus) {
44
+    this.currentStatus = currentStatus;
45
+  }
46
+
47
+  public int getDelayedByMinutes() {
48
+    return delayedByMinutes;
49
+  }
50
+
51
+  public void setDelayedByMinutes(int delayedByMinutes) {
52
+    this.delayedByMinutes = delayedByMinutes;
53
+  }
54
+
55
+  public String getLastUpdatedOn() {
56
+    return lastUpdatedOn;
57
+  }
58
+
59
+  public void setLastUpdatedOn(String lastUpdatedOn) {
60
+    this.lastUpdatedOn = lastUpdatedOn;
61
+  }
62
+
63
+}