Просмотр исходного кода

[maven-release-plugin] copy for tag dddsample-1.0-RC1

peter_backlund 18 лет назад
Родитель
Сommit
e00324e2fd
100 измененных файлов: 15 добавлений и 1168 удалений
  1. 0
    0
      checkstyle.xml
  2. Двоичные данные
      dddsample/doc/tracking.jpg
  3. 0
    74
      dddsample/src/test/java/se/citerus/dddsample/domain/service/RoutingScenarioTest.java
  4. 0
    0
      doc/dddsample-format-eclipse.pref
  5. 0
    0
      doc/deployment.png
  6. 0
    0
      doc/description.pdf
  7. 0
    0
      doc/domain.png
  8. 5
    8
      pom.xml
  9. 0
    34
      register-app/assembly.xml
  10. 0
    173
      register-app/pom.xml
  11. 0
    40
      register-app/src/main/java/se/citerus/App.java
  12. 0
    242
      register-app/src/main/java/se/citerus/registerapp/RegisterApp.java
  13. 0
    14
      register-app/src/main/java/se/citerus/registerapp/service/HandlingEventService.java
  14. 0
    17
      register-app/src/main/java/se/citerus/registerapp/service/HandlingEventServiceWs.java
  15. 0
    41
      register-app/src/main/java/se/citerus/registerapp/validation/AbstractFormValidationDecorator.java
  16. 0
    96
      register-app/src/main/java/se/citerus/registerapp/validation/AbstractValidator.java
  17. 0
    8
      register-app/src/main/java/se/citerus/registerapp/validation/ComponentValidator.java
  18. 0
    13
      register-app/src/main/java/se/citerus/registerapp/validation/FormValidationDecorator.java
  19. 0
    118
      register-app/src/main/java/se/citerus/registerapp/validation/FormValidationSwingDecorator.java
  20. 0
    25
      register-app/src/main/java/se/citerus/registerapp/validation/MandatoryTextFieldValidator.java
  21. 0
    1
      register-app/src/main/resources/app.properties
  22. 0
    36
      register-app/src/main/resources/context-app.xml
  23. Двоичные данные
      register-app/src/main/resources/icon/error_16x16.png
  24. 0
    23
      register-app/src/main/resources/log4j.properties
  25. 0
    38
      register-app/src/test/java/se/citerus/AppTest.java
  26. 0
    120
      register-app/src/test/java/se/citerus/registerapp/validation/ValidationTest.java
  27. 0
    2
      register-app/startApp.sh
  28. 0
    0
      src/main/java/se/citerus/dddsample/application/messaging/HandlingEventMessageDelegate.java
  29. 0
    1
      src/main/java/se/citerus/dddsample/application/messaging/JmsDomainEventNotifierImpl.java
  30. 0
    0
      src/main/java/se/citerus/dddsample/application/messaging/ThreadBasedDomainEventNotifierImpl.java
  31. 0
    0
      src/main/java/se/citerus/dddsample/application/messaging/package.html
  32. 0
    0
      src/main/java/se/citerus/dddsample/application/package.html
  33. 0
    0
      src/main/java/se/citerus/dddsample/application/persistence/CargoRepositoryHibernate.java
  34. 0
    0
      src/main/java/se/citerus/dddsample/application/persistence/CarrierMovementRepositoryHibernate.java
  35. 0
    0
      src/main/java/se/citerus/dddsample/application/persistence/HandlingEventRepositoryHibernate.java
  36. 0
    0
      src/main/java/se/citerus/dddsample/application/persistence/HibernateRepository.java
  37. 0
    0
      src/main/java/se/citerus/dddsample/application/persistence/LocationRepositoryHibernate.java
  38. 0
    0
      src/main/java/se/citerus/dddsample/application/persistence/package.html
  39. 0
    0
      src/main/java/se/citerus/dddsample/application/remoting/BookingServiceFacade.java
  40. 0
    2
      src/main/java/se/citerus/dddsample/application/remoting/BookingServiceFacadeImpl.java
  41. 0
    0
      src/main/java/se/citerus/dddsample/application/remoting/dto/CargoRoutingDTO.java
  42. 0
    0
      src/main/java/se/citerus/dddsample/application/remoting/dto/HandlingEventDTO.java
  43. 0
    0
      src/main/java/se/citerus/dddsample/application/remoting/dto/ItineraryCandidateDTO.java
  44. 0
    0
      src/main/java/se/citerus/dddsample/application/remoting/dto/LegDTO.java
  45. 0
    0
      src/main/java/se/citerus/dddsample/application/remoting/dto/LocationDTO.java
  46. 4
    4
      src/main/java/se/citerus/dddsample/application/remoting/dto/assembler/CargoRoutingDTOAssembler.java
  47. 0
    0
      src/main/java/se/citerus/dddsample/application/remoting/dto/assembler/ItineraryCandidateDTOAssembler.java
  48. 0
    0
      src/main/java/se/citerus/dddsample/application/remoting/dto/assembler/LocationDTOAssembler.java
  49. 0
    0
      src/main/java/se/citerus/dddsample/application/remoting/dto/assembler/package.html
  50. 0
    0
      src/main/java/se/citerus/dddsample/application/remoting/dto/package.html
  51. 0
    0
      src/main/java/se/citerus/dddsample/application/remoting/package.html
  52. 0
    0
      src/main/java/se/citerus/dddsample/application/routing/ExternalRoutingService.java
  53. 0
    0
      src/main/java/se/citerus/dddsample/application/routing/package.html
  54. 0
    0
      src/main/java/se/citerus/dddsample/application/util/SampleDataGenerator.java
  55. 0
    0
      src/main/java/se/citerus/dddsample/application/util/package.html
  56. 0
    0
      src/main/java/se/citerus/dddsample/application/ws/HandlingEventServiceEndpoint.java
  57. 0
    0
      src/main/java/se/citerus/dddsample/application/ws/HandlingEventServiceEndpointImpl.java
  58. 0
    0
      src/main/java/se/citerus/dddsample/application/ws/InvalidEventTypeException.java
  59. 0
    0
      src/main/java/se/citerus/dddsample/application/ws/package.html
  60. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/DomainEvent.java
  61. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/Entity.java
  62. 2
    1
      src/main/java/se/citerus/dddsample/domain/model/Specification.java
  63. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/ValueObject.java
  64. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/cargo/Cargo.java
  65. 0
    4
      src/main/java/se/citerus/dddsample/domain/model/cargo/CargoRepository.java
  66. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/cargo/DeliveryHistory.java
  67. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/cargo/Itinerary.java
  68. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/cargo/Leg.java
  69. 1
    18
      src/main/java/se/citerus/dddsample/domain/model/cargo/RouteSpecification.java
  70. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/cargo/StatusCode.java
  71. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/cargo/TrackingId.java
  72. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/cargo/package.html
  73. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/carrier/CarrierMovement.java
  74. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/carrier/CarrierMovementId.java
  75. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/carrier/CarrierMovementRepository.java
  76. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/carrier/package.html
  77. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/handling/HandlingEvent.java
  78. 0
    1
      src/main/java/se/citerus/dddsample/domain/model/handling/HandlingEventRepository.java
  79. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/handling/package.html
  80. 0
    10
      src/main/java/se/citerus/dddsample/domain/model/location/Location.java
  81. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/location/LocationRepository.java
  82. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/location/UnLocode.java
  83. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/location/package.html
  84. 0
    0
      src/main/java/se/citerus/dddsample/domain/model/package.html
  85. 0
    0
      src/main/java/se/citerus/dddsample/domain/package.html
  86. 0
    0
      src/main/java/se/citerus/dddsample/domain/service/BookingService.java
  87. 0
    0
      src/main/java/se/citerus/dddsample/domain/service/DomainEventNotifier.java
  88. 0
    0
      src/main/java/se/citerus/dddsample/domain/service/HandlingEventService.java
  89. 0
    0
      src/main/java/se/citerus/dddsample/domain/service/RoutingService.java
  90. 0
    0
      src/main/java/se/citerus/dddsample/domain/service/TrackingService.java
  91. 0
    0
      src/main/java/se/citerus/dddsample/domain/service/UnknownCarrierMovementIdException.java
  92. 0
    0
      src/main/java/se/citerus/dddsample/domain/service/UnknownLocationException.java
  93. 0
    0
      src/main/java/se/citerus/dddsample/domain/service/UnknownTrackingIdException.java
  94. 0
    0
      src/main/java/se/citerus/dddsample/domain/service/impl/BookingServiceImpl.java
  95. 0
    0
      src/main/java/se/citerus/dddsample/domain/service/impl/HandlingEventServiceImpl.java
  96. 3
    4
      src/main/java/se/citerus/dddsample/domain/service/impl/TrackingServiceImpl.java
  97. 0
    0
      src/main/java/se/citerus/dddsample/domain/service/package.html
  98. 0
    0
      src/main/java/se/citerus/dddsample/ui/CargoAdminController.java
  99. 0
    0
      src/main/java/se/citerus/dddsample/ui/CargoTrackingController.java
  100. 0
    0
      src/main/java/se/citerus/dddsample/ui/CargoTrackingViewAdapter.java

