C# Class DomainDrivenDelivery.Domain.Model.Handling.HandlingEventFactory

Creates handling events.
Show file Open project: awhatley/dddsample.net Class Usage Examples

Public Methods

Method Description
HandlingEventFactory ( CargoRepository cargoRepository, VoyageRepository voyageRepository, LocationRepository locationRepository ) : System
createHandlingEvent ( System.DateTime completionTime, TrackingId trackingId, VoyageNumber voyageNumber, UnLocode unlocode, HandlingActivityType type, OperatorCode operatorCode ) : HandlingEvent

Creates a handling event.

Private Methods

Method Description
findCargo ( TrackingId trackingId ) : Cargo
findLocation ( UnLocode unlocode ) : Location
findVoyage ( VoyageNumber voyageNumber ) : Voyage

Method Details

HandlingEventFactory() public method

public HandlingEventFactory ( CargoRepository cargoRepository, VoyageRepository voyageRepository, LocationRepository locationRepository ) : System
cargoRepository CargoRepository
voyageRepository VoyageRepository
locationRepository LocationRepository
return System

createHandlingEvent() public method

Creates a handling event.
if there's no voyage with this number if there's no cargo with this tracking id if there's no location with this UN Locode
public createHandlingEvent ( System.DateTime completionTime, TrackingId trackingId, VoyageNumber voyageNumber, UnLocode unlocode, HandlingActivityType type, OperatorCode operatorCode ) : HandlingEvent
completionTime System.DateTime when the event was completed, for example finished loading
trackingId TrackingId cargo tracking id
voyageNumber VoyageNumber voyage number
unlocode UnLocode United Nations Location Code for the location of the event
type HandlingActivityType type of event
operatorCode OperatorCode operator code
return HandlingEvent