7
7
import org .springframework .transaction .annotation .Transactional ;
8
8
import se .citerus .dddsample .tracking .core .application .event .SystemEvents ;
9
9
import se .citerus .dddsample .tracking .core .domain .model .cargo .TrackingId ;
10
- import se .citerus .dddsample .tracking .core .domain .model .handling .*;
10
+ import se .citerus .dddsample .tracking .core .domain .model .handling .HandlingEvent ;
11
+ import se .citerus .dddsample .tracking .core .domain .model .handling .HandlingEventFactory ;
12
+ import se .citerus .dddsample .tracking .core .domain .model .handling .HandlingEventRepository ;
13
+ import se .citerus .dddsample .tracking .core .domain .model .handling .OperatorCode ;
11
14
import se .citerus .dddsample .tracking .core .domain .model .location .UnLocode ;
12
15
import se .citerus .dddsample .tracking .core .domain .model .shared .HandlingActivityType ;
13
16
import se .citerus .dddsample .tracking .core .domain .model .voyage .VoyageNumber ;
@@ -20,7 +23,8 @@ public final class HandlingEventServiceImpl implements HandlingEventService {
20
23
private final SystemEvents systemEvents ;
21
24
private final HandlingEventRepository handlingEventRepository ;
22
25
private final HandlingEventFactory handlingEventFactory ;
23
- private final Log logger = LogFactory .getLog (HandlingEventServiceImpl .class );
26
+
27
+ private static final Log LOG = LogFactory .getLog (HandlingEventServiceImpl .class );
24
28
25
29
@ Autowired
26
30
public HandlingEventServiceImpl (final HandlingEventRepository handlingEventRepository ,
@@ -35,7 +39,7 @@ public HandlingEventServiceImpl(final HandlingEventRepository handlingEventRepos
35
39
@ Transactional
36
40
public void registerHandlingEvent (final Date completionTime , final TrackingId trackingId ,
37
41
final VoyageNumber voyageNumber , final UnLocode unLocode ,
38
- final HandlingActivityType type , final OperatorCode operatorCode ) throws CannotCreateHandlingEventException {
42
+ final HandlingActivityType type , final OperatorCode operatorCode ) {
39
43
40
44
/* Using a factory to create a HandlingEvent (aggregate). This is where
41
45
it is determined wether the incoming data, the attempt, actually is capable
@@ -53,7 +57,7 @@ state of the handling handlingEvent aggregate (but not the cargo aggregate -
53
57
/* Publish a system event */
54
58
systemEvents .notifyOfHandlingEvent (handlingEvent );
55
59
56
- logger .info ("Registered handling event: " + handlingEvent );
60
+ LOG .info ("Registered handling event: " + handlingEvent );
57
61
}
58
62
59
63
}
0 commit comments