1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.rendering.internal.configuration; |
21 |
|
|
22 |
|
import java.util.Arrays; |
23 |
|
import java.util.List; |
24 |
|
import java.util.Properties; |
25 |
|
|
26 |
|
import javax.inject.Inject; |
27 |
|
import javax.inject.Singleton; |
28 |
|
|
29 |
|
import org.xwiki.component.annotation.Component; |
30 |
|
import org.xwiki.configuration.ConfigurationSource; |
31 |
|
import org.xwiki.rendering.configuration.RenderingConfiguration; |
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
@version |
37 |
|
@since |
38 |
|
|
39 |
|
@Component |
40 |
|
@Singleton |
|
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 3 |
Complexity Density: 1 |
|
41 |
|
public class XWikiRenderingConfiguration implements RenderingConfiguration |
42 |
|
{ |
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
private static final String PREFIX = "rendering."; |
47 |
|
|
48 |
|
|
49 |
|
@see |
50 |
|
|
51 |
|
private static final String DEFAULT_LINK_LABEL_FORMAT = "%np"; |
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
@Inject |
57 |
|
private ConfigurationSource configuration; |
58 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
59 |
20 |
@Override... |
60 |
|
public String getLinkLabelFormat() |
61 |
|
{ |
62 |
20 |
return this.configuration.getProperty(PREFIX + "linkLabelFormat", DEFAULT_LINK_LABEL_FORMAT); |
63 |
|
} |
64 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
65 |
0 |
@Override... |
66 |
|
public Properties getInterWikiDefinitions() |
67 |
|
{ |
68 |
0 |
return this.configuration.getProperty(PREFIX + "interWikiDefinitions", Properties.class); |
69 |
|
} |
70 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
71 |
7191 |
@Override... |
72 |
|
public List<String> getTransformationNames() |
73 |
|
{ |
74 |
7191 |
return this.configuration.getProperty(PREFIX + "transformations", Arrays.asList("macro", "icon")); |
75 |
|
} |
76 |
|
} |