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.
Using "notifyOf..." naming convention in ApplicationEvents.
HandlingEvents now have a unique sequence number, and CargoUpdater looks events based on that to update the cargo in question.
First version of pessimistic locking of cargo during rerouting.
Cargo is now a facade for aggregate-internal classes Delivery and Projections.
Delivery calculates current voyage, last known location and transport status on the fly.
Introduced a tracking id generator domain service for getting next tracking id, instead of doing it in the cargo repository.
Collected all event-driven application services under the dddsample.application.event package and renamed CargoInspectionService to CargoDeliveryUpdater.
HandlingEventService.registerHandlingEvent() signature takes value objects instead of HandlingEventRegistrationAttempt, decoupling it from message queues.
Creating sample data using domain objects and storing with Hibernate, for simplicity.
Estimated time of arrival is now a property of the Cargo aggregate.
Tracking web interface has new look for 1.1.
Admin interface shows more time related information.
Serverside now handles change of destination (no UI yet though)
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)
Moved "assignToRoute" into Cargo and removed the service method.
Made Cargo.isMisdirected() persistent and asynchronously updated.
Moved nullSafe method to DomainObjectUtils.
Implemented copy() for value objects.
Methods returning Date on value objects now clone the value to maintain immutability.
Constructor-based injection for domain layer.
@Override annotation on interface implementations, which effectively makes the application Java 6 only.
Introduced CargoHandlingScenarioTest to support refactoring cargo handling, state updating and rerouting.
Brought EventService closer to the domain by renaming it DomainEventNotifier and use ubiquitous language in the method signatures (fireHandlingEventRegistered is now cargoWasHandled) in order to make it naturally fit in among the domain services.
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.
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.
Added asynchronous event emission whenever a handling event is registered, so that interested parties can be notified if a cargo is misdirected (is unloaded, is late, has arrived, or whatever).
Two different implementations a available: JMS and a simple thread-based one.
Also, the cargo service track method now uses TrackingId in the signature, for consistency.
HandlingEventService now has a single, strongly typed method for registering events.
A JAX-WS-based remote interface for registering events has been introduced, which works as an anti-corruption layer as well.
CarrierMovementRepository uses Hibernate implementation, test class created.
Reverted to Spring 2.0.8 in order to get JAX-WS integration going, but that's only until the next release gets out.
- Persistent implementations of all repositories are in place, with tests and sample data generation.
Sample data is shared between testing and web application, and is loaded through a ServletContextListener
- No relation Cargo -> HandlingEvent, it only goes the other way. A HandlingEvent is only associated to one Cargo.
- TrackingId and CarrierMovementId do not rely on toString() anymore, the accessor for the id string is now called idString().
- CarrierId is now CarrierMovementId
- HandlingEventService now has named methods for registerLoad(), registerUnload() etc instead of the String "type" argument, which was extremely fragile.
Made persistence configuration less intrusive by going with defaults everywhere, making it easier on the eyes. Empty default constructors are pushed to the bottom of the class.
Introduced CarrierId and embedded the DeliveryHistory in Cargo, aligning the persistence with the model as described in the DDD book.
Location.NULL changed name to Location.UNKNOWN.
Changed persistence layer to point to the InMem repositories
Added test-context-persistence.xml to still be able to test hibernate repositories
Added HandlingEventService (first lab version...)
Added HandlingEvent- and Carrier-Repository.
Modified some equality operators to fit better with HandlingEventRepository (Maybe unneccessary after all, but it's working...)