Suggestion for handling domain validation as close to each domain object as possible - Location now requires UN locode argument to constructor to match a certain regexp, and each HandlingEvent.Type may answer type.requiresCarrierMovement() and type.prohibitsCarrierMovement(), evaluated from HandlingEvent constructor.
Replaced ellipsis argument in DeliveryHistory.addEvents() with two methods; one that takes a single HandlingEvent and one that takes a Collection<HandlingEvent>
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.
Made Cargo-HandlingEvent relation bidirectional again, with DeliveryHistory in the middle.
Restored Cargo.lastKnownLocation() and Cargo.hasArrived().
All entities have sequential identifiers with no domain meaning. Equals and hashcode rely on business logic unrelated to persistence state.
Removed findDeliveryHistory from HaEvRepo since it's now OR-mapped.
Improved javadoc.
- 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...)
Domain model persisted using Hibernate annotations.
Repository test against an actual database.
Hibernate needs package-protected no-args constructors, which blocks the use of final in many places.
"Long id" properties are excluded from equals and hashcode builders, to enforce the use of natural business keys that are separate from persistence details.
Sitemesh introduced, slight rearranging of JSP structure.
Focus input search field.
Use XHTML 1.0 TR.
Distribution mgmt in POM allows deployment of Maven-generated site.
Brought back the xmlns attribute in the POM file (again), please don't remove!
Hibernate annotations dependencies introduced.
Removed auto deploy (the scanIntervalSeconds confguration property) since this seems to cause problems with file locking in the hsql database when auto deploy tries to reload the database schema
Tightened the CargoTrackingController a bit, treating "no cargo found" same way as a binding error
Introduced a Spring context for the web layer, where all web support components go.
Introduced the RequestContext attribute as "rc" in views.
Removed unneeded "unknown cargo" JSP.
c:out not needed anymore.
Modified InMem repository to cast exception if tryng to find cargo with track id DAE
Added new workflow for unknown cargo (new view and modified controller) instead of if statement i jsp page