1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package com.xpn.xwiki.plugin.activitystream.plugin; |
21 |
|
|
22 |
|
import com.xpn.xwiki.api.Api; |
23 |
|
import com.xpn.xwiki.XWikiContext; |
24 |
|
|
25 |
|
import java.util.Date; |
26 |
|
import java.util.Map; |
27 |
|
|
28 |
|
|
29 |
|
@link |
30 |
|
|
31 |
|
@version |
32 |
|
|
|
|
| 26.8% |
Uncovered Elements: 52 (71) |
Complexity: 33 |
Complexity Density: 0.94 |
|
33 |
|
public class ActivityEvent extends Api |
34 |
|
{ |
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
protected com.xpn.xwiki.plugin.activitystream.api.ActivityEvent event; |
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
@param |
44 |
|
@param |
45 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
46 |
126 |
public ActivityEvent(com.xpn.xwiki.plugin.activitystream.api.ActivityEvent event, XWikiContext context)... |
47 |
|
{ |
48 |
126 |
super(context); |
49 |
126 |
this.event = event; |
50 |
|
} |
51 |
|
|
52 |
|
|
53 |
|
@return |
54 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
55 |
0 |
public String getEventId()... |
56 |
|
{ |
57 |
0 |
return event.getEventId(); |
58 |
|
} |
59 |
|
|
60 |
|
|
61 |
|
@return |
62 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
63 |
19 |
public String getRequestId()... |
64 |
|
{ |
65 |
19 |
return event.getRequestId(); |
66 |
|
} |
67 |
|
|
68 |
|
|
69 |
|
@return |
70 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
71 |
0 |
public int getPriority()... |
72 |
|
{ |
73 |
0 |
return event.getPriority(); |
74 |
|
} |
75 |
|
|
76 |
|
|
77 |
|
@return |
78 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
79 |
504 |
public String getType()... |
80 |
|
{ |
81 |
504 |
return event.getType(); |
82 |
|
} |
83 |
|
|
84 |
|
|
85 |
|
@return |
86 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
87 |
96 |
public String getApplication()... |
88 |
|
{ |
89 |
96 |
return event.getApplication(); |
90 |
|
} |
91 |
|
|
92 |
|
|
93 |
|
@return |
94 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
95 |
0 |
public String getStream()... |
96 |
|
{ |
97 |
0 |
return event.getStream(); |
98 |
|
} |
99 |
|
|
100 |
|
|
101 |
|
@return |
102 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
103 |
72 |
public Date getDate()... |
104 |
|
{ |
105 |
72 |
return event.getDate(); |
106 |
|
} |
107 |
|
|
108 |
|
|
109 |
|
@return |
110 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
111 |
232 |
public String getUser()... |
112 |
|
{ |
113 |
232 |
return event.getUser(); |
114 |
|
} |
115 |
|
|
116 |
|
|
117 |
|
@return |
118 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
119 |
55 |
public String getWiki()... |
120 |
|
{ |
121 |
55 |
return event.getWiki(); |
122 |
|
} |
123 |
|
|
124 |
|
|
125 |
|
@return |
126 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
127 |
0 |
public String getSpace()... |
128 |
|
{ |
129 |
0 |
return event.getSpace(); |
130 |
|
} |
131 |
|
|
132 |
|
|
133 |
|
@return |
134 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
135 |
0 |
public String getPage()... |
136 |
|
{ |
137 |
0 |
return event.getPage(); |
138 |
|
} |
139 |
|
|
140 |
|
|
141 |
|
@return |
142 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
143 |
0 |
public String getUrl()... |
144 |
|
{ |
145 |
0 |
return event.getUrl(); |
146 |
|
} |
147 |
|
|
148 |
|
|
149 |
|
@return |
150 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
151 |
0 |
public String getTitle()... |
152 |
|
{ |
153 |
0 |
return event.getTitle(); |
154 |
|
} |
155 |
|
|
156 |
|
|
157 |
|
@return |
158 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
159 |
0 |
public String getBody()... |
160 |
|
{ |
161 |
0 |
return event.getBody(); |
162 |
|
} |
163 |
|
|
164 |
|
|
165 |
|
|
166 |
|
|
167 |
|
@param |
168 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
169 |
0 |
public void setTitle(String title)... |
170 |
|
{ |
171 |
0 |
if (hasProgrammingRights()) { |
172 |
0 |
event.setTitle(title); |
173 |
|
} |
174 |
|
} |
175 |
|
|
176 |
|
|
177 |
|
|
178 |
|
|
179 |
|
@param |
180 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
181 |
0 |
public void setBody(String body)... |
182 |
|
{ |
183 |
0 |
if (hasProgrammingRights()) { |
184 |
0 |
event.setBody(body); |
185 |
|
} |
186 |
|
} |
187 |
|
|
188 |
|
|
189 |
|
@return |
190 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
191 |
14 |
public String getVersion()... |
192 |
|
{ |
193 |
14 |
return event.getVersion(); |
194 |
|
} |
195 |
|
|
196 |
|
|
197 |
|
@return |
198 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
199 |
0 |
public String getParam1()... |
200 |
|
{ |
201 |
0 |
return event.getParam1(); |
202 |
|
} |
203 |
|
|
204 |
|
|
205 |
|
@return |
206 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
207 |
0 |
public String getParam2()... |
208 |
|
{ |
209 |
0 |
return event.getParam2(); |
210 |
|
} |
211 |
|
|
212 |
|
|
213 |
|
@return |
214 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
215 |
0 |
public String getParam3()... |
216 |
|
{ |
217 |
0 |
return event.getParam3(); |
218 |
|
} |
219 |
|
|
220 |
|
|
221 |
|
@return |
222 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
223 |
0 |
public String getParam4()... |
224 |
|
{ |
225 |
0 |
return event.getParam4(); |
226 |
|
} |
227 |
|
|
228 |
|
|
229 |
|
@return |
230 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
231 |
0 |
public String getParam5()... |
232 |
|
{ |
233 |
0 |
return event.getParam5(); |
234 |
|
} |
235 |
|
|
236 |
|
|
237 |
|
@return |
238 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
239 |
0 |
public String getDisplayTitle()... |
240 |
|
{ |
241 |
0 |
return event.getDisplayTitle(context); |
242 |
|
} |
243 |
|
|
244 |
|
|
245 |
|
@return |
246 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
247 |
0 |
public String getDisplayBody()... |
248 |
|
{ |
249 |
0 |
return event.getDisplayBody(context); |
250 |
|
} |
251 |
|
|
252 |
|
|
253 |
|
@return |
254 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
255 |
0 |
public String getDisplayDate()... |
256 |
|
{ |
257 |
0 |
return event.getDisplayDate(context); |
258 |
|
} |
259 |
|
|
260 |
|
|
261 |
|
@return |
262 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
263 |
0 |
public String getDisplayUser()... |
264 |
|
{ |
265 |
0 |
return event.getDisplayUser(context); |
266 |
|
} |
267 |
|
|
268 |
|
|
269 |
|
@return |
270 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
271 |
0 |
public Map<String, String> getParameters()... |
272 |
|
{ |
273 |
0 |
return event.getParameters(); |
274 |
|
} |
275 |
|
|
276 |
|
|
277 |
|
@return |
278 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
279 |
0 |
public com.xpn.xwiki.plugin.activitystream.api.ActivityEvent getProtectedEvent()... |
280 |
|
{ |
281 |
0 |
if (hasProgrammingRights()) { |
282 |
0 |
return event; |
283 |
|
} else { |
284 |
0 |
return null; |
285 |
|
} |
286 |
|
} |
287 |
|
|
288 |
|
|
289 |
|
@return |
290 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
291 |
72 |
protected com.xpn.xwiki.plugin.activitystream.api.ActivityEvent getEvent()... |
292 |
|
{ |
293 |
72 |
return event; |
294 |
|
} |
295 |
|
} |