se.citerus.dddsample.application.impl
Class BookingServiceImpl
java.lang.Object
se.citerus.dddsample.application.impl.BookingServiceImpl
- All Implemented Interfaces:
- BookingService
public final class BookingServiceImpl
- extends java.lang.Object
- implements BookingService
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BookingServiceImpl
public BookingServiceImpl(CargoRepository cargoRepository,
LocationRepository locationRepository,
RoutingService routingService)
bookNewCargo
@Transactional
public TrackingId bookNewCargo(UnLocode originUnLocode,
UnLocode destinationUnLocode,
java.util.Date arrivalDeadline)
- Description copied from interface:
BookingService
- Registers a new cargo in the tracking system, not yet routed.
- Specified by:
bookNewCargo
in interface BookingService
- Parameters:
originUnLocode
- cargo origindestinationUnLocode
- cargo destinationarrivalDeadline
- arrival deadline
- Returns:
- Cargo tracking id
requestPossibleRoutesForCargo
@Transactional
public java.util.List<Itinerary> requestPossibleRoutesForCargo(TrackingId trackingId)
- Description copied from interface:
BookingService
- Requests a list of itineraries describing possible routes for this cargo.
- Specified by:
requestPossibleRoutesForCargo
in interface BookingService
- Parameters:
trackingId
- cargo tracking id
- Returns:
- A list of possible itineraries for this cargo
assignCargoToRoute
@Transactional
public void assignCargoToRoute(Itinerary itinerary,
TrackingId trackingId)
- Specified by:
assignCargoToRoute
in interface BookingService
- Parameters:
itinerary
- itinerary describing the selected routetrackingId
- cargo tracking id
changeDestination
@Transactional
public void changeDestination(TrackingId trackingId,
UnLocode unLocode)
- Description copied from interface:
BookingService
- Changes the destination of a cargo.
- Specified by:
changeDestination
in interface BookingService
- Parameters:
trackingId
- cargo tracking idunLocode
- UN locode of new destination
Copyright © 2009. All Rights Reserved.