se.citerus.dddsample.domain.model.handling
Class HandlingEventFactory

java.lang.Object
  extended by se.citerus.dddsample.domain.model.handling.HandlingEventFactory

public class HandlingEventFactory
extends java.lang.Object

Creates handling events.


Constructor Summary
HandlingEventFactory(CargoRepository cargoRepository, VoyageRepository voyageRepository, LocationRepository locationRepository)
           
 
Method Summary
 HandlingEvent createHandlingEvent(java.util.Date registrationTime, java.util.Date completionTime, TrackingId trackingId, VoyageNumber voyageNumber, UnLocode unlocode, HandlingEvent.Type type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandlingEventFactory

public HandlingEventFactory(CargoRepository cargoRepository,
                            VoyageRepository voyageRepository,
                            LocationRepository locationRepository)
Method Detail

createHandlingEvent

public HandlingEvent createHandlingEvent(java.util.Date registrationTime,
                                         java.util.Date completionTime,
                                         TrackingId trackingId,
                                         VoyageNumber voyageNumber,
                                         UnLocode unlocode,
                                         HandlingEvent.Type type)
                                  throws CannotCreateHandlingEventException
Parameters:
registrationTime - time when this event was received by the system
completionTime - when the event was completed, for example finished loading
trackingId - cargo tracking id
voyageNumber - voyage number
unlocode - United Nations Location Code for the location of the event
type - type of event
Returns:
A handling event.
Throws:
UnknownVoyageException - if there's no voyage with this number
UnknownCargoException - if there's no cargo with this tracking id
UnknownLocationException - if there's no location with this UN Locode
CannotCreateHandlingEventException


Copyright © 2009. All Rights Reserved.