dddsample/checkstyle.xml → checkstyle.xml Просмотреть файл


Двоичные данные
dddsample/doc/tracking.jpg Просмотреть файл


+ 0
- 74
dddsample/src/test/java/se/citerus/dddsample/domain/service/RoutingScenarioTest.java Просмотреть файл

@@ -1,74 +0,0 @@
1
-package se.citerus.dddsample.domain.service;
2
-
3
-import junit.framework.TestCase;
4
-import se.citerus.dddsample.domain.model.cargo.*;
5
-import se.citerus.dddsample.domain.model.carrier.CarrierMovementId;
6
-import se.citerus.dddsample.domain.model.location.UnLocode;
7
-
8
-import java.util.Date;
9
-import java.util.List;
10
-
11
-public class RoutingScenarioTest extends TestCase {
12
-
13
-  RoutingService routingService;
14
-  CargoRepository cargoRepository;
15
-  HandlingEventService handlingEventService;
16
-
17
-  // TODO work on this
18
-  public void xtestCalculateRoute() throws Exception {
19
-
20
-    TrackingId trackingId = new TrackingId("XYZ123");
21
-    Cargo cargo = cargoRepository.find(trackingId);
22
-
23
-    Date twoWeeksFromNow = new Date(System.currentTimeMillis() + 1000 * 60 * 60 * 24 * 14);
24
-
25
-    RouteSpecification routeSpecification = RouteSpecification.forCargo(cargo, twoWeeksFromNow);
26
-
27
-    /*
28
-      The routing service calculates a number of possible routes that
29
-      satisfy the given specification (must arrive in three days, must not
30
-      cost more than $10,000 etc).
31
-     */
32
-    List<Itinerary> itineraryCandidates = routingService.fetchRoutesForSpecification(routeSpecification);
33
-
34
-    /*
35
-      Someone, or something, selects the most appropriate itinerary and
36
-      assigns that itinerary to the cargo.
37
-     */
38
-    Itinerary itinerary = stubbedItinerarySelection(itineraryCandidates);
39
-    cargo.attachItinerary(itinerary);
40
-
41
-    /*
42
-      A number of events occur, all of which are according to plan
43
-     */
44
-    handlingEventService.register(new Date(), trackingId, new CarrierMovementId("A001"), new UnLocode("SESTO"), null);
45
-    handlingEventService.register(new Date(), trackingId, new CarrierMovementId("B002"), null, null);
46
-    handlingEventService.register(new Date(), trackingId, new CarrierMovementId("C003"), null, null);
47
-
48
-    /*
49
-      Cargo should not be misdirected at this point.
50
-     */
51
-    assertFalse(cargo.isMisdirected());
52
-
53
-    /*
54
-      An unexpected event occur.
55
-     */
56
-    handlingEventService.register(null, null, null, null, null);
57
-
58
-    /*
59
-      Now the cargo is misdirected.
60
-     */
61
-    assertTrue(cargo.isMisdirected());
62
-  }
63
-
64
-  public void testRun() throws Exception
65
-  {
66
-    
67
-  }
68
-
69
-
70
-  private Itinerary stubbedItinerarySelection(List<Itinerary> itineraryCandidates) {
71
-    return itineraryCandidates.get(0);
72
-  }
73
-
74
-}

dddsample/doc/dddsample-format-eclipse.pref → doc/dddsample-format-eclipse.pref Просмотреть файл


dddsample/doc/deployment.png → doc/deployment.png Просмотреть файл


dddsample/doc/description.pdf → doc/description.pdf Просмотреть файл


dddsample/doc/domain.png → doc/domain.png Просмотреть файл


dddsample/pom.xml → pom.xml Просмотреть файл

@@ -1,13 +1,10 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project xmlns="http://maven.apache.org/POM/4.0.0"
3
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
1
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5 2
   <modelVersion>4.0.0</modelVersion>
6 3
   <groupId>se.citerus</groupId>
7 4
   <artifactId>dddsample</artifactId>
8 5
   <packaging>war</packaging>
9 6
   <name>DDDSample</name>
10
-  <version>1.0-SNAPSHOT</version>
7
+  <version>1.0-RC1</version>
11 8
   <description>This application shows a few key concepts of
12 9
     Domain Driven Design implemented in Enterprise Java.
13 10
   </description>
@@ -18,7 +15,7 @@
18 15
       <url>scp://shell.sf.net/home/groups/d/dd/dddsample/htdocs</url>
19 16
     </site>
20 17
   </distributionManagement>
21
-  <ciManagement/>
18
+  <ciManagement />
22 19
   <repositories>
23 20
     <repository>
24 21
       <id>maven2-repository.dev.java.net</id>
@@ -90,8 +87,8 @@
90 87
     </license>
91 88
   </licenses>
92 89
   <scm>
93
-    <developerConnection>scm:svn:https://dddsample.svn.sourceforge.net/svnroot/dddsample</developerConnection>
94
-    <url>http://ddd.sventon.org</url>
90
+    <developerConnection>scm:svn:https://dddsample.svn.sourceforge.net/svnroot/dddsample/tags/dddsample-1.0-RC1</developerConnection>
91
+    <url>http://ddd.sventon.org/tags/dddsample-1.0-RC1</url>
95 92
   </scm>
96 93
   <properties>
97 94
     <spring.version>2.5.1</spring.version>

+ 0
- 34
register-app/assembly.xml Просмотреть файл

@@ -1,34 +0,0 @@
1
-<?xml version="1.0"?>
2
-
3
-<assembly xmlns="http://maven.apache.org/POM/4.0.0"
4
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5
-          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
6
-
7
-    <formats>
8
-        <format>zip</format>
9
-    </formats>
10
-    <includeBaseDirectory>true</includeBaseDirectory>
11
-  
12
-    <files>
13
-        <file>
14
-            <source>src/main/resources/app.properties</source>
15
-            <destName>app.properties</destName>
16
-        </file>
17
-    </files>
18
-
19
-    <dependencySets>
20
-      <dependencySet>
21
-        <excludes>
22
-          <exclude>se.citerus:register-app</exclude>
23
-        </excludes>
24
-        <outputDirectory>lib</outputDirectory>
25
-      </dependencySet>
26
-      <dependencySet>
27
-        <includes>
28
-          <include>se.citerus:register-app</include>
29
-        </includes>
30
-        <outputFileNameMapping>IncidentLoggingApplication.${artifact.extension}</outputFileNameMapping>
31
-      </dependencySet>
32
-    </dependencySets>
33
-
34
-</assembly>

+ 0
- 173
register-app/pom.xml Просмотреть файл

