1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.observation.event; |
21 |
|
|
22 |
|
import java.io.Serializable; |
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
@link |
27 |
|
|
28 |
|
@version |
29 |
|
@deprecated |
30 |
|
|
31 |
|
|
32 |
|
@Deprecated |
|
|
| 100% |
Uncovered Elements: 0 (20) |
Complexity: 7 |
Complexity Density: 0.64 |
|
33 |
|
public class ActionExecutionEvent implements Event, Serializable |
34 |
|
{ |
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
private static final long serialVersionUID = 1L; |
40 |
|
|
41 |
|
|
42 |
|
private String actionName; |
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
@param |
48 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
49 |
17 |
public ActionExecutionEvent(String actionName)... |
50 |
|
{ |
51 |
17 |
this.actionName = actionName; |
52 |
|
} |
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
@return |
58 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
59 |
40 |
public String getActionName()... |
60 |
|
{ |
61 |
40 |
return this.actionName; |
62 |
|
} |
63 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
64 |
4 |
@Override... |
65 |
|
public int hashCode() |
66 |
|
{ |
67 |
4 |
return getActionName().hashCode(); |
68 |
|
} |
69 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
70 |
12 |
@Override... |
71 |
|
public boolean equals(Object object) |
72 |
|
{ |
73 |
12 |
if (object instanceof ActionExecutionEvent) { |
74 |
11 |
return getActionName().equals(((ActionExecutionEvent) object).getActionName()); |
75 |
|
} |
76 |
1 |
return getActionName().equals(object); |
77 |
|
} |
78 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
79 |
7 |
@Override... |
80 |
|
public boolean matches(Object otherEvent) |
81 |
|
{ |
82 |
7 |
boolean isMatching = false; |
83 |
7 |
if (this.getClass().isAssignableFrom(otherEvent.getClass())) { |
84 |
6 |
ActionExecutionEvent actionEvent = (ActionExecutionEvent) otherEvent; |
85 |
6 |
isMatching = getActionName().equals(actionEvent.getActionName()); |
86 |
|
} |
87 |
7 |
return isMatching; |
88 |
|
} |
89 |
|
} |