Revision 821fe02d
Added by Katja Luther over 3 years ago
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmServerInfo.java | ||
---|---|---|
56 | 56 |
|
57 | 57 |
public static final Logger logger = Logger.getLogger(CdmServerInfo.class); |
58 | 58 |
|
59 |
private final static String CDMSERVER_PREFIX = "cdmserver/";
|
|
59 |
protected final static String CDMSERVER_PREFIX = "cdmserver/";
|
|
60 | 60 |
private final static String NAME_PRODUCTION = "cybertaxonomy.org"; |
61 | 61 |
private final static String SERVER_PRODUCTION = "api.cybertaxonomy.org"; |
62 | 62 |
|
... | ... | |
75 | 75 |
public final static int NULL_PORT = -1; |
76 | 76 |
public final static String NULL_PORT_STRING = "N/A"; |
77 | 77 |
|
78 |
private static final String CDM_REMOTE_SERVERS_CONFIG_FILE = "cdm_remote_servers.json";
|
|
78 |
protected static final String CDM_REMOTE_SERVERS_CONFIG_FILE = "cdm_remote_servers.json";
|
|
79 | 79 |
|
80 | 80 |
|
81 | 81 |
private final String name; |
82 | 82 |
private final String server; |
83 | 83 |
private int port; |
84 |
private final List<CdmInstanceInfo> instances;
|
|
84 |
protected final List<CdmInstanceInfo> instances;
|
|
85 | 85 |
|
86 | 86 |
private String cdmlibServicesVersion = ""; |
87 | 87 |
private String cdmlibServicesLastModified = ""; |
... | ... | |
135 | 135 |
} else { |
136 | 136 |
addInstancesViaHttp(); |
137 | 137 |
} |
138 |
|
|
139 |
|
|
138 | 140 |
Collections.sort(instances, new Comparator<CdmInstanceInfo>() { |
139 | 141 |
@Override |
140 | 142 |
public int compare(CdmInstanceInfo cii1, CdmInstanceInfo cii2){ |
... | ... | |
392 | 394 |
for(CdmServerInfoConfig config : configList) { |
393 | 395 |
serverInfoList.add(new CdmServerInfo(config)); |
394 | 396 |
} |
395 |
// The local host managed server must not be in the config file |
|
397 |
// The local host managed server must not be in the config file, this should be moved and only added when plugin is installed
|
|
396 | 398 |
CdmServerInfoConfig localHostManagedConfig = new CdmServerInfoConfig(NAME_LOCALHOST_MGD, SERVER_LOCALHOST, NULL_PORT, CDMSERVER_PREFIX, false); |
397 | 399 |
serverInfoList.add(new CdmServerInfo(localHostManagedConfig)); |
398 | 400 |
return serverInfoList; |
399 | 401 |
} |
400 | 402 |
|
401 |
private static List<CdmServerInfoConfig> loadFromConfigFile(File file) {
|
|
403 |
protected static List<CdmServerInfoConfig> loadFromConfigFile(File file) {
|
|
402 | 404 |
|
403 | 405 |
List<CdmServerInfoConfig> serverList = null; |
404 | 406 |
|
Also available in: Unified diff
create new branch webapp