se.citerus.dddsample.application
Interface BookingService

All Known Implementing Classes:
BookingServiceImpl

public interface BookingService

Cargo booking service.


Method Summary
 void assignCargoToRoute(Itinerary itinerary, TrackingId trackingId)
           
 TrackingId bookNewCargo(UnLocode origin, UnLocode destination, java.util.Date arrivalDeadline)
          Registers a new cargo in the tracking system, not yet routed.
 void changeDestination(TrackingId trackingId, UnLocode unLocode)
          Changes the destination of a cargo.
 java.util.List<Itinerary> requestPossibleRoutesForCargo(TrackingId trackingId)
          Requests a list of itineraries describing possible routes for this cargo.
 

Method Detail

bookNewCargo

TrackingId bookNewCargo(UnLocode origin,
                        UnLocode destination,
                        java.util.Date arrivalDeadline)
Registers a new cargo in the tracking system, not yet routed.

Parameters:
origin - cargo origin
destination - cargo destination
arrivalDeadline - arrival deadline
Returns:
Cargo tracking id

requestPossibleRoutesForCargo

java.util.List<Itinerary> requestPossibleRoutesForCargo(TrackingId trackingId)
Requests a list of itineraries describing possible routes for this cargo.

Parameters:
trackingId - cargo tracking id
Returns:
A list of possible itineraries for this cargo

assignCargoToRoute

void assignCargoToRoute(Itinerary itinerary,
                        TrackingId trackingId)
Parameters:
itinerary - itinerary describing the selected route
trackingId - cargo tracking id

changeDestination

void changeDestination(TrackingId trackingId,
                       UnLocode unLocode)
Changes the destination of a cargo.

Parameters:
trackingId - cargo tracking id
unLocode - UN locode of new destination


Copyright © 2009. All Rights Reserved.