Prior to this commit the tests had a mixture of JUnit4 and JUnit3 style
of writing. With this commit all tests are using JUnit4 style with
annotations.
With this commit the Spring part has also been polished to use the
updated runner and cleanup the tests to remove the deprecation warnings
due to deprecated annotations.
Eric - Removed origin from Cargo. Now RouteSpecification is the only place with origin. Changed hibernate mappings to remove Cargo origin. Removed test that looked for case when Cargo origin was different from RouteSpecification origin. This rule isn't quite right. The rule should be that the origin cannot change after there is an event.
Added assertions to HandlingHistory that ensures that it refers to a unique cargo, and that a Cargo can't derive its delivery progress from a handling history of another cargo. There are also two descriptive static factory methods for the different possibilities of creating a HandlingHistory.
HandlingEventRepository now looks up handling events from Cargo instead of TrackingId.
Fixed a problem with Hibernate lazy proxies not being initialised when reading a field.
Moved ExternalRoutingService into impl subpackage and renamed it RoutingServiceImpl, for consistency. We probably should try to find use-case based package names below application though.
Introduced asynchronous processing of incoming handling event registration attempts.
Removed the plain-delegation track() method from TrackingService (using repository directly in CargoTrackingController instead).
Fixed a few carrier movement -> voyage references in setters and JSP expressions.
Added cargoIsMisdirected() and cargoHasArrived() to DomainEventNotifier (but no consumers yet).
Routing a cargo is still broken due to database changes incompatible with the random route generation algorithm.
Added RoutingStatus.
Renamed StatusCode to TransportStatus.
Voyage is persisted.
Implemented equals, hashCode for VoyageNumber.
Itinerary is now embedded into Cargo table, simplified relation Between Cargo and Itinerary.
Persistent classes are not final anymore (unnecessary obstruction for Hibernate)
Introduced Voyage, Schedule and VoyageNumber. CarrierMovement is now a value object, CarrierMovementId is dropped.
Leg now has load/unload location and time, and a reference to a Voyage.
HandlingEvent references a Voyage instead of a CarrierMovement.
DeliveryHistory is renamed to Delivery.
(Yes, it's very broken right now, but it compiles)
Package "remote" renamed "remoting" for consistency.
The implementation of our routing service - which consists mainly of model translation and delegation - is moved to the application part, from the domain service layer. The routing service interface is part of our domain but the implementation is not, similar to repositories and their implementations.
Slight refinement of packge structure under application - service is split into things like messagning and remoting.
The external routing team application is moved out to its own top-level package, to highlight the fact that it is a completely separate application from booking/tracking.
Split routing service into two parts: "our" part with model translation, and remote service part for graph calculations. Still a bit sketchy though.
More flesh on RouteSpecification, with some ideas around factory methods for specifications.
Renamed a few service methods to match ubiquotous language more closely.
Pushed DTO assembly outside of service layer and into MVC controllers, pending creation of dedicated remoting layer. Service layer now uses pure domain model classes.
CarrierMovementId implements ValueObject.
Final destination is now just "destination" everywhere.
Persistence annotations removed from domain model classes.
DeliveryHistory is now immutable.
Domain model implements the new pettern interfaces (entity/value object/domain event)
Orphaned old itinerary is now deleted when attaching a new itinerary to a Cargo.
Added Checkstyle configuration file that checks the sun coding conventions.
Misc CheckStyle fixes.
Removed magic numbers from HashCodeBuilder.
Created a separate sub package for DTO assemblers.
Minor refactorings to increase readability.
Big slew of changes (too big) leading up to draft presentation:
Removed unneeded constructors in Cargo and UnLocode.
Fixed spelling error in StatusCode - "e before i except after c", or whatever that was :-)
Cascade Itinerary/Leg on Cargo persist.
Cargo registration and routing web administration interface.
Better randomization in RoutingServiceImpl.
Replaced more test locations with the SampleLocations instances.
Persisted Itinerary and Leg, with sample data and mapping.
Introduced Itinerary.EMPTY_ITINERARY to represent an emtpy itinerary (null object pattern)
Added capability to display expected/misdirected status of cargo and events to web tracking interface (jsp, DTOs, etc)
Location constructor now only has package-level visibility, and test code uses static location instances.
Rewrote UN Locode import to use straight JDBC access.