Changeset 3665
- Timestamp:
- Aug 14, 2007, 2:53:42 PM (16 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/net/sf/basedb/core/Install.java
r3642 r3665 334 334 335 335 // Reporters 336 createRoleKey(Item.REPORTERTYPE, "Reporter types", "Gives access to reporter types", guests_use_ power_users_all);337 createRoleKey(Item.REPORTER, "Reporters", "Gives access to reporter", guests_use_ power_users_all);336 createRoleKey(Item.REPORTERTYPE, "Reporter types", "Gives access to reporter types", guests_use_administrators_all); 337 createRoleKey(Item.REPORTER, "Reporters", "Gives access to reporter", guests_use_administrators_all); 338 338 createRoleKey(Item.REPORTERLIST, "Reporter lists", "Gives access to reporter lists", users_create); 339 339 -
trunk/src/test/net/sf/basedb/test/roles/AdminTest.java
r2935 r3665 32 32 import net.sf.basedb.core.DbControl; 33 33 import net.sf.basedb.core.Directory; 34 import net.sf.basedb.core.File; 35 import net.sf.basedb.core.FileType; 34 36 import net.sf.basedb.core.Group; 35 37 import net.sf.basedb.core.MultiPermissions; 36 38 import net.sf.basedb.core.Permission; 39 import net.sf.basedb.core.PluginConfiguration; 37 40 import net.sf.basedb.core.PluginDefinition; 38 41 import net.sf.basedb.core.Quota; … … 43 46 import net.sf.basedb.plugins.PlateFlatFileImporter; 44 47 import net.sf.basedb.plugins.PrintMapFlatFileImporter; 45 import net.sf.basedb.plugins.ReporterFlatFileImporter;46 48 import net.sf.basedb.plugins.ReporterMapFlatFileImporter; 49 import net.sf.basedb.test.FileUtil; 50 import net.sf.basedb.test.MouseData; 51 import net.sf.basedb.test.PluginUtil; 47 52 import net.sf.basedb.test.TestUtil; 48 53 … … 55 60 <li>Create user: {@link #createPowerUser(DbControl, Group)} 56 61 <li>Create guest: {@link #createGuest(DbControl, Group)} 62 <li>Create fileformat for import: 63 <li>Import reporters: 57 64 </ol> 58 65 … … 87 94 Set<Permission> USE = EnumSet.of(Permission.USE); 88 95 Set<SharedItem> plugins = new HashSet<SharedItem>(); 89 plugins.add(PluginDefinition.getByClassName(dc, ReporterFlatFileImporter.class.getName()));90 96 plugins.add(PluginDefinition.getByClassName(dc, PlateFlatFileImporter.class.getName())); 91 97 plugins.add(PluginDefinition.getByClassName(dc, ReporterMapFlatFileImporter.class.getName())); … … 93 99 addPermissions(dc, powerUser, plugins, USE); 94 100 dc.commit(); 101 102 //Configuration to import reporters 103 dc = TestUtil.getDbControl(); 104 PluginConfiguration reporterImporter = PluginUtil.createPluginConfiguration(dc, "Reporters for project A", 105 "net.sf.basedb.plugins.ReporterFlatFileImporter", MouseData.getReporterParameters()); 106 107 PluginConfiguration genePixReporterImporter = PluginUtil.createPluginConfiguration(dc, "Reporters from GenePix file", 108 "net.sf.basedb.plugins.ReporterFlatFileImporter", MouseData.getGenePixReporterParameters()); 109 dc.commit(); 110 111 //Upload file with reporters 112 dc = TestUtil.getDbControl(); 113 File reporters = FileUtil.uploadFile(dc, "plates_and_reporters.mouse.v4.37k.txt", FileType.PLATE); 114 dc.commit(); 115 116 //Import reporters 117 PluginUtil.importReporters(reporterImporter, reporters, "Importing reporters for project A"); 95 118 96 119 TestUtil.logout(); -
trunk/src/test/net/sf/basedb/test/roles/PowerUserTest.java
r3659 r3665 73 73 <li>Create plate type: {@link #createPlateType(DbControl, String, int, int)} 74 74 <li>Create file formats for import: 75 <li>Import reporters:76 75 <li>Import plates: 77 76 <li>Create array design: {@link #createArrayDesign(DbControl, String)} … … 133 132 "net.sf.basedb.plugins.PlateFlatFileImporter", MouseData.getPlateParameters()); 134 133 135 PluginConfiguration reporterImporter = PluginUtil.createPluginConfiguration(dc, "Reporters for project A",136 "net.sf.basedb.plugins.ReporterFlatFileImporter", MouseData.getReporterParameters());137 138 PluginConfiguration genePixReporterImporter = PluginUtil.createPluginConfiguration(dc, "Reporters from GenePix file",139 "net.sf.basedb.plugins.ReporterFlatFileImporter", MouseData.getGenePixReporterParameters());140 141 134 PluginConfiguration genePixFeatureImporter = PluginUtil.createPluginConfiguration(dc, "Features from GenePix file", 142 135 "net.sf.basedb.plugins.ReporterMapFlatFileImporter", MouseData.getGenePixReporterMapParameters()); … … 154 147 dc = TestUtil.getDbControl(); 155 148 156 File plates = FileUtil.uploadFile(dc, "plates_and_reporters.mouse.v4.37k.txt", FileType.PLATE); 157 File reporters = plates; // Reporter info is found in the plate file 149 File plates = FileUtil.uploadFile(dc, "plates_and_reporters.mouse.v4.37k.txt", FileType.PLATE); 158 150 File printMap = FileUtil.uploadFile(dc, "printmap.mouse.v4.37k.tam", FileType.PRINT_MAP); 159 151 160 152 dc.commit(); 161 153 162 PluginUtil.importReporters(reporterImporter, reporters, "Importing reporters for project A");163 154 importPlates(platesImporter, plates, "Plate A", plateType); 164 155
Note: See TracChangeset
for help on using the changeset viewer.