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 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (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 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
48 |
28 |
public DesktopUrlProviderFactory(String defaultUrlString,... |
49 |
|
String cachedUrlList, String userUrlList) |
50 |
|
{ |
51 |
28 |
provDefaultUrl = defaultUrlString; |
52 |
28 |
menuUrlList = cachedUrlList; |
53 |
28 |
nonMenuUrlList = userUrlList; |
54 |
|
} |
55 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
56 |
28 |
@Override... |
57 |
|
public UrlProviderI createUrlProvider() |
58 |
|
{ |
59 |
|
|
60 |
28 |
List<UrlProviderI> providers = new ArrayList<UrlProviderI>(); |
61 |
|
|
62 |
28 |
UrlProviderI idProvider = new IdentifiersUrlProvider(menuUrlList); |
63 |
28 |
UrlProviderI customProvider = new CustomUrlProvider(menuUrlList, |
64 |
|
nonMenuUrlList); |
65 |
28 |
providers.add(idProvider); |
66 |
28 |
providers.add(customProvider); |
67 |
|
|
68 |
28 |
return new UrlProvider(provDefaultUrl, providers); |
69 |
|
} |
70 |
|
|
71 |
|
} |