|
|
@@ -8,6 +8,7 @@ import org.apache.commons.logging.LogFactory;
|
|
8
|
8
|
import org.springframework.transaction.annotation.Transactional;
|
|
9
|
9
|
import se.citerus.dddsample.reporting.api.CargoDetails;
|
|
10
|
10
|
import se.citerus.dddsample.reporting.api.Handling;
|
|
|
11
|
+import se.citerus.dddsample.reporting.api.ReportSubmission;
|
|
11
|
12
|
|
|
12
|
13
|
import javax.ws.rs.*;
|
|
13
|
14
|
import javax.ws.rs.core.Response;
|
|
|
@@ -20,7 +21,7 @@ import static javax.ws.rs.core.Response.status;
|
|
20
|
21
|
@Produces({"application/json", "application/pdf"})
|
|
21
|
22
|
@Consumes({"application/json", "application/xml"})
|
|
22
|
23
|
@Path("/")
|
|
23
|
|
-public class ReportingService {
|
|
|
24
|
+public class ReportingService implements ReportSubmission {
|
|
24
|
25
|
|
|
25
|
26
|
private ReportDAO reportDAO;
|
|
26
|
27
|
private static final Log LOG = LogFactory.getLog(ReportingService.class);
|
|
|
@@ -53,6 +54,7 @@ public class ReportingService {
|
|
53
|
54
|
build();
|
|
54
|
55
|
}
|
|
55
|
56
|
|
|
|
57
|
+ @Override
|
|
56
|
58
|
@PUT
|
|
57
|
59
|
@Path("/cargo")
|
|
58
|
60
|
@Transactional
|
|
|
@@ -61,6 +63,7 @@ public class ReportingService {
|
|
61
|
63
|
LOG.info("Stored cargo: " + cargoDetails);
|
|
62
|
64
|
}
|
|
63
|
65
|
|
|
|
66
|
+ @Override
|
|
64
|
67
|
@POST
|
|
65
|
68
|
@Path("/cargo/{trackingId}/handled")
|
|
66
|
69
|
@Transactional
|