1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
package info.magnolia.rest.registry; |
35 |
|
|
36 |
|
import info.magnolia.event.Event; |
37 |
|
import info.magnolia.rest.EndpointDefinition; |
38 |
|
|
39 |
|
|
40 |
|
@link |
41 |
|
|
42 |
|
@see |
43 |
|
@see |
44 |
|
|
|
|
| 42.1% |
Uncovered Elements: 11 (19) |
Complexity: 6 |
Complexity Density: 0.38 |
|
45 |
|
public class EndpointDefinitionRegistryEvent implements Event<EndpointDefinitionRegistryEventHandler> { |
46 |
|
|
47 |
|
private final EndpointDefinitionRegistryEventType type; |
48 |
|
private final String endpointName; |
49 |
|
private final EndpointDefinition endpointDefinition; |
50 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
51 |
1 |
public EndpointDefinitionRegistryEvent(EndpointDefinitionRegistryEventType type, String endpointName) {... |
52 |
1 |
this.type = type; |
53 |
1 |
this.endpointDefinition = null; |
54 |
1 |
this.endpointName = endpointName; |
55 |
|
} |
56 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
57 |
8 |
public EndpointDefinitionRegistryEvent(EndpointDefinitionRegistryEventType type, EndpointDefinition endpointDefinition) {... |
58 |
8 |
this.type = type; |
59 |
8 |
this.endpointDefinition = endpointDefinition; |
60 |
8 |
this.endpointName = endpointDefinition.getName(); |
61 |
|
} |
62 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
63 |
|
public EndpointDefinitionRegistryEventType getType() {... |
64 |
|
return type; |
65 |
|
} |
66 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
67 |
|
public String getEndpointName() {... |
68 |
|
return endpointName; |
69 |
|
} |
70 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
71 |
|
public EndpointDefinition getEndpointDefinition() {... |
72 |
|
return endpointDefinition; |
73 |
|
} |
74 |
|
|
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 4 |
Complexity Density: 0.4 |
|
75 |
0 |
@Override... |
76 |
|
public void dispatch(EndpointDefinitionRegistryEventHandler handler) { |
77 |
0 |
switch(type) { |
78 |
0 |
case REGISTERED: |
79 |
0 |
handler.onEndpointRegistered(this); |
80 |
0 |
break; |
81 |
0 |
case REREGISTERED: |
82 |
0 |
handler.onEndpointReregistered(this); |
83 |
0 |
break; |
84 |
0 |
case UNREGISTERED: |
85 |
0 |
handler.onEndpointUnregistered(this); |
86 |
0 |
break; |
87 |
|
} |
88 |
|
} |
89 |
|
} |