1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package com.xpn.xwiki.api; |
21 |
|
|
22 |
|
import java.io.IOException; |
23 |
|
import java.lang.reflect.Type; |
24 |
|
import java.util.ArrayList; |
25 |
|
import java.util.Collections; |
26 |
|
import java.util.Date; |
27 |
|
import java.util.List; |
28 |
|
import java.util.Locale; |
29 |
|
|
30 |
|
import org.apache.commons.lang3.StringUtils; |
31 |
|
import org.apache.commons.lang3.math.NumberUtils; |
32 |
|
import org.slf4j.Logger; |
33 |
|
import org.slf4j.LoggerFactory; |
34 |
|
import org.xwiki.component.manager.ComponentLookupException; |
35 |
|
import org.xwiki.job.Job; |
36 |
|
import org.xwiki.job.event.status.JobStatus; |
37 |
|
import org.xwiki.job.event.status.JobStatus.State; |
38 |
|
import org.xwiki.model.reference.DocumentReference; |
39 |
|
import org.xwiki.model.reference.DocumentReferenceResolver; |
40 |
|
import org.xwiki.model.reference.EntityReference; |
41 |
|
import org.xwiki.model.reference.EntityReferenceSerializer; |
42 |
|
import org.xwiki.model.reference.SpaceReference; |
43 |
|
import org.xwiki.model.reference.WikiReference; |
44 |
|
import org.xwiki.rendering.renderer.PrintRendererFactory; |
45 |
|
import org.xwiki.rendering.syntax.Syntax; |
46 |
|
|
47 |
|
import com.xpn.xwiki.XWikiContext; |
48 |
|
import com.xpn.xwiki.XWikiException; |
49 |
|
import com.xpn.xwiki.doc.XWikiDeletedDocument; |
50 |
|
import com.xpn.xwiki.doc.XWikiDocument; |
51 |
|
import com.xpn.xwiki.internal.XWikiInitializerJob; |
52 |
|
import com.xpn.xwiki.internal.XWikiInitializerJobStatus; |
53 |
|
import com.xpn.xwiki.objects.meta.MetaClass; |
54 |
|
import com.xpn.xwiki.user.api.XWikiUser; |
55 |
|
import com.xpn.xwiki.util.Programming; |
56 |
|
import com.xpn.xwiki.web.Utils; |
57 |
|
import com.xpn.xwiki.web.XWikiEngineContext; |
58 |
|
import com.xpn.xwiki.web.XWikiURLFactory; |
59 |
|
|
|
|
| 40.6% |
Uncovered Elements: 406 (684) |
Complexity: 272 |
Complexity Density: 0.69 |
|
60 |
|
public class XWiki extends Api |
61 |
|
{ |
62 |
|
|
63 |
|
protected static final Logger LOGGER = LoggerFactory.getLogger(XWiki.class); |
64 |
|
|
65 |
|
|
66 |
|
private com.xpn.xwiki.XWiki xwiki; |
67 |
|
|
68 |
|
|
69 |
|
@see |
70 |
|
|
71 |
|
private StatsService statsService; |
72 |
|
|
73 |
|
|
74 |
|
@see |
75 |
|
|
76 |
|
private CriteriaService criteriaService; |
77 |
|
|
78 |
|
|
79 |
|
@see |
80 |
|
|
81 |
|
private DocumentReferenceResolver<String> currentMixedDocumentReferenceResolver; |
82 |
|
|
83 |
|
|
84 |
|
@see |
85 |
|
|
86 |
|
private DocumentReferenceResolver<String> defaultDocumentReferenceResolver; |
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
|
91 |
|
|
92 |
|
private EntityReferenceSerializer<String> defaultStringEntityReferenceSerializer; |
93 |
|
|
94 |
|
private DocumentReferenceResolver<EntityReference> currentgetdocumentResolver; |
95 |
|
|
96 |
|
|
97 |
|
|
98 |
|
|
99 |
|
@param |
100 |
|
@param |
101 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
102 |
17722 |
public XWiki(com.xpn.xwiki.XWiki xwiki, XWikiContext context)... |
103 |
|
{ |
104 |
17729 |
super(context); |
105 |
|
|
106 |
17715 |
this.xwiki = xwiki; |
107 |
17710 |
this.statsService = new StatsService(context); |
108 |
17719 |
this.criteriaService = new CriteriaService(context); |
109 |
|
} |
110 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
111 |
38768 |
private DocumentReferenceResolver<String> getCurrentMixedDocumentReferenceResolver()... |
112 |
|
{ |
113 |
38766 |
if (this.currentMixedDocumentReferenceResolver == null) { |
114 |
8408 |
this.currentMixedDocumentReferenceResolver = |
115 |
|
Utils.getComponent(DocumentReferenceResolver.TYPE_STRING, "currentmixed"); |
116 |
|
} |
117 |
|
|
118 |
38767 |
return this.currentMixedDocumentReferenceResolver; |
119 |
|
} |
120 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
121 |
988 |
private DocumentReferenceResolver<EntityReference> getCurrentgetdocumentResolver()... |
122 |
|
{ |
123 |
988 |
if (this.currentgetdocumentResolver == null) { |
124 |
810 |
this.currentgetdocumentResolver = |
125 |
|
Utils.getComponent(DocumentReferenceResolver.TYPE_REFERENCE, "currentgetdocument"); |
126 |
|
} |
127 |
|
|
128 |
988 |
return this.currentgetdocumentResolver; |
129 |
|
} |
130 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
131 |
0 |
private DocumentReferenceResolver<String> getDefaultDocumentReferenceResolver()... |
132 |
|
{ |
133 |
0 |
if (this.defaultDocumentReferenceResolver == null) { |
134 |
0 |
this.defaultDocumentReferenceResolver = Utils.getComponent(DocumentReferenceResolver.TYPE_STRING); |
135 |
|
} |
136 |
|
|
137 |
0 |
return this.defaultDocumentReferenceResolver; |
138 |
|
} |
139 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
140 |
6 |
private EntityReferenceSerializer<String> getDefaultStringEntityReferenceSerializer()... |
141 |
|
{ |
142 |
6 |
if (this.defaultStringEntityReferenceSerializer == null) { |
143 |
3 |
this.defaultStringEntityReferenceSerializer = Utils.getComponent(EntityReferenceSerializer.TYPE_STRING); |
144 |
|
} |
145 |
|
|
146 |
6 |
return this.defaultStringEntityReferenceSerializer; |
147 |
|
} |
148 |
|
|
149 |
|
|
150 |
|
|
151 |
|
|
152 |
|
@return |
153 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
154 |
0 |
@Programming... |
155 |
|
public com.xpn.xwiki.XWiki getXWiki() |
156 |
|
{ |
157 |
0 |
if (hasProgrammingRights()) { |
158 |
0 |
return this.xwiki; |
159 |
|
} |
160 |
|
|
161 |
0 |
return null; |
162 |
|
} |
163 |
|
|
164 |
|
|
165 |
|
@return@link |
166 |
|
@since |
167 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
168 |
0 |
public XWikiInitializerJobStatus getJobStatus()... |
169 |
|
{ |
170 |
0 |
XWikiInitializerJob job = Utils.getComponent((Type) Job.class, XWikiInitializerJob.JOBTYPE); |
171 |
|
|
172 |
0 |
return job != null ? job.getStatus() : null; |
173 |
|
} |
174 |
|
|
175 |
|
|
176 |
|
@return |
177 |
|
@since |
178 |
|
|
|
|
| 0% |
Uncovered Elements: 13 (13) |
Complexity: 4 |
Complexity Density: 0.57 |
|
179 |
0 |
public JobStatus getCurrentInitializerJobStatus()... |
180 |
|
{ |
181 |
|
|
182 |
0 |
XWikiInitializerJobStatus xwikiStatus = getJobStatus(); |
183 |
|
|
184 |
0 |
if (xwikiStatus == null) { |
185 |
0 |
return null; |
186 |
|
} |
187 |
|
|
188 |
|
|
189 |
0 |
if (xwikiStatus.getState() != State.FINISHED) { |
190 |
0 |
return xwikiStatus; |
191 |
|
} |
192 |
|
|
193 |
|
|
194 |
0 |
Job wikiJob = this.xwiki.getWikiInitializerJob(this.context.getWikiId()); |
195 |
|
|
196 |
0 |
return wikiJob != null ? wikiJob.getStatus() : null; |
197 |
|
} |
198 |
|
|
199 |
|
|
200 |
|
@return |
201 |
|
|
202 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
203 |
1063 |
public String getVersion()... |
204 |
|
{ |
205 |
1063 |
return this.xwiki.getVersion(); |
206 |
|
} |
207 |
|
|
208 |
|
|
209 |
|
|
210 |
|
|
211 |
|
@return |
212 |
|
@throws |
213 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
214 |
1 |
public String getRequestURL() throws XWikiException... |
215 |
|
{ |
216 |
1 |
return getXWikiContext().getURLFactory().getRequestURL(getXWikiContext()).toString(); |
217 |
|
} |
218 |
|
|
219 |
|
|
220 |
|
|
221 |
|
|
222 |
|
@return |
223 |
|
@throws |
224 |
|
@since |
225 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
226 |
8605 |
public String getRelativeRequestURL() throws XWikiException... |
227 |
|
{ |
228 |
8605 |
XWikiURLFactory urlFactory = getXWikiContext().getURLFactory(); |
229 |
|
|
230 |
8603 |
return urlFactory.getURL(urlFactory.getRequestURL(getXWikiContext()), getXWikiContext()); |
231 |
|
} |
232 |
|
|
233 |
|
|
234 |
|
|
235 |
|
|
236 |
|
@param |
237 |
|
@return |
238 |
|
@link |
239 |
|
@throws |
240 |
|
|
|
|
| 71.4% |
Uncovered Elements: 2 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
241 |
38286 |
public Document getDocument(String fullName) throws XWikiException... |
242 |
|
{ |
243 |
38286 |
DocumentReference reference; |
244 |
|
|
245 |
|
|
246 |
38286 |
if (fullName != null) { |
247 |
|
|
248 |
|
|
249 |
38284 |
reference = getCurrentMixedDocumentReferenceResolver().resolve(fullName); |
250 |
|
} else { |
251 |
0 |
reference = getDefaultDocumentReferenceResolver().resolve(""); |
252 |
|
} |
253 |
|
|
254 |
38287 |
return getDocument(reference); |
255 |
|
} |
256 |
|
|
257 |
|
|
258 |
|
|
259 |
|
|
260 |
|
@param |
261 |
|
@return |
262 |
|
@link |
263 |
|
@throws |
264 |
|
@since |
265 |
|
|
|
|
| 80% |
Uncovered Elements: 2 (10) |
Complexity: 3 |
Complexity Density: 0.38 |
|
266 |
47414 |
public Document getDocument(DocumentReference reference) throws XWikiException... |
267 |
|
{ |
268 |
47415 |
try { |
269 |
47414 |
XWikiDocument doc = this.xwiki.getDocument(reference, getXWikiContext()); |
270 |
47416 |
if (this.xwiki.getRightService().hasAccessLevel("view", getXWikiContext().getUser(), |
271 |
|
doc.getPrefixedFullName(), getXWikiContext()) == false) { |
272 |
5 |
return null; |
273 |
|
} |
274 |
|
|
275 |
47409 |
Document newdoc = doc.newDocument(getXWikiContext()); |
276 |
47411 |
return newdoc; |
277 |
|
} catch (Exception ex) { |
278 |
0 |
LOGGER.warn("Failed to access document " + reference + ": " + ex.getMessage()); |
279 |
0 |
return new Document(new XWikiDocument(reference), getXWikiContext()); |
280 |
|
} |
281 |
|
} |
282 |
|
|
283 |
|
|
284 |
|
|
285 |
|
|
286 |
|
|
287 |
|
|
288 |
|
|
289 |
|
|
290 |
|
@param |
291 |
|
@return |
292 |
|
@link |
293 |
|
@throws |
294 |
|
@since |
295 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
296 |
988 |
public Document getDocument(EntityReference reference) throws XWikiException... |
297 |
|
{ |
298 |
988 |
return getDocument(getCurrentgetdocumentResolver().resolve(reference)); |
299 |
|
} |
300 |
|
|
301 |
|
|
302 |
|
|
303 |
|
|
304 |
|
|
305 |
|
@param |
306 |
|
@return |
307 |
|
@link |
308 |
|
@throws |
309 |
|
@since |
310 |
|
|
|
|
| 71.4% |
Uncovered Elements: 2 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
311 |
7 |
public Document getDocumentAsAuthor(String fullName) throws XWikiException... |
312 |
|
{ |
313 |
7 |
DocumentReference reference; |
314 |
|
|
315 |
|
|
316 |
7 |
if (fullName != null) { |
317 |
|
|
318 |
|
|
319 |
7 |
reference = getCurrentMixedDocumentReferenceResolver().resolve(fullName); |
320 |
|
} else { |
321 |
0 |
reference = getDefaultDocumentReferenceResolver().resolve(""); |
322 |
|
} |
323 |
|
|
324 |
7 |
return getDocumentAsAuthor(reference); |
325 |
|
} |
326 |
|
|
327 |
|
|
328 |
|
|
329 |
|
|
330 |
|
|
331 |
|
@param |
332 |
|
@return |
333 |
|
@link |
334 |
|
@throws |
335 |
|
@since |
336 |
|
|
|
|
| 75% |
Uncovered Elements: 2 (8) |
Complexity: 2 |
Complexity Density: 0.33 |
|
337 |
7 |
public Document getDocumentAsAuthor(DocumentReference reference) throws XWikiException... |
338 |
|
{ |
339 |
7 |
String author = this.getEffectiveScriptAuthorName(); |
340 |
7 |
XWikiDocument doc = this.xwiki.getDocument(reference, getXWikiContext()); |
341 |
7 |
if (this.xwiki.getRightService().hasAccessLevel("view", author, doc.getFullName(), |
342 |
|
getXWikiContext()) == false) { |
343 |
0 |
return null; |
344 |
|
} |
345 |
|
|
346 |
7 |
Document newdoc = doc.newDocument(getXWikiContext()); |
347 |
7 |
return newdoc; |
348 |
|
} |
349 |
|
|
350 |
|
|
351 |
|
@param@link |
352 |
|
@param@link |
353 |
|
@return |
354 |
|
@throws |
355 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 3 |
Complexity Density: 0.43 |
|
356 |
304 |
public List<DeletedDocument> getDeletedDocuments(String fullname, String locale) throws XWikiException... |
357 |
|
{ |
358 |
304 |
XWikiDeletedDocument[] dds = this.xwiki.getDeletedDocuments(fullname, locale, this.context); |
359 |
302 |
if (dds == null || dds.length == 0) { |
360 |
287 |
return Collections.emptyList(); |
361 |
|
} |
362 |
15 |
List<DeletedDocument> result = new ArrayList<DeletedDocument>(dds.length); |
363 |
15 |
for (XWikiDeletedDocument dd : dds) { |
364 |
17 |
result.add(new DeletedDocument(dd, this.context)); |
365 |
|
} |
366 |
15 |
return result; |
367 |
|
} |
368 |
|
|
369 |
|
|
370 |
|
@return |
371 |
|
@param@link |
372 |
|
@param@link |
373 |
|
@throws |
374 |
|
|
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
375 |
0 |
public DeletedDocument getDeletedDocument(String fullname, String locale, String index) throws XWikiException... |
376 |
|
{ |
377 |
0 |
if (!NumberUtils.isDigits(index)) { |
378 |
0 |
return null; |
379 |
|
} |
380 |
0 |
XWikiDeletedDocument dd = |
381 |
|
this.xwiki.getDeletedDocument(fullname, locale, Integer.parseInt(index), this.context); |
382 |
0 |
if (dd == null) { |
383 |
0 |
return null; |
384 |
|
} |
385 |
|
|
386 |
0 |
return new DeletedDocument(dd, this.context); |
387 |
|
} |
388 |
|
|
389 |
|
|
390 |
|
|
391 |
|
|
392 |
|
|
393 |
|
|
394 |
|
|
395 |
|
@param@link |
396 |
|
@return |
397 |
|
|
398 |
|
|
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 4 |
Complexity Density: 0.4 |
|
399 |
0 |
public List<DeletedAttachment> getDeletedAttachments(String docName)... |
400 |
|
{ |
401 |
0 |
try { |
402 |
0 |
List<com.xpn.xwiki.doc.DeletedAttachment> attachments = |
403 |
|
this.xwiki.getDeletedAttachments(docName, this.context); |
404 |
0 |
if (attachments == null || attachments.isEmpty()) { |
405 |
0 |
attachments = Collections.emptyList(); |
406 |
|
} |
407 |
0 |
List<DeletedAttachment> result = new ArrayList<DeletedAttachment>(attachments.size()); |
408 |
0 |
for (com.xpn.xwiki.doc.DeletedAttachment attachment : attachments) { |
409 |
0 |
result.add(new DeletedAttachment(attachment, this.context)); |
410 |
|
} |
411 |
0 |
return result; |
412 |
|
} catch (Exception ex) { |
413 |
0 |
LOGGER.warn("Failed to retrieve deleted attachments", ex); |
414 |
|
} |
415 |
0 |
return Collections.emptyList(); |
416 |
|
} |
417 |
|
|
418 |
|
|
419 |
|
|
420 |
|
|
421 |
|
|
422 |
|
|
423 |
|
|
424 |
|
|
425 |
|
@param@link |
426 |
|
@param@link |
427 |
|
@return |
428 |
|
|
429 |
|
|
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 3 |
Complexity Density: 0.3 |
|
430 |
0 |
public List<DeletedAttachment> getDeletedAttachments(String docName, String filename)... |
431 |
|
{ |
432 |
0 |
try { |
433 |
0 |
List<com.xpn.xwiki.doc.DeletedAttachment> attachments = |
434 |
|
this.xwiki.getDeletedAttachments(docName, filename, this.context); |
435 |
0 |
if (attachments == null) { |
436 |
0 |
attachments = Collections.emptyList(); |
437 |
|
} |
438 |
0 |
List<DeletedAttachment> result = new ArrayList<DeletedAttachment>(attachments.size()); |
439 |
0 |
for (com.xpn.xwiki.doc.DeletedAttachment attachment : attachments) { |
440 |
0 |
result.add(new DeletedAttachment(attachment, this.context)); |
441 |
|
} |
442 |
0 |
return result; |
443 |
|
} catch (Exception ex) { |
444 |
0 |
LOGGER.warn("Failed to retrieve deleted attachments", ex); |
445 |
|
} |
446 |
0 |
return Collections.emptyList(); |
447 |
|
} |
448 |
|
|
449 |
|
|
450 |
|
|
451 |
|
|
452 |
|
@param |
453 |
|
@return |
454 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 3 |
Complexity Density: 0.5 |
|
455 |
0 |
public DeletedAttachment getDeletedAttachment(String id)... |
456 |
|
{ |
457 |
0 |
try { |
458 |
0 |
com.xpn.xwiki.doc.DeletedAttachment attachment = this.xwiki.getDeletedAttachment(id, this.context); |
459 |
0 |
if (attachment != null) { |
460 |
0 |
return new DeletedAttachment(attachment, this.context); |
461 |
|
} |
462 |
|
} catch (Exception ex) { |
463 |
0 |
LOGGER.warn("Failed to retrieve deleted attachment", ex); |
464 |
|
} |
465 |
0 |
return null; |
466 |
|
} |
467 |
|
|
468 |
|
|
469 |
|
|
470 |
|
|
471 |
|
@param |
472 |
|
@return |
473 |
|
@throws |
474 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
475 |
37317 |
public boolean exists(String fullname) throws XWikiException... |
476 |
|
{ |
477 |
37316 |
return this.xwiki.exists(fullname, getXWikiContext()); |
478 |
|
} |
479 |
|
|
480 |
|
|
481 |
|
|
482 |
|
|
483 |
|
@param |
484 |
|
@return |
485 |
|
@since |
486 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
487 |
1435 |
public boolean exists(DocumentReference reference) throws XWikiException... |
488 |
|
{ |
489 |
1435 |
return this.xwiki.exists(reference, getXWikiContext()); |
490 |
|
} |
491 |
|
|
492 |
|
|
493 |
|
|
494 |
|
|
495 |
|
|
496 |
|
@param |
497 |
|
@param |
498 |
|
@return |
499 |
|
|
|
|
| 80% |
Uncovered Elements: 1 (5) |
Complexity: 2 |
Complexity Density: 0.4 |
|
500 |
13 |
public boolean checkAccess(String docname, String right)... |
501 |
|
{ |
502 |
13 |
try { |
503 |
13 |
DocumentReference docReference = getCurrentMixedDocumentReferenceResolver().resolve(docname); |
504 |
13 |
XWikiDocument doc = getXWikiContext().getWiki().getDocument(docReference, this.context); |
505 |
13 |
return getXWikiContext().getWiki().checkAccess(right, doc, getXWikiContext()); |
506 |
|
} catch (XWikiException e) { |
507 |
0 |
return false; |
508 |
|
} |
509 |
|
} |
510 |
|
|
511 |
|
|
512 |
|
|
513 |
|
|
514 |
|
@param |
515 |
|
@param |
516 |
|
@return |
517 |
|
@link |
518 |
|
@throws |
519 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
520 |
0 |
public Document getDocument(String space, String fullname) throws XWikiException... |
521 |
|
{ |
522 |
0 |
XWikiDocument doc = this.xwiki.getDocument(space, fullname, getXWikiContext()); |
523 |
0 |
if (this.xwiki.getRightService().hasAccessLevel("view", getXWikiContext().getUser(), doc.getFullName(), |
524 |
|
getXWikiContext()) == false) { |
525 |
0 |
return null; |
526 |
|
} |
527 |
|
|
528 |
0 |
return doc.newDocument(getXWikiContext()); |
529 |
|
} |
530 |
|
|
531 |
|
|
532 |
|
|
533 |
|
|
534 |
|
@param |
535 |
|
@param |
536 |
|
@return |
537 |
|
@throws |
538 |
|
|
|
|
| 53.8% |
Uncovered Elements: 6 (13) |
Complexity: 5 |
Complexity Density: 0.56 |
|
539 |
3 |
public Document getDocument(Document doc, String rev) throws XWikiException... |
540 |
|
{ |
541 |
3 |
if ((doc == null) || (doc.getDoc() == null)) { |
542 |
0 |
return null; |
543 |
|
} |
544 |
|
|
545 |
3 |
if (this.xwiki.getRightService().hasAccessLevel("view", getXWikiContext().getUser(), doc.getFullName(), |
546 |
|
getXWikiContext()) == false) { |
547 |
|
|
548 |
0 |
return null; |
549 |
|
} |
550 |
|
|
551 |
3 |
try { |
552 |
3 |
XWikiDocument revdoc = this.xwiki.getDocument(doc.getDoc(), rev, getXWikiContext()); |
553 |
3 |
return revdoc.newDocument(getXWikiContext()); |
554 |
|
} catch (Exception e) { |
555 |
|
|
556 |
0 |
LOGGER.error("Failed to read versioned document", e); |
557 |
|
|
558 |
0 |
return null; |
559 |
|
} |
560 |
|
} |
561 |
|
|
562 |
|
|
563 |
|
|
564 |
|
|
565 |
|
@param |
566 |
|
@return |
567 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
568 |
0 |
public String getTextArea(String content)... |
569 |
|
{ |
570 |
0 |
return com.xpn.xwiki.XWiki.getTextArea(content, getXWikiContext()); |
571 |
|
} |
572 |
|
|
573 |
|
|
574 |
|
|
575 |
|
|
576 |
|
@return |
577 |
|
@throws |
578 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
579 |
28 |
public List<String> getClassList() throws XWikiException... |
580 |
|
{ |
581 |
28 |
return this.xwiki.getClassList(getXWikiContext()); |
582 |
|
} |
583 |
|
|
584 |
|
|
585 |
|
|
586 |
|
|
587 |
|
@return |
588 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
589 |
184 |
public MetaClass getMetaclass()... |
590 |
|
{ |
591 |
184 |
return this.xwiki.getMetaclass(); |
592 |
|
} |
593 |
|
|
594 |
|
|
595 |
|
|
596 |
|
|
597 |
|
|
598 |
|
|
599 |
|
|
600 |
|
|
601 |
|
|
602 |
|
|
603 |
|
|
604 |
|
|
605 |
|
|
606 |
|
|
607 |
|
|
608 |
|
|
609 |
|
|
610 |
|
|
611 |
|
|
612 |
|
|
613 |
|
|
614 |
|
|
615 |
|
|
616 |
|
|
617 |
|
|
618 |
|
@param |
619 |
|
@return |
620 |
|
@throws |
621 |
|
@deprecated |
622 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
623 |
0 |
@Deprecated... |
624 |
|
public List<String> searchDocuments(String wheresql) throws XWikiException |
625 |
|
{ |
626 |
0 |
return this.xwiki.getStore().searchDocumentsNames(wheresql, getXWikiContext()); |
627 |
|
} |
628 |
|
|
629 |
|
|
630 |
|
|
631 |
|
|
632 |
|
|
633 |
|
@param |
634 |
|
@param |
635 |
|
@param |
636 |
|
@return |
637 |
|
@throws |
638 |
|
@see |
639 |
|
@deprecated |
640 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
641 |
0 |
@Deprecated... |
642 |
|
public List<String> searchDocuments(String wheresql, int nb, int start) throws XWikiException |
643 |
|
{ |
644 |
0 |
return this.xwiki.getStore().searchDocumentsNames(wheresql, nb, start, getXWikiContext()); |
645 |
|
} |
646 |
|
|
647 |
|
|
648 |
|
|
649 |
|
|
650 |
|
|
651 |
|
|
652 |
|
@param |
653 |
|
@param |
654 |
|
@param |
655 |
|
@param |
656 |
|
@return |
657 |
|
@throws |
658 |
|
@deprecated |
659 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
660 |
0 |
@Deprecated... |
661 |
|
public List<String> searchDocuments(String wheresql, int nb, int start, String selectColumns) throws XWikiException |
662 |
|
{ |
663 |
0 |
if (hasProgrammingRights()) { |
664 |
0 |
return this.xwiki.getStore().searchDocumentsNames(wheresql, nb, start, selectColumns, getXWikiContext()); |
665 |
|
} |
666 |
|
|
667 |
0 |
return Collections.emptyList(); |
668 |
|
} |
669 |
|
|
670 |
|
|
671 |
|
|
672 |
|
|
673 |
|
@param |
674 |
|
@param |
675 |
|
@return |
676 |
|
@throws |
677 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
678 |
0 |
public List<Document> searchDocuments(String wheresql, boolean distinctbylocale) throws XWikiException... |
679 |
|
{ |
680 |
0 |
return convert(this.xwiki.getStore().searchDocuments(wheresql, distinctbylocale, getXWikiContext())); |
681 |
|
} |
682 |
|
|
683 |
|
|
684 |
|
|
685 |
|
|
686 |
|
@param |
687 |
|
@param |
688 |
|
@return |
689 |
|
@param |
690 |
|
@param |
691 |
|
@throws |
692 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
693 |
0 |
public List<Document> searchDocuments(String wheresql, boolean distinctbylocale, int nb, int start)... |
694 |
|
throws XWikiException |
695 |
|
{ |
696 |
0 |
return convert(this.xwiki.getStore().searchDocuments(wheresql, distinctbylocale, nb, start, getXWikiContext())); |
697 |
|
} |
698 |
|
|
699 |
|
|
700 |
|
|
701 |
|
|
702 |
|
|
703 |
|
|
704 |
|
|
705 |
|
|
706 |
|
|
707 |
|
|
708 |
|
|
709 |
|
|
710 |
|
|
711 |
|
|
712 |
|
|
713 |
|
|
714 |
|
|
715 |
|
|
716 |
|
@param |
717 |
|
|
718 |
|
@param |
719 |
|
@param |
720 |
|
@param |
721 |
|
@return |
722 |
|
@throws |
723 |
|
@deprecated |
724 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
725 |
0 |
@Deprecated... |
726 |
|
public List<String> searchDocuments(String parameterizedWhereClause, int maxResults, int startOffset, |
727 |
|
List<?> parameterValues) throws XWikiException |
728 |
|
{ |
729 |
0 |
return this.xwiki.getStore().searchDocumentsNames(parameterizedWhereClause, maxResults, startOffset, |
730 |
|
parameterValues, getXWikiContext()); |
731 |
|
} |
732 |
|
|
733 |
|
|
734 |
|
@link |
735 |
|
|
736 |
|
@see |
737 |
|
@deprecated |
738 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
739 |
0 |
@Deprecated... |
740 |
|
public List<String> searchDocuments(String parameterizedWhereClause, List<?> parameterValues) throws XWikiException |
741 |
|
{ |
742 |
0 |
return this.xwiki.getStore().searchDocumentsNames(parameterizedWhereClause, parameterValues, getXWikiContext()); |
743 |
|
} |
744 |
|
|
745 |
|
|
746 |
|
|
747 |
|
@link |
748 |
|
|
749 |
|
@param |
750 |
|
@param |
751 |
|
|
752 |
|
@param |
753 |
|
@param |
754 |
|
@param |
755 |
|
@return |
756 |
|
@see |
757 |
|
@throws |
758 |
|
@deprecated |
759 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
760 |
0 |
@Deprecated... |
761 |
|
public List<String> searchDocumentsNames(String wikiName, String parameterizedWhereClause, int maxResults, |
762 |
|
int startOffset, List<?> parameterValues) throws XWikiException |
763 |
|
{ |
764 |
0 |
String database = this.context.getWikiId(); |
765 |
|
|
766 |
0 |
try { |
767 |
0 |
this.context.setWikiId(wikiName); |
768 |
|
|
769 |
0 |
return searchDocuments(parameterizedWhereClause, maxResults, startOffset, parameterValues); |
770 |
|
} finally { |
771 |
0 |
this.context.setWikiId(database); |
772 |
|
} |
773 |
|
} |
774 |
|
|
775 |
|
|
776 |
|
|
777 |
|
@link |
778 |
|
|
779 |
|
@param |
780 |
|
|
781 |
|
@param |
782 |
|
@param |
783 |
|
@param |
784 |
|
@return |
785 |
|
@throws |
786 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
787 |
0 |
public List<String> searchSpacesNames(String parametrizedSqlClause, int nb, int start, List<?> parameterValues)... |
788 |
|
throws XWikiException |
789 |
|
{ |
790 |
0 |
return this.xwiki.getStore().search("select distinct doc.space from XWikiDocument doc " + parametrizedSqlClause, |
791 |
|
nb, start, parameterValues, this.context); |
792 |
|
} |
793 |
|
|
794 |
|
|
795 |
|
|
796 |
|
@link |
797 |
|
|
798 |
|
|
799 |
|
@param |
800 |
|
|
801 |
|
@param |
802 |
|
@param |
803 |
|
@param@link |
804 |
|
@return@link |
805 |
|
@throws |
806 |
|
@since |
807 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
808 |
2 |
public List<Attachment> searchAttachments(String parametrizedSqlClause, int nb, int start, List<?> parameterValues)... |
809 |
|
throws XWikiException |
810 |
|
{ |
811 |
2 |
return convertAttachments( |
812 |
|
this.xwiki.searchAttachments(parametrizedSqlClause, true, nb, start, parameterValues, this.context)); |
813 |
|
} |
814 |
|
|
815 |
|
|
816 |
|
|
817 |
|
|
818 |
|
@param |
819 |
|
@link |
820 |
|
@param@link |
821 |
|
@return |
822 |
|
@throws |
823 |
|
@see |
824 |
|
@since |
825 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
826 |
2 |
public int countAttachments(String parametrizedSqlClause, List<?> parameterValues) throws XWikiException... |
827 |
|
{ |
828 |
2 |
return this.xwiki.countAttachments(parametrizedSqlClause, parameterValues, this.context); |
829 |
|
} |
830 |
|
|
831 |
|
|
832 |
|
|
833 |
|
|
834 |
|
@param |
835 |
|
@return |
836 |
|
|
|
|
| 88% |
Uncovered Elements: 3 (25) |
Complexity: 7 |
Complexity Density: 0.47 |
|
837 |
6 |
public List<Document> wrapDocs(List<?> docs)... |
838 |
|
{ |
839 |
6 |
List<Document> result = new ArrayList<Document>(); |
840 |
6 |
if (docs != null) { |
841 |
6 |
for (java.lang.Object obj : docs) { |
842 |
8 |
try { |
843 |
8 |
if (obj instanceof XWikiDocument) { |
844 |
4 |
XWikiDocument doc = (XWikiDocument) obj; |
845 |
4 |
Document wrappedDoc = doc.newDocument(getXWikiContext()); |
846 |
4 |
result.add(wrappedDoc); |
847 |
4 |
} else if (obj instanceof Document) { |
848 |
2 |
result.add((Document) obj); |
849 |
2 |
} else if (obj instanceof String) { |
850 |
2 |
Document doc = getDocument(obj.toString()); |
851 |
2 |
if (doc != null) { |
852 |
2 |
result.add(doc); |
853 |
|
} |
854 |
|
} |
855 |
|
} catch (XWikiException ex) { |
856 |
|
} |
857 |
|
} |
858 |
|
} |
859 |
|
|
860 |
6 |
return result; |
861 |
|
} |
862 |
|
|
863 |
|
|
864 |
|
|
865 |
|
|
866 |
|
@param |
867 |
|
@return |
868 |
|
@deprecated |
869 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
870 |
0 |
@Deprecated... |
871 |
|
public String parseContent(String content) |
872 |
|
{ |
873 |
0 |
return this.xwiki.parseContent(content, getXWikiContext()); |
874 |
|
} |
875 |
|
|
876 |
|
|
877 |
|
|
878 |
|
|
879 |
|
|
880 |
|
|
881 |
|
@param |
882 |
|
@return |
883 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
884 |
71458 |
public String parseTemplate(String template)... |
885 |
|
{ |
886 |
71455 |
return this.xwiki.parseTemplate(template, getXWikiContext()); |
887 |
|
} |
888 |
|
|
889 |
|
|
890 |
|
|
891 |
|
|
892 |
|
|
893 |
|
|
894 |
|
@param |
895 |
|
@return |
896 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
897 |
0 |
public String renderTemplate(String template)... |
898 |
|
{ |
899 |
0 |
return this.xwiki.renderTemplate(template, getXWikiContext()); |
900 |
|
} |
901 |
|
|
902 |
|
|
903 |
|
|
904 |
|
|
905 |
|
|
906 |
|
@param |
907 |
|
@return |
908 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
909 |
0 |
public String invokeServletAndReturnAsString(String url)... |
910 |
|
{ |
911 |
0 |
return this.xwiki.invokeServletAndReturnAsString(url, getXWikiContext()); |
912 |
|
} |
913 |
|
|
914 |
|
|
915 |
|
|
916 |
|
|
917 |
|
|
918 |
|
|
919 |
|
@param |
920 |
|
@return |
921 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
922 |
14424 |
public String getSkinFile(String filename)... |
923 |
|
{ |
924 |
14423 |
return this.xwiki.getSkinFile(filename, getXWikiContext()); |
925 |
|
} |
926 |
|
|
927 |
|
|
928 |
|
|
929 |
|
|
930 |
|
|
931 |
|
|
932 |
|
@param |
933 |
|
@param |
934 |
|
|
935 |
|
@return |
936 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
937 |
7248 |
public String getSkinFile(String filename, boolean forceSkinAction)... |
938 |
|
{ |
939 |
7248 |
return this.xwiki.getSkinFile(filename, forceSkinAction, getXWikiContext()); |
940 |
|
} |
941 |
|
|
942 |
|
|
943 |
|
|
944 |
|
|
945 |
|
|
946 |
|
|
947 |
|
|
948 |
|
|
949 |
|
|
950 |
|
@return |
951 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
952 |
9003 |
public String getSkin()... |
953 |
|
{ |
954 |
9002 |
return this.xwiki.getSkin(getXWikiContext()); |
955 |
|
} |
956 |
|
|
957 |
|
|
958 |
|
|
959 |
|
|
960 |
|
|
961 |
|
|
962 |
|
@return |
963 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
964 |
0 |
public String getBaseSkin()... |
965 |
|
{ |
966 |
0 |
return this.xwiki.getBaseSkin(getXWikiContext()); |
967 |
|
} |
968 |
|
|
969 |
|
|
970 |
|
|
971 |
|
|
972 |
|
|
973 |
|
@return |
974 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
975 |
6827 |
public String getSpaceCopyright()... |
976 |
|
{ |
977 |
6827 |
return this.xwiki.getSpaceCopyright(getXWikiContext()); |
978 |
|
} |
979 |
|
|
980 |
|
|
981 |
|
|
982 |
|
|
983 |
|
|
984 |
|
@param |
985 |
|
@return |
986 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
987 |
2240 |
public String getXWikiPreference(String preference)... |
988 |
|
{ |
989 |
2234 |
return this.xwiki.getXWikiPreference(preference, getXWikiContext()); |
990 |
|
} |
991 |
|
|
992 |
|
|
993 |
|
|
994 |
|
|
995 |
|
|
996 |
|
@param |
997 |
|
@param |
998 |
|
@return |
999 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1000 |
0 |
public String getXWikiPreference(String preference, String defaultValue)... |
1001 |
|
{ |
1002 |
0 |
return this.xwiki.getXWikiPreference(preference, defaultValue, getXWikiContext()); |
1003 |
|
} |
1004 |
|
|
1005 |
|
|
1006 |
|
|
1007 |
|
|
1008 |
|
|
1009 |
|
|
1010 |
|
@param |
1011 |
|
@return |
1012 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1013 |
44821 |
public String getSpacePreference(String preference)... |
1014 |
|
{ |
1015 |
44821 |
return this.xwiki.getSpacePreference(preference, getXWikiContext()); |
1016 |
|
} |
1017 |
|
|
1018 |
|
|
1019 |
|
|
1020 |
|
|
1021 |
|
|
1022 |
|
|
1023 |
|
@param |
1024 |
|
@param |
1025 |
|
@return |
1026 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1027 |
0 |
public String getSpacePreference(String preference, String defaultValue)... |
1028 |
|
{ |
1029 |
0 |
return this.xwiki.getSpacePreference(preference, defaultValue, getXWikiContext()); |
1030 |
|
} |
1031 |
|
|
1032 |
|
|
1033 |
|
|
1034 |
|
|
1035 |
|
@param |
1036 |
|
@return |
1037 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1038 |
0 |
public String getSkinPreference(String preference)... |
1039 |
|
{ |
1040 |
0 |
return this.xwiki.getSkinPreference(preference, getXWikiContext()); |
1041 |
|
} |
1042 |
|
|
1043 |
|
|
1044 |
|
|
1045 |
|
|
1046 |
|
@param |
1047 |
|
@param |
1048 |
|
@return |
1049 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1050 |
1063 |
public String getSkinPreference(String preference, String defaultValue)... |
1051 |
|
{ |
1052 |
1062 |
return this.xwiki.getSkinPreference(preference, defaultValue, getXWikiContext()); |
1053 |
|
} |
1054 |
|
|
1055 |
|
|
1056 |
|
|
1057 |
|
|
1058 |
|
|
1059 |
|
|
1060 |
|
@param |
1061 |
|
@param |
1062 |
|
@return |
1063 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1064 |
0 |
public String getSpacePreferenceFor(String preference, String space)... |
1065 |
|
{ |
1066 |
0 |
return getSpacePreferenceFor(preference, space, ""); |
1067 |
|
} |
1068 |
|
|
1069 |
|
|
1070 |
|
|
1071 |
|
|
1072 |
|
|
1073 |
|
|
1074 |
|
@param |
1075 |
|
@param |
1076 |
|
@param |
1077 |
|
@return |
1078 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1079 |
0 |
public String getSpacePreferenceFor(String preference, String space, String defaultValue)... |
1080 |
|
{ |
1081 |
0 |
return this.xwiki.getSpacePreference(preference, space, defaultValue, getXWikiContext()); |
1082 |
|
} |
1083 |
|
|
1084 |
|
|
1085 |
|
|
1086 |
|
|
1087 |
|
|
1088 |
|
|
1089 |
|
@param |
1090 |
|
@param |
1091 |
|
@return |
1092 |
|
@since |
1093 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1094 |
0 |
public String getSpacePreferenceFor(String preference, SpaceReference spaceReference)... |
1095 |
|
{ |
1096 |
0 |
return this.xwiki.getSpacePreference(preference, spaceReference, getXWikiContext()); |
1097 |
|
} |
1098 |
|
|
1099 |
|
|
1100 |
|
|
1101 |
|
|
1102 |
|
|
1103 |
|
|
1104 |
|
@param |
1105 |
|
@param |
1106 |
|
@param |
1107 |
|
@return |
1108 |
|
@since |
1109 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1110 |
0 |
public String getSpacePreferenceFor(String preference, SpaceReference spaceReference, String defaultValue)... |
1111 |
|
{ |
1112 |
0 |
return this.xwiki.getSpacePreference(preference, spaceReference, defaultValue, getXWikiContext()); |
1113 |
|
} |
1114 |
|
|
1115 |
|
|
1116 |
|
|
1117 |
|
|
1118 |
|
|
1119 |
|
@param |
1120 |
|
@param |
1121 |
|
@return |
1122 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1123 |
0 |
public long getXWikiPreferenceAsLong(String preference, long defaultValue)... |
1124 |
|
{ |
1125 |
0 |
return this.xwiki.getXWikiPreferenceAsLong(preference, defaultValue, getXWikiContext()); |
1126 |
|
} |
1127 |
|
|
1128 |
|
|
1129 |
|
|
1130 |
|
|
1131 |
|
|
1132 |
|
@param |
1133 |
|
@return |
1134 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1135 |
0 |
public long getXWikiPreferenceAsLong(String preference)... |
1136 |
|
{ |
1137 |
0 |
return this.xwiki.getXWikiPreferenceAsLong(preference, getXWikiContext()); |
1138 |
|
} |
1139 |
|
|
1140 |
|
|
1141 |
|
|
1142 |
|
|
1143 |
|
|
1144 |
|
|
1145 |
|
@param |
1146 |
|
@param |
1147 |
|
@return |
1148 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1149 |
0 |
public long getSpacePreferenceAsLong(String preference, long defaultValue)... |
1150 |
|
{ |
1151 |
0 |
return this.xwiki.getSpacePreferenceAsLong(preference, defaultValue, getXWikiContext()); |
1152 |
|
} |
1153 |
|
|
1154 |
|
|
1155 |
|
|
1156 |
|
|
1157 |
|
|
1158 |
|
|
1159 |
|
@param |
1160 |
|
@return |
1161 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1162 |
0 |
public long getSpacePreferenceAsLong(String preference)... |
1163 |
|
{ |
1164 |
0 |
return this.xwiki.getSpacePreferenceAsLong(preference, getXWikiContext()); |
1165 |
|
} |
1166 |
|
|
1167 |
|
|
1168 |
|
|
1169 |
|
|
1170 |
|
|
1171 |
|
@param |
1172 |
|
@param |
1173 |
|
@return |
1174 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1175 |
118 |
public int getXWikiPreferenceAsInt(String preference, int defaultValue)... |
1176 |
|
{ |
1177 |
118 |
return this.xwiki.getXWikiPreferenceAsInt(preference, defaultValue, getXWikiContext()); |
1178 |
|
} |
1179 |
|
|
1180 |
|
|
1181 |
|
|
1182 |
|
|
1183 |
|
|
1184 |
|
@param |
1185 |
|
@return |
1186 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1187 |
0 |
public int getXWikiPreferenceAsInt(String preference)... |
1188 |
|
{ |
1189 |
0 |
return this.xwiki.getXWikiPreferenceAsInt(preference, getXWikiContext()); |
1190 |
|
} |
1191 |
|
|
1192 |
|
|
1193 |
|
|
1194 |
|
|
1195 |
|
|
1196 |
|
|
1197 |
|
@param |
1198 |
|
@param |
1199 |
|
@return |
1200 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1201 |
572 |
public int getSpacePreferenceAsInt(String preference, int defaultValue)... |
1202 |
|
{ |
1203 |
572 |
return this.xwiki.getSpacePreferenceAsInt(preference, defaultValue, getXWikiContext()); |
1204 |
|
} |
1205 |
|
|
1206 |
|
|
1207 |
|
|
1208 |
|
|
1209 |
|
|
1210 |
|
|
1211 |
|
@param |
1212 |
|
@return |
1213 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1214 |
0 |
public int getSpacePreferenceAsInt(String preference)... |
1215 |
|
{ |
1216 |
0 |
return this.xwiki.getSpacePreferenceAsInt(preference, getXWikiContext()); |
1217 |
|
} |
1218 |
|
|
1219 |
|
|
1220 |
|
|
1221 |
|
|
1222 |
|
|
1223 |
|
@param |
1224 |
|
@return |
1225 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1226 |
4797 |
public String getUserPreference(String preference)... |
1227 |
|
{ |
1228 |
4796 |
return this.xwiki.getUserPreference(preference, getXWikiContext()); |
1229 |
|
} |
1230 |
|
|
1231 |
|
|
1232 |
|
|
1233 |
|
|
1234 |
|
@param |
1235 |
|
@return |
1236 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1237 |
0 |
public String getUserPreferenceFromCookie(String preference)... |
1238 |
|
{ |
1239 |
0 |
return this.xwiki.getUserPreferenceFromCookie(preference, getXWikiContext()); |
1240 |
|
} |
1241 |
|
|
1242 |
|
|
1243 |
|
@link |
1244 |
|
|
1245 |
|
@return |
1246 |
|
@deprecated@link |
1247 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1248 |
0 |
@Deprecated... |
1249 |
|
public String getLanguagePreference() |
1250 |
|
{ |
1251 |
0 |
return this.xwiki.getLanguagePreference(getXWikiContext()); |
1252 |
|
} |
1253 |
|
|
1254 |
|
|
1255 |
|
|
1256 |
|
|
1257 |
|
|
1258 |
|
|
1259 |
|
|
1260 |
|
|
1261 |
|
@return |
1262 |
|
@since |
1263 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1264 |
0 |
public Locale getLocalePreference()... |
1265 |
|
{ |
1266 |
0 |
return this.xwiki.getLocalePreference(getXWikiContext()); |
1267 |
|
} |
1268 |
|
|
1269 |
|
|
1270 |
|
@link |
1271 |
|
|
1272 |
|
@return |
1273 |
|
@deprecated@link |
1274 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1275 |
0 |
@Deprecated... |
1276 |
|
public String getInterfaceLanguagePreference() |
1277 |
|
{ |
1278 |
0 |
return this.xwiki.getInterfaceLanguagePreference(getXWikiContext()); |
1279 |
|
} |
1280 |
|
|
1281 |
|
|
1282 |
|
|
1283 |
|
|
1284 |
|
|
1285 |
|
|
1286 |
|
@return |
1287 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1288 |
0 |
public Locale getInterfaceLocalePreference()... |
1289 |
|
{ |
1290 |
0 |
return this.xwiki.getInterfaceLocalePreference(getXWikiContext()); |
1291 |
|
} |
1292 |
|
|
1293 |
|
|
1294 |
|
@return |
1295 |
|
|
1296 |
|
|
1297 |
|
@see |
1298 |
|
|
|
|
| 80% |
Uncovered Elements: 1 (5) |
Complexity: 2 |
Complexity Density: 0.4 |
|
1299 |
49 |
public List<String> getWikiNames()... |
1300 |
|
{ |
1301 |
49 |
List<String> result = new ArrayList<String>(); |
1302 |
|
|
1303 |
49 |
try { |
1304 |
49 |
result = this.xwiki.getVirtualWikisDatabaseNames(getXWikiContext()); |
1305 |
|
} catch (Exception e) { |
1306 |
0 |
LOGGER.error("Failed to get the list of all wiki names", e); |
1307 |
|
} |
1308 |
|
|
1309 |
49 |
return result; |
1310 |
|
} |
1311 |
|
|
1312 |
|
|
1313 |
|
|
1314 |
|
|
1315 |
|
@return |
1316 |
|
@see |
1317 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1318 |
49 |
public boolean hasSubWikis()... |
1319 |
|
{ |
1320 |
49 |
return getWikiNames().size() > 1; |
1321 |
|
} |
1322 |
|
|
1323 |
|
|
1324 |
|
|
1325 |
|
|
1326 |
|
@return |
1327 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1328 |
9226 |
public boolean isMultiLingual()... |
1329 |
|
{ |
1330 |
9226 |
return this.xwiki.isMultiLingual(getXWikiContext()); |
1331 |
|
} |
1332 |
|
|
1333 |
|
|
1334 |
|
|
1335 |
|
|
1336 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
1337 |
0 |
public void flushCache()... |
1338 |
|
{ |
1339 |
0 |
if (hasProgrammingRights()) { |
1340 |
0 |
this.xwiki.flushCache(getXWikiContext()); |
1341 |
|
} |
1342 |
|
} |
1343 |
|
|
1344 |
|
|
1345 |
|
|
1346 |
|
|
1347 |
|
@return |
1348 |
|
|
1349 |
|
|
1350 |
|
|
1351 |
|
|
1352 |
|
|
1353 |
|
|
1354 |
|
|
1355 |
|
@throws |
1356 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1357 |
0 |
public int createUser() throws XWikiException... |
1358 |
|
{ |
1359 |
0 |
return createUser(false, "edit"); |
1360 |
|
} |
1361 |
|
|
1362 |
|
|
1363 |
|
|
1364 |
|
|
1365 |
|
|
1366 |
|
@param |
1367 |
|
@return |
1368 |
|
|
1369 |
|
|
1370 |
|
|
1371 |
|
|
1372 |
|
|
1373 |
|
|
1374 |
|
|
1375 |
|
@throws |
1376 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1377 |
0 |
public int createUser(boolean withValidation) throws XWikiException... |
1378 |
|
{ |
1379 |
0 |
return createUser(withValidation, "edit"); |
1380 |
|
} |
1381 |
|
|
1382 |
|
|
1383 |
|
|
1384 |
|
|
1385 |
|
|
1386 |
|
|
1387 |
|
|
1388 |
|
|
1389 |
|
@param |
1390 |
|
@param |
1391 |
|
@return |
1392 |
|
|
1393 |
|
|
1394 |
|
|
1395 |
|
|
1396 |
|
|
1397 |
|
|
1398 |
|
|
1399 |
|
@throws |
1400 |
|
|
|
|
| 0% |
Uncovered Elements: 14 (14) |
Complexity: 4 |
Complexity Density: 0.4 |
|
1401 |
0 |
public int createUser(boolean withValidation, String userRights) throws XWikiException... |
1402 |
|
{ |
1403 |
0 |
boolean registerRight; |
1404 |
0 |
try { |
1405 |
|
|
1406 |
|
|
1407 |
0 |
if (hasProgrammingRights()) { |
1408 |
0 |
registerRight = true; |
1409 |
|
} else { |
1410 |
0 |
registerRight = this.xwiki.getRightService().hasAccessLevel("register", getXWikiContext().getUser(), |
1411 |
|
"XWiki.XWikiPreferences", getXWikiContext()); |
1412 |
|
} |
1413 |
|
|
1414 |
0 |
if (registerRight) { |
1415 |
0 |
return this.xwiki.createUser(withValidation, userRights, getXWikiContext()); |
1416 |
|
} |
1417 |
|
|
1418 |
0 |
return -1; |
1419 |
|
} catch (Exception e) { |
1420 |
0 |
LOGGER.error("Failed to create user", e); |
1421 |
|
|
1422 |
0 |
return -10; |
1423 |
|
} |
1424 |
|
|
1425 |
|
} |
1426 |
|
|
1427 |
|
|
1428 |
|
|
1429 |
|
|
1430 |
|
|
1431 |
|
@param |
1432 |
|
@return |
1433 |
|
@throws |
1434 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1435 |
0 |
public int validateUser(boolean withConfirmEmail) throws XWikiException... |
1436 |
|
{ |
1437 |
0 |
return this.xwiki.validateUser(withConfirmEmail, getXWikiContext()); |
1438 |
|
} |
1439 |
|
|
1440 |
|
|
1441 |
|
|
1442 |
|
|
1443 |
|
@param |
1444 |
|
@throws |
1445 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
1446 |
0 |
public void addToAllGroup(String fullwikiname) throws XWikiException... |
1447 |
|
{ |
1448 |
0 |
if (hasProgrammingRights()) { |
1449 |
0 |
this.xwiki.setUserDefaultGroup(fullwikiname, getXWikiContext()); |
1450 |
|
} |
1451 |
|
} |
1452 |
|
|
1453 |
|
|
1454 |
|
|
1455 |
|
|
1456 |
|
@param |
1457 |
|
@param |
1458 |
|
@param |
1459 |
|
@param |
1460 |
|
@param |
1461 |
|
@throws |
1462 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
1463 |
0 |
public void sendConfirmationMail(String xwikiname, String password, String email, String add_message,... |
1464 |
|
String contentfield) throws XWikiException |
1465 |
|
{ |
1466 |
0 |
if (hasProgrammingRights()) { |
1467 |
0 |
this.xwiki.sendConfirmationEmail(xwikiname, password, email, add_message, contentfield, getXWikiContext()); |
1468 |
|
} |
1469 |
|
} |
1470 |
|
|
1471 |
|
|
1472 |
|
|
1473 |
|
|
1474 |
|
@param |
1475 |
|
@param |
1476 |
|
@param |
1477 |
|
@param |
1478 |
|
@throws |
1479 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
1480 |
0 |
public void sendConfirmationMail(String xwikiname, String password, String email, String contentfield)... |
1481 |
|
throws XWikiException |
1482 |
|
{ |
1483 |
0 |
if (hasProgrammingRights()) { |
1484 |
0 |
this.xwiki.sendConfirmationEmail(xwikiname, password, email, "", contentfield, getXWikiContext()); |
1485 |
|
} |
1486 |
|
} |
1487 |
|
|
1488 |
|
|
1489 |
|
|
1490 |
|
|
1491 |
|
@param |
1492 |
|
@param |
1493 |
|
@return |
1494 |
|
@throws |
1495 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1496 |
3 |
public boolean copyDocument(String docname, String targetdocname) throws XWikiException... |
1497 |
|
{ |
1498 |
3 |
return this.copyDocument(docname, targetdocname, null, null, null, false, false); |
1499 |
|
} |
1500 |
|
|
1501 |
|
|
1502 |
|
|
1503 |
|
|
1504 |
|
@param |
1505 |
|
@param |
1506 |
|
@param |
1507 |
|
@return |
1508 |
|
@throws |
1509 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1510 |
0 |
public boolean copyDocument(String docname, String targetdocname, String wikilocale) throws XWikiException... |
1511 |
|
{ |
1512 |
0 |
return this.copyDocument(docname, targetdocname, null, null, wikilocale, false, false); |
1513 |
|
} |
1514 |
|
|
1515 |
|
|
1516 |
|
|
1517 |
|
|
1518 |
|
@param |
1519 |
|
@param |
1520 |
|
@param |
1521 |
|
@param |
1522 |
|
@return |
1523 |
|
@throws |
1524 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1525 |
0 |
public boolean copyDocument(String docname, String sourceWiki, String targetWiki, String wikilocale)... |
1526 |
|
throws XWikiException |
1527 |
|
{ |
1528 |
0 |
return this.copyDocument(docname, docname, sourceWiki, targetWiki, wikilocale, true, false); |
1529 |
|
} |
1530 |
|
|
1531 |
|
|
1532 |
|
|
1533 |
|
|
1534 |
|
|
1535 |
|
@param |
1536 |
|
@param |
1537 |
|
@param |
1538 |
|
@param |
1539 |
|
@param |
1540 |
|
@return |
1541 |
|
@throws |
1542 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1543 |
0 |
public boolean copyDocument(String docname, String targetdocname, String sourceWiki, String targetWiki,... |
1544 |
|
String wikilocale, boolean reset) throws XWikiException |
1545 |
|
{ |
1546 |
0 |
return this.copyDocument(docname, targetdocname, sourceWiki, targetWiki, wikilocale, reset, false); |
1547 |
|
} |
1548 |
|
|
1549 |
|
|
1550 |
|
|
1551 |
|
|
1552 |
|
|
1553 |
|
@param |
1554 |
|
@param |
1555 |
|
@param |
1556 |
|
@param |
1557 |
|
@param |
1558 |
|
@param |
1559 |
|
@param |
1560 |
|
@return |
1561 |
|
@throws |
1562 |
|
|
|
|
| 63.6% |
Uncovered Elements: 4 (11) |
Complexity: 3 |
Complexity Density: 0.43 |
|
1563 |
3 |
public boolean copyDocument(String docname, String targetdocname, String sourceWiki, String targetWiki,... |
1564 |
|
String wikilocale, boolean reset, boolean force) throws XWikiException |
1565 |
|
{ |
1566 |
3 |
DocumentReference sourceDocumentReference = getCurrentMixedDocumentReferenceResolver().resolve(docname); |
1567 |
3 |
if (!StringUtils.isEmpty(sourceWiki)) { |
1568 |
0 |
sourceDocumentReference = sourceDocumentReference.replaceParent(sourceDocumentReference.getWikiReference(), |
1569 |
|
new WikiReference(sourceWiki)); |
1570 |
|
} |
1571 |
|
|
1572 |
3 |
DocumentReference targetDocumentReference = getCurrentMixedDocumentReferenceResolver().resolve(targetdocname); |
1573 |
3 |
if (!StringUtils.isEmpty(targetWiki)) { |
1574 |
0 |
targetDocumentReference = targetDocumentReference.replaceParent(targetDocumentReference.getWikiReference(), |
1575 |
|
new WikiReference(targetWiki)); |
1576 |
|
} |
1577 |
|
|
1578 |
3 |
return this.copyDocument(sourceDocumentReference, targetDocumentReference, wikilocale, reset, force); |
1579 |
|
} |
1580 |
|
|
1581 |
|
|
1582 |
|
|
1583 |
|
|
1584 |
|
|
1585 |
|
@param |
1586 |
|
@param |
1587 |
|
@param |
1588 |
|
@param |
1589 |
|
@param |
1590 |
|
@return |
1591 |
|
@throws |
1592 |
|
@since |
1593 |
|
|
|
|
| 66.7% |
Uncovered Elements: 3 (9) |
Complexity: 6 |
Complexity Density: 1.2 |
|
1594 |
3 |
public boolean copyDocument(DocumentReference sourceDocumentReference, DocumentReference targetDocumentReference,... |
1595 |
|
String wikilocale, boolean resetHistory, boolean overwrite) throws XWikiException |
1596 |
|
{ |
1597 |
|
|
1598 |
3 |
if (hasAccessLevel("view", getDefaultStringEntityReferenceSerializer().serialize(sourceDocumentReference))) { |
1599 |
3 |
String targetDocStringRef = getDefaultStringEntityReferenceSerializer().serialize(targetDocumentReference); |
1600 |
|
|
1601 |
|
|
1602 |
|
|
1603 |
|
|
1604 |
3 |
if (hasAccessLevel("edit", targetDocStringRef) |
1605 |
|
&& (!overwrite || !exists(targetDocumentReference) || hasAccessLevel("delete", targetDocStringRef))) { |
1606 |
|
|
1607 |
3 |
return this.xwiki.copyDocument(sourceDocumentReference, targetDocumentReference, wikilocale, |
1608 |
|
resetHistory, overwrite, true, getXWikiContext()); |
1609 |
|
} |
1610 |
|
} |
1611 |
|
|
1612 |
0 |
return false; |
1613 |
|
} |
1614 |
|
|
1615 |
|
|
1616 |
|
|
1617 |
|
|
1618 |
|
@param |
1619 |
|
@param |
1620 |
|
@param |
1621 |
|
@param |
1622 |
|
@param |
1623 |
|
@return |
1624 |
|
@throws |
1625 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
1626 |
0 |
public int copySpaceBetweenWikis(String space, String sourceWiki, String targetWiki, String locale, boolean clean)... |
1627 |
|
throws XWikiException |
1628 |
|
{ |
1629 |
0 |
if (hasProgrammingRights()) { |
1630 |
0 |
return this.xwiki.copySpaceBetweenWikis(space, sourceWiki, targetWiki, locale, clean, getXWikiContext()); |
1631 |
|
} |
1632 |
|
|
1633 |
0 |
return -1; |
1634 |
|
} |
1635 |
|
|
1636 |
|
|
1637 |
|
|
1638 |
|
|
1639 |
|
@param |
1640 |
|
@return |
1641 |
|
@throws |
1642 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1643 |
0 |
public String includeTopic(String topic) throws XWikiException... |
1644 |
|
{ |
1645 |
0 |
return includeTopic(topic, true); |
1646 |
|
} |
1647 |
|
|
1648 |
|
|
1649 |
|
|
1650 |
|
|
1651 |
|
|
1652 |
|
|
1653 |
|
@param |
1654 |
|
@return |
1655 |
|
@throws |
1656 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1657 |
72 |
public String includeForm(String topic) throws XWikiException... |
1658 |
|
{ |
1659 |
72 |
return includeForm(topic, true); |
1660 |
|
} |
1661 |
|
|
1662 |
|
|
1663 |
|
|
1664 |
|
|
1665 |
|
|
1666 |
|
@param |
1667 |
|
@param |
1668 |
|
@return |
1669 |
|
@throws |
1670 |
|
|
|
|
| 40% |
Uncovered Elements: 6 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
1671 |
78 |
public String includeTopic(String topic, boolean pre) throws XWikiException... |
1672 |
|
{ |
1673 |
78 |
String result = this.xwiki.include(topic, false, getXWikiContext()); |
1674 |
|
|
1675 |
78 |
if (pre) { |
1676 |
0 |
String includerSyntax = this.xwiki.getCurrentContentSyntaxId(null, this.context); |
1677 |
|
|
1678 |
0 |
if (includerSyntax != null && Syntax.XWIKI_1_0.toIdString().equals(includerSyntax)) { |
1679 |
0 |
result = "{pre}" + result + "{/pre}"; |
1680 |
|
} |
1681 |
|
} |
1682 |
|
|
1683 |
78 |
return result; |
1684 |
|
} |
1685 |
|
|
1686 |
|
|
1687 |
|
|
1688 |
|
|
1689 |
|
|
1690 |
|
|
1691 |
|
|
1692 |
|
@param |
1693 |
|
@param |
1694 |
|
@return |
1695 |
|
@throws |
1696 |
|
|
|
|
| 70% |
Uncovered Elements: 3 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
1697 |
72 |
public String includeForm(String topic, boolean pre) throws XWikiException... |
1698 |
|
{ |
1699 |
72 |
String result = this.xwiki.include(topic, true, getXWikiContext()); |
1700 |
|
|
1701 |
72 |
if (pre) { |
1702 |
72 |
String includerSyntax = this.xwiki.getCurrentContentSyntaxId(null, this.context); |
1703 |
|
|
1704 |
72 |
if (includerSyntax != null && Syntax.XWIKI_1_0.toIdString().equals(includerSyntax)) { |
1705 |
0 |
result = "{pre}" + result + "{/pre}"; |
1706 |
|
} |
1707 |
|
} |
1708 |
|
|
1709 |
72 |
return result; |
1710 |
|
} |
1711 |
|
|
1712 |
|
|
1713 |
|
|
1714 |
|
|
1715 |
|
@param |
1716 |
|
@return |
1717 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1718 |
1823 |
public boolean hasAccessLevel(String level)... |
1719 |
|
{ |
1720 |
1823 |
return hasAccessLevel(level, getXWikiContext().getUser(), getXWikiContext().getDoc().getFullName()); |
1721 |
|
} |
1722 |
|
|
1723 |
|
|
1724 |
|
|
1725 |
|
|
1726 |
|
@param |
1727 |
|
@param |
1728 |
|
@param |
1729 |
|
@return |
1730 |
|
|
|
|
| 66.7% |
Uncovered Elements: 1 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
1731 |
2483 |
public boolean hasAccessLevel(String level, String user, String docname)... |
1732 |
|
{ |
1733 |
2483 |
try { |
1734 |
2483 |
return this.xwiki.getRightService().hasAccessLevel(level, user, docname, getXWikiContext()); |
1735 |
|
} catch (Exception e) { |
1736 |
0 |
return false; |
1737 |
|
} |
1738 |
|
} |
1739 |
|
|
1740 |
|
|
1741 |
|
|
1742 |
|
|
1743 |
|
|
1744 |
|
|
1745 |
|
@return |
1746 |
|
|
1747 |
|
@throws |
1748 |
|
@deprecated |
1749 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1750 |
0 |
@Deprecated... |
1751 |
|
public List<String> getSpaces() throws XWikiException |
1752 |
|
{ |
1753 |
0 |
return this.xwiki.getSpaces(getXWikiContext()); |
1754 |
|
} |
1755 |
|
|
1756 |
|
|
1757 |
|
|
1758 |
|
|
1759 |
|
|
1760 |
|
|
1761 |
|
@param |
1762 |
|
@return |
1763 |
|
|
1764 |
|
@throws |
1765 |
|
@deprecated |
1766 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1767 |
0 |
@Deprecated... |
1768 |
|
public List<String> getSpaceDocsName(String spaceReference) throws XWikiException |
1769 |
|
{ |
1770 |
0 |
return this.xwiki.getSpaceDocsName(spaceReference, getXWikiContext()); |
1771 |
|
} |
1772 |
|
|
1773 |
|
|
1774 |
|
|
1775 |
|
|
1776 |
|
|
1777 |
|
@return |
1778 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1779 |
1109 |
public String getEncoding()... |
1780 |
|
{ |
1781 |
1109 |
return this.xwiki.getEncoding(); |
1782 |
|
} |
1783 |
|
|
1784 |
|
|
1785 |
|
|
1786 |
|
|
1787 |
|
|
1788 |
|
|
1789 |
|
|
1790 |
|
@param |
1791 |
|
@param |
1792 |
|
@return |
1793 |
|
@throws |
1794 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1795 |
4 |
public String getAttachmentURL(String fullname, String filename) throws XWikiException... |
1796 |
|
{ |
1797 |
4 |
return this.xwiki.getAttachmentURL(fullname, filename, getXWikiContext()); |
1798 |
|
} |
1799 |
|
|
1800 |
|
|
1801 |
|
|
1802 |
|
|
1803 |
|
|
1804 |
|
|
1805 |
|
|
1806 |
|
@param |
1807 |
|
@return |
1808 |
|
@throws |
1809 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1810 |
471 |
public String getURL(String fullname) throws XWikiException... |
1811 |
|
{ |
1812 |
471 |
return this.xwiki.getURL(fullname, "view", getXWikiContext()); |
1813 |
|
} |
1814 |
|
|
1815 |
|
|
1816 |
|
|
1817 |
|
|
1818 |
|
|
1819 |
|
|
1820 |
|
|
1821 |
|
@param |
1822 |
|
@return |
1823 |
|
@throws |
1824 |
|
@since |
1825 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1826 |
2410 |
public String getURL(EntityReference reference) throws XWikiException... |
1827 |
|
{ |
1828 |
2409 |
return this.xwiki.getURL(reference, getXWikiContext()); |
1829 |
|
} |
1830 |
|
|
1831 |
|
|
1832 |
|
|
1833 |
|
|
1834 |
|
|
1835 |
|
|
1836 |
|
|
1837 |
|
|
1838 |
|
@param |
1839 |
|
@param |
1840 |
|
@param |
1841 |
|
|
1842 |
|
@return |
1843 |
|
@throws |
1844 |
|
@since |
1845 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1846 |
24 |
public String getURL(EntityReference reference, String action, String querystring) throws XWikiException... |
1847 |
|
{ |
1848 |
24 |
return this.xwiki.getURL(reference, action, querystring, null, getXWikiContext()); |
1849 |
|
} |
1850 |
|
|
1851 |
|
|
1852 |
|
|
1853 |
|
|
1854 |
|
|
1855 |
|
|
1856 |
|
|
1857 |
|
@param |
1858 |
|
@return |
1859 |
|
@throws |
1860 |
|
@since |
1861 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1862 |
12249 |
public String getURL(DocumentReference reference) throws XWikiException... |
1863 |
|
{ |
1864 |
12249 |
return this.xwiki.getURL(reference, "view", getXWikiContext()); |
1865 |
|
} |
1866 |
|
|
1867 |
|
|
1868 |
|
|
1869 |
|
|
1870 |
|
|
1871 |
|
|
1872 |
|
|
1873 |
|
@param |
1874 |
|
@param |
1875 |
|
@return |
1876 |
|
@throws |
1877 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1878 |
3959 |
public String getURL(String fullname, String action) throws XWikiException... |
1879 |
|
{ |
1880 |
3958 |
return this.xwiki.getURL(fullname, action, getXWikiContext()); |
1881 |
|
} |
1882 |
|
|
1883 |
|
|
1884 |
|
|
1885 |
|
|
1886 |
|
|
1887 |
|
|
1888 |
|
|
1889 |
|
|
1890 |
|
@param |
1891 |
|
@param |
1892 |
|
@param |
1893 |
|
|
1894 |
|
@return |
1895 |
|
@throws |
1896 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1897 |
5547 |
public String getURL(String fullname, String action, String querystring) throws XWikiException... |
1898 |
|
{ |
1899 |
5547 |
return this.xwiki.getURL(fullname, action, querystring, getXWikiContext()); |
1900 |
|
} |
1901 |
|
|
1902 |
|
|
1903 |
|
|
1904 |
|
|
1905 |
|
|
1906 |
|
|
1907 |
|
|
1908 |
|
|
1909 |
|
@param |
1910 |
|
@param |
1911 |
|
@param |
1912 |
|
|
1913 |
|
@return |
1914 |
|
@throws |
1915 |
|
@since |
1916 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1917 |
1757 |
public String getURL(DocumentReference reference, String action, String querystring) throws XWikiException... |
1918 |
|
{ |
1919 |
1757 |
return this.xwiki.getURL(reference, action, querystring, null, getXWikiContext()); |
1920 |
|
} |
1921 |
|
|
1922 |
|
|
1923 |
|
|
1924 |
|
|
1925 |
|
|
1926 |
|
|
1927 |
|
|
1928 |
|
|
1929 |
|
@param |
1930 |
|
@param |
1931 |
|
@param |
1932 |
|
|
1933 |
|
@param |
1934 |
|
@return |
1935 |
|
@throws |
1936 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1937 |
0 |
public String getURL(String fullname, String action, String querystring, String anchor) throws XWikiException... |
1938 |
|
{ |
1939 |
0 |
return this.xwiki.getURL(fullname, action, querystring, anchor, getXWikiContext()); |
1940 |
|
} |
1941 |
|
|
1942 |
|
|
1943 |
|
|
1944 |
|
|
1945 |
|
|
1946 |
|
|
1947 |
|
@param |
1948 |
|
@return |
1949 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
1950 |
0 |
public String getRefererText(String referer)... |
1951 |
|
{ |
1952 |
0 |
try { |
1953 |
0 |
return this.xwiki.getRefererText(referer, getXWikiContext()); |
1954 |
|
} catch (Exception e) { |
1955 |
0 |
return ""; |
1956 |
|
} |
1957 |
|
} |
1958 |
|
|
1959 |
|
|
1960 |
|
|
1961 |
|
|
1962 |
|
|
1963 |
|
|
1964 |
|
@param |
1965 |
|
@param |
1966 |
|
@return |
1967 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
1968 |
0 |
public String getShortRefererText(String referer, int length)... |
1969 |
|
{ |
1970 |
0 |
try { |
1971 |
0 |
return this.xwiki.getRefererText(referer, getXWikiContext()).substring(0, length); |
1972 |
|
} catch (Exception e) { |
1973 |
0 |
return this.xwiki.getRefererText(referer, getXWikiContext()); |
1974 |
|
} |
1975 |
|
} |
1976 |
|
|
1977 |
|
|
1978 |
|
|
1979 |
|
|
1980 |
|
@param |
1981 |
|
@return |
1982 |
|
@since |
1983 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1984 |
156 |
public String getPlainUserName(DocumentReference userReference)... |
1985 |
|
{ |
1986 |
156 |
return this.xwiki.getPlainUserName(userReference, getXWikiContext()); |
1987 |
|
} |
1988 |
|
|
1989 |
|
|
1990 |
|
|
1991 |
|
|
1992 |
|
|
1993 |
|
@param |
1994 |
|
@return |
1995 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1996 |
1157 |
public String getUserName(String user)... |
1997 |
|
{ |
1998 |
1157 |
return this.xwiki.getUserName(user, null, getXWikiContext()); |
1999 |
|
} |
2000 |
|
|
2001 |
|
|
2002 |
|
|
2003 |
|
|
2004 |
|
|
2005 |
|
|
2006 |
|
@param |
2007 |
|
@param |
2008 |
|
@return |
2009 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2010 |
0 |
public String getUserName(String user, String format)... |
2011 |
|
{ |
2012 |
0 |
return this.xwiki.getUserName(user, format, getXWikiContext()); |
2013 |
|
} |
2014 |
|
|
2015 |
|
|
2016 |
|
|
2017 |
|
|
2018 |
|
|
2019 |
|
@param |
2020 |
|
@return |
2021 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
2022 |
0 |
public String getLocalUserName(String user)... |
2023 |
|
{ |
2024 |
0 |
try { |
2025 |
0 |
return this.xwiki.getUserName(user.substring(user.indexOf(":") + 1), null, getXWikiContext()); |
2026 |
|
} catch (Exception e) { |
2027 |
0 |
return this.xwiki.getUserName(user, null, getXWikiContext()); |
2028 |
|
} |
2029 |
|
} |
2030 |
|
|
2031 |
|
|
2032 |
|
|
2033 |
|
|
2034 |
|
|
2035 |
|
|
2036 |
|
|
2037 |
|
@param |
2038 |
|
@param |
2039 |
|
@return |
2040 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
2041 |
0 |
public String getLocalUserName(String user, String format)... |
2042 |
|
{ |
2043 |
0 |
try { |
2044 |
0 |
return this.xwiki.getUserName(user.substring(user.indexOf(":") + 1), format, getXWikiContext()); |
2045 |
|
} catch (Exception e) { |
2046 |
0 |
return this.xwiki.getUserName(user, format, getXWikiContext()); |
2047 |
|
} |
2048 |
|
} |
2049 |
|
|
2050 |
|
|
2051 |
|
|
2052 |
|
|
2053 |
|
|
2054 |
|
|
2055 |
|
@param |
2056 |
|
@param |
2057 |
|
@return |
2058 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2059 |
4204 |
public String getUserName(String user, boolean link)... |
2060 |
|
{ |
2061 |
4204 |
return this.xwiki.getUserName(user, null, link, getXWikiContext()); |
2062 |
|
} |
2063 |
|
|
2064 |
|
|
2065 |
|
|
2066 |
|
|
2067 |
|
|
2068 |
|
|
2069 |
|
|
2070 |
|
@param |
2071 |
|
@param |
2072 |
|
@param |
2073 |
|
@return |
2074 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2075 |
0 |
public String getUserName(String user, String format, boolean link)... |
2076 |
|
{ |
2077 |
0 |
return this.xwiki.getUserName(user, format, link, getXWikiContext()); |
2078 |
|
} |
2079 |
|
|
2080 |
|
|
2081 |
|
|
2082 |
|
|
2083 |
|
|
2084 |
|
|
2085 |
|
@param |
2086 |
|
@param |
2087 |
|
@return |
2088 |
|
|
|
|
| 66.7% |
Uncovered Elements: 1 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
2089 |
52 |
public String getLocalUserName(String user, boolean link)... |
2090 |
|
{ |
2091 |
52 |
try { |
2092 |
52 |
return this.xwiki.getUserName(user.substring(user.indexOf(":") + 1), null, link, getXWikiContext()); |
2093 |
|
} catch (Exception e) { |
2094 |
0 |
return this.xwiki.getUserName(user, null, link, getXWikiContext()); |
2095 |
|
} |
2096 |
|
} |
2097 |
|
|
2098 |
|
|
2099 |
|
|
2100 |
|
|
2101 |
|
|
2102 |
|
|
2103 |
|
|
2104 |
|
@param |
2105 |
|
@param |
2106 |
|
@param |
2107 |
|
@return |
2108 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
2109 |
0 |
public String getLocalUserName(String user, String format, boolean link)... |
2110 |
|
{ |
2111 |
0 |
try { |
2112 |
0 |
return this.xwiki.getUserName(user.substring(user.indexOf(":") + 1), format, link, getXWikiContext()); |
2113 |
|
} catch (Exception e) { |
2114 |
0 |
return this.xwiki.getUserName(user, format, link, getXWikiContext()); |
2115 |
|
} |
2116 |
|
} |
2117 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2118 |
3 |
public User getUser()... |
2119 |
|
{ |
2120 |
3 |
return this.xwiki.getUser(getXWikiContext()); |
2121 |
|
} |
2122 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2123 |
0 |
public User getUser(String username)... |
2124 |
|
{ |
2125 |
0 |
return this.xwiki.getUser(username, getXWikiContext()); |
2126 |
|
} |
2127 |
|
|
2128 |
|
|
2129 |
|
|
2130 |
|
|
2131 |
|
|
2132 |
|
@param |
2133 |
|
@return |
2134 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2135 |
1042 |
public String formatDate(Date date)... |
2136 |
|
{ |
2137 |
1042 |
return this.xwiki.formatDate(date, null, getXWikiContext()); |
2138 |
|
} |
2139 |
|
|
2140 |
|
|
2141 |
|
|
2142 |
|
|
2143 |
|
|
2144 |
|
|
2145 |
|
@param |
2146 |
|
@param |
2147 |
|
@return |
2148 |
|
@see |
2149 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2150 |
176 |
public String formatDate(Date date, String format)... |
2151 |
|
{ |
2152 |
176 |
return this.xwiki.formatDate(date, format, getXWikiContext()); |
2153 |
|
} |
2154 |
|
|
2155 |
|
|
2156 |
|
@return |
2157 |
|
|
2158 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2159 |
0 |
public String getUserTimeZone()... |
2160 |
|
{ |
2161 |
0 |
return this.xwiki.getUserTimeZone(this.context); |
2162 |
|
} |
2163 |
|
|
2164 |
|
|
2165 |
|
|
2166 |
|
@link |
2167 |
|
|
2168 |
|
|
2169 |
|
|
2170 |
|
|
2171 |
|
@param |
2172 |
|
@return |
2173 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2174 |
23812 |
public Api get(String name)... |
2175 |
|
{ |
2176 |
23812 |
return getPlugin(name); |
2177 |
|
} |
2178 |
|
|
2179 |
|
|
2180 |
|
|
2181 |
|
|
2182 |
|
@param |
2183 |
|
@return |
2184 |
|
|
|
|
| 66.7% |
Uncovered Elements: 1 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
2185 |
23851 |
public Api getPlugin(String name)... |
2186 |
|
{ |
2187 |
23851 |
return this.xwiki != null ? this.xwiki.getPluginApi(name, getXWikiContext()) : null; |
2188 |
|
} |
2189 |
|
|
2190 |
|
|
2191 |
|
|
2192 |
|
|
2193 |
|
@return |
2194 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2195 |
0 |
public String getAdType()... |
2196 |
|
{ |
2197 |
0 |
return this.xwiki.getAdType(getXWikiContext()); |
2198 |
|
} |
2199 |
|
|
2200 |
|
|
2201 |
|
|
2202 |
|
|
2203 |
|
@return |
2204 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2205 |
0 |
public String getAdClientId()... |
2206 |
|
{ |
2207 |
0 |
return this.xwiki.getAdClientId(getXWikiContext()); |
2208 |
|
} |
2209 |
|
|
2210 |
|
|
2211 |
|
|
2212 |
|
|
2213 |
|
@param |
2214 |
|
@param |
2215 |
|
@param |
2216 |
|
@return |
2217 |
|
@throws |
2218 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
2219 |
0 |
public String getURLContent(String surl, String username, String password) throws IOException... |
2220 |
|
{ |
2221 |
0 |
try { |
2222 |
0 |
return this.xwiki.getURLContent(surl, username, password, this.context); |
2223 |
|
} catch (Exception e) { |
2224 |
0 |
LOGGER.warn("Failed to retrieve content from [" + surl + "]", e); |
2225 |
0 |
return ""; |
2226 |
|
} |
2227 |
|
} |
2228 |
|
|
2229 |
|
|
2230 |
|
|
2231 |
|
|
2232 |
|
@param |
2233 |
|
@return |
2234 |
|
@throws |
2235 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
2236 |
0 |
public String getURLContent(String surl) throws IOException... |
2237 |
|
{ |
2238 |
0 |
try { |
2239 |
0 |
return this.xwiki.getURLContent(surl, this.context); |
2240 |
|
} catch (Exception e) { |
2241 |
0 |
LOGGER.warn("Failed to retrieve content from [" + surl + "]", e); |
2242 |
0 |
return ""; |
2243 |
|
} |
2244 |
|
} |
2245 |
|
|
2246 |
|
|
2247 |
|
|
2248 |
|
|
2249 |
|
@param |
2250 |
|
@param |
2251 |
|
@param |
2252 |
|
@param |
2253 |
|
@return |
2254 |
|
@throws |
2255 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
2256 |
0 |
public String getURLContent(String surl, String username, String password, int timeout) throws IOException... |
2257 |
|
{ |
2258 |
0 |
try { |
2259 |
0 |
return this.xwiki.getURLContent(surl, username, password, timeout, |
2260 |
|
this.xwiki.getHttpUserAgent(this.context)); |
2261 |
|
} catch (Exception e) { |
2262 |
0 |
return ""; |
2263 |
|
} |
2264 |
|
} |
2265 |
|
|
2266 |
|
|
2267 |
|
|
2268 |
|
|
2269 |
|
@param |
2270 |
|
@param |
2271 |
|
@return |
2272 |
|
@throws |
2273 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
2274 |
0 |
public String getURLContent(String surl, int timeout) throws IOException... |
2275 |
|
{ |
2276 |
0 |
try { |
2277 |
0 |
return this.xwiki.getURLContent(surl, timeout, this.xwiki.getHttpUserAgent(this.context)); |
2278 |
|
} catch (Exception e) { |
2279 |
0 |
return ""; |
2280 |
|
} |
2281 |
|
} |
2282 |
|
|
2283 |
|
|
2284 |
|
|
2285 |
|
|
2286 |
|
@param |
2287 |
|
@param |
2288 |
|
@param |
2289 |
|
@return |
2290 |
|
@throws |
2291 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
2292 |
0 |
public byte[] getURLContentAsBytes(String surl, String username, String password) throws IOException... |
2293 |
|
{ |
2294 |
0 |
try { |
2295 |
0 |
return this.xwiki.getURLContentAsBytes(surl, username, password, this.context); |
2296 |
|
} catch (Exception e) { |
2297 |
0 |
return null; |
2298 |
|
} |
2299 |
|
} |
2300 |
|
|
2301 |
|
|
2302 |
|
|
2303 |
|
|
2304 |
|
@param |
2305 |
|
@return |
2306 |
|
@throws |
2307 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
2308 |
0 |
public byte[] getURLContentAsBytes(String surl) throws IOException... |
2309 |
|
{ |
2310 |
0 |
try { |
2311 |
0 |
return this.xwiki.getURLContentAsBytes(surl, this.context); |
2312 |
|
} catch (Exception e) { |
2313 |
0 |
return null; |
2314 |
|
} |
2315 |
|
} |
2316 |
|
|
2317 |
|
|
2318 |
|
|
2319 |
|
|
2320 |
|
@param |
2321 |
|
@param |
2322 |
|
@return |
2323 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2324 |
0 |
public List<String> getIncludedMacros(String defaultSpace, String content)... |
2325 |
|
{ |
2326 |
0 |
return this.xwiki.getIncludedMacros(defaultSpace, content, getXWikiContext()); |
2327 |
|
} |
2328 |
|
|
2329 |
|
|
2330 |
|
|
2331 |
|
|
2332 |
|
@return |
2333 |
|
@see |
2334 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2335 |
6832 |
public boolean isReadOnly()... |
2336 |
|
{ |
2337 |
6832 |
return this.xwiki.isReadOnly(); |
2338 |
|
} |
2339 |
|
|
2340 |
|
|
2341 |
|
|
2342 |
|
|
2343 |
|
|
2344 |
|
|
2345 |
|
@param |
2346 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
2347 |
0 |
public void setReadOnly(boolean ro)... |
2348 |
|
{ |
2349 |
0 |
if (hasAdminRights()) { |
2350 |
0 |
this.xwiki.setReadOnly(ro); |
2351 |
|
} |
2352 |
|
} |
2353 |
|
|
2354 |
|
|
2355 |
|
|
2356 |
|
|
2357 |
|
|
2358 |
|
@throws |
2359 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
2360 |
0 |
public void refreshLinks() throws XWikiException... |
2361 |
|
{ |
2362 |
0 |
if (hasAdminRights()) { |
2363 |
0 |
this.xwiki.refreshLinks(getXWikiContext()); |
2364 |
|
} |
2365 |
|
} |
2366 |
|
|
2367 |
|
|
2368 |
|
|
2369 |
|
|
2370 |
|
@return |
2371 |
|
@throws |
2372 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2373 |
0 |
public boolean hasBacklinks() throws XWikiException... |
2374 |
|
{ |
2375 |
0 |
return this.xwiki.hasBacklinks(getXWikiContext()); |
2376 |
|
} |
2377 |
|
|
2378 |
|
|
2379 |
|
|
2380 |
|
|
2381 |
|
@return |
2382 |
|
@throws |
2383 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2384 |
0 |
public boolean hasTags() throws XWikiException... |
2385 |
|
{ |
2386 |
0 |
return this.xwiki.hasTags(getXWikiContext()); |
2387 |
|
} |
2388 |
|
|
2389 |
|
|
2390 |
|
|
2391 |
|
|
2392 |
|
|
2393 |
|
@return |
2394 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2395 |
118 |
public boolean hasEditComment()... |
2396 |
|
{ |
2397 |
118 |
return this.xwiki.hasEditComment(this.context); |
2398 |
|
} |
2399 |
|
|
2400 |
|
|
2401 |
|
|
2402 |
|
|
2403 |
|
|
2404 |
|
@return |
2405 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2406 |
100 |
public boolean isEditCommentFieldHidden()... |
2407 |
|
{ |
2408 |
100 |
return this.xwiki.isEditCommentFieldHidden(this.context); |
2409 |
|
} |
2410 |
|
|
2411 |
|
|
2412 |
|
|
2413 |
|
|
2414 |
|
|
2415 |
|
@return |
2416 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2417 |
34 |
public boolean isEditCommentSuggested()... |
2418 |
|
{ |
2419 |
34 |
return this.xwiki.isEditCommentSuggested(this.context); |
2420 |
|
} |
2421 |
|
|
2422 |
|
|
2423 |
|
|
2424 |
|
|
2425 |
|
|
2426 |
|
@return |
2427 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2428 |
68 |
public boolean isEditCommentMandatory()... |
2429 |
|
{ |
2430 |
68 |
return this.xwiki.isEditCommentMandatory(this.context); |
2431 |
|
} |
2432 |
|
|
2433 |
|
|
2434 |
|
|
2435 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2436 |
59 |
public boolean hasMinorEdit()... |
2437 |
|
{ |
2438 |
59 |
return this.xwiki.hasMinorEdit(this.context); |
2439 |
|
} |
2440 |
|
|
2441 |
|
|
2442 |
|
|
2443 |
|
|
2444 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2445 |
18 |
public boolean hasRecycleBin()... |
2446 |
|
{ |
2447 |
18 |
return this.xwiki.hasRecycleBin(this.context); |
2448 |
|
} |
2449 |
|
|
2450 |
|
|
2451 |
|
|
2452 |
|
|
2453 |
|
|
2454 |
|
@param |
2455 |
|
@param |
2456 |
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 5 |
Complexity Density: 0.71 |
|
2457 |
0 |
public boolean renamePage(Document doc, String newFullName)... |
2458 |
|
{ |
2459 |
0 |
try { |
2460 |
0 |
if (this.xwiki.exists(newFullName, getXWikiContext()) && !this.xwiki.getRightService() |
2461 |
|
.hasAccessLevel("delete", getXWikiContext().getUser(), newFullName, getXWikiContext())) { |
2462 |
0 |
return false; |
2463 |
|
} |
2464 |
0 |
if (this.xwiki.getRightService().hasAccessLevel("edit", getXWikiContext().getUser(), doc.getFullName(), |
2465 |
|
getXWikiContext())) { |
2466 |
0 |
this.xwiki.renamePage(doc.getFullName(), newFullName, getXWikiContext()); |
2467 |
|
} |
2468 |
|
} catch (XWikiException e) { |
2469 |
0 |
return false; |
2470 |
|
} |
2471 |
|
|
2472 |
0 |
return true; |
2473 |
|
} |
2474 |
|
|
2475 |
|
|
2476 |
|
|
2477 |
|
|
2478 |
|
|
2479 |
|
@return |
2480 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2481 |
27 |
public String getEditorPreference()... |
2482 |
|
{ |
2483 |
27 |
return this.xwiki.getEditorPreference(getXWikiContext()); |
2484 |
|
} |
2485 |
|
|
2486 |
|
|
2487 |
|
|
2488 |
|
|
2489 |
|
|
2490 |
|
@param |
2491 |
|
@return |
2492 |
|
@throws |
2493 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
2494 |
0 |
public java.lang.Object parseGroovyFromString(String script) throws XWikiException... |
2495 |
|
{ |
2496 |
0 |
if (hasProgrammingRights()) { |
2497 |
0 |
return this.xwiki.parseGroovyFromString(script, getXWikiContext()); |
2498 |
|
} |
2499 |
0 |
return "groovy_missingrights"; |
2500 |
|
} |
2501 |
|
|
2502 |
|
|
2503 |
|
|
2504 |
|
|
2505 |
|
|
2506 |
|
@param |
2507 |
|
@return |
2508 |
|
@throws |
2509 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
2510 |
0 |
public java.lang.Object parseGroovyFromPage(String script, String jarWikiPage) throws XWikiException... |
2511 |
|
{ |
2512 |
0 |
XWikiDocument doc = this.xwiki.getDocument(script, getXWikiContext()); |
2513 |
0 |
if (this.xwiki.getRightService().hasProgrammingRights(doc, getXWikiContext())) { |
2514 |
0 |
return this.xwiki.parseGroovyFromString(doc.getContent(), jarWikiPage, getXWikiContext()); |
2515 |
|
} |
2516 |
0 |
return "groovy_missingrights"; |
2517 |
|
} |
2518 |
|
|
2519 |
|
|
2520 |
|
|
2521 |
|
|
2522 |
|
|
2523 |
|
@param |
2524 |
|
@return |
2525 |
|
@throws |
2526 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
2527 |
0 |
public java.lang.Object parseGroovyFromPage(String fullname) throws XWikiException... |
2528 |
|
{ |
2529 |
0 |
XWikiDocument doc = this.xwiki.getDocument(fullname, getXWikiContext()); |
2530 |
0 |
if (this.xwiki.getRightService().hasProgrammingRights(doc, getXWikiContext())) { |
2531 |
0 |
return this.xwiki.parseGroovyFromString(doc.getContent(), getXWikiContext()); |
2532 |
|
} |
2533 |
0 |
return "groovy_missingrights"; |
2534 |
|
} |
2535 |
|
|
2536 |
|
|
2537 |
|
|
2538 |
|
|
2539 |
|
|
2540 |
|
@return |
2541 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2542 |
0 |
public String getMacroList()... |
2543 |
|
{ |
2544 |
0 |
return this.xwiki.getMacroList(getXWikiContext()); |
2545 |
|
} |
2546 |
|
|
2547 |
|
|
2548 |
|
|
2549 |
|
|
2550 |
|
@return |
2551 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2552 |
0 |
public String getWysiwygToolbars()... |
2553 |
|
{ |
2554 |
0 |
return this.xwiki.getWysiwygToolbars(getXWikiContext()); |
2555 |
|
} |
2556 |
|
|
2557 |
|
|
2558 |
|
|
2559 |
|
|
2560 |
|
|
2561 |
|
@param |
2562 |
|
@return |
2563 |
|
@throws |
2564 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2565 |
0 |
public com.xpn.xwiki.api.Object getObjectFromRequest(String className) throws XWikiException... |
2566 |
|
{ |
2567 |
0 |
return new com.xpn.xwiki.api.Object(this.xwiki.getObjectFromRequest(className, getXWikiContext()), |
2568 |
|
getXWikiContext()); |
2569 |
|
} |
2570 |
|
|
2571 |
|
|
2572 |
|
|
2573 |
|
|
2574 |
|
@return |
2575 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2576 |
0 |
public Document createDocument()... |
2577 |
|
{ |
2578 |
0 |
return new XWikiDocument().newDocument(getXWikiContext()); |
2579 |
|
} |
2580 |
|
|
2581 |
|
|
2582 |
|
|
2583 |
|
|
2584 |
|
|
2585 |
|
@param |
2586 |
|
@return |
2587 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2588 |
0 |
public String convertUsername(String username)... |
2589 |
|
{ |
2590 |
0 |
return this.xwiki.convertUsername(username, getXWikiContext()); |
2591 |
|
} |
2592 |
|
|
2593 |
|
|
2594 |
|
|
2595 |
|
|
2596 |
|
|
2597 |
|
@param |
2598 |
|
@return |
2599 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2600 |
0 |
public com.xpn.xwiki.api.PropertyClass getPropertyClassFromName(String propPath)... |
2601 |
|
{ |
2602 |
0 |
return new PropertyClass(this.xwiki.getPropertyClassFromName(propPath, getXWikiContext()), getXWikiContext()); |
2603 |
|
} |
2604 |
|
|
2605 |
|
|
2606 |
|
|
2607 |
|
|
2608 |
|
@param |
2609 |
|
@return |
2610 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2611 |
36 |
public String getUniquePageName(String name)... |
2612 |
|
{ |
2613 |
36 |
return this.xwiki.getUniquePageName(name, getXWikiContext()); |
2614 |
|
} |
2615 |
|
|
2616 |
|
|
2617 |
|
|
2618 |
|
|
2619 |
|
@param |
2620 |
|
@param |
2621 |
|
@return |
2622 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2623 |
0 |
public String getUniquePageName(String space, String name)... |
2624 |
|
{ |
2625 |
0 |
return this.xwiki.getUniquePageName(space, name, getXWikiContext()); |
2626 |
|
} |
2627 |
|
|
2628 |
|
|
2629 |
|
|
2630 |
|
|
2631 |
|
@param |
2632 |
|
@param |
2633 |
|
@param |
2634 |
|
@return |
2635 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2636 |
0 |
public String addTooltip(String html, String message, String params)... |
2637 |
|
{ |
2638 |
0 |
return this.xwiki.addTooltip(html, message, params, getXWikiContext()); |
2639 |
|
} |
2640 |
|
|
2641 |
|
|
2642 |
|
|
2643 |
|
|
2644 |
|
@param |
2645 |
|
@param |
2646 |
|
@return |
2647 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2648 |
0 |
public String addTooltip(String html, String message)... |
2649 |
|
{ |
2650 |
0 |
return this.xwiki.addTooltip(html, message, getXWikiContext()); |
2651 |
|
} |
2652 |
|
|
2653 |
|
|
2654 |
|
|
2655 |
|
|
2656 |
|
@return |
2657 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2658 |
0 |
public String addTooltipJS()... |
2659 |
|
{ |
2660 |
0 |
return this.xwiki.addTooltipJS(getXWikiContext()); |
2661 |
|
} |
2662 |
|
|
2663 |
|
|
2664 |
|
|
2665 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2666 |
0 |
public String addMandatory()... |
2667 |
|
{ |
2668 |
0 |
return this.xwiki.addMandatory(getXWikiContext()); |
2669 |
|
} |
2670 |
|
|
2671 |
|
|
2672 |
|
|
2673 |
|
|
2674 |
|
|
2675 |
|
@link |
2676 |
|
|
2677 |
|
|
2678 |
|
|
2679 |
|
|
2680 |
|
@param |
2681 |
|
|
2682 |
|
@return |
2683 |
|
|
2684 |
|
|
2685 |
|
@throws |
2686 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
2687 |
456 |
public Class getClass(String documentName) throws XWikiException... |
2688 |
|
{ |
2689 |
|
|
2690 |
|
|
2691 |
456 |
DocumentReference docReference = getCurrentMixedDocumentReferenceResolver().resolve(documentName); |
2692 |
456 |
return new Class(this.xwiki.getDocument(docReference, this.context).getXClass(), this.context); |
2693 |
|
} |
2694 |
|
|
2695 |
|
|
2696 |
|
|
2697 |
|
|
2698 |
|
@param |
2699 |
|
@return |
2700 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 2 |
Complexity Density: 0.29 |
|
2701 |
0 |
public String getCounter(String name)... |
2702 |
|
{ |
2703 |
0 |
XWikiEngineContext econtext = this.context.getEngineContext(); |
2704 |
0 |
Integer counter = (Integer) econtext.getAttribute(name); |
2705 |
0 |
if (counter == null) { |
2706 |
0 |
counter = 0; |
2707 |
|
} |
2708 |
0 |
counter = counter.intValue() + 1; |
2709 |
0 |
econtext.setAttribute(name, counter); |
2710 |
|
|
2711 |
0 |
return counter.toString(); |
2712 |
|
} |
2713 |
|
|
2714 |
|
|
2715 |
|
|
2716 |
|
|
2717 |
|
@return |
2718 |
|
@throws |
2719 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2720 |
0 |
public XWikiUser checkAuth() throws XWikiException... |
2721 |
|
{ |
2722 |
0 |
return this.context.getWiki().getAuthService().checkAuth(this.context); |
2723 |
|
} |
2724 |
|
|
2725 |
|
|
2726 |
|
|
2727 |
|
|
2728 |
|
|
2729 |
|
@param |
2730 |
|
@param |
2731 |
|
@param |
2732 |
|
@return |
2733 |
|
@throws |
2734 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2735 |
0 |
public XWikiUser checkAuth(String username, String password, String rememberme) throws XWikiException... |
2736 |
|
{ |
2737 |
0 |
return this.context.getWiki().getAuthService().checkAuth(username, password, rememberme, this.context); |
2738 |
|
} |
2739 |
|
|
2740 |
|
|
2741 |
|
|
2742 |
|
|
2743 |
|
@return |
2744 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2745 |
0 |
public StatsService getStatsService()... |
2746 |
|
{ |
2747 |
0 |
return this.statsService; |
2748 |
|
} |
2749 |
|
|
2750 |
|
|
2751 |
|
|
2752 |
|
|
2753 |
|
|
2754 |
|
@return |
2755 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2756 |
14 |
public CriteriaService getCriteriaService()... |
2757 |
|
{ |
2758 |
14 |
return this.criteriaService; |
2759 |
|
} |
2760 |
|
|
2761 |
|
|
2762 |
|
@return |
2763 |
|
@deprecated |
2764 |
|
|
2765 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2766 |
0 |
@Deprecated... |
2767 |
|
public List<String> getConfiguredSyntaxes() |
2768 |
|
{ |
2769 |
0 |
return this.xwiki.getConfiguredSyntaxes(); |
2770 |
|
} |
2771 |
|
|
2772 |
|
|
2773 |
|
|
2774 |
|
|
2775 |
|
|
2776 |
|
@param |
2777 |
|
@return |
2778 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2779 |
0 |
public String getServletPath(String wikiName)... |
2780 |
|
{ |
2781 |
0 |
return this.xwiki.getServletPath(wikiName, this.context); |
2782 |
|
} |
2783 |
|
|
2784 |
|
|
2785 |
|
|
2786 |
|
|
2787 |
|
|
2788 |
|
@return |
2789 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2790 |
1063 |
public String getServletPath()... |
2791 |
|
{ |
2792 |
1063 |
return this.xwiki.getServletPath(this.context.getWikiId(), this.context); |
2793 |
|
} |
2794 |
|
|
2795 |
|
|
2796 |
|
|
2797 |
|
|
2798 |
|
|
2799 |
|
@return |
2800 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2801 |
1063 |
public String getWebAppPath()... |
2802 |
|
{ |
2803 |
1063 |
return this.xwiki.getWebAppPath(this.context); |
2804 |
|
} |
2805 |
|
|
2806 |
|
|
2807 |
|
@return |
2808 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2809 |
0 |
public String getDefaultDocumentSyntax()... |
2810 |
|
{ |
2811 |
0 |
return this.xwiki.getDefaultDocumentSyntax(); |
2812 |
|
} |
2813 |
|
|
2814 |
|
|
2815 |
|
|
2816 |
|
|
2817 |
|
|
2818 |
|
|
2819 |
|
@param |
2820 |
|
@param |
2821 |
|
@return@link |
2822 |
|
|
|
|
| 94.7% |
Uncovered Elements: 1 (19) |
Complexity: 8 |
Complexity Density: 0.62 |
|
2823 |
5775 |
public Syntax getAvailableRendererSyntax(String syntaxType, String syntaxVersion)... |
2824 |
|
{ |
2825 |
5775 |
Syntax syntax = null; |
2826 |
|
|
2827 |
5775 |
try { |
2828 |
5775 |
List<PrintRendererFactory> factories = |
2829 |
|
Utils.getContextComponentManager().getInstanceList((Type) PrintRendererFactory.class); |
2830 |
5775 |
for (PrintRendererFactory factory : factories) { |
2831 |
45978 |
Syntax factorySyntax = factory.getSyntax(); |
2832 |
45971 |
if (syntaxVersion != null) { |
2833 |
7 |
if (factorySyntax.getType().getId().equalsIgnoreCase(syntaxType) |
2834 |
|
&& factorySyntax.getVersion().equals(syntaxVersion)) { |
2835 |
2 |
syntax = factorySyntax; |
2836 |
2 |
break; |
2837 |
|
} |
2838 |
|
} else { |
2839 |
|
|
2840 |
|
|
2841 |
|
|
2842 |
45967 |
if (factorySyntax.getType().getId().equalsIgnoreCase(syntaxType) |
2843 |
|
&& (syntax == null || factorySyntax.getVersion().compareTo(syntax.getVersion()) > 0)) { |
2844 |
5207 |
syntax = factorySyntax; |
2845 |
|
} |
2846 |
|
} |
2847 |
|
} |
2848 |
|
} catch (ComponentLookupException e) { |
2849 |
0 |
LOGGER.error("Failed to lookup available renderer syntaxes", e); |
2850 |
|
} |
2851 |
|
|
2852 |
5774 |
return syntax; |
2853 |
|
} |
2854 |
|
|
2855 |
|
|
2856 |
|
@return |
2857 |
|
|
2858 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2859 |
47 |
public boolean hasSectionEdit()... |
2860 |
|
{ |
2861 |
47 |
return this.xwiki.hasSectionEdit(getXWikiContext()); |
2862 |
|
} |
2863 |
|
|
2864 |
|
|
2865 |
|
@return |
2866 |
|
|
2867 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2868 |
47 |
public long getSectionEditingDepth()... |
2869 |
|
{ |
2870 |
47 |
return this.xwiki.getSectionEditingDepth(); |
2871 |
|
} |
2872 |
|
|
2873 |
|
|
2874 |
|
@return |
2875 |
|
|
2876 |
|
|
2877 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2878 |
212 |
public boolean isTitleInCompatibilityMode()... |
2879 |
|
{ |
2880 |
212 |
return this.xwiki.isTitleInCompatibilityMode(); |
2881 |
|
} |
2882 |
|
|
2883 |
|
|
2884 |
|
|
2885 |
|
|
2886 |
|
|
2887 |
|
|
2888 |
|
@link |
2889 |
|
|
2890 |
|
|
2891 |
|
|
2892 |
|
@link |
2893 |
|
|
2894 |
|
@return |
2895 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
2896 |
182 |
public String getCurrentContentSyntaxId()... |
2897 |
|
{ |
2898 |
182 |
return this.xwiki.getCurrentContentSyntaxId(getXWikiContext()); |
2899 |
|
} |
2900 |
|
} |