HandlingEventService.java 1005B

12345678910111213141516171819202122232425262728
  1. package se.citerus.dddsample.service;
  2. import se.citerus.dddsample.domain.CarrierMovementId;
  3. import se.citerus.dddsample.domain.HandlingEvent;
  4. import se.citerus.dddsample.domain.TrackingId;
  5. import java.util.Date;
  6. /**
  7. * Handling event service.
  8. *
  9. */
  10. public interface HandlingEventService {
  11. /**
  12. * @param completionTime when the event was completed, for example finished loading
  13. * @param trackingId tracking id
  14. * @param carrierMovementId carrier movement id, if applicable (may be null)
  15. * @param unlocode United Nations Location Code for the location of the event
  16. * @param type type of event
  17. * @throws UnknownCarrierMovementIdException if there's not carrier movement with this id
  18. * @throws UnknownTrackingIdException if there's no cargo with this tracking id
  19. */
  20. void register(Date completionTime, TrackingId trackingId, CarrierMovementId carrierMovementId, String unlocode, HandlingEvent.Type type)
  21. throws UnknownCarrierMovementIdException, UnknownTrackingIdException;
  22. }