public List<PluginInfo> getUpdateInfoList() { return provider.getAvailableDownloads(); }
public List<Boolean> getInstallList(){ if (install == null){ install = new ArrayList<Boolean>(getUpdateInfoList().size()); for (PluginInfo info : getUpdateInfoList()) { install.add(provider.isSelected(info)); } } return install; }
private void runSearch(SearchType searchType) { final BackgroundTask autoUpdateTask = ProtegeApplication.getBackgroundTaskManager().startTask("autoupdate"); Runnable runnable = () -> { PluginRegistry registry = new PluginRegistryImpl(getPluginRegistryLocation()); try { registry.reload(); getPrefs().putLong(LAST_RUN_PREFS_KEY, System.currentTimeMillis()); } finally { ProtegeApplication.getBackgroundTaskManager().endTask(autoUpdateTask); List<PluginInfo> availablePlugins = registry.getAvailablePlugins(); if (searchType == SearchType.UPDATES_AND_INSTALLS) { showPluginsDialog(availablePlugins); } else { if (!availablePlugins.isEmpty()) { showPluginsDialog(availablePlugins); } } } }; Thread t = new Thread(runnable, "Auto-Update"); t.setPriority(Thread.MIN_PRIORITY); t.start(); }
public List<PluginInfo> getUpdateInfoList() { return provider.getAvailableDownloads(); }
public List<Boolean> getInstallList(){ if (install == null){ install = new ArrayList<Boolean>(getUpdateInfoList().size()); for (PluginInfo info : getUpdateInfoList()) { install.add(provider.isSelected(info)); } } return install; }
public void run() { List<PluginInfo> downloads; try { PluginRegistry registry = getPluginRegistry(); downloads = registry.getAvailableDownloads(); } finally { ProtegeApplication.getBackgroundTaskManager().endTask(task); } if (!downloads.isEmpty()){ Map<String, PluginRegistry> map = new LinkedHashMap<String, PluginRegistry>(); map.put("Downloads", getPluginRegistry()); showUpdatesDialog(map); } else{ JOptionPane.showMessageDialog(null, "No downloads available at this time."); } } };
public void run() { List<PluginInfo> downloads; try { PluginRegistry registry = getPluginRegistry(); downloads = registry.getAvailableDownloads(); } finally { ProtegeApplication.getBackgroundTaskManager().endTask(task); } if (!downloads.isEmpty()){ Map<String, PluginRegistry> map = new LinkedHashMap<String, PluginRegistry>(); map.put("Downloads", getPluginRegistry()); showUpdatesDialog(map); } else{ JOptionPane.showMessageDialog(null, "No downloads available at this time."); } } };
public void run() { PluginRegistry updatesProvider; java.util.List<PluginInfo> updates; try { updatesProvider = new PluginRegistryImpl(getPluginRegistryLocation(), PLUGIN_UPDATE_REGISTRY); updates = updatesProvider.getAvailableDownloads(); } finally { ProtegeApplication.getBackgroundTaskManager().endTask(task); } if (!updates.isEmpty()) { Map<String, PluginRegistry> map = new LinkedHashMap<String, PluginRegistry>(); map.put("Updates", updatesProvider); showUpdatesDialog(map); } else{ JOptionPane.showMessageDialog(null, "No updates available at this time."); } } };
public void run() { PluginRegistry updatesProvider; java.util.List<PluginInfo> updates; try { updatesProvider = new PluginRegistryImpl(getPluginRegistryLocation(), PLUGIN_UPDATE_REGISTRY); updates = updatesProvider.getAvailableDownloads(); } finally { ProtegeApplication.getBackgroundTaskManager().endTask(task); } if (!updates.isEmpty()) { Map<String, PluginRegistry> map = new LinkedHashMap<String, PluginRegistry>(); map.put("Updates", updatesProvider); showUpdatesDialog(map); } else{ JOptionPane.showMessageDialog(null, "No updates available at this time."); } } };
public void run() { PluginRegistry updatesProvider = new PluginRegistryImpl(getPluginRegistryLocation(), PLUGIN_UPDATE_REGISTRY); List<PluginInfo> updates = updatesProvider.getAvailableDownloads(); if (!updates.isEmpty()) { ProtegeApplication.getBackgroundTaskManager().endTask(autoUpdateTask); Map<String, PluginRegistry> map = new LinkedHashMap<String, PluginRegistry>(); map.put(PLUGIN_UPDATE_REGISTRY.getLabel(), updatesProvider); map.put(PLUGIN_DOWNLOAD_REGISTRY.getLabel(), new PluginRegistryImpl(getPluginRegistryLocation(), PLUGIN_DOWNLOAD_REGISTRY)); showUpdatesDialog(map); } else{ PluginRegistry registry = getPluginRegistry(); final List<PluginInfo> downloads = registry.getAvailableDownloads(); ProtegeApplication.getBackgroundTaskManager().endTask(autoUpdateTask); if (!downloads.isEmpty()){ Map<String, PluginRegistry> map = new LinkedHashMap<String, PluginRegistry>(); map.put("Downloads", registry); map.put("Updates", updatesProvider); showUpdatesDialog(map); } else { JOptionPane.showMessageDialog(null, "No additional plugins / updates available at this time."); } } } };
public void run() { PluginRegistry updatesProvider = new PluginRegistryImpl(getPluginRegistryLocation(), PLUGIN_UPDATE_REGISTRY); List<PluginInfo> updates = updatesProvider.getAvailableDownloads(); if (!updates.isEmpty()) { ProtegeApplication.getBackgroundTaskManager().endTask(autoUpdateTask); Map<String, PluginRegistry> map = new LinkedHashMap<String, PluginRegistry>(); map.put(PLUGIN_UPDATE_REGISTRY.getLabel(), updatesProvider); map.put(PLUGIN_DOWNLOAD_REGISTRY.getLabel(), new PluginRegistryImpl(getPluginRegistryLocation(), PLUGIN_DOWNLOAD_REGISTRY)); showUpdatesDialog(map); } else{ PluginRegistry registry = getPluginRegistry(); final List<PluginInfo> downloads = registry.getAvailableDownloads(); ProtegeApplication.getBackgroundTaskManager().endTask(autoUpdateTask); if (!downloads.isEmpty()){ Map<String, PluginRegistry> map = new LinkedHashMap<String, PluginRegistry>(); map.put("Downloads", registry); map.put("Updates", updatesProvider); showUpdatesDialog(map); } else { JOptionPane.showMessageDialog(null, "No additional plugins / updates available at this time."); } } } };
public void run() { try { updatesProvider = new PluginRegistryImpl(getPluginRegistryLocation(), PLUGIN_UPDATE_REGISTRY); updates = updatesProvider.getAvailableDownloads(); } finally { ProtegeApplication.getBackgroundTaskManager().endTask(autoUpdateTask); } if (!updates.isEmpty()) { Map<String, PluginRegistry> map = new LinkedHashMap<String, PluginRegistry>(); map.put(PLUGIN_UPDATE_REGISTRY.getLabel(), updatesProvider); map.put(PLUGIN_DOWNLOAD_REGISTRY.getLabel(), new PluginRegistryImpl(getPluginRegistryLocation(), PLUGIN_DOWNLOAD_REGISTRY)); showUpdatesDialog(map); } } };
public void run() { try { updatesProvider = new PluginRegistryImpl(getPluginRegistryLocation(), PLUGIN_UPDATE_REGISTRY); updates = updatesProvider.getAvailableDownloads(); } finally { ProtegeApplication.getBackgroundTaskManager().endTask(autoUpdateTask); } if (!updates.isEmpty()) { Map<String, PluginRegistry> map = new LinkedHashMap<String, PluginRegistry>(); map.put(PLUGIN_UPDATE_REGISTRY.getLabel(), updatesProvider); map.put(PLUGIN_DOWNLOAD_REGISTRY.getLabel(), new PluginRegistryImpl(getPluginRegistryLocation(), PLUGIN_DOWNLOAD_REGISTRY)); showUpdatesDialog(map); } } };