@@ -1,173 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project xmlns="http://maven.apache.org/POM/4.0.0"
3
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
-
6
-  <modelVersion>4.0.0</modelVersion>
7
-  <groupId>se.citerus</groupId>
8
-  <artifactId>register-app</artifactId>
9
-  <name>register-app</name>
10
-  <version>1.0-SNAPSHOT</version>
11
-  <url>http://maven.apache.org</url>
12
-  <build>
13
-    <plugins>
14
-      <plugin>
15
-        <artifactId>maven-compiler-plugin</artifactId>
16
-        <configuration>
17
-          <source>1.5</source>
18
-          <target>1.5</target>
19
-          <encoding>UTF-8</encoding>
20
-        </configuration>
21
-      </plugin>
22
-      <plugin>
23
-        <artifactId>maven-jar-plugin</artifactId>
24
-        <configuration>
25
-          <archive>
26
-            <manifest>
27
-              <mainClass>se.citerus.App</mainClass>
28
-              <addClasspath>true</addClasspath>
29
-              <classpathPrefix>lib</classpathPrefix>
30
-            </manifest>
31
-          </archive>
32
-        </configuration>
33
-      </plugin>
34
-      <plugin>
35
-        <artifactId>maven-assembly-plugin</artifactId>
36
-        <configuration>
37
-          <descriptors>
38
-            <descriptor>assembly.xml</descriptor>
39
-          </descriptors>
40
-          <finalName>IncidentLoggingApplication</finalName>
41
-        </configuration>
42
-      </plugin>
43
-    </plugins>
44
-  </build>
45
-  <repositories>
46
-    <repository>
47
-      <id>maven2-repository.dev.java.net</id>
48
-      <name>Java.net Repository for Maven</name>
49
-      <url>http://download.java.net/maven/2/</url>
50
-    </repository>
51
-  </repositories>
52
-  <pluginRepositories>
53
-    <pluginRepository>
54
-      <id>maven2-repository.dev.java.net</id>
55
-      <name>Java.net Repository for Maven</name>
56
-      <url>http://download.java.net/maven/2/</url>
57
-    </pluginRepository>
58
-  </pluginRepositories>
59
-  <dependencies>
60
-    <dependency>
61
-      <groupId>junit</groupId>
62
-      <artifactId>junit</artifactId>
63
-      <version>3.8.1</version>
64
-      <scope>test</scope>
65
-    </dependency>
66
-    <dependency>
67
-      <groupId>org.springframework</groupId>
68
-      <artifactId>spring-context</artifactId>
69
-      <version>2.5.5</version>
70
-    </dependency>
71
-    <dependency>
72
-      <groupId>org.springframework</groupId>
73
-      <artifactId>spring-web</artifactId>
74
-      <version>2.5.5</version>
75
-    </dependency>
76
-    <dependency>
77
-      <groupId>org.springframework</groupId>
78
-      <artifactId>spring-aop</artifactId>
79
-      <version>2.5.5</version>
80
-    </dependency>
81
-    <dependency>
82
-      <groupId>com.jgoodies</groupId>
83
-      <artifactId>forms</artifactId>
84
-      <version>1.0.7</version>
85
-    </dependency>
86
-    <dependency>
87
-      <groupId>com.jgoodies</groupId>
88
-      <artifactId>looks</artifactId>
89
-      <version>2.1.2</version>
90
-    </dependency>
91
-    <dependency>
92
-      <groupId>com.sun.xml.ws</groupId>
93
-      <artifactId>jaxws-rt</artifactId>
94
-      <version>2.1.3</version>
95
-    </dependency>
96
-    <dependency>
97
-      <groupId>se.citerus</groupId>
98
-      <artifactId>dddsample</artifactId>
99
-      <version>1.0-SNAPSHOT</version>
100
-      <classifier>ws-client</classifier>
101
-      <exclusions>
102
-        <exclusion>
103
-          <artifactId>spring-core</artifactId>
104
-          <groupId>org.springframework</groupId>
105
-        </exclusion>
106
-        <exclusion>
107
-          <artifactId>spring-webmvc</artifactId>
108
-          <groupId>org.springframework</groupId>
109
-        </exclusion>
110
-        <exclusion>
111
-          <artifactId>spring-orm</artifactId>
112
-          <groupId>org.springframework</groupId>
113
-        </exclusion>
114
-        <exclusion>
115
-          <artifactId>spring-jdbc</artifactId>
116
-          <groupId>org.springframework</groupId>
117
-        </exclusion>
118
-        <exclusion>
119
-          <artifactId>spring-aop</artifactId>
120
-          <groupId>org.springframework</groupId>
121
-        </exclusion>
122
-        <exclusion>
123
-          <artifactId>spring-context</artifactId>
124
-          <groupId>org.springframework</groupId>
125
-        </exclusion>
126
-        <exclusion>
127
-          <artifactId>spring-jms</artifactId>
128
-          <groupId>org.springframework</groupId>
129
-        </exclusion>
130
-        <exclusion>
131
-          <artifactId>spring-beans</artifactId>
132
-          <groupId>org.springframework</groupId>
133
-        </exclusion>
134
-        <exclusion>
135
-          <artifactId>hibernate</artifactId>
136
-          <groupId>org.hibernate</groupId>
137
-        </exclusion>
138
-        <exclusion>
139
-          <artifactId>hibernate-annotations</artifactId>
140
-          <groupId>org.hibernate</groupId>
141
-        </exclusion>
142
-        <exclusion>
143
-          <artifactId>hibernate-commons-annotations</artifactId>
144
-          <groupId>org.hibernate</groupId>
145
-        </exclusion>
146
-        <exclusion>
147
-          <artifactId>commons-dbcp</artifactId>
148
-          <groupId>commons-dbcp</groupId>
149
-        </exclusion>
150
-        <exclusion>
151
-          <artifactId>hsqldb</artifactId>
152
-          <groupId>hsqldb</groupId>
153
-        </exclusion>
154
-        <exclusion>
155
-          <artifactId>servlet-api</artifactId>
156
-          <groupId>javax.servlet</groupId>
157
-        </exclusion>
158
-        <exclusion>
159
-          <artifactId>standard</artifactId>
160
-          <groupId>taglibs</groupId>
161
-        </exclusion>
162
-        <exclusion>
163
-          <artifactId>jstl</artifactId>
164
-          <groupId>javax.servlet</groupId>
165
-        </exclusion>
166
-        <exclusion>
167
-          <artifactId>sitemesh</artifactId>
168
-          <groupId>opensymphony</groupId>
169
-        </exclusion>
170
-      </exclusions>
171
-    </dependency>
172
-  </dependencies>
173
-</project>

+ 0
- 40
register-app/src/main/java/se/citerus/App.java Просмотреть файл

@@ -1,40 +0,0 @@
1
-package se.citerus;
2
-
3
-import org.springframework.context.ApplicationContext;
4
-import org.springframework.context.support.ClassPathXmlApplicationContext;
5
-
6
-import se.citerus.registerapp.RegisterApp;
7
-
8
-/**
9
- * The application main class
10
- *
11
- */
12
-public class App {
13
-  private static RegisterApp app;
14
-  
15
-  public static void main(String[] args) {
16
-    app = getRegisterApp();
17
-    
18
-    //Schedule a job for the event-dispatching thread:
19
-    //creating and showing this application's GUI.
20
-    javax.swing.SwingUtilities.invokeLater(new Runnable() {
21
-        public void run() {
22
-            app.show();
23
-        }
24
-    });
25
-  }
26
-
27
-  private static RegisterApp getRegisterApp() {
28
-    return (RegisterApp)getBean("registerApp");
29
-  }
30
-
31
-  public static Object getBean(String bean){
32
-    ApplicationContext context = getContext(); 
33
-
34
-    return context.getBean(bean);
35
-}
36
-
37
-public static ClassPathXmlApplicationContext getContext() {
38
-    return new ClassPathXmlApplicationContext(new String[] {"context-app.xml"});
39
-}
40
-}

+ 0
- 242
register-app/src/main/java/se/citerus/registerapp/RegisterApp.java Просмотреть файл

