// Initial URLs loading
this.discoverer = discoverer;
urls.addAll(discoverer.getUrls());
+ if (!discoverer.isUrlsModifiable())
+ {
+ urlListTable.setEnabled(false);
+ newWsUrl.setEnabled(false);
+ editWsUrl.setEnabled(false);
+ deleteWsUrl.setEnabled(false);
+ moveUrlUp.setEnabled(false);
+ moveUrlDown.setEnabled(false);
+ }
for (URL url : urls)
{
reloadStatusForUrl(url);
}
}
+ @Override
+ public boolean isUrlsModifiable()
+ {
+ return getUrlsPropertyKey() != null;
+ }
+
/**
* Get the key in jalview property file where the urls for this discoverer are
* stored. Return null if modifying urls is not supported.
/**
* Set the list of urls where the discoverer will search for services.
+ * May throw UnsupportedOperationException if the list is unmodifiable.
*/
void setUrls(List<URL> wsUrls);
/**
+ * Check if list of urls is modifiable.
+ *
+ * @return is list modifiable
+ */
+ boolean isUrlsModifiable();
+
+ /**
* Test if the url is a valid url for that discoverer.
*/
default boolean testUrl(URL url)