1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.url.filesystem; |
21 |
|
|
22 |
|
import java.io.File; |
23 |
|
import java.util.Collection; |
24 |
|
import java.util.HashSet; |
25 |
|
import java.util.Set; |
26 |
|
import java.util.Stack; |
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
@version |
33 |
|
@since |
34 |
|
|
|
|
| 35.7% |
Uncovered Elements: 18 (28) |
Complexity: 14 |
Complexity Density: 1.08 |
|
35 |
|
public class FilesystemExportContext |
36 |
|
{ |
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
private Stack<Integer> cssParentDepth = new Stack<>(); |
43 |
|
|
44 |
|
|
45 |
|
@see |
46 |
|
|
47 |
|
private Set<String> exportedPages = new HashSet<>(); |
48 |
|
|
49 |
|
|
50 |
|
@see |
51 |
|
|
52 |
|
private File exportDir; |
53 |
|
|
54 |
|
|
55 |
|
@see |
56 |
|
|
57 |
|
private Set<String> neededSkins = new HashSet<>(); |
58 |
|
|
59 |
|
|
60 |
|
@see |
61 |
|
|
62 |
|
private Set<String> exportedSkinFiles = new HashSet<>(); |
63 |
|
|
64 |
|
|
65 |
|
@return |
66 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
67 |
6 |
public int getCSSParentLevel()... |
68 |
|
{ |
69 |
6 |
return this.cssParentDepth.isEmpty() ? 0 : this.cssParentDepth.peek(); |
70 |
|
} |
71 |
|
|
72 |
|
|
73 |
|
|
74 |
|
|
75 |
|
@param |
76 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
77 |
1 |
public void pushCSSParentLevels(int depth)... |
78 |
|
{ |
79 |
1 |
this.cssParentDepth.push(depth); |
80 |
|
} |
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
85 |
0 |
public void popCSSParentLevels()... |
86 |
|
{ |
87 |
0 |
this.cssParentDepth.pop(); |
88 |
|
} |
89 |
|
|
90 |
|
|
91 |
|
@return |
92 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
93 |
0 |
public Set<String> getNeededSkins()... |
94 |
|
{ |
95 |
0 |
return this.neededSkins; |
96 |
|
} |
97 |
|
|
98 |
|
|
99 |
|
@param@link |
100 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
101 |
0 |
public void addNeededSkin(String skin)... |
102 |
|
{ |
103 |
0 |
this.neededSkins.add(skin); |
104 |
|
} |
105 |
|
|
106 |
|
|
107 |
|
@return |
108 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
109 |
4 |
public File getExportDir()... |
110 |
|
{ |
111 |
4 |
return this.exportDir; |
112 |
|
} |
113 |
|
|
114 |
|
|
115 |
|
@return |
116 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
117 |
0 |
public Set<String> getExportedPages()... |
118 |
|
{ |
119 |
0 |
return this.exportedPages; |
120 |
|
} |
121 |
|
|
122 |
|
|
123 |
|
@param@link |
124 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
125 |
0 |
public void addExportedPage(String page)... |
126 |
|
{ |
127 |
0 |
this.exportedPages.add(page); |
128 |
|
} |
129 |
|
|
130 |
|
|
131 |
|
@param |
132 |
|
@return |
133 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
134 |
0 |
public boolean hasExportedPage(String page)... |
135 |
|
{ |
136 |
0 |
return this.exportedPages.contains(page); |
137 |
|
} |
138 |
|
|
139 |
|
|
140 |
|
@param@link |
141 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
142 |
3 |
public void setExportDir(File exportDir)... |
143 |
|
{ |
144 |
3 |
this.exportDir = exportDir; |
145 |
|
} |
146 |
|
|
147 |
|
|
148 |
|
@return |
149 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
150 |
0 |
public Collection<String> getExportedSkinFiles()... |
151 |
|
{ |
152 |
0 |
return this.exportedSkinFiles; |
153 |
|
} |
154 |
|
|
155 |
|
|
156 |
|
@param |
157 |
|
@return |
158 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
159 |
0 |
public boolean hasExportedSkinFile(String filePath)... |
160 |
|
{ |
161 |
0 |
return this.exportedSkinFiles.contains(filePath); |
162 |
|
} |
163 |
|
|
164 |
|
|
165 |
|
@param@link |
166 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
167 |
0 |
public void addExportedSkinFile(String filePath)... |
168 |
|
{ |
169 |
0 |
this.exportedSkinFiles.add(filePath); |
170 |
|
} |
171 |
|
} |