svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.downloader / org.gvsig.downloader.lib / org.gvsig.downloader.lib.api / src / main / java / org / gvsig / downloader / spi / AbstractDownloaderAuthenticationConfig.java @ 47821
History | View | Annotate | Download (1.85 KB)
1 |
/*
|
---|---|
2 |
* To change this license header, choose License Headers in Project Properties.
|
3 |
* To change this template file, choose Tools | Templates
|
4 |
* and open the template in the editor.
|
5 |
*/
|
6 |
package org.gvsig.downloader.spi; |
7 |
|
8 |
import org.gvsig.downloader.DownloaderAuthenticationConfig; |
9 |
import org.gvsig.downloader.DownloaderAuthenticationFactory; |
10 |
import org.gvsig.downloader.DownloaderAuthenticationRequester; |
11 |
import org.gvsig.downloader.DownloaderLocator; |
12 |
|
13 |
/**
|
14 |
*
|
15 |
* @author jjdelcerro
|
16 |
*/
|
17 |
public abstract class AbstractDownloaderAuthenticationConfig |
18 |
implements DownloaderAuthenticationConfig
|
19 |
{ |
20 |
|
21 |
private String providerName; |
22 |
private DownloaderAuthenticationFactory factory;
|
23 |
private String baseUrl; |
24 |
|
25 |
protected AbstractDownloaderAuthenticationConfig(DownloaderAuthenticationFactory factory, String baseUrl) { |
26 |
this.factory = factory;
|
27 |
this.baseUrl = baseUrl;
|
28 |
this.providerName = factory.getProviderName();
|
29 |
} |
30 |
|
31 |
// public AbstractDownloaderAuthenticationConfig(String providerName, String baseUrl) {
|
32 |
// this(
|
33 |
// DownloaderLocator.getDownloaderManager().getAuthenticationType(providerName),
|
34 |
// baseUrl
|
35 |
// );
|
36 |
// }
|
37 |
//
|
38 |
@Override
|
39 |
public String getProviderName() { |
40 |
return this.providerName; |
41 |
} |
42 |
|
43 |
@Override
|
44 |
public DownloaderAuthenticationFactory getFactory() {
|
45 |
return this.factory; |
46 |
} |
47 |
|
48 |
@Override
|
49 |
public String getBaseUrl() { |
50 |
return this.baseUrl; |
51 |
} |
52 |
|
53 |
@Override
|
54 |
public boolean isConfigurable() { |
55 |
return false; |
56 |
} |
57 |
|
58 |
@Override
|
59 |
public boolean requestAuthenticationConfig() { |
60 |
return true; |
61 |
} |
62 |
|
63 |
@Override
|
64 |
public Object clone() throws CloneNotSupportedException { |
65 |
return (DownloaderAuthenticationConfig) super.clone(); |
66 |
} |
67 |
|
68 |
@Override
|
69 |
public String getKey() { |
70 |
return null; |
71 |
} |
72 |
|
73 |
} |