1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
package net.smartlab.web.config; |
24 |
|
|
25 |
|
import java.net.URL; |
26 |
|
|
27 |
|
import net.smartlab.config.Configuration; |
28 |
|
import net.smartlab.config.ConfigurationException; |
29 |
|
import net.smartlab.config.XMLConfiguration; |
30 |
|
import net.smartlab.web.Domain; |
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
@author |
36 |
|
|
37 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 2 |
Complexity Density: 0,4 |
|
38 |
|
public class FileDomainConfigurationStrategy implements DomainConfigurationStrategy { |
39 |
|
|
40 |
|
|
41 |
|
@throws |
42 |
|
@see |
43 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0,33 |
|
44 |
0
|
public Configuration getConfiguration(Domain domain) throws ConfigurationException {... |
45 |
0
|
String archive = Domain.getLastArchiveName(domain.getClass()); |
46 |
0
|
URL file = Domain.getResource(this.getClass(), new String[] {"/META-INF/" + archive + ".xml", |
47 |
|
"/META-INF/smartweb.jar.xml"}); |
48 |
0
|
return new XMLConfiguration(file); |
49 |
|
} |
50 |
|
|
51 |
|
|
52 |
|
@see |
53 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
|
54 |
0
|
public Configuration getConfiguration(Domain domain, String filename) throws ConfigurationException {... |
55 |
0
|
URL file = Domain.getResource(this.getClass(), new String[] {"/META-INF/" + filename}); |
56 |
0
|
return new XMLConfiguration(file); |
57 |
|
} |
58 |
|
} |