@@ -1,242 +0,0 @@
1
-package se.citerus.registerapp;
2
-
3
-import java.awt.Color;
4
-import java.awt.Component;
5
-import java.awt.Dimension;
6
-import java.awt.event.ActionEvent;
7
-import java.awt.event.ActionListener;
8
-import java.text.SimpleDateFormat;
9
-import java.util.Date;
10
-
11
-import javax.swing.*;
12
-import javax.swing.border.Border;
13
-import javax.swing.border.CompoundBorder;
14
-import javax.swing.border.LineBorder;
15
-import javax.swing.plaf.basic.BasicBorders;
16
-import javax.swing.text.DefaultFormatter;
17
-
18
-import se.citerus.registerapp.service.HandlingEventService;
19
-import se.citerus.registerapp.validation.FormValidationDecorator;
20
-import se.citerus.registerapp.validation.FormValidationSwingDecorator;
21
-import se.citerus.registerapp.validation.MandatoryTextFieldValidator;
22
-
23
-import com.jgoodies.forms.builder.DefaultFormBuilder;
24
-import com.jgoodies.forms.debug.FormDebugPanel;
25
-import com.jgoodies.forms.factories.ButtonBarFactory;
26
-import com.jgoodies.forms.layout.FormLayout;
27
-
28
-public class RegisterApp {
29
-  private static final DefaultFormatter DEFAULT_FORMATTER = new DefaultFormatter();
30
-  private static final SimpleDateFormat ISO8601_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:MM:SS.SSS");
31
-  private static final String TITLE = "Incident Logging Application";
32
-  private JFrame frame;
33
-  private JFormattedTextField completionTimeField;
34
-  private JFormattedTextField trackingIdField;
35
-  private JFormattedTextField carrierMovementField;
36
-  private JFormattedTextField locationField;
37
-  //private JFormattedTextField eventTypeField;
38
-  private JComboBox eventTypeField;
39
-  private JButton registerButton;
40
-  
41
-  private HandlingEventService handlingEventService;
42
-  private boolean debugUI;
43
-  private FormValidationDecorator validator;
44
-
45
-
46
-
47
-  /////////////////////////////////////////////////////////////////////////////
48
-  // GUI EVENT HANDLING
49
-  /////////////////////////////////////////////////////////////////////////////
50
-  protected void onRegister(){
51
-    assert handlingEventService != null : "No HandlingEventService available";
52
-
53
-      handlingEventService.register(ISO8601_DATE_FORMAT.format(completionTimeField.getValue()),
54
-                                  getStringValue(trackingIdField),
55
-                                  getStringValue(carrierMovementField),
56
-                                  getStringValue(locationField),
57
-                                  getStringValue(eventTypeField).toUpperCase());
58
-    
59
-    clearForm();
60
-  }
61
-
62
-  private String getStringValue(JComboBox comboBox) {
63
-      Object value = comboBox.getSelectedItem();
64
-      
65
-      if (value != null) {
66
-        return value.toString();
67
-      } else {
68
-        return null;
69
-      }
70
-  }
71
-
72
-
73
-  private String getStringValue(JFormattedTextField formattedTextField) {
74
-    Object value = formattedTextField.getValue();
75
-    
76
-    if (value != null) {
77
-      return value.toString();
78
-    } else {
79
-      return null;
80
-    }
81
-  }
82
-  
83
-  
84
-  /////////////////////////////////////////////////////////////////////////////
85
-  // PUBLIC API
86
-  /////////////////////////////////////////////////////////////////////////////
87
-  public void show() {
88
-    try {
89
-      UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel");
90
-    } catch (Exception e) {
91
-      // Likely PlasticXP is not in the class path; ignore.
92
-    }
93
-    
94
-    initComponents();
95
-    JComponent panel = createMainPanel();
96
-    
97
-    
98
-    frame = createFrame(panel);
99
-    frame.pack();
100
-    centerOnScreen(frame);
101
-    
102
-    initValidation(frame);
103
-    
104
-    frame.setVisible(true);
105
-    
106
-    clearForm();
107
-  }
108
-
109
-
110
-  public void setHandlingEventService(HandlingEventService handlingEventService) {
111
-    this.handlingEventService = handlingEventService;
112
-  }
113
-
114
-  public void setDebugUI(boolean on){
115
-    this.debugUI = on;
116
-  }
117
-
118
-  /////////////////////////////////////////////////////////////////////////////
119
-  // GUI SETUP
120
-  /////////////////////////////////////////////////////////////////////////////
121
-  private void clearForm() {
122
-    completionTimeField.setText(ISO8601_DATE_FORMAT.format(new Date()));
123
-    trackingIdField.setText("");
124
-    carrierMovementField.setText("");
125
-    locationField.setText("");
126
-    eventTypeField.setSelectedIndex(0);
127
-  }
128
-
129
-  public static Border getMandatoryBorder() {
130
-    return new CompoundBorder(new LineBorder(Color.RED), new BasicBorders.MarginBorder());
131
-  }
132
-  
133
-  private void initComponents(){
134
-    completionTimeField = new JFormattedTextField(ISO8601_DATE_FORMAT);
135
-    trackingIdField = new JFormattedTextField(DEFAULT_FORMATTER);
136
-    carrierMovementField = new JFormattedTextField(DEFAULT_FORMATTER);
137
-    locationField = new JFormattedTextField(DEFAULT_FORMATTER);
138
-    eventTypeField = new JComboBox(new String[] {"-- Select --","Receive","Load","Unload","Customs","Claim"});
139
-    
140
-    registerButton = new JButton("Register");
141
-    registerButton.addActionListener(new ActionListener(){
142
-      public void actionPerformed(ActionEvent e) {
143
-        if (validator.validate()){
144
-          onRegister();
145
-        }
146
-      }
147
-    });
148
-  }
149
-
150
-  /**
151
-   * We need to do initialization of validators after the components and their parent frame has been initialized.
152
-   * @param frame 
153
-   * 
154
-   */
155
-  private void initValidation(JFrame frame){
156
-    validator = new FormValidationSwingDecorator(frame);
157
-    
158
-    validator.add(trackingIdField, new MandatoryTextFieldValidator("Tracking id can't be empty"));
159
-    validator.add(locationField, new MandatoryTextFieldValidator("Location can't be empty"));
160
-  }
161
-  
162
-  
163
-  /**
164
-   * Center a component on the screen.
165
-   * 
166
-   * @param component the component to be centered
167
-   */
168
-
169
-  public static void centerOnScreen(Component component) {
170
-      Dimension componentSize = component.getSize();
171
-      Dimension screenSize = component.getToolkit().getScreenSize();
172
-
173
-      component.setLocation(
174
-          (screenSize.width  - componentSize.width)  / 2,
175
-          (int) ((screenSize.height - componentSize.height) *0.45));
176
-
177
-  }
178
-
179
-  private JFrame createFrame(JComponent panel) {
180
-    JFrame f = new JFrame();
181
-    f.setTitle(TITLE);
182
-    f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
183
-    f.getContentPane().add(panel);
184
-    
185
-    return f;
186
-  }
187
-
188
-  private JComponent createMainPanel() {
189
-    JComponent fieldPanel = createFieldPanel();
190
-    JComponent buttonPanel = createButtonPanel();
191
-    
192
-    DefaultFormBuilder mainBuilder = createBuilder("p");
193
-    mainBuilder.append(fieldPanel);
194
-    mainBuilder.append(buttonPanel);
195
-    
196
-    return mainBuilder.getPanel();
197
-  }
198
-
199
-
200
-  private JComponent createButtonPanel() {
201
-    return ButtonBarFactory.buildRightAlignedBar(registerButton);
202
-  }
203
-
204
-
205
-  private JComponent createFieldPanel() {
206
-    DefaultFormBuilder builder = createBuilder("right:pref, 3dlu, 100dlu");
207
-    
208
-    builder.appendSeparator("Completion");
209
-    builder.append("Time", completionTimeField); builder.nextLine();
210
-    
211
-    builder.appendSeparator("Cargo");
212
-    builder.append("Tracking Id", trackingIdField); builder.nextLine();
213
-    
214
-    builder.appendSeparator("Event");
215
-    builder.append("Carrier Movement", carrierMovementField); builder.nextLine();
216
-    builder.append("Location UN/Locode", locationField); builder.nextLine();
217
-    builder.append("Event Type", eventTypeField); builder.nextLine();
218
-    
219
-    builder.appendSeparator("");
220
-    
221
-    return builder.getPanel();
222
-  }
223
-
224
-
225
-  private DefaultFormBuilder createBuilder(String colSpec) {
226
-    FormLayout layout = new FormLayout(colSpec);
227
-
228
-    DefaultFormBuilder builder = createDefaultFormBuilder(layout);
229
-    builder.setDefaultDialogBorder();
230
-    return builder;
231
-  }
232
-
233
-
234
-  private DefaultFormBuilder createDefaultFormBuilder(FormLayout layout) {
235
-    if (debugUI){
236
-      return new DefaultFormBuilder(layout, new FormDebugPanel());
237
-    } else {
238
-      return new DefaultFormBuilder(layout);
239
-    }
240
-  }
241
- 
242
-}

+ 0
- 14
register-app/src/main/java/se/citerus/registerapp/service/HandlingEventService.java Просмотреть файл

@@ -1,14 +0,0 @@
1
-package se.citerus.registerapp.service;
2
-
3
-public interface HandlingEventService {
4
-  /**
5
-   * Register an cargo handling event.
6
-   *
7
-   * @param completionTime time when event occured, for example a the loading of cargo was completed
8
-   * @param trackingId tracking id of the cargo
9
-   * @param carrierMovementId carrier movement id, if applicable
10
-   * @param unlocode United Nations Location Code for the location where the event occured
11
-   * @param eventType type of event
12
-   */
13
-  void register(String completionTime, String trackingId, String carrierMovementId, String unlocode, String eventType);
14
-}

+ 0
- 17
register-app/src/main/java/se/citerus/registerapp/service/HandlingEventServiceWs.java Просмотреть файл

@@ -1,17 +0,0 @@
1
-package se.citerus.registerapp.service;
2
-
3
-import se.citerus.dddsample.application.ws.HandlingEventServiceEndpoint;
4
-
5
-
6
-public class HandlingEventServiceWs implements HandlingEventService {
7
-  private HandlingEventServiceEndpoint endPoint;
8
-  
9
-  public void register(String completionTime, String trackingId, String carrierMovementId, String unlocode, String eventType){
10
-    System.out.println(completionTime);
11
-    endPoint.register(completionTime, trackingId, carrierMovementId, unlocode, eventType);
12
-  }
13
-
14
-  public void setEndPoint(HandlingEventServiceEndpoint endPoint) {
15
-    this.endPoint = endPoint;
16
-  }
17
-}

+ 0
- 41
register-app/src/main/java/se/citerus/registerapp/validation/AbstractFormValidationDecorator.java Просмотреть файл

@@ -1,41 +0,0 @@
1
-package se.citerus.registerapp.validation;
2
-
3
-import java.awt.event.KeyEvent;
4
-import java.awt.event.KeyListener;
5
-import java.util.HashMap;
6
-import java.util.Map.Entry;
7
-
8
-import javax.swing.JComponent;
9
-
10
-public abstract class AbstractFormValidationDecorator implements FormValidationDecorator{
11
-  private HashMap<JComponent, ComponentValidator> validators = new HashMap<JComponent, ComponentValidator>();
12
-
13
-  public void add(final JComponent component, ComponentValidator validator) {
14
-    this.validators.put(component, validator);
15
-
16
-    component.addKeyListener(new KeyListener(){
17
-      public void keyPressed(KeyEvent e) {
18
-        for (final Entry<JComponent, ComponentValidator> entry : validators.entrySet()) {
19
-          undecorate(entry.getKey());
20
-        }
21
-      }
22
-
23
-      public void keyReleased(KeyEvent e) {}
24
-      public void keyTyped(KeyEvent e) {}
25
-    });
26
-  }
27
-
28
-  public boolean validate() {
29
-    boolean allValidated = true;
30
-    for (final Entry<JComponent, ComponentValidator> entry : validators.entrySet()) {
31
-      if (!entry.getValue().validate(entry.getKey())){
32
-        decorate(entry.getKey(), entry.getValue());
33
-        allValidated = false;
34
-      }
35
-    }
36
-    return allValidated;
37
-  }
38
-  
39
-  public abstract void decorate(JComponent component, ComponentValidator validator);
40
-  public abstract void undecorate(JComponent component);
41
-}

