From a3fd7f44cbc5d69e9866dfd2b9889fdda1342490 Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Thu, 1 Feb 2018 17:30:35 +0000 Subject: [PATCH] JAL-2890 removed tool parameter from validate/submit job methods --- src/jalview/ext/cipres/TreeJob.java | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/jalview/ext/cipres/TreeJob.java b/src/jalview/ext/cipres/TreeJob.java index 345279b..fd77d17 100644 --- a/src/jalview/ext/cipres/TreeJob.java +++ b/src/jalview/ext/cipres/TreeJob.java @@ -36,7 +36,7 @@ public class TreeJob // Clients for umbrella application, not currently in use. private static CiClient adminClient; - private CiClient userClient; + private static CiClient userClient; public TreeJob() { @@ -144,13 +144,13 @@ public class TreeJob * doesn't actually run the job. This is a lightweight way to validate that * the given parameters are correct for a specified tool. */ - public CiJob validateJobParams(String toolName) + public CiJob validateJobParams() { CiJob validateJob = null; try { validateJob = cipresClient - .validateJob(toolName, vParams, inputParams, metadata); + .validateJob(tool, vParams, inputParams, metadata); validateJob.show(true); // currently outputs just to console, should be // graphical paramsValidated = true; @@ -179,20 +179,20 @@ public class TreeJob * Sends the job to CIPRES. If the job hasn't been validated beforehand this * method will do so before submitting. * - * @param toolName + * */ - public CiJob submitJob(String toolName) + public CiJob submitJob() { if (!paramsValidated) { // validate before running some expensive job first. - CiJob validateJob = validateJobParams(toolName); + CiJob validateJob = validateJobParams(); // should be redundant but extra check here anyway. if (!validateJob.isError()) { - submittedJob = submitJob(toolName); + submittedJob = submitJob(); } } else @@ -200,7 +200,7 @@ public class TreeJob try { submittedJob = cipresClient - .submitJob(toolName, vParams, inputParams, metadata); + .submitJob(tool, vParams, inputParams, metadata); } catch (CiCipresException ce) { @@ -209,10 +209,11 @@ public class TreeJob "Cipres error in submitted job, code=" + ed.code + ", message=" + ed.displayMessage); + // invalid parameters shouldn't be possible here but just in case. if (ed.code == ErrorData.FORM_VALIDATION) { for (ParamError pe : ed.paramError) - // invalid parameters shouldn't be possible here but just in case. + { System.out.println(pe.param + ": " + pe.error); } @@ -227,4 +228,5 @@ public class TreeJob return submittedJob; } + } -- 1.7.10.2