1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.urls.desktop; |
22 |
|
|
23 |
|
import jalview.urls.CustomUrlProvider; |
24 |
|
import jalview.urls.IdentifiersUrlProvider; |
25 |
|
import jalview.urls.UrlProvider; |
26 |
|
import jalview.urls.api.UrlProviderFactoryI; |
27 |
|
import jalview.urls.api.UrlProviderI; |
28 |
|
|
29 |
|
import java.util.ArrayList; |
30 |
|
import java.util.List; |
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
@author |
36 |
|
@version |
37 |
|
|
38 |
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 2 |
Complexity Density: 0.22 |
|
39 |
|
public class DesktopUrlProviderFactory implements UrlProviderFactoryI |
40 |
|
{ |
41 |
|
|
42 |
|
private String provDefaultUrl; |
43 |
|
|
44 |
|
private String menuUrlList; |
45 |
|
|
46 |
|
private String nonMenuUrlList; |
47 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
48 |
0 |
public DesktopUrlProviderFactory(String defaultUrlString,... |
49 |
|
String cachedUrlList, String userUrlList) |
50 |
|
{ |
51 |
0 |
provDefaultUrl = defaultUrlString; |
52 |
0 |
menuUrlList = cachedUrlList; |
53 |
0 |
nonMenuUrlList = userUrlList; |
54 |
|
} |
55 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
56 |
0 |
@Override... |
57 |
|
public UrlProviderI createUrlProvider() |
58 |
|
{ |
59 |
|
|
60 |
0 |
List<UrlProviderI> providers = new ArrayList<UrlProviderI>(); |
61 |
|
|
62 |
0 |
UrlProviderI idProvider = new IdentifiersUrlProvider(menuUrlList); |
63 |
0 |
UrlProviderI customProvider = new CustomUrlProvider(menuUrlList, |
64 |
|
nonMenuUrlList); |
65 |
0 |
providers.add(idProvider); |
66 |
0 |
providers.add(customProvider); |
67 |
|
|
68 |
0 |
return new UrlProvider(provDefaultUrl, providers); |
69 |
|
} |
70 |
|
|
71 |
|
} |