+ 0
- 96
register-app/src/main/java/se/citerus/registerapp/validation/AbstractValidator.java Просмотреть файл

@@ -1,96 +0,0 @@
1
-package se.citerus.registerapp.validation;
2
-
3
-import java.awt.Color;
4
-import java.awt.FlowLayout;
5
-import java.awt.event.KeyEvent;
6
-import java.awt.event.KeyListener;
7
-
8
-import javax.swing.ImageIcon;
9
-import javax.swing.InputVerifier;
10
-import javax.swing.JComponent;
11
-import javax.swing.JFrame;
12
-import javax.swing.JLabel;
13
-import javax.swing.JPanel;
14
-
15
-public abstract class AbstractValidator extends InputVerifier implements KeyListener{
16
-  private static final Color ERROR_COMPONENT_COLOR = Color.PINK;
17
-  private static final Color POPUP_COLOR = new Color(243, 255, 159);
18
-  private JPanel popup;
19
-  private JLabel messageLabel = new JLabel();;
20
-  private JLabel image = new JLabel();
21
-  private JFrame parent;
22
-  private String message;;
23
-
24
-  
25
-  
26
-  public AbstractValidator(String message) {
27
-    this.message = message;
28
-  }
29
-  
30
-  public String getMessage(){
31
-    return message;
32
-  }
33
-
34
-  public AbstractValidator(JFrame parent, JComponent c, String message) {
35
-    c.addKeyListener(this);
36
-    popup = new JPanel();
37
-    this.parent = parent;
38
-    messageLabel = new JLabel(message + " ");
39
-    image = new JLabel(new ImageIcon("/icon/error_16x16.png"));
40
-    initComponents();
41
-  }
42
-
43
-  /**
44
-   * Implement the actual validation logic in this method. The method should
45
-   * return false if data is invalid and true if it is valid.
46
-   * 
47
-   * @param c The JComponent to be validated.
48
-   * @return false if data is invalid. true if it is valid.
49
-   */
50
-  protected abstract boolean validate(JComponent c);
51
-
52
-  @Override
53
-  public boolean verify(JComponent component) {
54
-    if (!validate(component)) {
55
-
56
-//      
57
-//      Dimension compSize = component.getSize();
58
-//      Point compPos = popup.getLocation();
59
-//      
60
-//      component.setBackground(ERROR_COMPONENT_COLOR);
61
-//
62
-//      popup.setLocation(
63
-//          compPos.x - (int) compSize.getWidth() / 2, 
64
-//          compPos.y + (int) compSize.getHeight() / 2);
65
-      
66
-      parent.setGlassPane(popup);
67
-      component.setBackground(ERROR_COMPONENT_COLOR);
68
-      popup.setVisible(true);
69
-      return false;
70
-    } else {
71
-      component.setBackground(Color.WHITE);
72
-      return true;
73
-    }
74
-  }
75
-
76
-  public void keyPressed(KeyEvent e) {
77
-    popup.setVisible(false);    
78
-  }
79
-
80
-  public void keyReleased(KeyEvent e) {}
81
-
82
-  public void keyTyped(KeyEvent e) {}
83
-  
84
-  
85
-  private void initComponents() {
86
-    popup.setLayout(new FlowLayout());
87
-//    popup.setUndecorated(true);
88
-    popup.setBackground(POPUP_COLOR);
89
-    popup.add(image);
90
-    popup.add(messageLabel);
91
-//    popup.setOpaque(false);
92
-//    popup.setFocusableWindowState(false);
93
-  }
94
-
95
-
96
-}

+ 0
- 8
register-app/src/main/java/se/citerus/registerapp/validation/ComponentValidator.java Просмотреть файл

@@ -1,8 +0,0 @@
1
-package se.citerus.registerapp.validation;
2
-
3
-import javax.swing.JComponent;
4
-
5
-public interface ComponentValidator {
6
-  boolean validate(JComponent c);
7
-  String getMessage();
8
-}

+ 0
- 13
register-app/src/main/java/se/citerus/registerapp/validation/FormValidationDecorator.java Просмотреть файл

@@ -1,13 +0,0 @@
1
-package se.citerus.registerapp.validation;
2
-
3
-import javax.swing.JComponent;
4
-
5
-
6
-public interface FormValidationDecorator {
7
-
8
-  void add(final JComponent component, ComponentValidator validator);
9
-
10
-  boolean validate();
11
-
12
-  
13
-}

+ 0
- 118
register-app/src/main/java/se/citerus/registerapp/validation/FormValidationSwingDecorator.java Просмотреть файл

@@ -1,118 +0,0 @@
1
-package se.citerus.registerapp.validation;
2
-
3
-import java.awt.Color;
4
-import java.awt.Dimension;
5
-import java.awt.FlowLayout;
6
-import java.awt.Point;
7
-import java.util.HashMap;
8
-
9
-import javax.swing.ImageIcon;
10
-import javax.swing.JComponent;
11
-import javax.swing.JFrame;
12
-import javax.swing.JLabel;
13
-import javax.swing.JPanel;
14
-
15
-public class FormValidationSwingDecorator extends AbstractFormValidationDecorator{
16
-
17
-  private static final int POPUP_Y_OFFSET = 0;
18
-  private static final int POPUP_X_OFFSET = 12;
19
-  private Color oldColor = Color.WHITE;
20
-  private JFrame form;
21
-  private String message;
22
-  private HashMap<JComponent, JPanel> popups = new HashMap<JComponent, JPanel>();
23
-  private JPanel glassPane = new JPanel();
24
-
25
-  public FormValidationSwingDecorator(JFrame form) {
26
-    assert form != null : "Can't decorate null frame";
27
-    
28
-    this.form = form;
29
-    glassPane.setOpaque(false);
30
-    glassPane.setVisible(false);
31
-    glassPane.setLayout(null);
32
-//    glassPane.setPreferredSize(form.getPreferredSize());
33
-    glassPane.setSize(form.getSize());
34
-    
35
-    form.setGlassPane(glassPane);
36
-    
37
-    
38
-  }
39
-
40
-  public FormValidationSwingDecorator(JFrame form, String message) {
41
-    this(form);
42
-    
43
-    this.message = message;
44
-  }
45
-
46
-  private JPanel createPopupRelativeTo(JComponent component) {
47
-    JPanel popupPane = null;
48
-    
49
-    if (popups.containsKey(component)){
50
-      popupPane = popups.get(component);
51
-    } else {
52
-      popupPane = new JPanel(new FlowLayout());
53
-      glassPane.add(popupPane);
54
-      glassPane.setVisible(true);
55
-      
56
-      popupPane.add(getIconLabel());
57
-      popupPane.add(getMessageLabel());
58
-      popupPane.setLocation(getPopupPositionRelativeTo(component));
59
-      popupPane.setVisible(true);
60
-      popupPane.setOpaque(false);
61
-      popupPane.validate();
62
-      popupPane.setSize(popupPane.getPreferredSize());
63
-     
64
-    }
65
-    
66
-    return popupPane;
67
-  }
68
-
69
-  private Point getPopupPositionRelativeTo(JComponent component) {
70
-    Point compPos = component.getLocation();
71
-    Dimension compDim = component.getSize();
72
-    Point popupPos = new Point(compPos.x + POPUP_X_OFFSET, compPos.y + compDim.height + POPUP_Y_OFFSET);
73
-    
74
-    System.out.println("Comp pos: " + compPos + " - Popup pos: " + popupPos);
75
-    return popupPos;
76
-  }
77
-
78
-  private JLabel getMessageLabel() {
79
-    JLabel label = new JLabel(message != null ? message : "");
80
-    label.setOpaque(false);
81
-    return label;
82
-  }
83
-
84
-  private JLabel getIconLabel() {
85
-    JLabel label = new JLabel();
86
-    
87
-    java.net.URL imageURL = this.getClass().getResource("/icon/error_16x16.png");
88
-    if (imageURL != null){
89
-      ImageIcon icon = new ImageIcon(imageURL);
90
-      label.setIcon(icon);
91
-    } else {
92
-      System.out.println("No icon found");
93
-    }
94
-    
95
-    
96
-    label.setOpaque(false);
97
-    return label;
98
-  }
99
-  
100
-  @Override
101
-  public void decorate(JComponent component, ComponentValidator validator) {
102
-    this.message = validator.getMessage();
103
-    this.oldColor = component.getBackground();
104
-    component.setBackground(Color.PINK);
105
-    JPanel panel = createPopupRelativeTo(component);
106
-    popups.put(component, panel);
107
-    panel.setVisible(true);
108
-  }
109
-
110
-  @Override
111
-  public void undecorate(JComponent component) {
112
-    component.setBackground(oldColor);
113
-    JPanel panel = popups.get(component);
114
-    if (panel != null){
115
-      panel.setVisible(false);
116
-    }
117
-  }
118
-}

