Changeset 5481


Ignore:
Timestamp:
Nov 8, 2010, 2:49:35 PM (12 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1542: Plug-ins should be able to suggest a better job name

Now fixed in all core plug-ins.

Location:
trunk/src
Files:
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/plugins/SimpleExport.java

    r5433 r5481  
    208208          storeValue(job, request, ri.getParameter(SAVE_AS));
    209209          storeValue(job, request, ri.getParameter(OVERWRITE));
     210
     211          response.setSuggestedJobName("Export table of " + context.getItem().toString().toLowerCase() +
     212              " data to file: " + job.getValue(SAVE_AS));
    210213          response.setExecuteImmediately("The job configuration is complete", ExecutionTime.SHORTEST, true);
    211214        }
  • trunk/src/core/net/sf/basedb/util/zip/AbstractFileUnpacker.java

    r5384 r5481  
    240240        storeValue(job, request, ri.getParameter(OVERWRITE));
    241241       
     242        File file = (File)job.getValue(ZIP_FILE);
     243        response.setSuggestedJobName("Unpack file '" + file.getName() +
     244            "' to " + job.getValue(UNPACK_DIRECTORY));
     245       
    242246        response.setDone("The job configuration is complete");
    243247      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/AnnotationFlatFileImporter.java

    r5430 r5481  
    587587        // Save context info
    588588        job.setValue("itemType", new StringParameterType(), context.getItem().name());
     589        File file = (File)job.getValue("file");
     590        response.setSuggestedJobName("Import " + context.getItem().toString().toLowerCase() +
     591            " annotations from file '" + file.getName() + "'");
    589592        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);   
    590593
  • trunk/src/plugins/core/net/sf/basedb/plugins/Base1PluginExecuter.java

    r5405 r5481  
    499499          }
    500500        }
     501        PluginConfiguration config = configuration.getPluginConfiguration();
     502        BioAssaySet bioAssaySet = (BioAssaySet)job.getValue(SOURCE_BIOASSAYSET);
     503        response.setSuggestedJobName("Run BASE 1 plug-in '" + config.getName() +
     504            "' on bioassay set '" + bioAssaySet.getName() + "'");
    501505        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
    502506      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/BaseFileExporterPlugin.java

    r5424 r5481  
    275275          // No filename --> immediate download
    276276          BioAssaySet source = (BioAssaySet)request.getParameterValue("source");
     277          response.setSuggestedJobName("Download bioassay set '" +source.getName() + "' as " +
     278              job.getValue("fileformat") + " BASEfile");
     279         
    277280          response.setDownloadImmediately("Export bioassay set " +
    278281              source.getName(), Job.ExecutionTime.SHORT, true);
     
    280283        else
    281284        {
     285          BioAssaySet source = (BioAssaySet)job.getValue("source");
     286          response.setSuggestedJobName("Export bioassay set '" +source.getName() + "' to " +
     287              job.getValue("fileformat") + " BASEfile: " + job.getValue(SAVE_AS));
     288         
    282289          response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
    283290        }
  • trunk/src/plugins/core/net/sf/basedb/plugins/BfsExporterPlugin.java

    r5439 r5481  
    227227        storeValues(job, request, ri.getParameter("assayFields"));
    228228
     229        BioAssaySet bioAssaySet = (BioAssaySet)job.getValue("source");
     230        response.setSuggestedJobName("Export bioassay set '" +bioAssaySet.getName() + "' to " +
     231            job.getValue(PARAMETER_FILEFORMAT) + " BFS file: " + job.getValue("saveTo"));
     232       
    229233        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
    230234      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/CdfFileReporterImporter.java

    r5451 r5481  
    295295        storeValue(job, request, ri.getParameter("mode"));
    296296        storeValue(job, request, ri.getParameter("reporterType"));
     297       
     298        File file = (File)job.getValue("file");
     299        response.setSuggestedJobName("Create reporters from Affymetrix CDF file '" +
     300            file.getName() + "'");
    297301        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
    298302      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/FormulaFilter.java

    r5405 r5481  
    291291        storeValue(job, request, ri.getParameter(CHILD_DESCRIPTION));
    292292       
     293        BioAssaySet bioAssaySet = (BioAssaySet)job.getValue(SOURCE_BIOASSAYSET);
     294        response.setSuggestedJobName("Filter bioassay set '" + bioAssaySet.getName() +
     295            "': " + job.getValue("expression"));
     296       
    293297        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
    294298      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/GalExporter.java

    r5405 r5481  
    238238          storeValue(job, request, ri.getParameter(OVERWRITE));
    239239          storeValue(job, request, ri.getParameter("setAsReporterMap"));
     240         
     241          ArrayDesign design = (ArrayDesign)job.getValue("design");
     242          response.setSuggestedJobName("Export array design '" + design.getName() +
     243              "' as GAL file: " + job.getValue(SAVE_AS));
     244         
    240245          response.setDone("The job configuration is complete", ExecutionTime.SHORTEST);
    241246        }
  • trunk/src/plugins/core/net/sf/basedb/plugins/HelpExporter.java

    r5405 r5481  
    231231          storeValue(job, request, ri.getParameter(SAVE_AS));
    232232          storeValue(job, request, ri.getParameter(OVERWRITE));
     233          Client client = (Client)job.getValue("client");
     234          response.setSuggestedJobName("Export help texts for client application '" + client.getName() + "'");
    233235          response.setDone("The job configuration is complete", ExecutionTime.SHORTEST);
    234236        }
  • trunk/src/plugins/core/net/sf/basedb/plugins/HelpImporter.java

    r5405 r5481  
    185185      storeValue(job, request, clientParameter);
    186186      storeValue(job, request, overWriteParameter);
     187     
     188      File file = (File)job.getValue("file");
     189      Client client = (Client)job.getValue("client");
     190      response.setSuggestedJobName("Import help texts to client application '" + client.getName() +
     191          "' from file '" + file.getName() + "'");
    187192     
    188193      response.setDone("The job configuration is complete");     
  • trunk/src/plugins/core/net/sf/basedb/plugins/IlluminaRawDataImporter.java

    r5384 r5481  
    328328        storeValue(job, request, numberFormatErrorParameter);
    329329       
     330        File file = (File)job.getValue("file");
     331        if (context.getItem() == Item.EXPERIMENT)
     332        {
     333          Experiment exp = (Experiment)job.getValue("experiment");
     334          response.setSuggestedJobName("Import Illumina raw bioassays to experiment '" + exp.getName() +
     335              "' from file '" + file.getName() + "'");
     336        }
     337        else
     338        {
     339          response.setSuggestedJobName("Import Illumina raw bioassays from file '" +
     340              file.getName() + "'");
     341        }
     342       
    330343        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
    331344      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/IntensityCalculatorPlugin.java

    r5405 r5481  
    424424        }
    425425       
     426        response.setSuggestedJobName("Create root bioassay set in experiment '" + experiment.getName() +
     427            "' using formula '" + formula.getName() + "'");
     428       
    426429        response.setDone("Job configuration complete", execTime);
    427430      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/JepExtraValueCalculator.java

    r5405 r5481  
    276276        storeValue(job, request, expressionParameter);
    277277       
     278        BioAssaySet bioAssaySet = (BioAssaySet)job.getValue(SOURCE_BIOASSAYSET);
     279        ExtraValueType extraValueType = (ExtraValueType)job.getValue("extraValueType");
     280        response.setSuggestedJobName("Create extra value '" + extraValueType.getName() +
     281            "' for bioassay set '" + bioAssaySet.getName() + "': " + job.getValue("expression"));
     282       
    278283        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
    279284      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/JepIntensityTransformer.java

    r5405 r5481  
    307307        }
    308308       
     309        BioAssaySet bioAssaySet = (BioAssaySet)job.getValue(SOURCE_BIOASSAYSET);
     310        response.setSuggestedJobName("Intensity transform on bioassay set '" + bioAssaySet.getName() + "'");
     311       
    309312        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
    310313      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/LowessNormalization.java

    r5405 r5481  
    336336        storeValue(job, request, blockGroupParameter);
    337337        storeValue(job, request, ri.getParameter("excludeReporters"));
     338       
     339        BioAssaySet bioAssaySet = (BioAssaySet)job.getValue(SOURCE_BIOASSAYSET);
     340        response.setSuggestedJobName("Lowess normalization on bioassay set '" +
     341            bioAssaySet.getName() + "'");
     342       
    338343        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
    339344      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/ManualTransformCreator.java

    r5384 r5481  
    310310      }
    311311     
     312      BioAssaySet bioAssaySet = (BioAssaySet)job.getValue(SOURCE_BIOASSAYSET);
     313      PluginConfiguration config = configuration.getPluginConfiguration();
     314      response.setSuggestedJobName("Manual transform '" + config.getName() +
     315        "' on bioassay set '" + bioAssaySet.getName() + "'");
     316
    312317      boolean importSpotData = "import".equals(job.getValue("spotData"));
    313318      if (importSpotData)
  • trunk/src/plugins/core/net/sf/basedb/plugins/MedianRatioNormalization.java

    r5405 r5481  
    366366        // 2-channel only
    367367        storeValue(job, request, blockGroupParameter);
     368       
     369        BioAssaySet bioAssaySet = (BioAssaySet)job.getValue(SOURCE_BIOASSAYSET);
     370        response.setSuggestedJobName("Median ratio normalization on bioassay set '" +
     371            bioAssaySet.getName() + "'");
     372
    368373        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
    369374      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/PackedFileExporter.java

    r5405 r5481  
    307307        storeValue(job, request, ri.getParameter("root"));
    308308        ParameterType<Integer> filesAndDirectories = new IntegerParameterType(null, null, null, true, 0, 0, 0, null);
     309        int numSelected = 0;
    309310        if (selectedFiles != null && selectedFiles.size() > 0)
    310311        {
     312          numSelected += selectedFiles.size();
    311313          job.setValues("files", filesAndDirectories, selectedFiles);
    312314        }
    313315        if (selectedDirs != null && selectedDirs.size() > 0)
    314316        {
     317          numSelected += selectedDirs.size();
    315318          job.setValues("directories", filesAndDirectories, selectedDirs);
    316319        }
     
    322325          storeValue(job, request, ri.getParameter(OVERWRITE));
    323326          storeValue(job, (PluginParameter<String>)ri.getParameter(SAVE_AS), saveAs);
     327          response.setSuggestedJobName("Pack " + numSelected + " files/directories to " +
     328              packer.getFileExtension() + " file: " + job.getValue(SAVE_AS));
    324329          response.setDone("Job configuration is done", ExecutionTime.SHORT);
    325330        }
  • trunk/src/plugins/core/net/sf/basedb/plugins/PlateFlatFileImporter.java

    r5451 r5481  
    2727import net.sf.basedb.core.BaseException;
    2828import net.sf.basedb.core.DbControl;
     29import net.sf.basedb.core.File;
    2930import net.sf.basedb.core.FileType;
    3031import net.sf.basedb.core.Include;
     
    356357        storeValue(job, request, numberFormatErrorParameter);
    357358       
     359        File file = (File)job.getValue("file");
     360        response.setSuggestedJobName("Import plates from file '" + file.getName() + "'");
     361       
    358362        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
    359363      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/PlateMappingExporter.java

    r5405 r5481  
    229229          storeValue(job, request, ri.getParameter(SAVE_AS));
    230230          storeValue(job, request, ri.getParameter(OVERWRITE));
     231          PlateMapping pm = (PlateMapping)job.getValue("plateMapping");
     232          response.setSuggestedJobName("Export plate mapping '" + pm.getName() + "'");
    231233          response.setDone("The job configuration is complete", ExecutionTime.SHORTEST);
    232234        }
  • trunk/src/plugins/core/net/sf/basedb/plugins/PlateMappingImporter.java

    r4513 r5481  
    3434import net.sf.basedb.core.BaseException;
    3535import net.sf.basedb.core.DbControl;
     36import net.sf.basedb.core.File;
    3637import net.sf.basedb.core.Item;
    3738import net.sf.basedb.core.ItemQuery;
     
    207208        storeValue(job, request, fileParameter);
    208209
     210        File file = (File)job.getValue("file");
     211        response.setSuggestedJobName("Import plate mapping '" + job.getValue("name") +
     212            "' from file '" + file.getName() + "'");
     213
    209214        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
    210215      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/PluginConfigurationExporter.java

    r5405 r5481  
    178178          storeValue(job, request, ri.getParameter(SAVE_AS));
    179179          storeValue(job, request, ri.getParameter(OVERWRITE));
     180          response.setSuggestedJobName("Export " + selectedItems.size() +
     181              " plugin configurations to file: " + job.getValue(SAVE_AS));
    180182          response.setDone("The job configuration is complete", ExecutionTime.SHORTEST);
    181183        }
  • trunk/src/plugins/core/net/sf/basedb/plugins/PluginConfigurationImporter.java

    r5405 r5481  
    208208      else
    209209      {
     210        File file = (File)job.getValue("xmlfile");
     211        response.setSuggestedJobName("Import plugin configurations from file '" + file.getName()+ "'");
    210212        response.setDone("The job configuration is complete");
    211213      }
     
    231233      }
    232234     
     235      File file = (File)job.getValue("xmlfile");
     236      response.setSuggestedJobName("Import plugin configurations from file '" + file.getName()+ "'");
    233237      response.setDone("The job configuration is complete");
    234238    }
  • trunk/src/plugins/core/net/sf/basedb/plugins/PrintMapFlatFileImporter.java

    r5451 r5481  
    275275        storeValue(job, request, missingWellErrorParameter);
    276276       
     277        ArrayDesign design = (ArrayDesign)job.getValue("arrayDesign");
     278        File file = (File)job.getValue("file");
     279        response.setSuggestedJobName("Import print map for array design '" + design.getName() +
     280            "' from file '" + file.getName() + "'");
     281       
    277282        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
    278283      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/RawDataFlatFileImporter.java

    r5451 r5481  
    552552        storeValue(job, request, numberOutOfRangeErrorParameter);
    553553       
     554        if (context.getItem() == Item.RAWBIOASSAY)
     555        {
     556          RawBioAssay rba = (RawBioAssay)job.getValue("rawBioAssay");
     557          File file = (File)job.getValue("file");
     558          response.setSuggestedJobName("Import raw data to raw bioassay '" + rba.getName() +
     559              "' from file '" + file.getName() + "'");
     560        }
     561        else
     562        {
     563          Experiment exp = (Experiment)job.getValue("experiment");
     564          response.setSuggestedJobName("Import raw data to experiment '" + exp.getName() + "'");
     565        }
     566       
    554567        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
    555568      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/ReporterMapFlatFileImporter.java

    r5451 r5481  
    482482        storeValue(job, request, stringTooLongErrorParameter);
    483483       
     484        ArrayDesign design = (ArrayDesign)job.getValue("arrayDesign");
     485        File file = (File)job.getValue("file");
     486        response.setSuggestedJobName("Import reporter map for array design '" + design.getName() +
     487            "' from file '" + file.getName() + "'");
     488       
    484489        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
    485490      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/AbstractItemImporter.java

    r5449 r5481  
    419419        }
    420420
     421        File file = (File)job.getValue("file");
     422        response.setSuggestedJobName("Import " + context.getItem().toString().toLowerCase()
     423            + " items from file '" + file.getName() + "'");
     424       
    421425        // Save context info
    422426        response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);   
  • trunk/src/plugins/core/net/sf/basedb/plugins/executor/ExternalProgramExecutor.java

    r5480 r5481  
    3636import net.sf.basedb.core.ParameterException;
    3737import net.sf.basedb.core.PermissionDeniedException;
     38import net.sf.basedb.core.PluginConfiguration;
    3839import net.sf.basedb.core.PluginDefinition;
    3940import net.sf.basedb.core.PluginParameter;
     
    529530      storeValue(job, request, ri.getParameter(SOURCE_BIOASSAYSET));
    530531      storeValue(job, request, ri.getParameter(PARAMETER_DEBUG_MODE));
     532
     533      BioAssaySet bioAssaySet = (BioAssaySet)job.getValue(SOURCE_BIOASSAYSET);
     534      PluginConfiguration config = configuration.getPluginConfiguration();
     535      response.setSuggestedJobName("Run external program '" + config.getName() +
     536        "' on bioassay set '" + bioAssaySet.getName() + "'");
    531537      response.setDone("Job configuration is complete");
    532538    }
Note: See TracChangeset for help on using the changeset viewer.