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 java.util.ArrayList; |
23 |
|
import java.util.Collections; |
24 |
|
import java.util.List; |
25 |
|
|
26 |
|
import org.slf4j.Logger; |
27 |
|
import org.slf4j.LoggerFactory; |
28 |
|
|
29 |
|
import com.sun.syndication.feed.synd.SyndEntry; |
30 |
|
import com.sun.syndication.feed.synd.SyndFeed; |
31 |
|
import com.xpn.xwiki.XWikiContext; |
32 |
|
import com.xpn.xwiki.api.Document; |
33 |
|
import com.xpn.xwiki.plugin.PluginApi; |
34 |
|
import com.xpn.xwiki.plugin.XWikiPluginInterface; |
35 |
|
import com.xpn.xwiki.plugin.activitystream.api.ActivityStream; |
36 |
|
import com.xpn.xwiki.plugin.activitystream.api.ActivityStreamException; |
37 |
|
|
38 |
|
|
39 |
|
@link |
40 |
|
|
41 |
|
@version |
42 |
|
|
|
|
| 10.8% |
Uncovered Elements: 174 (195) |
Complexity: 71 |
Complexity Density: 0.69 |
|
43 |
|
public class ActivityStreamPluginApi extends PluginApi<ActivityStreamPlugin> |
44 |
|
{ |
45 |
|
|
46 |
|
private static final Logger LOG = LoggerFactory.getLogger(ActivityStreamPlugin.class); |
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
@see |
52 |
|
@param |
53 |
|
@param |
54 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
55 |
110 |
public ActivityStreamPluginApi(ActivityStreamPlugin plugin, XWikiContext context)... |
56 |
|
{ |
57 |
110 |
super(plugin, context); |
58 |
|
} |
59 |
|
|
60 |
|
|
61 |
|
@return@link |
62 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
63 |
110 |
protected ActivityStream getActivityStream()... |
64 |
|
{ |
65 |
110 |
return getProtectedPlugin().getActivityStream(); |
66 |
|
} |
67 |
|
|
68 |
|
|
69 |
|
@link |
70 |
|
|
71 |
|
@param |
72 |
|
@throws |
73 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
74 |
0 |
public void addActivityEvent(com.xpn.xwiki.plugin.activitystream.api.ActivityEvent event)... |
75 |
|
throws ActivityStreamException |
76 |
|
{ |
77 |
0 |
if (hasProgrammingRights()) { |
78 |
0 |
getActivityStream().addActivityEvent(event, this.context); |
79 |
|
} |
80 |
|
} |
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
@param |
86 |
|
@param |
87 |
|
@link |
88 |
|
@param |
89 |
|
@throws |
90 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
91 |
0 |
public void addActivityEvent(String streamName, String type, String title) throws ActivityStreamException... |
92 |
|
{ |
93 |
0 |
if (hasProgrammingRights()) { |
94 |
0 |
getActivityStream().addActivityEvent(streamName, type, title, this.context); |
95 |
|
} |
96 |
|
} |
97 |
|
|
98 |
|
|
99 |
|
|
100 |
|
|
101 |
|
|
102 |
|
@param |
103 |
|
@param |
104 |
|
@param |
105 |
|
@param |
106 |
|
@throws |
107 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
108 |
0 |
public void addActivityEvent(String streamName, String type, String title, List<String> params)... |
109 |
|
throws ActivityStreamException |
110 |
|
{ |
111 |
0 |
if (hasProgrammingRights()) { |
112 |
0 |
getActivityStream().addActivityEvent(streamName, type, title, params, this.context); |
113 |
|
} |
114 |
|
} |
115 |
|
|
116 |
|
|
117 |
|
|
118 |
|
|
119 |
|
|
120 |
|
@param |
121 |
|
@param |
122 |
|
@param@link |
123 |
|
@param |
124 |
|
@throws |
125 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
126 |
0 |
public void addDocumentActivityEvent(String streamName, Document doc, String type, String title)... |
127 |
|
throws ActivityStreamException |
128 |
|
{ |
129 |
0 |
if (hasProgrammingRights()) { |
130 |
0 |
getActivityStream().addDocumentActivityEvent(streamName, doc.getDocument(), type, title, this.context); |
131 |
|
} |
132 |
|
} |
133 |
|
|
134 |
|
|
135 |
|
|
136 |
|
|
137 |
|
|
138 |
|
@param |
139 |
|
@param |
140 |
|
@param |
141 |
|
@param |
142 |
|
@param |
143 |
|
@throws |
144 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
145 |
0 |
public void addDocumentActivityEvent(String streamName, Document doc, String type, int priority, String title)... |
146 |
|
throws ActivityStreamException |
147 |
|
{ |
148 |
0 |
if (hasProgrammingRights()) { |
149 |
0 |
getActivityStream().addDocumentActivityEvent(streamName, doc.getDocument(), type, priority, title, |
150 |
|
this.context); |
151 |
|
} |
152 |
|
} |
153 |
|
|
154 |
|
|
155 |
|
|
156 |
|
|
157 |
|
@param |
158 |
|
@throws |
159 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
160 |
0 |
public void deleteActivityEvents(List<ActivityEvent> evs) throws ActivityStreamException... |
161 |
|
{ |
162 |
0 |
if (hasProgrammingRights()) { |
163 |
0 |
List<com.xpn.xwiki.plugin.activitystream.api.ActivityEvent> events = unwrapEvents(evs); |
164 |
0 |
for (com.xpn.xwiki.plugin.activitystream.api.ActivityEvent ev : events) { |
165 |
0 |
getActivityStream().deleteActivityEvent(ev, this.context); |
166 |
|
} |
167 |
|
} |
168 |
|
} |
169 |
|
|
170 |
|
|
171 |
|
|
172 |
|
|
173 |
|
@param |
174 |
|
@throws |
175 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
176 |
0 |
public void deleteActivityEvent(ActivityEvent event) throws ActivityStreamException... |
177 |
|
{ |
178 |
0 |
if (hasProgrammingRights()) { |
179 |
0 |
getActivityStream().deleteActivityEvent(event.getEvent(), this.context); |
180 |
|
} |
181 |
|
} |
182 |
|
|
183 |
|
|
184 |
|
|
185 |
|
|
186 |
|
|
187 |
|
@param |
188 |
|
@param |
189 |
|
@param |
190 |
|
@param |
191 |
|
@param |
192 |
|
@throws |
193 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
194 |
0 |
public void addDocumentActivityEvent(String streamName, Document doc, String type, String title,... |
195 |
|
List<String> params) throws ActivityStreamException |
196 |
|
{ |
197 |
0 |
if (hasProgrammingRights()) { |
198 |
0 |
getActivityStream().addDocumentActivityEvent(streamName, doc.getDocument(), type, title, params, |
199 |
|
this.context); |
200 |
|
} |
201 |
|
} |
202 |
|
|
203 |
|
|
204 |
|
|
205 |
|
|
206 |
|
|
207 |
|
@param |
208 |
|
@param |
209 |
|
@param |
210 |
|
@param |
211 |
|
@param |
212 |
|
@param |
213 |
|
@throws |
214 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
215 |
0 |
public void addDocumentActivityEvent(String streamName, Document doc, String type, int priority, String title,... |
216 |
|
List<String> params) throws ActivityStreamException |
217 |
|
{ |
218 |
0 |
if (hasProgrammingRights()) { |
219 |
0 |
getActivityStream().addDocumentActivityEvent(streamName, doc.getDocument(), type, priority, title, params, |
220 |
|
this.context); |
221 |
|
} |
222 |
|
} |
223 |
|
|
224 |
|
|
225 |
|
|
226 |
|
|
227 |
|
@param |
228 |
|
@param |
229 |
|
@param |
230 |
|
@param |
231 |
|
@return@link |
232 |
|
|
233 |
|
@throws |
234 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
235 |
0 |
public List<ActivityEvent> searchEvents(String hql, boolean filter, int nb, int start)... |
236 |
|
throws ActivityStreamException |
237 |
|
{ |
238 |
0 |
if (hasProgrammingRights()) { |
239 |
0 |
return wrapEvents(getActivityStream().searchEvents(hql, filter, nb, start, this.context)); |
240 |
|
} else { |
241 |
0 |
return null; |
242 |
|
} |
243 |
|
} |
244 |
|
|
245 |
|
|
246 |
|
|
247 |
|
|
248 |
|
@param |
249 |
|
@param |
250 |
|
@param |
251 |
|
@param |
252 |
|
@param |
253 |
|
@return@link |
254 |
|
|
255 |
|
@throws |
256 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
257 |
0 |
public List<ActivityEvent> searchEvents(String hql, boolean filter, boolean globalSearch, int nb, int start)... |
258 |
|
throws ActivityStreamException |
259 |
|
{ |
260 |
0 |
if (hasProgrammingRights()) { |
261 |
0 |
return wrapEvents(getActivityStream().searchEvents(hql, filter, globalSearch, nb, start, this.context)); |
262 |
|
} else { |
263 |
0 |
return null; |
264 |
|
} |
265 |
|
} |
266 |
|
|
267 |
|
|
268 |
|
|
269 |
|
|
270 |
|
@param |
271 |
|
@param |
272 |
|
@param |
273 |
|
@param |
274 |
|
@param |
275 |
|
@return@link |
276 |
|
|
277 |
|
@throws |
278 |
|
|
|
|
| 60% |
Uncovered Elements: 2 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
279 |
24 |
public List<ActivityEvent> searchEvents(String hql, boolean filter, int nb, int start, List<Object> parameterValues)... |
280 |
|
throws ActivityStreamException |
281 |
|
{ |
282 |
24 |
if (hasProgrammingRights()) { |
283 |
24 |
return wrapEvents(getActivityStream().searchEvents("", hql, filter, nb, start, parameterValues, |
284 |
|
this.context)); |
285 |
|
} else { |
286 |
0 |
return null; |
287 |
|
} |
288 |
|
} |
289 |
|
|
290 |
|
|
291 |
|
|
292 |
|
|
293 |
|
@param |
294 |
|
@param |
295 |
|
@param |
296 |
|
@param |
297 |
|
@param |
298 |
|
@param |
299 |
|
@return@link |
300 |
|
|
301 |
|
@throws |
302 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
303 |
0 |
public List<ActivityEvent> searchEvents(String hql, boolean filter, boolean globalSearch, int nb, int start,... |
304 |
|
List<Object> parameterValues) throws ActivityStreamException |
305 |
|
{ |
306 |
0 |
if (hasProgrammingRights()) { |
307 |
0 |
return wrapEvents(getActivityStream().searchEvents("", hql, filter, globalSearch, nb, start, |
308 |
|
parameterValues, this.context)); |
309 |
|
} else { |
310 |
0 |
return null; |
311 |
|
} |
312 |
|
} |
313 |
|
|
314 |
|
|
315 |
|
|
316 |
|
|
317 |
|
@param |
318 |
|
@param |
319 |
|
@param |
320 |
|
@param |
321 |
|
@param |
322 |
|
@return@link |
323 |
|
|
324 |
|
@throws |
325 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
326 |
0 |
public List<ActivityEvent> searchEvents(String fromHql, String hql, boolean filter, int nb, int start)... |
327 |
|
throws ActivityStreamException |
328 |
|
{ |
329 |
0 |
if (hasProgrammingRights()) { |
330 |
0 |
return wrapEvents(getActivityStream().searchEvents(fromHql, hql, filter, nb, start, this.context)); |
331 |
|
} else { |
332 |
0 |
return null; |
333 |
|
} |
334 |
|
} |
335 |
|
|
336 |
|
|
337 |
|
|
338 |
|
|
339 |
|
@param |
340 |
|
@param |
341 |
|
@param |
342 |
|
@param |
343 |
|
@param |
344 |
|
@param |
345 |
|
@return@link |
346 |
|
|
347 |
|
@throws |
348 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
349 |
0 |
public List<ActivityEvent> searchEvents(String fromHql, String hql, boolean filter, boolean globalSearch, int nb,... |
350 |
|
int start) throws ActivityStreamException |
351 |
|
{ |
352 |
0 |
if (hasProgrammingRights()) { |
353 |
0 |
return wrapEvents(getActivityStream().searchEvents(fromHql, hql, filter, globalSearch, nb, start, |
354 |
|
this.context)); |
355 |
|
} else { |
356 |
0 |
return null; |
357 |
|
} |
358 |
|
} |
359 |
|
|
360 |
|
|
361 |
|
|
362 |
|
|
363 |
|
@param |
364 |
|
@param |
365 |
|
@param |
366 |
|
@param |
367 |
|
@param |
368 |
|
@param |
369 |
|
@return@link |
370 |
|
|
371 |
|
@throws |
372 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
373 |
0 |
public List<ActivityEvent> searchEvents(String fromHql, String hql, boolean filter, int nb, int start,... |
374 |
|
List<Object> parameterValues) throws ActivityStreamException |
375 |
|
{ |
376 |
0 |
if (hasProgrammingRights()) { |
377 |
0 |
return wrapEvents(getActivityStream().searchEvents(fromHql, hql, filter, nb, start, this.context)); |
378 |
|
} else { |
379 |
0 |
return null; |
380 |
|
} |
381 |
|
} |
382 |
|
|
383 |
|
|
384 |
|
|
385 |
|
|
386 |
|
@param |
387 |
|
@param |
388 |
|
@param |
389 |
|
@param |
390 |
|
@param |
391 |
|
@param |
392 |
|
@param |
393 |
|
@return@link |
394 |
|
|
395 |
|
@throws |
396 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
397 |
0 |
public List<ActivityEvent> searchEvents(String fromHql, String hql, boolean filter, boolean globalSearch, int nb,... |
398 |
|
int start, List<Object> parameterValues) throws ActivityStreamException |
399 |
|
{ |
400 |
0 |
if (hasProgrammingRights()) { |
401 |
0 |
return wrapEvents(getActivityStream().searchEvents(fromHql, hql, filter, globalSearch, nb, start, |
402 |
|
this.context)); |
403 |
|
} else { |
404 |
0 |
return null; |
405 |
|
} |
406 |
|
} |
407 |
|
|
408 |
|
|
409 |
|
|
410 |
|
|
411 |
|
@param |
412 |
|
@param |
413 |
|
@param |
414 |
|
@return |
415 |
|
@throws |
416 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
417 |
0 |
public List<ActivityEvent> getEvents(boolean filter, int nb, int start) throws ActivityStreamException... |
418 |
|
{ |
419 |
0 |
if (hasProgrammingRights()) { |
420 |
0 |
return wrapEvents(getActivityStream().getEvents(filter, nb, start, this.context)); |
421 |
|
} else { |
422 |
0 |
return null; |
423 |
|
} |
424 |
|
} |
425 |
|
|
426 |
|
|
427 |
|
|
428 |
|
|
429 |
|
@see |
430 |
|
@param |
431 |
|
@param |
432 |
|
@param |
433 |
|
@param |
434 |
|
@return |
435 |
|
@throws |
436 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
437 |
0 |
public List<ActivityEvent> getEventsForSpace(String space, boolean filter, int nb, int start)... |
438 |
|
throws ActivityStreamException |
439 |
|
{ |
440 |
0 |
if (hasProgrammingRights()) { |
441 |
0 |
return wrapEvents(getActivityStream().getEventsForSpace(space, filter, nb, start, this.context)); |
442 |
|
} else { |
443 |
0 |
return null; |
444 |
|
} |
445 |
|
} |
446 |
|
|
447 |
|
|
448 |
|
|
449 |
|
|
450 |
|
@see |
451 |
|
@param |
452 |
|
@param |
453 |
|
@param |
454 |
|
@param |
455 |
|
@return |
456 |
|
@throws |
457 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
458 |
0 |
public List<ActivityEvent> getEventsForUser(String user, boolean filter, int nb, int start)... |
459 |
|
throws ActivityStreamException |
460 |
|
{ |
461 |
0 |
if (hasProgrammingRights()) { |
462 |
0 |
return wrapEvents(getActivityStream().getEventsForUser(user, filter, nb, start, this.context)); |
463 |
|
} else { |
464 |
0 |
return null; |
465 |
|
} |
466 |
|
} |
467 |
|
|
468 |
|
|
469 |
|
|
470 |
|
|
471 |
|
@see |
472 |
|
@param |
473 |
|
@param |
474 |
|
@param |
475 |
|
@param |
476 |
|
@return |
477 |
|
@throws |
478 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
479 |
0 |
public List<ActivityEvent> getEvents(String streamName, boolean filter, int nb, int start)... |
480 |
|
throws ActivityStreamException |
481 |
|
{ |
482 |
0 |
if (hasProgrammingRights()) { |
483 |
0 |
return wrapEvents(getActivityStream().getEvents(streamName, filter, nb, start, this.context)); |
484 |
|
} else { |
485 |
0 |
return null; |
486 |
|
} |
487 |
|
} |
488 |
|
|
489 |
|
|
490 |
|
|
491 |
|
|
492 |
|
@param |
493 |
|
@param |
494 |
|
@param |
495 |
|
@param |
496 |
|
@param |
497 |
|
@return |
498 |
|
@throws |
499 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
500 |
0 |
public List<ActivityEvent> getEventsForSpace(String streamName, String space, boolean filter, int nb, int start)... |
501 |
|
throws ActivityStreamException |
502 |
|
{ |
503 |
0 |
if (hasProgrammingRights()) { |
504 |
0 |
return wrapEvents(getActivityStream().getEventsForSpace(streamName, space, filter, nb, start, this.context)); |
505 |
|
} else { |
506 |
0 |
return null; |
507 |
|
} |
508 |
|
} |
509 |
|
|
510 |
|
|
511 |
|
|
512 |
|
|
513 |
|
@param |
514 |
|
@param |
515 |
|
@param |
516 |
|
@param |
517 |
|
@param |
518 |
|
@return |
519 |
|
@throws |
520 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
521 |
0 |
public List<ActivityEvent> getEventsForUser(String streamName, String user, boolean filter, int nb, int start)... |
522 |
|
throws ActivityStreamException |
523 |
|
{ |
524 |
0 |
if (hasProgrammingRights()) { |
525 |
0 |
return wrapEvents(getActivityStream().getEventsForUser(streamName, user, filter, nb, start, this.context)); |
526 |
|
} else { |
527 |
0 |
return null; |
528 |
|
} |
529 |
|
} |
530 |
|
|
531 |
|
|
532 |
|
|
533 |
|
|
534 |
|
@param |
535 |
|
@return |
536 |
|
|
|
|
| 87.5% |
Uncovered Elements: 1 (8) |
Complexity: 2 |
Complexity Density: 0.33 |
|
537 |
96 |
protected List<ActivityEvent> wrapEvents(List<com.xpn.xwiki.plugin.activitystream.api.ActivityEvent> events)... |
538 |
|
{ |
539 |
96 |
List<ActivityEvent> result = new ArrayList<ActivityEvent>(); |
540 |
96 |
if (events != null) { |
541 |
96 |
for (com.xpn.xwiki.plugin.activitystream.api.ActivityEvent event : events) { |
542 |
126 |
com.xpn.xwiki.plugin.activitystream.plugin.ActivityEvent wrappedEvent = |
543 |
|
new com.xpn.xwiki.plugin.activitystream.plugin.ActivityEvent(event, getXWikiContext()); |
544 |
126 |
result.add(wrappedEvent); |
545 |
|
} |
546 |
|
} |
547 |
96 |
return result; |
548 |
|
} |
549 |
|
|
550 |
|
|
551 |
|
|
552 |
|
|
553 |
|
@param |
554 |
|
@return |
555 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 2 |
Complexity Density: 0.33 |
|
556 |
0 |
protected List<com.xpn.xwiki.plugin.activitystream.api.ActivityEvent> unwrapEvents(List<ActivityEvent> events)... |
557 |
|
{ |
558 |
0 |
List<com.xpn.xwiki.plugin.activitystream.api.ActivityEvent> result = |
559 |
|
new ArrayList<com.xpn.xwiki.plugin.activitystream.api.ActivityEvent>(); |
560 |
0 |
if (events != null) { |
561 |
0 |
for (ActivityEvent event : events) { |
562 |
0 |
com.xpn.xwiki.plugin.activitystream.api.ActivityEvent unwrappedEvent = event.getEvent(); |
563 |
0 |
result.add(unwrappedEvent); |
564 |
|
} |
565 |
|
} |
566 |
0 |
return result; |
567 |
|
} |
568 |
|
|
569 |
|
|
570 |
|
|
571 |
|
|
572 |
|
@param |
573 |
|
@return |
574 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
575 |
0 |
public SyndEntry getFeedEntry(com.xpn.xwiki.plugin.activitystream.plugin.ActivityEvent event)... |
576 |
|
{ |
577 |
0 |
return getActivityStream().getFeedEntry(event.getEvent(), this.context); |
578 |
|
} |
579 |
|
|
580 |
|
|
581 |
|
|
582 |
|
|
583 |
|
@param |
584 |
|
@param |
585 |
|
@return |
586 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
587 |
0 |
public SyndEntry getFeedEntry(com.xpn.xwiki.plugin.activitystream.plugin.ActivityEvent event, String suffix)... |
588 |
|
{ |
589 |
0 |
return getActivityStream().getFeedEntry(event.getEvent(), suffix, this.context); |
590 |
|
} |
591 |
|
|
592 |
|
|
593 |
|
|
594 |
|
|
595 |
|
@param |
596 |
|
@return |
597 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
598 |
0 |
public SyndFeed getFeed(List<ActivityEvent> events)... |
599 |
|
{ |
600 |
0 |
return getActivityStream().getFeed(unwrapEvents(events), this.context); |
601 |
|
} |
602 |
|
|
603 |
|
|
604 |
|
|
605 |
|
|
606 |
|
@param |
607 |
|
@param |
608 |
|
@return |
609 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
610 |
0 |
public SyndFeed getFeed(List<ActivityEvent> events, String suffix)... |
611 |
|
{ |
612 |
0 |
return getActivityStream().getFeed(unwrapEvents(events), suffix, this.context); |
613 |
|
} |
614 |
|
|
615 |
|
|
616 |
|
|
617 |
|
|
618 |
|
@param |
619 |
|
@param |
620 |
|
@param |
621 |
|
@param |
622 |
|
@param |
623 |
|
@param |
624 |
|
@param |
625 |
|
@return |
626 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
627 |
0 |
public SyndFeed getFeed(List<ActivityEvent> events, String author, String title, String description,... |
628 |
|
String copyright, String encoding, String url) |
629 |
|
{ |
630 |
0 |
return getActivityStream().getFeed(unwrapEvents(events), author, title, description, copyright, encoding, url, |
631 |
|
this.context); |
632 |
|
} |
633 |
|
|
634 |
|
|
635 |
|
|
636 |
|
|
637 |
|
@param |
638 |
|
@param |
639 |
|
@param |
640 |
|
@param |
641 |
|
@param |
642 |
|
@param |
643 |
|
@param |
644 |
|
@param |
645 |
|
@return |
646 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
647 |
0 |
public SyndFeed getFeed(List<ActivityEvent> events, String author, String title, String description,... |
648 |
|
String copyright, String encoding, String url, String suffix) |
649 |
|
{ |
650 |
0 |
return getActivityStream().getFeed(unwrapEvents(events), author, title, description, copyright, encoding, url, |
651 |
|
suffix, this.context); |
652 |
|
} |
653 |
|
|
654 |
|
|
655 |
|
|
656 |
|
|
657 |
|
@param |
658 |
|
@param |
659 |
|
@param |
660 |
|
@param |
661 |
|
@param |
662 |
|
@param |
663 |
|
@param |
664 |
|
@param |
665 |
|
|
666 |
|
@return |
667 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
668 |
0 |
public String getFeedOutput(List<ActivityEvent> events, String author, String title, String description,... |
669 |
|
String copyright, String encoding, String url, String type) |
670 |
|
{ |
671 |
0 |
return getActivityStream().getFeedOutput(unwrapEvents(events), author, title, description, copyright, encoding, |
672 |
|
url, type, this.context); |
673 |
|
} |
674 |
|
|
675 |
|
|
676 |
|
|
677 |
|
|
678 |
|
@param |
679 |
|
@param |
680 |
|
@param |
681 |
|
@param |
682 |
|
@param |
683 |
|
@param |
684 |
|
@param |
685 |
|
@param |
686 |
|
|
687 |
|
@param |
688 |
|
@return |
689 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
690 |
0 |
public String getFeedOutput(List<ActivityEvent> events, String author, String title, String description,... |
691 |
|
String copyright, String encoding, String url, String type, String suffix) |
692 |
|
{ |
693 |
0 |
return getActivityStream().getFeedOutput(unwrapEvents(events), author, title, description, copyright, encoding, |
694 |
|
url, type, suffix, this.context); |
695 |
|
} |
696 |
|
|
697 |
|
|
698 |
|
|
699 |
|
|
700 |
|
@param |
701 |
|
@param |
702 |
|
|
703 |
|
@return |
704 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
705 |
0 |
public String getFeedOutput(SyndFeed feed, String type)... |
706 |
|
{ |
707 |
0 |
return getActivityStream().getFeedOutput(feed, type); |
708 |
|
} |
709 |
|
|
710 |
|
|
711 |
|
@param |
712 |
|
@return |
713 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
714 |
0 |
public String getStreamName(String space)... |
715 |
|
{ |
716 |
0 |
return getActivityStream().getStreamName(space, this.context); |
717 |
|
} |
718 |
|
|
719 |
|
|
720 |
|
|
721 |
|
|
722 |
|
|
723 |
|
@param |
724 |
|
@return |
725 |
|
@throws |
726 |
|
@see |
727 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
728 |
72 |
public List<ActivityEvent> getRelatedEvents(ActivityEvent event) throws ActivityStreamException... |
729 |
|
{ |
730 |
72 |
return wrapEvents(getActivityStream().getRelatedEvents(event.getEvent(), this.context)); |
731 |
|
} |
732 |
|
|
733 |
|
|
734 |
|
|
735 |
|
|
736 |
|
|
737 |
|
@param |
738 |
|
@param |
739 |
|
@param |
740 |
|
@return |
741 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
742 |
0 |
public List<Object[]> searchUniquePages(String optionalWhereClause, int maxItems, int startAt)... |
743 |
|
{ |
744 |
0 |
try { |
745 |
0 |
return getActivityStream().searchUniquePages(optionalWhereClause, maxItems, startAt, this.context); |
746 |
|
} catch (ActivityStreamException ex) { |
747 |
0 |
LOG.error("Failed to query events: " + ex.getMessage(), ex); |
748 |
0 |
return Collections.emptyList(); |
749 |
|
} |
750 |
|
} |
751 |
|
|
752 |
|
|
753 |
|
|
754 |
|
|
755 |
|
|
756 |
|
@param |
757 |
|
@param |
758 |
|
@param |
759 |
|
@param |
760 |
|
@return |
761 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
762 |
0 |
public List<Object[]> searchUniquePages(String optionalWhereClause, List<Object> parametersValues, int maxItems,... |
763 |
|
int startAt) |
764 |
|
{ |
765 |
0 |
try { |
766 |
0 |
return getActivityStream().searchUniquePages(optionalWhereClause, parametersValues, maxItems, startAt, |
767 |
|
this.context); |
768 |
|
} catch (ActivityStreamException ex) { |
769 |
0 |
LOG.error("Failed to query events: " + ex.getMessage(), ex); |
770 |
0 |
return Collections.emptyList(); |
771 |
|
} |
772 |
|
} |
773 |
|
|
774 |
|
|
775 |
|
|
776 |
|
|
777 |
|
|
778 |
|
@param |
779 |
|
@param |
780 |
|
@param |
781 |
|
@return |
782 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
783 |
0 |
public List<Object[]> searchDailyPages(String optionalWhereClause, int maxItems, int startAt)... |
784 |
|
{ |
785 |
0 |
try { |
786 |
0 |
return getActivityStream().searchDailyPages(optionalWhereClause, maxItems, startAt, this.context); |
787 |
|
} catch (ActivityStreamException ex) { |
788 |
0 |
LOG.error("Failed to query events: " + ex.getMessage(), ex); |
789 |
0 |
return Collections.emptyList(); |
790 |
|
} |
791 |
|
} |
792 |
|
|
793 |
|
|
794 |
|
|
795 |
|
|
796 |
|
|
797 |
|
@param |
798 |
|
@param |
799 |
|
@param |
800 |
|
@param |
801 |
|
@return |
802 |
|
|
|
|
| 50% |
Uncovered Elements: 2 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
803 |
14 |
public List<Object[]> searchDailyPages(String optionalWhereClause, List<Object> parametersValues, int maxItems,... |
804 |
|
int startAt) |
805 |
|
{ |
806 |
14 |
try { |
807 |
14 |
return getActivityStream().searchDailyPages(optionalWhereClause, parametersValues, maxItems, startAt, |
808 |
|
this.context); |
809 |
|
} catch (ActivityStreamException ex) { |
810 |
0 |
LOG.error("Failed to query events: " + ex.getMessage(), ex); |
811 |
0 |
return Collections.emptyList(); |
812 |
|
} |
813 |
|
} |
814 |
|
} |