+ 0
- 25
register-app/src/main/java/se/citerus/registerapp/validation/MandatoryTextFieldValidator.java Просмотреть файл

@@ -1,25 +0,0 @@
1
-package se.citerus.registerapp.validation;
2
-
3
-import javax.swing.JComponent;
4
-import javax.swing.JTextField;
5
-
6
-public class MandatoryTextFieldValidator implements ComponentValidator {
7
-  private String message;
8
-
9
-  public MandatoryTextFieldValidator(String message) {
10
-    this.message = message;
11
-  }
12
-
13
-  public boolean validate(JComponent c) {
14
-    JTextField field = (JTextField) c;
15
-    
16
-    boolean valid = !"".equals(field.getText());
17
-    
18
-    return valid;
19
-  }
20
-
21
-  public String getMessage() {
22
-    return message;
23
-  }
24
-
25
-}

+ 0
- 1
register-app/src/main/resources/app.properties Просмотреть файл

@@ -1 +0,0 @@
1
-wsdl.url=http://localhost:8080/dddsample/ws/RegisterEvent?wsdl

+ 0
- 36
register-app/src/main/resources/context-app.xml Просмотреть файл

@@ -1,36 +0,0 @@
1
-<?xml version="1.0"?>
2
-
3
-<beans xmlns="http://www.springframework.org/schema/beans"
4
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
6
-
7
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
8
-    <property name="locations" value="file:app.properties"/>
9
-    <property name="order" value="1"/>
10
-    <property name="ignoreResourceNotFound" value="true"/>
11
-    <property name="ignoreUnresolvablePlaceholders" value="true"/>
12
-  </bean>
13
-
14
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
15
-    <property name="locations" value="classpath:app.properties"/>
16
-    <property name="order" value="2"/>
17
-  </bean>
18
-
19
-  <bean id="registerApp" class="se.citerus.registerapp.RegisterApp">
20
-    <property name="handlingEventService" ref="handlingEventServiceWs"/>
21
-    <property name="debugUI" value="false" />
22
-  </bean>
23
-
24
-  <bean id="handlingEventServiceWs" class="se.citerus.registerapp.service.HandlingEventServiceWs">
25
-    <property name="endPoint" ref="handlingEventWebServiceEndPoint"/>
26
-  </bean>
27
-
28
-  <bean id="handlingEventWebServiceEndPoint" class="org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean">
29
-    <property name="serviceInterface" value="se.citerus.dddsample.application.ws.HandlingEventServiceEndpoint" />
30
-    <property name="wsdlDocumentUrl" value="${wsdl.url}" />
31
-    <property name="namespaceUri" value="http://ws.application.dddsample.citerus.se/" />
32
-    <property name="serviceName" value="HandlingEventServiceEndpointImplService" />
33
-    <property name="portName" value="HandlingEventServiceEndpointImplPort" />
34
-  </bean>
35
-
36
-</beans>

Двоичные данные
register-app/src/main/resources/icon/error_16x16.png Просмотреть файл


+ 0
- 23
register-app/src/main/resources/log4j.properties Просмотреть файл

@@ -1,23 +0,0 @@
1
-# For JBoss: Avoid to setup Log4J outside $JBOSS_HOME/server/default/deploy/log4j.xml!
2
-# For all other servers: Comment out the Log4J listener in web.xml to activate Log4J.
3
-log4j.rootLogger=info, stdout, logfile
4
-
5
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
6
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
7
-log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n
8
-
9
-log4j.appender.logfile=org.apache.log4j.RollingFileAppender
10
-log4j.appender.logfile.File=${java.io.tmpdir}/registration-app.log
11
-log4j.appender.logfile.MaxFileSize=512KB
12
-# Keep three backup files.
13
-log4j.appender.logfile.MaxBackupIndex=3
14
-# Pattern to output: date priority [category] - message
15
-log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
16
-log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n
17
-
18
-log4j.logger.se.citerus.dddsample=debug
19
-log4j.logger.net.sf.ehcache.config.ConfigurationFactory=error
20
-log4j.logger.org.hibernate.tool.hbm2ddl.SchemaExport=debug
21
-
22
-#log4j.logger.org.springframework.orm=debug
23
-#log4j.logger.org.springframework.transaction=debug

+ 0
- 38
register-app/src/test/java/se/citerus/AppTest.java Просмотреть файл

@@ -1,38 +0,0 @@
1
-package se.citerus;
2
-
3
-import junit.framework.Test;
4
-import junit.framework.TestCase;
5
-import junit.framework.TestSuite;
6
-
7
-/**
8
- * Unit test for simple App.
9
- */
10
-public class AppTest 
11
-    extends TestCase
12
-{
13
-    /**
14
-     * Create the test case
15
-     *
16
-     * @param testName name of the test case
17
-     */
18
-    public AppTest( String testName )
19
-    {
20
-        super( testName );
21
-    }
22
-
23
-    /**
24
-     * @return the suite of tests being tested
25
-     */
26
-    public static Test suite()
27
-    {
28
-        return new TestSuite( AppTest.class );
29
-    }
30
-
31
-    /**
32
-     * Rigourous Test :-)
33
-     */
34
-    public void testApp()
35
-    {
36
-        assertTrue( true );
37
-    }
38
-}

+ 0
- 120
register-app/src/test/java/se/citerus/registerapp/validation/ValidationTest.java Просмотреть файл

@@ -1,120 +0,0 @@
1
-package se.citerus.registerapp.validation;
2
-
3
-import java.awt.event.ActionEvent;
4
-import java.awt.event.ActionListener;
5
-
6
-import javax.swing.JButton;
7
-import javax.swing.JComponent;
8
-import javax.swing.JFrame;
9
-import javax.swing.JTextField;
10
-
11
-import junit.framework.TestCase;
12
-
13
-public class ValidationTest extends TestCase {
14
-  private boolean actionPerformed;
15
-
16
-  public void testValidationScenario() throws Exception {
17
-    JFrame frame = new JFrame();
18
-    
19
-    final FormValidationDecorator validationDecorator = new FormValidationSwingDecorator(frame);
20
-    
21
-    JTextField field1 = new JTextField();
22
-    JTextField field2 = new JTextField();
23
-    JButton button = new JButton();
24
-    frame.add(field1);
25
-    frame.add(field2);
26
-    frame.add(button);
27
-    
28
-    
29
-    ValidatorMock validator1 = createValidator("No Way!", true);
30
-    validationDecorator.add(field1, validator1);
31
-    
32
-    ValidatorMock validator2 = createValidator("My Way!", true);
33
-    validationDecorator.add(field2, validator2);
34
-    
35
-   button.addActionListener(new ActionListener(){
36
-    public void actionPerformed(ActionEvent e) {
37
-      if (validationDecorator.validate()){
38
-        onAction();
39
-      }
40
-    }
41
-   });
42
-   
43
-   
44
-   
45
-   field1.setText("Field1");
46
-   field2.setText("");
47
-   button.doClick();
48
-   assertTrue("Field1 not validated", validator1.isValidated());
49
-   assertTrue("Field2 not validated", validator2.isValidated());
50
-   assertTrue("Button action not performed", actionPerformed);
51
-  }
52
-  
53
-  public void testValidationFailure() throws Exception {
54
-    JFrame frame = new JFrame();
55
-    final FormValidationDecorator validator = new FormValidationSwingDecorator(frame);
56
-    
57
-    JTextField field1 = new JTextField();
58
-    JTextField field2 = new JTextField();
59
-    JButton button = new JButton();
60
-    frame.add(field1);
61
-    frame.add(field2);
62
-    frame.add(button);
63
-    
64
-    ValidatorMock validator1 = createValidator("No Way!", true);
65
-    validator.add(field1, validator1);
66
-    
67
-    ValidatorMock validator2 = createValidator("My Way!", false);
68
-    validator.add(field2, validator2);
69
-    
70
-   button.addActionListener(new ActionListener(){
71
-    public void actionPerformed(ActionEvent e) {
72
-      if (validator.validate()){
73
-        onAction();
74
-      }
75
-    }
76
-   });
77
-   
78
-   field1.setText("Field1");
79
-   field2.setText("");
80
-   button.doClick();
81
-   assertTrue("Field1 not validated", validator1.isValidated());
82
-   assertTrue("Field2 not validated", validator2.isValidated());
83
-   assertFalse("Button action should not be performed", actionPerformed);
84
-  }
85
-  
86
-
87
-  private ValidatorMock createValidator(String message, boolean result) {
88
-    return new ValidatorMock(message, result);
89
-  }
90
-
91
-  protected void onAction() {
92
-    this.actionPerformed = true;
93
-    // Do some action...
94
-  }
95
-  
96
-  private static final class ValidatorMock implements ComponentValidator{
97
-    private final boolean result;
98
-    private boolean validated;
99
-    private String message;
100
-    
101
-    public ValidatorMock(String message, boolean result) {
102
-      this.message = message;
103
-      this.result = result;
104
-    }
105
-
106
-    public boolean validate(JComponent c) {
107
-      validated = true;
108
-      return result;
109
-    }
110
-
111
-    public boolean isValidated() {
112
-      return validated;
113
-    }
114
-
115
-    public String getMessage() {
116
-      return message;
117
-    }
118
-    
119
-  }
120
-}

