1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.extension.repository.internal.core; |
21 |
|
|
22 |
|
import java.net.URL; |
23 |
|
import java.util.Collection; |
24 |
|
|
25 |
|
import org.xwiki.extension.AbstractExtension; |
26 |
|
import org.xwiki.extension.CoreExtension; |
27 |
|
import org.xwiki.extension.Extension; |
28 |
|
import org.xwiki.extension.ExtensionDependency; |
29 |
|
import org.xwiki.extension.ExtensionId; |
30 |
|
|
31 |
|
|
32 |
|
@link |
33 |
|
|
34 |
|
@version |
35 |
|
@since |
36 |
|
|
|
|
| 83.8% |
Uncovered Elements: 6 (37) |
Complexity: 16 |
Complexity Density: 0.76 |
|
37 |
|
public class DefaultCoreExtension extends AbstractExtension implements CoreExtension |
38 |
|
{ |
39 |
|
|
40 |
|
@see |
41 |
|
|
42 |
|
private static final String PKEY_DESCRIPTORURL = "core.descriptorurl"; |
43 |
|
|
44 |
|
|
45 |
|
@see |
46 |
|
|
47 |
|
private boolean complete; |
48 |
|
|
49 |
|
|
50 |
|
@param |
51 |
|
@param |
52 |
|
@param |
53 |
|
@param |
54 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
55 |
13947 |
public DefaultCoreExtension(DefaultCoreExtensionRepository repository, URL url, ExtensionId id, String type)... |
56 |
|
{ |
57 |
13947 |
super(repository, id, type); |
58 |
|
|
59 |
13947 |
setURL(url); |
60 |
|
} |
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
@link@link |
66 |
|
|
67 |
|
|
68 |
|
@param |
69 |
|
@param |
70 |
|
@param |
71 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
72 |
10899 |
public DefaultCoreExtension(DefaultCoreExtensionRepository repository, URL url, Extension extension)... |
73 |
|
{ |
74 |
10899 |
super(repository, extension); |
75 |
|
|
76 |
10899 |
setURL(url); |
77 |
|
} |
78 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
79 |
10919 |
@Override... |
80 |
|
public void setAllowedNamespaces(Collection<String> namespaces) |
81 |
|
{ |
82 |
|
|
83 |
|
|
84 |
|
} |
85 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
86 |
22696 |
@Override... |
87 |
|
public void setManagedDependencies(Collection<? extends ExtensionDependency> managedDependencies) |
88 |
|
{ |
89 |
|
|
90 |
|
|
91 |
|
} |
92 |
|
|
93 |
|
|
94 |
|
@return |
95 |
|
@since |
96 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
97 |
805 |
public boolean isComplete()... |
98 |
|
{ |
99 |
805 |
return this.complete; |
100 |
|
} |
101 |
|
|
102 |
|
|
103 |
|
@param |
104 |
|
@since |
105 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
106 |
12054 |
public void setComplete(boolean complete)... |
107 |
|
{ |
108 |
12054 |
this.complete = complete; |
109 |
|
} |
110 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
111 |
0 |
@Override... |
112 |
|
public void setId(ExtensionId id) |
113 |
|
{ |
114 |
0 |
super.setId(id); |
115 |
|
} |
116 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
117 |
0 |
@Override... |
118 |
|
public void setType(String type) |
119 |
|
{ |
120 |
0 |
super.setType(type); |
121 |
|
} |
122 |
|
|
123 |
|
|
124 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
125 |
10918 |
@Override... |
126 |
|
public URL getURL() |
127 |
|
{ |
128 |
10918 |
return getProperty(PKEY_URL, null); |
129 |
|
} |
130 |
|
|
131 |
|
|
132 |
|
@param@link |
133 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
134 |
35764 |
public void setURL(URL url)... |
135 |
|
{ |
136 |
35764 |
setFile(new DefaultCoreExtensionFile(url)); |
137 |
|
|
138 |
35764 |
putProperty(PKEY_URL, url); |
139 |
|
} |
140 |
|
|
141 |
|
|
142 |
|
@return@link |
143 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
144 |
12748 |
public URL getDescriptorURL()... |
145 |
|
{ |
146 |
12748 |
return getProperty(PKEY_DESCRIPTORURL, null); |
147 |
|
} |
148 |
|
|
149 |
|
|
150 |
|
@param@link |
151 |
|
|
152 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
153 |
32995 |
public void setDescriptorURL(URL descriptorURL)... |
154 |
|
{ |
155 |
32995 |
putProperty(PKEY_DESCRIPTORURL, descriptorURL); |
156 |
|
} |
157 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
158 |
0 |
@Override... |
159 |
|
public boolean isGuessed() |
160 |
|
{ |
161 |
0 |
return getProperty(PKEY_GUESSED, false); |
162 |
|
} |
163 |
|
|
164 |
|
|
165 |
|
@param |
166 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
167 |
2000 |
public void setGuessed(boolean guessed)... |
168 |
|
{ |
169 |
2000 |
putProperty(PKEY_GUESSED, guessed); |
170 |
|
} |
171 |
|
|
172 |
|
|
173 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
174 |
5570 |
@Override... |
175 |
|
public String toString() |
176 |
|
{ |
177 |
5570 |
return getId().toString(); |
178 |
|
} |
179 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
180 |
10918 |
@Override... |
181 |
|
public void set(Extension extension) |
182 |
|
{ |
183 |
10918 |
URL url = getURL(); |
184 |
10918 |
URL descriptorURL = getDescriptorURL(); |
185 |
|
|
186 |
10918 |
super.set(extension); |
187 |
|
|
188 |
10918 |
setURL(url); |
189 |
10918 |
setDescriptorURL(descriptorURL); |
190 |
|
} |
191 |
|
} |