package Ġcom . github . ca ay 2 0 0 0 . tt k . context . world . cargo . application . produce Ċ Ċ import Ġarrow . core . get Or Handle Ċ import Ġcom . github . ca ay 2 0 0 0 . tt k . context . shared . domain . to Domain Id Ċ import Ġcom . github . ca ay 2 0 0 0 . tt k . context . world . World Command Ċ import Ġcom . github . ca ay 2 0 0 0 . tt k . context . world . stop . domain . Stop Repository Ċ import Ġcom . github . ca ay 2 0 0 0 . tt k . lib . event bus . command . CommandHandler Ċ import Ġcom . github . ca ay 2 0 0 0 . tt k . lib . event bus . event . Event Ċ import Ġcom . github . ca ay 2 0 0 0 . tt k . lib . event bus . event . Event Publisher Ċ import Ġjava . util . UUID Ċ Ċ class ĠPro duce Cargo CommandHandler ( event Publisher : ĠEvent Publisher < Event >, Ġstop Repository : ĠStop Repository ) Ġ: ĠCommand Handler < Produce Cargo Command > Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġproduce Cargo Service Ġ= ĠPro duce Cargo Service ( event Publisher , Ġstop Repository ) ĊĊĠĠĠ Ġoverride Ġfun Ġinvoke ( command : ĠPro duce Cargo Command ) Ġ{ ĊĠĠĠĠĠĠĠ Ġproduce Cargo Service . invoke ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstop Id Ġ= Ġcommand . stop Id . to Domain Id (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcargo Id Ġ= Ġcommand . cargo Id . to Domain Id (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtarget Id Ġ= Ġcommand . target Stop Id . to Domain Id () ĊĠĠĠĠĠĠĠ Ġ). get Or Handle Ġ{ Ġthrow Ġit Ġ} ĊĠĠĠ Ġ} Ċ } Ċ Ċ data Ġclass ĠPro duce Cargo Command ( override Ġval Ġworld Id : ĠUUID , Ġval Ġstop Id : ĠUUID , Ġval Ġcargo Id : ĠUUID , Ġval Ġtarget Stop Id : ĠUUID ) Ġ: ĊĠĠĠ ĠWorld Command Ġ{ ĊĠĠĠ Ġoverride Ġval Ġcommand Id : ĠUUID Ġ= ĠUUID . randomUUID () Ċ } Ċ