JAL-2890 removed tool parameter from validate/submit job methods
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Thu, 1 Feb 2018 17:30:35 +0000 (17:30 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Thu, 1 Feb 2018 17:33:57 +0000 (17:33 +0000)
src/jalview/ext/cipres/TreeJob.java

index 345279b..fd77d17 100644 (file)
@@ -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;
   }
 
+
 }