Changeset 1076
- Timestamp:
- May 15, 2009, 5:27:03 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/base2/net.sf.basedb.pluginutilities/trunk/src/net/sf/basedb/plugins/AbstractRunBinaryPlugin.java
r1046 r1076 30 30 import net.sf.basedb.core.BioAssaySet; 31 31 import net.sf.basedb.core.DbControl; 32 import net.sf.basedb.core.Experiment; 33 import net.sf.basedb.core.Item; 32 34 import net.sf.basedb.core.ItemParameterType; 33 35 import net.sf.basedb.core.Job; … … 256 258 List<BioAssay> assays = sourceBAS.getBioAssays().list(dc); 257 259 PluginParameter<BioAssay> par = new PluginParameter<BioAssay> 258 ( selectBASid, "Select assays", selectBASdescription,260 ( selectBASid, selectBASlabel, selectBASdescription, 259 261 new ItemParameterType<BioAssay>(BioAssay.class, assays.get(0), 260 262 true, assays.size(), assays) ); … … 316 318 signalHandler = new ThreadSignalHandler(); 317 319 return signalHandler; 320 } 321 322 323 public String isInContext(GuiContext context, Object item) 324 { 325 DbControl dc = sc.newDbControl(); 326 try { 327 Experiment e=Experiment.getById 328 (dc, sc.getCurrentContext(Item.EXPERIMENT).getId()); 329 int channels=e.getRawDataType().getChannels(); 330 if (channels<minNofChannels || channels>maxNofChannels) 331 return ("Number of channels must be between " + minNofChannels + 332 " and " + maxNofChannels); 333 } 334 finally { 335 if (dc != null) 336 dc.close(); 337 } 338 return null; 318 339 } 319 340 … … 415 436 protected BioAssaySet sourceBAS = null; 416 437 protected BioAssaySet selectBAS = null; 438 439 protected int minNofChannels=0; 440 protected int maxNofChannels=0; 441 417 442 protected Boolean selectBASconfigure = false; 418 443 protected String selectBASdescription = null; 419 444 protected final String selectBASid = "selectBAS"; 445 protected String selectBASlabel = "Select assays"; 420 446 421 447 // files
Note: See TracChangeset
for help on using the changeset viewer.