use of org.cytoscape.app.internal.net.Update in project cytoscape-impl by cytoscape.
the class CheckForUpdatesPanel method getSelectedUpdates.
/**
* Obtain the set of {@link Update} objects corresponding to currently selected entries in the table of apps
* @return A set of {@link Update} objects corresponding to selected apps in the table
*/
private Set<Update> getSelectedUpdates() {
Set<Update> selectedUpdates = new HashSet<Update>();
int[] selectedRows = updatesTable.getSelectedRows();
for (int index = 0; index < selectedRows.length; index++) {
Update update = (Update) updatesTable.getModel().getValueAt(updatesTable.convertRowIndexToModel(selectedRows[index]), 0);
selectedUpdates.add(update);
}
return selectedUpdates;
}
use of org.cytoscape.app.internal.net.Update in project cytoscape-impl by cytoscape.
the class UpdateTask method run.
@Override
public void run(TaskMonitor taskMonitor) throws Exception {
if (app == null) {
taskMonitor.showMessage(TaskMonitor.Level.ERROR, "App name not provided");
return;
}
if (app.equals("all")) {
}
updateList = new ArrayList<>();
Set<Update> updates = updateManager.getUpdates();
if (app.equals("all")) {
updateList.addAll(updates);
} else {
for (Update update : updates) {
App appObject = update.getApp();
if (appObject.getAppName().equalsIgnoreCase(app))
updateList.add(update);
}
}
taskMonitor.setTitle("Updating apps");
insertTasksAfterCurrentTask(new InstallUpdatesTask(updates, appManager));
}
use of org.cytoscape.app.internal.net.Update in project cytoscape-impl by cytoscape.
the class InstallUpdatesTask method run.
@Override
public void run(TaskMonitor taskMonitor) throws Exception {
taskMonitor.setTitle("Install Updates");
taskMonitor.setTitle("");
List<WebApp> webApps = new ArrayList<WebApp>();
for (Update update : updates) {
webApps.add(update.getWebApp());
}
insertTasksAfterCurrentTask(new InstallAppsFromWebAppTask(webApps, appManager, false));
}