1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package com.xpn.xwiki.doc; |
21 |
|
|
22 |
|
import java.util.ArrayList; |
23 |
|
import java.util.Collection; |
24 |
|
import java.util.Date; |
25 |
|
import java.util.Iterator; |
26 |
|
import java.util.List; |
27 |
|
import java.util.Set; |
28 |
|
import java.util.SortedMap; |
29 |
|
import java.util.SortedSet; |
30 |
|
import java.util.TreeMap; |
31 |
|
import java.util.TreeSet; |
32 |
|
|
33 |
|
import org.suigeneris.jrcs.rcs.Version; |
34 |
|
import org.suigeneris.jrcs.util.ToString; |
35 |
|
|
36 |
|
import com.xpn.xwiki.XWikiContext; |
37 |
|
import com.xpn.xwiki.XWikiException; |
38 |
|
import com.xpn.xwiki.doc.rcs.XWikiPatch; |
39 |
|
import com.xpn.xwiki.doc.rcs.XWikiRCSArchive; |
40 |
|
import com.xpn.xwiki.doc.rcs.XWikiRCSNodeContent; |
41 |
|
import com.xpn.xwiki.doc.rcs.XWikiRCSNodeId; |
42 |
|
import com.xpn.xwiki.doc.rcs.XWikiRCSNodeInfo; |
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
@version |
48 |
|
|
|
|
| 94.6% |
Uncovered Elements: 12 (221) |
Complexity: 55 |
Complexity Density: 0.36 |
|
49 |
|
public class XWikiDocumentArchive |
50 |
|
{ |
51 |
|
|
52 |
|
private long id; |
53 |
|
|
54 |
|
|
55 |
|
private SortedMap<Version, XWikiRCSNodeInfo> versionToNode = new TreeMap<Version, XWikiRCSNodeInfo>(); |
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
private SortedSet<Version> fullVersions = new TreeSet<Version>(); |
61 |
|
|
62 |
|
|
63 |
|
@link |
64 |
|
private Set<XWikiRCSNodeInfo> deletedNodes = new TreeSet<XWikiRCSNodeInfo>(); |
65 |
|
|
66 |
|
@link |
67 |
|
private Set<XWikiRCSNodeInfo> updatedNodeInfos = new TreeSet<XWikiRCSNodeInfo>(); |
68 |
|
|
69 |
|
@link |
70 |
|
private Set<XWikiRCSNodeContent> updatedNodeContents = new TreeSet<XWikiRCSNodeContent>(); |
71 |
|
|
72 |
|
@param@link |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
73 |
4101 |
public XWikiDocumentArchive(long id)... |
74 |
|
{ |
75 |
4101 |
this(); |
76 |
4101 |
setId(id); |
77 |
|
} |
78 |
|
|
79 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
80 |
4105 |
public XWikiDocumentArchive()... |
81 |
|
{ |
82 |
|
} |
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
@param |
87 |
|
@param |
88 |
|
@return |
89 |
|
|
|
|
| 81.8% |
Uncovered Elements: 2 (11) |
Complexity: 3 |
Complexity Density: 0.43 |
|
90 |
11 |
protected Version createNextVersion(Version cur, boolean isMinor)... |
91 |
|
{ |
92 |
11 |
Version result; |
93 |
11 |
if (cur == null) { |
94 |
4 |
result = new Version(1, 1); |
95 |
7 |
} else if (!isMinor) { |
96 |
7 |
result = cur.getBase(1).next().newBranch(1); |
97 |
|
} else { |
98 |
0 |
result = cur.next(); |
99 |
|
} |
100 |
11 |
return result; |
101 |
|
} |
102 |
|
|
103 |
|
@param |
|
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
104 |
10601 |
protected void updateNode(XWikiRCSNodeInfo node)... |
105 |
|
{ |
106 |
10601 |
Version ver = node.getId().getVersion(); |
107 |
10601 |
this.versionToNode.put(ver, node); |
108 |
10601 |
if (!node.isDiff()) { |
109 |
7762 |
this.fullVersions.add(ver); |
110 |
|
} else { |
111 |
2839 |
this.fullVersions.remove(ver); |
112 |
|
} |
113 |
|
} |
114 |
|
|
115 |
|
|
116 |
|
|
117 |
|
|
118 |
|
@param |
119 |
|
@param |
120 |
|
@param |
121 |
|
@return |
122 |
|
@throws |
123 |
|
|
|
|
| 95% |
Uncovered Elements: 1 (20) |
Complexity: 5 |
Complexity Density: 0.36 |
|
124 |
5752 |
protected XWikiRCSNodeContent makePatch(XWikiRCSNodeInfo newnode, XWikiDocument doc,... |
125 |
|
XWikiContext context) throws XWikiException |
126 |
|
{ |
127 |
5752 |
XWikiRCSNodeContent result = new XWikiRCSNodeContent(); |
128 |
5752 |
result.setPatch(new XWikiPatch().setFullVersion(doc, context)); |
129 |
5752 |
newnode.setContent(result); |
130 |
5752 |
XWikiRCSNodeInfo latestNode = getLatestNode(); |
131 |
5752 |
if (latestNode != null) { |
132 |
408 |
int nodesCount = getNodes().size(); |
133 |
408 |
int nodesPerFull = |
134 |
408 |
context.getWiki() == null ? 5 : Integer.parseInt(context.getWiki().getConfig() |
135 |
|
.getProperty("xwiki.store.rcs.nodesPerFull", "5")); |
136 |
408 |
if (nodesPerFull <= 0 || (nodesCount % nodesPerFull) != 0) { |
137 |
379 |
XWikiRCSNodeContent latestContent = latestNode.getContent(context); |
138 |
379 |
latestContent.getPatch().setDiffVersion(latestContent.getPatch().getContent(), |
139 |
|
doc, context); |
140 |
379 |
latestNode.setContent(latestContent); |
141 |
379 |
updateNode(latestNode); |
142 |
379 |
getUpdatedNodeContents().add(latestContent); |
143 |
|
} |
144 |
|
} |
145 |
5752 |
return result; |
146 |
|
} |
147 |
|
|
148 |
|
@return@link |
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
149 |
9848 |
public long getId()... |
150 |
|
{ |
151 |
9848 |
return this.id; |
152 |
|
} |
153 |
|
|
154 |
|
@param@link |
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
155 |
4101 |
public void setId(long id)... |
156 |
|
{ |
157 |
4101 |
this.id = id; |
158 |
|
} |
159 |
|
|
160 |
|
@return |
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
161 |
6783 |
public Collection<XWikiRCSNodeInfo> getNodes()... |
162 |
|
{ |
163 |
6783 |
return this.versionToNode.values(); |
164 |
|
} |
165 |
|
|
166 |
|
|
167 |
|
@return |
168 |
|
@param |
169 |
|
@param |
170 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
171 |
40 |
public Collection<XWikiRCSNodeInfo> getNodes(Version vfrom, Version vto)... |
172 |
|
{ |
173 |
40 |
int[] ito = vto.getNumbers(); |
174 |
40 |
ito[1]--; |
175 |
40 |
return this.versionToNode.subMap(vfrom, new Version(ito)).values(); |
176 |
|
} |
177 |
|
|
178 |
|
@param |
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 2 |
Complexity Density: 0.33 |
|
179 |
3962 |
public void setNodes(Collection<XWikiRCSNodeInfo> versions)... |
180 |
|
{ |
181 |
3962 |
resetArchive(); |
182 |
3962 |
for (XWikiRCSNodeInfo node : versions) { |
183 |
3623 |
updateNode(node); |
184 |
|
} |
185 |
3962 |
if (getNodes().size() > 0) { |
186 |
|
|
187 |
694 |
getLatestNode().setDiff(false); |
188 |
694 |
updateNode(getLatestNode()); |
189 |
|
} |
190 |
|
} |
191 |
|
|
192 |
|
|
193 |
|
@param |
194 |
|
@return@link |
195 |
|
@throws |
196 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
197 |
279 |
public String getArchive(XWikiContext context) throws XWikiException... |
198 |
|
{ |
199 |
279 |
XWikiRCSArchive archive = new XWikiRCSArchive(getNodes(), context); |
200 |
279 |
return archive.toString(); |
201 |
|
} |
202 |
|
|
203 |
|
|
204 |
|
@link |
205 |
|
|
206 |
|
@param |
207 |
|
@throws |
208 |
|
|
|
|
| 85.7% |
Uncovered Elements: 2 (14) |
Complexity: 3 |
Complexity Density: 0.25 |
|
209 |
134 |
public void setArchive(String text) throws XWikiException... |
210 |
|
{ |
211 |
134 |
try { |
212 |
134 |
XWikiRCSArchive archive = new XWikiRCSArchive(text); |
213 |
134 |
resetArchive(); |
214 |
134 |
Collection nodes = archive.getNodes(getId()); |
215 |
284 |
for (Iterator it = nodes.iterator(); it.hasNext();) { |
216 |
150 |
XWikiRCSNodeInfo nodeInfo = (XWikiRCSNodeInfo) it.next(); |
217 |
150 |
XWikiRCSNodeContent nodeContent = (XWikiRCSNodeContent) it.next(); |
218 |
150 |
updateNode(nodeInfo); |
219 |
150 |
this.updatedNodeInfos.add(nodeInfo); |
220 |
150 |
this.updatedNodeContents.add(nodeContent); |
221 |
|
} |
222 |
|
} catch (Exception e) { |
223 |
0 |
Object[] args = { text, new Long(getId()) }; |
224 |
0 |
throw new XWikiException(XWikiException.MODULE_XWIKI_DIFF, |
225 |
|
XWikiException.ERROR_XWIKI_DIFF_CONTENT_ERROR, |
226 |
|
"Exception while constructing archive for JRCS string [{0}] for document [{1}]", e, args); |
227 |
|
} |
228 |
|
} |
229 |
|
|
230 |
|
|
231 |
|
|
232 |
|
|
233 |
|
@param |
234 |
|
@param |
235 |
|
@param |
236 |
|
@param |
237 |
|
@param |
238 |
|
@param |
239 |
|
@throws |
240 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 4 |
Complexity Density: 0.33 |
|
241 |
5752 |
public void updateArchive(XWikiDocument doc, String author, Date date, String comment,... |
242 |
|
Version version, XWikiContext context) throws XWikiException |
243 |
|
{ |
244 |
5752 |
Version oldLatestVer = getLatestVersion(); |
245 |
5752 |
Version newVer = version; |
246 |
5752 |
if (newVer == null || oldLatestVer != null && newVer.compareVersions(oldLatestVer) <= 0) { |
247 |
11 |
newVer = createNextVersion(oldLatestVer, doc.isMinorEdit()); |
248 |
|
} |
249 |
5752 |
XWikiRCSNodeInfo newNode = new XWikiRCSNodeInfo(new XWikiRCSNodeId(getId(), newVer)); |
250 |
5752 |
newNode.setAuthor(author); |
251 |
5752 |
newNode.setComment(comment); |
252 |
5752 |
newNode.setDate(date); |
253 |
5752 |
XWikiRCSNodeContent newContent = makePatch(newNode, doc, context); |
254 |
|
|
255 |
5752 |
updateNode(newNode); |
256 |
5752 |
this.updatedNodeInfos.add(newNode); |
257 |
5752 |
this.updatedNodeContents.add(newContent); |
258 |
|
} |
259 |
|
|
260 |
|
|
261 |
|
|
262 |
|
|
263 |
|
@param |
264 |
|
@param |
265 |
|
@param |
266 |
|
@throws |
267 |
|
|
|
|
| 90.7% |
Uncovered Elements: 4 (43) |
Complexity: 7 |
Complexity Density: 0.21 |
|
268 |
3 |
public void removeVersions(Version newerVersion, Version olderVersion, XWikiContext context)... |
269 |
|
throws XWikiException |
270 |
|
{ |
271 |
3 |
Version upperBound = newerVersion; |
272 |
3 |
Version lowerBound = olderVersion; |
273 |
3 |
if (upperBound.compareVersions(lowerBound) < 0) { |
274 |
1 |
Version tmp = upperBound; |
275 |
1 |
upperBound = lowerBound; |
276 |
1 |
lowerBound = tmp; |
277 |
|
} |
278 |
3 |
Version firstVersionAfter = getNextVersion(upperBound); |
279 |
3 |
Version firstVersionBefore = getPrevVersion(lowerBound); |
280 |
3 |
if (firstVersionAfter == null && firstVersionBefore == null) { |
281 |
0 |
resetArchive(); |
282 |
0 |
return; |
283 |
|
} |
284 |
3 |
if (firstVersionAfter == null) { |
285 |
|
|
286 |
|
|
287 |
2 |
String xmlBefore = getVersionXml(firstVersionBefore, context); |
288 |
2 |
XWikiRCSNodeInfo niBefore = getNode(firstVersionBefore); |
289 |
2 |
XWikiRCSNodeContent ncBefore = niBefore.getContent(context); |
290 |
2 |
ncBefore.getPatch().setFullVersion(xmlBefore); |
291 |
2 |
niBefore.setContent(ncBefore); |
292 |
2 |
updateNode(niBefore); |
293 |
2 |
getUpdatedNodeContents().add(ncBefore); |
294 |
1 |
} else if (firstVersionBefore != null) { |
295 |
|
|
296 |
|
|
297 |
1 |
String xmlAfter = getVersionXml(firstVersionAfter, context); |
298 |
1 |
String xmlBefore = getVersionXml(firstVersionBefore, context); |
299 |
1 |
XWikiRCSNodeInfo niBefore = getNode(firstVersionBefore); |
300 |
1 |
XWikiRCSNodeContent ncBefore = niBefore.getContent(context); |
301 |
1 |
ncBefore.getPatch().setDiffVersion(xmlBefore, xmlAfter, ""); |
302 |
1 |
niBefore.setContent(ncBefore); |
303 |
1 |
updateNode(niBefore); |
304 |
1 |
getUpdatedNodeContents().add(ncBefore); |
305 |
|
} |
306 |
|
|
307 |
7 |
for (Iterator<XWikiRCSNodeInfo> it = getNodes(upperBound, lowerBound).iterator(); it.hasNext();) { |
308 |
4 |
XWikiRCSNodeInfo ni = it.next(); |
309 |
4 |
this.fullVersions.remove(ni.getId().getVersion()); |
310 |
4 |
this.deletedNodes.add(ni); |
311 |
4 |
it.remove(); |
312 |
|
} |
313 |
|
} |
314 |
|
|
315 |
|
|
316 |
|
@return |
317 |
|
@param |
318 |
|
@param |
319 |
|
@throws |
320 |
|
|
|
|
| 88.2% |
Uncovered Elements: 2 (17) |
Complexity: 3 |
Complexity Density: 0.2 |
|
321 |
35 |
public XWikiDocument loadDocument(Version version, XWikiContext context)... |
322 |
|
throws XWikiException |
323 |
|
{ |
324 |
35 |
XWikiRCSNodeInfo nodeInfo = getNode(version); |
325 |
35 |
if (nodeInfo == null) { |
326 |
2 |
return null; |
327 |
|
} |
328 |
33 |
try { |
329 |
33 |
String content = getVersionXml(version, context); |
330 |
33 |
XWikiDocument doc = new XWikiDocument(); |
331 |
33 |
doc.fromXML(content); |
332 |
|
|
333 |
33 |
doc.setRCSVersion(version); |
334 |
33 |
doc.setComment(nodeInfo.getComment()); |
335 |
33 |
doc.setAuthor(nodeInfo.getAuthor()); |
336 |
33 |
doc.setMinorEdit(nodeInfo.isMinorEdit()); |
337 |
33 |
doc.setMostRecent(version.equals(getLatestVersion())); |
338 |
33 |
return doc; |
339 |
|
} catch (Exception e) { |
340 |
0 |
Object[] args = { version.toString(), new Long(getId()) }; |
341 |
0 |
throw new XWikiException(XWikiException.MODULE_XWIKI_STORE, |
342 |
|
XWikiException.ERROR_XWIKI_STORE_RCS_READING_REVISIONS, |
343 |
|
"Exception while reading version [{0}] for document id [{1,number}]", e, args); |
344 |
|
} |
345 |
|
} |
346 |
|
|
347 |
|
|
348 |
|
|
349 |
|
|
350 |
|
|
351 |
|
@param |
352 |
|
@param@link |
353 |
|
@return |
354 |
|
@throws |
355 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
356 |
37 |
public String getVersionXml(Version version, XWikiContext context) throws XWikiException... |
357 |
|
{ |
358 |
37 |
Version nearestFullVersion = getNearestFullVersion(version); |
359 |
|
|
360 |
37 |
List<XWikiRCSNodeContent> lstContent = loadRCSNodeContents(nearestFullVersion, version, context); |
361 |
37 |
List<String> origText = new ArrayList<String>(); |
362 |
37 |
for (XWikiRCSNodeContent nodeContent : lstContent) { |
363 |
74 |
nodeContent.getPatch().patch(origText); |
364 |
|
} |
365 |
|
|
366 |
37 |
return ToString.arrayToString(origText.toArray()); |
367 |
|
} |
368 |
|
|
369 |
|
|
370 |
|
@return@link |
371 |
|
@param |
372 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
373 |
7234 |
public XWikiRCSNodeInfo getNode(Version version)... |
374 |
|
{ |
375 |
7234 |
return version == null ? null : (XWikiRCSNodeInfo) this.versionToNode.get(version); |
376 |
|
} |
377 |
|
|
378 |
|
@return |
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
379 |
18673 |
public Version getLatestVersion()... |
380 |
|
{ |
381 |
18673 |
return this.versionToNode.size() == 0 ? null : (Version) this.versionToNode.firstKey(); |
382 |
|
} |
383 |
|
|
384 |
|
@return |
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
385 |
7140 |
public XWikiRCSNodeInfo getLatestNode()... |
386 |
|
{ |
387 |
7140 |
return getNode(getLatestVersion()); |
388 |
|
} |
389 |
|
|
390 |
|
|
391 |
|
@return |
392 |
|
@param |
393 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
394 |
3 |
public Version getNextVersion(Version ver)... |
395 |
|
{ |
396 |
|
|
397 |
3 |
SortedMap<Version, XWikiRCSNodeInfo> headmap = this.versionToNode.headMap(ver); |
398 |
3 |
return (headmap.size() == 0) ? null : headmap.lastKey(); |
399 |
|
} |
400 |
|
|
401 |
|
|
402 |
|
@return |
403 |
|
@param |
404 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 2 |
Complexity Density: 0.33 |
|
405 |
10 |
public Version getPrevVersion(Version ver)... |
406 |
|
{ |
407 |
|
|
408 |
10 |
SortedMap<Version, XWikiRCSNodeInfo> tailmap = this.versionToNode.tailMap(ver); |
409 |
10 |
if (tailmap.size() <= 1) { |
410 |
3 |
return null; |
411 |
|
} |
412 |
7 |
Iterator<Version> it = tailmap.keySet().iterator(); |
413 |
7 |
it.next(); |
414 |
7 |
return it.next(); |
415 |
|
} |
416 |
|
|
417 |
|
|
418 |
|
@param |
419 |
|
@return |
420 |
|
|
|
|
| 87.5% |
Uncovered Elements: 1 (8) |
Complexity: 3 |
Complexity Density: 0.75 |
|
421 |
37 |
public Version getNearestFullVersion(Version ver)... |
422 |
|
{ |
423 |
37 |
if (this.fullVersions.contains(ver)) { |
424 |
10 |
return ver; |
425 |
|
} |
426 |
27 |
SortedSet<Version> headSet = this.fullVersions.headSet(ver); |
427 |
27 |
return (headSet.size() == 0) ? null : headSet.last(); |
428 |
|
} |
429 |
|
|
430 |
|
|
431 |
|
@return@link |
432 |
|
@param |
433 |
|
@param |
434 |
|
@param |
435 |
|
@throws |
436 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
437 |
37 |
private List<XWikiRCSNodeContent> loadRCSNodeContents(Version vfrom, Version vto, XWikiContext context)... |
438 |
|
throws XWikiException |
439 |
|
{ |
440 |
37 |
List<XWikiRCSNodeContent> result = new ArrayList<XWikiRCSNodeContent>(); |
441 |
37 |
for (XWikiRCSNodeInfo nodeInfo : getNodes(vfrom, vto)) { |
442 |
74 |
XWikiRCSNodeContent nodeContent = nodeInfo.getContent(context); |
443 |
74 |
result.add(nodeContent); |
444 |
|
} |
445 |
37 |
return result; |
446 |
|
} |
447 |
|
|
448 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
449 |
6168 |
public void resetArchive()... |
450 |
|
{ |
451 |
6168 |
this.versionToNode.clear(); |
452 |
6168 |
this.fullVersions.clear(); |
453 |
6168 |
this.deletedNodes.addAll(this.updatedNodeInfos); |
454 |
6168 |
this.updatedNodeInfos.clear(); |
455 |
6168 |
this.updatedNodeContents.clear(); |
456 |
|
} |
457 |
|
|
458 |
|
@return@link |
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
459 |
13714 |
public Set<XWikiRCSNodeInfo> getDeletedNodeInfo()... |
460 |
|
{ |
461 |
13714 |
return this.deletedNodes; |
462 |
|
} |
463 |
|
|
464 |
|
@return@link |
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
465 |
11647 |
public Set<XWikiRCSNodeInfo> getUpdatedNodeInfos()... |
466 |
|
{ |
467 |
11647 |
return this.updatedNodeInfos; |
468 |
|
} |
469 |
|
|
470 |
|
@return@link |
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
471 |
12029 |
public Set<XWikiRCSNodeContent> getUpdatedNodeContents()... |
472 |
|
{ |
473 |
12029 |
return this.updatedNodeContents; |
474 |
|
} |
475 |
|
|
476 |
|
|
477 |
|
@return |
478 |
|
@param@link |
479 |
|
@param |
480 |
|
@throws |
481 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
482 |
122 |
public XWikiDocumentArchive clone(long docId, XWikiContext context) throws XWikiException... |
483 |
|
{ |
484 |
122 |
XWikiDocumentArchive result = new XWikiDocumentArchive(docId); |
485 |
122 |
result.setArchive(getArchive(context)); |
486 |
122 |
return result; |
487 |
|
} |
488 |
|
} |