1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.display.internal; |
21 |
|
|
22 |
|
import org.xwiki.rendering.syntax.Syntax; |
23 |
|
|
24 |
|
|
25 |
|
@link |
26 |
|
|
27 |
|
@version |
28 |
|
@since |
29 |
|
|
|
|
| 97.7% |
Uncovered Elements: 1 (44) |
Complexity: 18 |
Complexity Density: 0.67 |
|
30 |
|
public class DocumentDisplayerParameters implements Cloneable |
31 |
|
{ |
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
private String sectionId; |
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
private boolean titleDisplayed; |
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
private boolean executionContextIsolated; |
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
private boolean transformationContextIsolated = true; |
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
private boolean transformationContextRestricted; |
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
private boolean contentTransformed = true; |
67 |
|
|
68 |
|
|
69 |
|
|
70 |
|
|
71 |
|
|
72 |
|
private boolean contentTranslated; |
73 |
|
|
74 |
|
|
75 |
|
|
76 |
|
|
77 |
|
private Syntax targetSyntax; |
78 |
|
|
79 |
|
|
80 |
|
@return |
81 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
82 |
7320 |
public String getSectionId()... |
83 |
|
{ |
84 |
7320 |
return sectionId; |
85 |
|
} |
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
@param |
91 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
92 |
2191 |
public void setSectionId(String sectionId)... |
93 |
|
{ |
94 |
2191 |
this.sectionId = sectionId; |
95 |
|
} |
96 |
|
|
97 |
|
|
98 |
|
@return |
99 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
100 |
29204 |
public boolean isTitleDisplayed()... |
101 |
|
{ |
102 |
29201 |
return titleDisplayed; |
103 |
|
} |
104 |
|
|
105 |
|
|
106 |
|
|
107 |
|
|
108 |
|
@param |
109 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
110 |
21276 |
public void setTitleDisplayed(boolean titleDisplayed)... |
111 |
|
{ |
112 |
21276 |
this.titleDisplayed = titleDisplayed; |
113 |
|
} |
114 |
|
|
115 |
|
|
116 |
|
@return |
117 |
|
|
118 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
119 |
38362 |
public boolean isExecutionContextIsolated()... |
120 |
|
{ |
121 |
38362 |
return executionContextIsolated; |
122 |
|
} |
123 |
|
|
124 |
|
|
125 |
|
|
126 |
|
|
127 |
|
@param |
128 |
|
|
129 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
130 |
29662 |
public void setExecutionContextIsolated(boolean executionContextIsolated)... |
131 |
|
{ |
132 |
29664 |
this.executionContextIsolated = executionContextIsolated; |
133 |
|
} |
134 |
|
|
135 |
|
|
136 |
|
@return |
137 |
|
|
138 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
139 |
26036 |
public boolean isTransformationContextIsolated()... |
140 |
|
{ |
141 |
26035 |
return transformationContextIsolated; |
142 |
|
} |
143 |
|
|
144 |
|
|
145 |
|
|
146 |
|
|
147 |
|
@param |
148 |
|
|
149 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
150 |
8385 |
public void setTransformationContextIsolated(boolean transformationContextIsolated)... |
151 |
|
{ |
152 |
8384 |
this.transformationContextIsolated = transformationContextIsolated; |
153 |
|
} |
154 |
|
|
155 |
|
|
156 |
|
@return |
157 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
158 |
6372 |
public boolean isTransformationContextRestricted()... |
159 |
|
{ |
160 |
6372 |
return transformationContextRestricted; |
161 |
|
} |
162 |
|
|
163 |
|
|
164 |
|
|
165 |
|
|
166 |
|
@param |
167 |
|
|
168 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
169 |
7155 |
public void setTransformationContextRestricted(boolean transformationContextRestricted)... |
170 |
|
{ |
171 |
7155 |
this.transformationContextRestricted = transformationContextRestricted; |
172 |
|
} |
173 |
|
|
174 |
|
|
175 |
|
@return |
176 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
177 |
43538 |
public boolean isContentTransformed()... |
178 |
|
{ |
179 |
43539 |
return contentTransformed; |
180 |
|
} |
181 |
|
|
182 |
|
|
183 |
|
|
184 |
|
|
185 |
|
@param |
186 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
187 |
2191 |
public void setContentTransformed(boolean contentTransformed)... |
188 |
|
{ |
189 |
2191 |
this.contentTransformed = contentTransformed; |
190 |
|
} |
191 |
|
|
192 |
|
|
193 |
|
@return |
194 |
|
|
195 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
196 |
7320 |
public boolean isContentTranslated()... |
197 |
|
{ |
198 |
7320 |
return contentTranslated; |
199 |
|
} |
200 |
|
|
201 |
|
|
202 |
|
|
203 |
|
|
204 |
|
@param |
205 |
|
|
206 |
|
|
207 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
208 |
7593 |
public void setContentTranslated(boolean contentTranslated)... |
209 |
|
{ |
210 |
7593 |
this.contentTranslated = contentTranslated; |
211 |
|
} |
212 |
|
|
213 |
|
|
214 |
|
@return |
215 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
216 |
8 |
public Syntax getTargetSyntax()... |
217 |
|
{ |
218 |
8 |
return this.targetSyntax; |
219 |
|
} |
220 |
|
|
221 |
|
|
222 |
|
@param |
223 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
224 |
27222 |
public void setTargetSyntax(Syntax targetSyntax)... |
225 |
|
{ |
226 |
27222 |
this.targetSyntax = targetSyntax; |
227 |
|
} |
228 |
|
|
|
|
| 90.9% |
Uncovered Elements: 1 (11) |
Complexity: 2 |
Complexity Density: 0.18 |
|
229 |
1225 |
@Override... |
230 |
|
public DocumentDisplayerParameters clone() |
231 |
|
{ |
232 |
1225 |
DocumentDisplayerParameters clone; |
233 |
1225 |
try { |
234 |
1225 |
clone = (DocumentDisplayerParameters) super.clone(); |
235 |
|
} catch (CloneNotSupportedException e) { |
236 |
|
|
237 |
0 |
throw new RuntimeException("Failed to clone object", e); |
238 |
|
} |
239 |
1225 |
clone.setContentTransformed(contentTransformed); |
240 |
1225 |
clone.setContentTranslated(contentTranslated); |
241 |
1225 |
clone.setExecutionContextIsolated(executionContextIsolated); |
242 |
1225 |
clone.setSectionId(sectionId); |
243 |
1225 |
clone.setTitleDisplayed(titleDisplayed); |
244 |
1225 |
clone.setTransformationContextIsolated(transformationContextIsolated); |
245 |
1225 |
return clone; |
246 |
|
} |
247 |
|
} |