+ 0
- 2
register-app/startApp.sh Просмотреть файл

@@ -1,2 +0,0 @@
1
-#!/bin/sh
2
-java -classpath .:target/register-app-1.0-SNAPSHOT-jar-with-dependencies.jar se.citerus.App

dddsample/src/main/java/se/citerus/dddsample/application/messaging/HandlingEventMessageDelegate.java → src/main/java/se/citerus/dddsample/application/messaging/HandlingEventMessageDelegate.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/messaging/JmsDomainEventNotifierImpl.java → src/main/java/se/citerus/dddsample/application/messaging/JmsDomainEventNotifierImpl.java Просмотреть файл

@@ -18,7 +18,6 @@ public final class JmsDomainEventNotifierImpl implements DomainEventNotifier {
18 18
 
19 19
   public void cargoWasHandled(final HandlingEvent event) {
20 20
     jmsOperations.send(destination, new MessageCreator() {
21
-      // TODO: richer message type
22 21
       public Message createMessage(final Session session) throws JMSException {
23 22
         final MapMessage message = session.createMapMessage();
24 23
         message.setStringProperty(TRACKING_ID_KEY, event.cargo().trackingId().idString());

dddsample/src/main/java/se/citerus/dddsample/application/messaging/ThreadBasedDomainEventNotifierImpl.java → src/main/java/se/citerus/dddsample/application/messaging/ThreadBasedDomainEventNotifierImpl.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/messaging/package.html → src/main/java/se/citerus/dddsample/application/messaging/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/package.html → src/main/java/se/citerus/dddsample/application/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/persistence/CargoRepositoryHibernate.java → src/main/java/se/citerus/dddsample/application/persistence/CargoRepositoryHibernate.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/persistence/CarrierMovementRepositoryHibernate.java → src/main/java/se/citerus/dddsample/application/persistence/CarrierMovementRepositoryHibernate.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/persistence/HandlingEventRepositoryHibernate.java → src/main/java/se/citerus/dddsample/application/persistence/HandlingEventRepositoryHibernate.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/persistence/HibernateRepository.java → src/main/java/se/citerus/dddsample/application/persistence/HibernateRepository.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/persistence/LocationRepositoryHibernate.java → src/main/java/se/citerus/dddsample/application/persistence/LocationRepositoryHibernate.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/persistence/package.html → src/main/java/se/citerus/dddsample/application/persistence/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/remoting/BookingServiceFacade.java → src/main/java/se/citerus/dddsample/application/remoting/BookingServiceFacade.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/remoting/BookingServiceFacadeImpl.java → src/main/java/se/citerus/dddsample/application/remoting/BookingServiceFacadeImpl.java Просмотреть файл

@@ -47,7 +47,6 @@ public class BookingServiceFacadeImpl implements BookingServiceFacade {
47 47
   }
48 48
 
49 49
   public CargoRoutingDTO loadCargoForRouting(String trackingId) {
50
-    // TODO lock
51 50
     final Cargo cargo = cargoRepository.find(new TrackingId(trackingId));
52 51
     final CargoRoutingDTOAssembler assembler = new CargoRoutingDTOAssembler();
53 52
     return assembler.toDTO(cargo);
@@ -56,7 +55,6 @@ public class BookingServiceFacadeImpl implements BookingServiceFacade {
56 55
   public void assignCargoToRoute(String trackingId, ItineraryCandidateDTO itineraryCandidateDTO) {
57 56
     final Itinerary itinerary = new ItineraryCandidateDTOAssembler().fromDTO(itineraryCandidateDTO, carrierMovementRepository, locationRepository);
58 57
     bookingService.assignCargoToRoute(new TrackingId(trackingId), itinerary);
59
-    // TODO unlock
60 58
   }
61 59
 
62 60
   public List<CargoRoutingDTO> listAllCargos() {

dddsample/src/main/java/se/citerus/dddsample/application/remoting/dto/CargoRoutingDTO.java → src/main/java/se/citerus/dddsample/application/remoting/dto/CargoRoutingDTO.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/remoting/dto/HandlingEventDTO.java → src/main/java/se/citerus/dddsample/application/remoting/dto/HandlingEventDTO.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/remoting/dto/ItineraryCandidateDTO.java → src/main/java/se/citerus/dddsample/application/remoting/dto/ItineraryCandidateDTO.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/remoting/dto/LegDTO.java → src/main/java/se/citerus/dddsample/application/remoting/dto/LegDTO.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/remoting/dto/LocationDTO.java → src/main/java/se/citerus/dddsample/application/remoting/dto/LocationDTO.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/remoting/dto/assembler/CargoRoutingDTOAssembler.java → src/main/java/se/citerus/dddsample/application/remoting/dto/assembler/CargoRoutingDTOAssembler.java Просмотреть файл

@@ -12,14 +12,14 @@ public class CargoRoutingDTOAssembler {
12 12
   public CargoRoutingDTO toDTO(final Cargo cargo) {
13 13
     final CargoRoutingDTO dto = new CargoRoutingDTO(
14 14
       cargo.trackingId().idString(),
15
-      cargo.origin().toString(),
16
-      cargo.destination().toString()
15
+      cargo.origin().unLocode().idString(),
16
+      cargo.destination().unLocode().idString()
17 17
     );
18 18
     for (Leg leg : cargo.itinerary().legs()) {
19 19
       dto.addLeg(
20 20
         leg.carrierMovement().carrierMovementId().idString(),
21
-        leg.from().toString(),
22
-        leg.to().toString()
21
+        leg.from().unLocode().idString(),
22
+        leg.to().unLocode().idString()
23 23
       );
24 24
     }
25 25
     return dto;

dddsample/src/main/java/se/citerus/dddsample/application/remoting/dto/assembler/ItineraryCandidateDTOAssembler.java → src/main/java/se/citerus/dddsample/application/remoting/dto/assembler/ItineraryCandidateDTOAssembler.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/remoting/dto/assembler/LocationDTOAssembler.java → src/main/java/se/citerus/dddsample/application/remoting/dto/assembler/LocationDTOAssembler.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/remoting/dto/assembler/package.html → src/main/java/se/citerus/dddsample/application/remoting/dto/assembler/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/remoting/dto/package.html → src/main/java/se/citerus/dddsample/application/remoting/dto/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/remoting/package.html → src/main/java/se/citerus/dddsample/application/remoting/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/routing/ExternalRoutingService.java → src/main/java/se/citerus/dddsample/application/routing/ExternalRoutingService.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/routing/package.html → src/main/java/se/citerus/dddsample/application/routing/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/util/SampleDataGenerator.java → src/main/java/se/citerus/dddsample/application/util/SampleDataGenerator.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/util/package.html → src/main/java/se/citerus/dddsample/application/util/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/ws/HandlingEventServiceEndpoint.java → src/main/java/se/citerus/dddsample/application/ws/HandlingEventServiceEndpoint.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/ws/HandlingEventServiceEndpointImpl.java → src/main/java/se/citerus/dddsample/application/ws/HandlingEventServiceEndpointImpl.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/ws/InvalidEventTypeException.java → src/main/java/se/citerus/dddsample/application/ws/InvalidEventTypeException.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/application/ws/package.html → src/main/java/se/citerus/dddsample/application/ws/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/DomainEvent.java → src/main/java/se/citerus/dddsample/domain/model/DomainEvent.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/Entity.java → src/main/java/se/citerus/dddsample/domain/model/Entity.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/Specification.java → src/main/java/se/citerus/dddsample/domain/model/Specification.java Просмотреть файл

@@ -1,6 +1,7 @@
1 1
 package se.citerus.dddsample.domain.model;
2 2
 
3 3
 public interface Specification<T> {
4
-  // TODO replace with Specification project dependency
4
+
5 5
   boolean isSatisfiedBy(T t);
6
+    
6 7
 }

dddsample/src/main/java/se/citerus/dddsample/domain/model/ValueObject.java → src/main/java/se/citerus/dddsample/domain/model/ValueObject.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/cargo/Cargo.java → src/main/java/se/citerus/dddsample/domain/model/cargo/Cargo.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/cargo/CargoRepository.java → src/main/java/se/citerus/dddsample/domain/model/cargo/CargoRepository.java Просмотреть файл

@@ -27,10 +27,6 @@ public interface CargoRepository {
27 27
   void save(Cargo cargo);
28 28
 
29 29
   /**
30
-   * TODO
31
-   * this is too complex a procedure to belong in the repository -
32
-   * introduce a TrackingIdFactory (or perhaps a CargoFactory).
33
-   *
34 30
    * @return A new generated tracking Id.
35 31
    */
36 32
   TrackingId nextTrackingId();

dddsample/src/main/java/se/citerus/dddsample/domain/model/cargo/DeliveryHistory.java → src/main/java/se/citerus/dddsample/domain/model/cargo/DeliveryHistory.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/cargo/Itinerary.java → src/main/java/se/citerus/dddsample/domain/model/cargo/Itinerary.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/cargo/Leg.java → src/main/java/se/citerus/dddsample/domain/model/cargo/Leg.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/cargo/RouteSpecification.java → src/main/java/se/citerus/dddsample/domain/model/cargo/RouteSpecification.java Просмотреть файл

@@ -33,23 +33,6 @@ public class RouteSpecification implements ValueObject<RouteSpecification>, Spec
33 33
     return new RouteSpecification(cargo.origin(), cargo.destination(), arrivalDeadline);
34 34
   }
35 35
 
36
-  /**
37
-   * Factory for creating a route specfication from an explicit destination,
38
-   * for rerouting a cargo.
39
-   *
40
-   * @param from
41
-   * @param cargo
42
-   * @param arrivalDeadline
43
-   * @return
44
-   */
45
-  public static RouteSpecification forReroutedCargo(Location from, Cargo cargo, Date arrivalDeadline) {
46
-    Validate.notNull(from);
47
-    Validate.notNull(cargo);
48
-    Validate.notNull(arrivalDeadline);
49
-
50
-    return new RouteSpecification(from, cargo.destination(), arrivalDeadline);
51
-  }
52
-
53 36
   private RouteSpecification(Location origin, Location destination, Date arrivalDeadline) {
54 37
     this.origin = origin;
55 38
     this.destination = destination;
@@ -65,7 +48,7 @@ public class RouteSpecification implements ValueObject<RouteSpecification>, Spec
65 48
   }
66 49
 
67 50
   public boolean isSatisfiedBy(Itinerary itinerary) {
68
-    // TODO implement
51
+    // Stub implementation for now
69 52
     return true;
70 53
   }
71 54
 

dddsample/src/main/java/se/citerus/dddsample/domain/model/cargo/StatusCode.java → src/main/java/se/citerus/dddsample/domain/model/cargo/StatusCode.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/cargo/TrackingId.java → src/main/java/se/citerus/dddsample/domain/model/cargo/TrackingId.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/cargo/package.html → src/main/java/se/citerus/dddsample/domain/model/cargo/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/carrier/CarrierMovement.java → src/main/java/se/citerus/dddsample/domain/model/carrier/CarrierMovement.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/carrier/CarrierMovementId.java → src/main/java/se/citerus/dddsample/domain/model/carrier/CarrierMovementId.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/carrier/CarrierMovementRepository.java → src/main/java/se/citerus/dddsample/domain/model/carrier/CarrierMovementRepository.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/carrier/package.html → src/main/java/se/citerus/dddsample/domain/model/carrier/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/handling/HandlingEvent.java → src/main/java/se/citerus/dddsample/domain/model/handling/HandlingEvent.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/handling/HandlingEventRepository.java → src/main/java/se/citerus/dddsample/domain/model/handling/HandlingEventRepository.java Просмотреть файл

@@ -17,7 +17,6 @@ public interface HandlingEventRepository {
17 17
   void save(final HandlingEvent event);
18 18
 
19 19
 
20
-  // TODO: remove this in 1.0 branch, it's not used anywhere
21 20
   /**
22 21
    * @param trackingId cargo tracking id
23 22
    * @return All handling events for this cargo, ordered by completion time.

dddsample/src/main/java/se/citerus/dddsample/domain/model/handling/package.html → src/main/java/se/citerus/dddsample/domain/model/handling/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/location/Location.java → src/main/java/se/citerus/dddsample/domain/model/location/Location.java Просмотреть файл

@@ -80,16 +80,6 @@ public final class Location implements Entity<Location> {
80 80
     return unLocode.hashCode();
81 81
   }
82 82
 
83
-  /**
84
-   * @return Unlocode and name, on the format "SESTO (Stockholm)"
85
-   */
86
-  @Override
87
-  public String toString() {
88
-    // TODO: this feels like presentation logic and is very inconsistent, move to DTO assembler
89
-    return unLocode.idString() + " (" + name + ")";
90
-  }
91
-
92
-
93 83
   Location() {
94 84
     // Needed by Hibernate
95 85
   }

dddsample/src/main/java/se/citerus/dddsample/domain/model/location/LocationRepository.java → src/main/java/se/citerus/dddsample/domain/model/location/LocationRepository.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/location/UnLocode.java → src/main/java/se/citerus/dddsample/domain/model/location/UnLocode.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/location/package.html → src/main/java/se/citerus/dddsample/domain/model/location/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/model/package.html → src/main/java/se/citerus/dddsample/domain/model/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/package.html → src/main/java/se/citerus/dddsample/domain/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/service/BookingService.java → src/main/java/se/citerus/dddsample/domain/service/BookingService.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/service/DomainEventNotifier.java → src/main/java/se/citerus/dddsample/domain/service/DomainEventNotifier.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/service/HandlingEventService.java → src/main/java/se/citerus/dddsample/domain/service/HandlingEventService.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/service/RoutingService.java → src/main/java/se/citerus/dddsample/domain/service/RoutingService.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/service/TrackingService.java → src/main/java/se/citerus/dddsample/domain/service/TrackingService.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/service/UnknownCarrierMovementIdException.java → src/main/java/se/citerus/dddsample/domain/service/UnknownCarrierMovementIdException.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/service/UnknownLocationException.java → src/main/java/se/citerus/dddsample/domain/service/UnknownLocationException.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/service/UnknownTrackingIdException.java → src/main/java/se/citerus/dddsample/domain/service/UnknownTrackingIdException.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/service/impl/BookingServiceImpl.java → src/main/java/se/citerus/dddsample/domain/service/impl/BookingServiceImpl.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/service/impl/HandlingEventServiceImpl.java → src/main/java/se/citerus/dddsample/domain/service/impl/HandlingEventServiceImpl.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/domain/service/impl/TrackingServiceImpl.java → src/main/java/se/citerus/dddsample/domain/service/impl/TrackingServiceImpl.java Просмотреть файл

@@ -28,7 +28,7 @@ public class TrackingServiceImpl implements TrackingService {
28 28
 
29 29
     final Cargo cargo = cargoRepository.find(trackingId);
30 30
     if (cargo == null) {
31
-      logger.warn("Can't notify listeners for non-existing cargo " + trackingId);
31
+      logger.warn("Can't inspect non-existing cargo " + trackingId);
32 32
       return;
33 33
     }
34 34
 
@@ -41,14 +41,13 @@ public class TrackingServiceImpl implements TrackingService {
41 41
   }
42 42
 
43 43
   private void notifyCustomerOfAvailability(Cargo cargo) {
44
-    // TODO: more elaborate notifications
45 44
     logger.info("Cargo " + cargo.trackingId() + " has been unloaded " +
46
-      "at its final destination " + cargo.destination());
45
+                "at its final destination " + cargo.destination());
47 46
   }
48 47
 
49 48
   private void handleMisdirectedCargo(Cargo cargo) {
50 49
     logger.info("Cargo " + cargo.trackingId() + " has been misdirected. " +
51
-      "Last event was " + cargo.deliveryHistory().lastEvent());
50
+                "Last event was " + cargo.deliveryHistory().lastEvent());
52 51
   }
53 52
 
54 53
   public void setCargoRepository(CargoRepository cargoRepository) {

dddsample/src/main/java/se/citerus/dddsample/domain/service/package.html → src/main/java/se/citerus/dddsample/domain/service/package.html Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/ui/CargoAdminController.java → src/main/java/se/citerus/dddsample/ui/CargoAdminController.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/ui/CargoTrackingController.java → src/main/java/se/citerus/dddsample/ui/CargoTrackingController.java Просмотреть файл


dddsample/src/main/java/se/citerus/dddsample/ui/CargoTrackingViewAdapter.java → src/main/java/se/citerus/dddsample/ui/CargoTrackingViewAdapter.java Просмотреть файл


Некоторые файлы не были показаны из-за большого количества измененных файлов