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 org.xwiki.diff.Delta; |
23 |
|
|
24 |
|
import com.xpn.xwiki.XWikiContext; |
25 |
|
import com.xpn.xwiki.doc.XWikiAttachment; |
26 |
|
|
27 |
|
|
28 |
|
@link |
29 |
|
|
30 |
|
@since |
31 |
|
@version |
32 |
|
|
|
|
| 0% |
Uncovered Elements: 26 (26) |
Complexity: 11 |
Complexity Density: 0.92 |
|
33 |
|
public class AttachmentDiff |
34 |
|
{ |
35 |
|
|
36 |
|
@link |
37 |
|
|
38 |
|
private com.xpn.xwiki.doc.AttachmentDiff diff; |
39 |
|
|
40 |
|
|
41 |
|
@link |
42 |
|
|
43 |
|
private XWikiContext context; |
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
@param |
49 |
|
@param@link |
50 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
51 |
0 |
public AttachmentDiff(com.xpn.xwiki.doc.AttachmentDiff diff, XWikiContext context)... |
52 |
|
{ |
53 |
0 |
this.diff = diff; |
54 |
0 |
this.context = context; |
55 |
|
} |
56 |
|
|
57 |
|
|
58 |
|
@return |
59 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
60 |
0 |
public String getFileName()... |
61 |
|
{ |
62 |
0 |
return this.diff.getFileName(); |
63 |
|
} |
64 |
|
|
65 |
|
|
66 |
|
@return |
67 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
68 |
0 |
public String getType()... |
69 |
|
{ |
70 |
0 |
Delta.Type type = this.diff.getType(); |
71 |
0 |
return type != null ? type.toString().toLowerCase() : null; |
72 |
|
} |
73 |
|
|
74 |
|
|
75 |
|
@return |
76 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
77 |
0 |
public Attachment getOrigAttachment()... |
78 |
|
{ |
79 |
0 |
XWikiAttachment origAttachment = this.diff.getOrigAttachment(); |
80 |
0 |
return origAttachment != null ? new Attachment(origAttachment.getDoc().newDocument(context), origAttachment, |
81 |
|
context) : null; |
82 |
|
} |
83 |
|
|
84 |
|
|
85 |
|
@return |
86 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
87 |
0 |
public Attachment getNewAttachment()... |
88 |
|
{ |
89 |
0 |
XWikiAttachment newAttachment = this.diff.getNewAttachment(); |
90 |
0 |
return newAttachment != null ? new Attachment(newAttachment.getDoc().newDocument(context), newAttachment, |
91 |
|
context) : null; |
92 |
|
} |
93 |
|
|
94 |
|
|
95 |
|
|
96 |
|
@link |
97 |
|
|
98 |
|
@return |
99 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
100 |
0 |
@Deprecated... |
101 |
|
public String getOrigVersion() |
102 |
|
{ |
103 |
0 |
return this.diff.getOrigVersion(); |
104 |
|
} |
105 |
|
|
106 |
|
|
107 |
|
|
108 |
|
@link |
109 |
|
|
110 |
|
@return |
111 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
112 |
0 |
@Deprecated... |
113 |
|
public String getNewVersion() |
114 |
|
{ |
115 |
0 |
return this.diff.getNewVersion(); |
116 |
|
} |
117 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
118 |
0 |
@Override... |
119 |
|
public String toString() |
120 |
|
{ |
121 |
0 |
return this.diff.toString(); |
122 |
|
} |
123 |
|
} |