- Timestamp:
- Sep 5, 2006, 12:01:35 PM (17 years ago)
- Location:
- branches/2.0
- Files:
-
- 1 added
- 1 deleted
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/doc/specifications/migration/index.html
r2614 r2622 49 49 <li><a href="#Quota">Quota</a></li> 50 50 <li><a href="#Reporters">Reporters</a></li> 51 <li><a href="#Roles">Roles</a><br/> 52 <ol> 53 <li><a href="#defaultBaseRoles">Default BASE Roles</a></li> 54 <li><a href="#rolesPermissions">Role Permissions</a></li> 55 <li><a href="RolesAndPermissions.html">Roles And Permissions</a></li> 56 </ol> 57 </li> 51 <li><a href="#Roles">Roles</a></li> 58 52 <li><a href="#SampleOrigins">Sample Origins</a></li> 59 53 <li><a href="base1Tables.html">BASE 1 tables description</a></li> … … 160 154 <li>Each user is assigned one of <a href="../core/defaultdata.html#quota">default quotas</a>.</li> 161 155 <li>Quota assignment depends on the fileQuota in base 1 and the total usage in BASE 2.</li> 162 <li>Groups are not assigned any quotas</li>163 156 </ul> 164 157 … … 180 173 <h3>Default BASE Roles</h3> 181 174 </a> 175 176 <p> 177 Role assignment is done according to the following protocol: 178 </p> 179 182 180 <ol> 183 184 <li>A user shall be assigned to role <b>Guest</b> if the following roles apply:<br/> 181 <li>If <i>Admin privileges » Superuser</i> is checked that user shall <b><u>only</u></b> 182 be assigned to the BASE 2 role <b>Administrator</b>.<br/> 183 <ul> 184 <li>No read restrictions shall be set on users assigned to this role.</li> 185 </ul> 186 </li> 187 188 <li>If <i>Admin privileges » Complete read access</i> is checked that user shall be assigned 189 to the BASE 2 role <b>Supervisor</b>.<br/> 185 190 <ul> 186 <li>Hardware/Software Administrator</li> 187 <li>Arrays/Plates Administrator</li> 188 <li>Uploader</li> 189 <li>Reporters Viewer</li> 190 <li>Arrays/Plates Viewer</li> 191 <li>No read restrictions shall be set on users assigned to this role.</li> 192 <li>Additional roles may be assigned if the user has more permissions.</li> 191 193 </ul> 192 194 </li> 193 <li>A user shall be assigned to role <b>User</b> if the following roles apply:<br/> 195 196 <li>A user shall be assigned to at most one of the BASE 2 roles <b>Guest</b>, <b>User</b> and 197 <b>Power user</b>:<br/> 194 198 <ul> 195 <li>All roles that are needed for role <b>Guest</b>.</li> 196 <li>Reporter Administrator</li> 197 <li>Biomaterials Administrator</li> 198 <li>Hybridizations Administrator</li> 199 </ul> 200 </li> 201 <li>A user shall be assigned to role <b>Power User</b> if the following roles apply:<br/> 202 <ul> 203 <li>All roles that are needed for role <b>User</b>.</li> 204 <li>Protocols Administrator</li> 205 <li>Annotation Types Administrator</li> 206 </ul> 207 </li> 208 209 <li>If <i>Admin privileges » Complete read access</i> is checked that user shall be assigned to the role <b>Supervisor</b>.<br/> 210 <ul> 211 <li>No read restrictions shall be set on users assigned to this role.</li> 212 </ul> 213 </li> 214 <li>If <i>Admin privileges » Superuser</i> is checked that user shall <b><u>only</u></b> be assigned to the role <b>Administrator</b>.<br/> 215 <ul> 216 <li>No read restrictions shall be set on users assigned to this role.</li> 199 <li>Guest: Upload files</li> 200 <li>User: Guest + Add biomaterials, Add hybridizations, Create experiments 201 <li>Power user: User + Add file formats, Add reporters, Add hardware/software, 202 Add annotation types, Add arrays/plates, Add protocols 217 203 </ul> 218 204 </li> 219 205 </ol> 220 206 221 222 <a name="additionalBaseRoles">223 <h3>Additional BASE Roles</h3>224 </a>225 226 207 <p> 227 All users except those assigned to role <b>Administrator</b> shall also be assigned additional role[s] if needed. 228 229 <ul> 230 <li>User Administrator <br/>if <i>Admin privileges » Administer Users</i> is checked</li> 231 <li>Plugin Administrator <br/>if <i>Admin privileges » Add Plugins</i> is checked</li> 232 <li>News Administrator <br/>if <i>Admin privileges » Add News</i> is checked</li> 233 <li>Protocols Administrator <br/>if <i>Advanced rights » Add Protocols</i> is checked</li> 234 <li>Arrays/Plates Administrator <br/>if <i>Advanced rights » Add Arrays/Plates</i> is checked</li> 235 <li>Annotation Types Administrator <br/>if <i>Advanced rights » Add AnnotationTypes</i> is checked</li> 236 <li>Hardware/Software Administrator <br/>if <i>Advanced rights » Add Hardware/Software</i> is checked</li> 237 <li>Reporter Administrator <br/>if <i>Advanced rights » Add Reporters</i> is checked</li> 238 <li>File Formats Administrator <br/>if <i>Advanced rights » Add File Formats</i> is checked</li> 239 <li>Biomaterials Administrator <br/>if <i>Basic editing » Add Biomaterials</i> is checked</li> 240 <li>Hybridizations Administrator <br/>if <i>Basic editing » Add Hybridization</i> is checked</li> 241 <li>Uploader <br/>if <i>Basic editing » Upload Files</i> is checked</li> 242 <li>Arrays/Plates Viewer <br/>if <i>Basic read access » Read Arrays/Plates</i> is checked</li> 243 <li>Hybridizations Viewer <br/>if <i>Basic read access » Read Hybridizations</i> is checked and <br/>Restricted Arrays/Plates <br/>if unchecked</li> 244 <li>Reporters Viewer <br/>if <i>Basic read access » Read Reporters</i> is checked and <br/>Restricted Hybridizations <br/>if unchecked</li> 245 <li>Biomaterials Viewer <br/>if <i>Basic read access » Read Biomaterials</i> is checked and <br/>Restricted Biomaterials <br/>if unchecked</li> 246 <li><i>Admin privileges » Speak in left frame</i> value shall not be assigned to any role.</li> 247 </ul> 208 If the user after this assignment has more permissions that couldn't be matched to a 209 predefined role, the user is assigned to one or more of the migration roles. The migration 210 roles are created by the migration program and have the same name as the BASE 1 permission 211 with the prefix "BASE 1:" added to it. 248 212 </p> 249 213 250 <a name="rolesPermissions">251 <h3>Role permissions</h3>252 </a>253 254 214 <p> 255 CRUWD is short for CREATE, READ, UPDATE, WRITE and DELETE215 C = Create, R = Read, U = Use, W = Write, D = Delete 256 216 </p> 257 258 <ul> 259 <li>User Administrator role has 260 <b>CRUWD</b> on User, Group, Role, Quota and 261 <b>C</b> on Directory</li> 262 263 <li>Plugin Administrator role has 264 <b>C</b> on PluginDefinition, PluginConfiguration</li> 265 266 <li>News Administrator role has 267 <b>CRUWD</b> on News</li> 268 269 <li>Protocols Administrator role has 270 <b>C</b> on Protocols and 271 <b>RU</b> to ProtocolType</li> 272 273 <li>Arrays/Plates Administrator role has 274 <b>RU</b> on PlateGeometry, ProtocolType and 275 <b>C</b> on PlateType, Plate, PlateMapping, ArrayDesign, ArrayBatch, ArraySlide</li> 276 277 <li>Annotation Types Administrator role has 278 <b>C</b> on AnnotationType</li> 279 280 <li>Hardware/Software Administrator role has 281 <b>C</b> on Hardware, Software and 282 <b>RU</b> on HardwareType, SoftwareType</li> 283 284 <li>Reporter Administrator role has 285 <b>CRUWD</b> on Reporter, ReporterType</li> 286 287 <li>File Formats Administrator role has 288 <b>C</b> on PluginConfiguration and 289 <span class="question">RU ? Standard import plugins</span></li> 290 291 <li>Biomaterials Administrator role has 292 <b>C</b> on BioSource, Sample, Extract, LabeledExtract, Label</li> 293 294 <li>Hybridizations Administrator role has 295 <b>C</b> on Hybridization, Scan, RawBioAssay</li> 296 297 <li>Uploader role has 298 <b>C</b> on File, Directory</li> 299 300 <li>Arrays/Plates Viewer role has 301 <b>R</b> on PlateGeometry, PlateType, Plate, PlateMapping, ProtocolType, ArrayDesign, ArrayBatch, ArraySlide</li> 302 303 <li>Hybridizations Viewer role has 304 <b>R</b> on Hybridization, Scan, RawBioAssay</li> 305 306 <li>Reporters Viewer role has 307 <b>RU</b> on Reporter and 308 <b>R</b> on ReporterType</li> 309 310 <li>Biomaterials Viewer role has 311 <b>R</b> on BioSource, Sample, Extract, LabeledExtract, Label</li> 312 313 314 <li>Restricted Arrays/Plates role has 315 <b>DENIED</b> on PlateGeometry, PlateType, Plate, PlateMapping, ProtocolType, ArrayDesign, ArrayBatch, ArraySlide</li> 316 317 <li>Restricted Hybridizations role has 318 <b>DENIED</b> on Hybridization, Scan, RawBioAssay</li> 319 320 <li>Restricted Biomaterials role has 321 <b>DENIED</b> on BioSource, Sample, Extract, LabeledExtract, Label</li> 322 323 </ul> 324 </p> 325 217 218 <table style="border: 1px solid #000000" cellspacing="0" cellpadding="2" width="100%"> 219 <tr style="background: #E0E0E0"> 220 <th>BASE 1 permission</th> 221 <th>BASE 2 Permissions</th> 222 </tr> 223 224 <tr valign="top"> 225 <td style="border-top: 1px solid #000000">Administer users</td> 226 <td style="border-top: 1px solid #000000"> 227 USER (CRUWD), GROUP (CRUWD), ROLE (CRUWD), <br> 228 QUOTA (CRUWD), QUOTATYPE (RU), DIRECTORY (C) 229 </td> 230 </tr> 231 232 <tr valign="top"> 233 <td style="border-top: 1px solid #000000">Speak in left frame</td> 234 <td style="border-top: 1px solid #000000"> 235 Not used by BASE 2. 236 </td> 237 </tr> 238 239 <tr valign="top"> 240 <td style="border-top: 1px solid #000000">Add plug-ins</td> 241 <td style="border-top: 1px solid #000000">PLUGINDEFINITION (C), PLUGINCONFIGURATION (C), PLUGINTYPE (RU)</td> 242 </tr> 243 244 <tr valign="top"> 245 <td style="border-top: 1px solid #000000">Add news</td> 246 <td style="border-top: 1px solid #000000">NEWS (CRUWD)</td> 247 </tr> 248 249 <tr valign="top"> 250 <td style="border-top: 1px solid #000000">Add protocols</td> 251 <td style="border-top: 1px solid #000000">PROTOCOL (CRUWD), PROTOCOLTYPE (RU)</td> 252 </tr> 253 254 <tr valign="top"> 255 <td style="border-top: 1px solid #000000">Add arrays/plates</td> 256 <td style="border-top: 1px solid #000000"> 257 PLATEGEOMETRY (RU), PLATETYPE (C), PLATE (C), PLATEMAPPING (RU),<br> 258 ARRAYDESIGN (C), ARRAYBATCH (C), ARRAYSLIDE (C), PROTOCOLTYPE (RU) 259 </td> 260 </tr> 261 262 <tr valign="top"> 263 <td style="border-top: 1px solid #000000">Add annotation types</td> 264 <td style="border-top: 1px solid #000000"> 265 ANNOTATIONTYPE (C), ANNOTATIONTYPECATEGORY (C) 266 </td> 267 </tr> 268 269 <tr valign="top"> 270 <td style="border-top: 1px solid #000000">Add hardware/software</td> 271 <td style="border-top: 1px solid #000000"> 272 HARDWARE (C), HARDWARETYPE (RU), SOFTWARE (C), SOFTWARETYPE (RU) 273 </td> 274 </tr> 275 276 <tr valign="top"> 277 <td style="border-top: 1px solid #000000">Add reporters</td> 278 <td style="border-top: 1px solid #000000"> 279 REPORTER (CRUWD), REPORERTYPE (CRUWD), REPORTERLIST (C) 280 </td> 281 </tr> 282 283 <tr valign="top"> 284 <td style="border-top: 1px solid #000000">Add file formats</td> 285 <td style="border-top: 1px solid #000000"> 286 PLUGINCONFIGURATION (C) 287 </td> 288 </tr> 289 290 <tr valign="top"> 291 <td style="border-top: 1px solid #000000">Read more user info</td> 292 <td style="border-top: 1px solid #000000"> 293 - 294 </td> 295 </tr> 296 297 <tr valign="top"> 298 <td style="border-top: 1px solid #000000">Read plugins (if missing)</td> 299 <td style="border-top: 1px solid #000000"> 300 PLUGINDEFINITION (DENIED), PLUGINCONFIGURATION (DENIED) 301 </td> 302 </tr> 303 304 <tr valign="top"> 305 <td style="border-top: 1px solid #000000">Create MAGE-ML file</td> 306 <td style="border-top: 1px solid #000000"> 307 - 308 </td> 309 </tr> 310 311 <tr valign="top"> 312 <td style="border-top: 1px solid #000000">Share with world</td> 313 <td style="border-top: 1px solid #000000"> 314 SHARE_TO_EVERYONE 315 </td> 316 </tr> 317 318 <tr valign="top"> 319 <td style="border-top: 1px solid #000000">Add biomaterials</td> 320 <td style="border-top: 1px solid #000000"> 321 BIOSOURCE (C), SAMPLE (C), EXTRACT (C), LABELEDEXTRACT (C), LABEL (C) 322 </td> 323 </tr> 324 325 <tr valign="top"> 326 <td style="border-top: 1px solid #000000">Add hybridization</td> 327 <td style="border-top: 1px solid #000000"> 328 HYBRIDIZATION (C), SCAN (C), RAWBIOASSAY (C) 329 </td> 330 </tr> 331 332 <tr valign="top"> 333 <td style="border-top: 1px solid #000000">Create experiments</td> 334 <td style="border-top: 1px solid #000000"> 335 EXPERIMENT (C) 336 </td> 337 </tr> 338 339 <tr valign="top"> 340 <td style="border-top: 1px solid #000000">Edit experiments</td> 341 <td style="border-top: 1px solid #000000"> 342 - 343 </td> 344 </tr> 345 346 <tr valign="top"> 347 <td style="border-top: 1px solid #000000">Upload files</td> 348 <td style="border-top: 1px solid #000000"> 349 FILE (C), DIRECTORY (C) 350 </td> 351 </tr> 352 353 <tr valign="top"> 354 <td style="border-top: 1px solid #000000">Read arrays/plates (if missing)</td> 355 <td style="border-top: 1px solid #000000"> 356 PLATEGEOMETRY (DENIED), PLATETYPE (DENIED), PLATE (DENIED), <br> 357 PLATEMAPPING (DENIED), ARRAYDESIGN (DENIED),<br> 358 ARRAYBATCH (DENIED), ARRAYSLIDE (DENIED) 359 </td> 360 </tr> 361 362 <tr valign="top"> 363 <td style="border-top: 1px solid #000000">Read user info (if missing)</td> 364 <td style="border-top: 1px solid #000000"> 365 USER (DENIED) 366 </td> 367 </tr> 368 369 <tr valign="top"> 370 <td style="border-top: 1px solid #000000">Read biomaterials (if missing)</td> 371 <td style="border-top: 1px solid #000000"> 372 BIOSOURCE (DENIED), SAMPLE (DENIED), EXTRACT (DENIED),<br> 373 LABELEDEXTRACT (DENIED), LABEL (DENIED) 374 </td> 375 </tr> 376 377 <tr valign="top"> 378 <td style="border-top: 1px solid #000000">Read hybridizations (if missing)</td> 379 <td style="border-top: 1px solid #000000"> 380 HYBRIDIZATION (DENIED), SCAN (DENIED), RAWBIOASSAY (DENIED) 381 </td> 382 </tr> 383 384 <tr valign="top"> 385 <td style="border-top: 1px solid #000000">Read experiments (if missing)</td> 386 <td style="border-top: 1px solid #000000"> 387 EXPERIMENT (DENIED) 388 </td> 389 </tr> 390 391 <tr valign="top"> 392 <td style="border-top: 1px solid #000000">Read reporters</td> 393 <td style="border-top: 1px solid #000000"> 394 REPORTER (RU), REPORTERTYPE (RU) 395 </td> 396 </tr> 397 </table> 326 398 327 399 <a name="SampleOrigins"> -
branches/2.0/src/clients/migrate/migrate.properties.in
r2614 r2622 25 25 db1.user = 26 26 db1.password = 27 db1.url = jdbc:mysql://localhost:3306/base 27 db1.url = jdbc:mysql://localhost:3306/base?zeroDateTimeBehavior=convertToNull 28 28 db1.driver = com.mysql.jdbc.Driver 29 29 # Number of items to handle in one batch or query … … 65 65 # 66 66 67 includeQuota = yes 67 68 includeRole = yes 68 69 includeReporter = yes -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/AnnotationTransfer.java
r2614 r2622 76 76 public void start() 77 77 { 78 startProgress(getInt("countSampleAnnotations")); 78 int count = getInt("countSampleAnnotations"); 79 initIdMap(count); 80 startProgress(count); 79 81 runUnBatched( 80 82 prepareStatementFromFile("selectSampleAnnotations"), 0, getBatchSize()); -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/GroupTransfer.java
r2614 r2622 27 27 import net.sf.basedb.core.DbControl; 28 28 import net.sf.basedb.core.Group; 29 import net.sf.basedb.core.Quota; 29 30 import net.sf.basedb.core.User; 30 31 import java.sql.PreparedStatement; … … 54 55 */ 55 56 private UserTransfer userT = null; 57 private QuotaTransfer quotaT = null; 56 58 57 59 /** 58 60 @param userT Depends on a finnished UserTransfer. 59 61 */ 60 GroupTransfer(UserTransfer userT )62 GroupTransfer(UserTransfer userT, QuotaTransfer quotaT) 61 63 { 62 if (userT.isDone() )64 if (userT.isDone() && quotaT.isDone()) 63 65 { 64 66 this.userT = userT; 67 this.quotaT = quotaT; 65 68 } 66 69 else … … 106 109 group.setDescription(rs.getString(3)); 107 110 group.setRemoved(rs.getBoolean(4)); 111 long byteQuota = rs.getLong(6); 112 if (rs.wasNull()) byteQuota = Quota.UNLIMITED; 113 group.setQuota(quotaT.getQuotaForTotal(dc, byteQuota)); 114 108 115 // Add users to this group 109 116 PreparedStatement usersSql = prepareStatementFromFile("selectUsersByGroup"); -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/HybridizationTransfer.java
r2614 r2622 26 26 import net.sf.basedb.core.ArraySlide; 27 27 import net.sf.basedb.core.BaseException; 28 import net.sf.basedb.core.BioMaterialEvent; 28 29 import net.sf.basedb.core.CommonItem; 29 30 import net.sf.basedb.core.DbControl; 30 31 import net.sf.basedb.core.Hybridization; 32 import net.sf.basedb.core.LabeledExtract; 33 34 import java.sql.PreparedStatement; 31 35 import java.sql.ResultSet; 32 36 import java.sql.SQLException; … … 50 54 public class HybridizationTransfer extends CommonItemTransfer 51 55 { 52 ArraySlideTransfer arraySlideT = null; 56 private ArraySlideTransfer arraySlideT = null; 57 private LabeledExtractTransfer labeledExtractT = null; 58 private ProtocolTransfer protocolT = null; 53 59 54 60 /** … … 60 66 */ 61 67 HybridizationTransfer(UserTransfer userT, GroupTransfer groupT, 62 ArraySlideTransfer arraySlideT )68 ArraySlideTransfer arraySlideT, LabeledExtractTransfer labeledExtractT, ProtocolTransfer protocolT) 63 69 { 64 70 super(userT, groupT); 65 if (arraySlideT.isDone() )71 if (arraySlideT.isDone() && labeledExtractT.isDone() && protocolT.isDone()) 66 72 { 67 73 this.arraySlideT = arraySlideT; 74 this.labeledExtractT = labeledExtractT; 75 this.protocolT = protocolT; 68 76 } 69 77 else … … 98 106 Hybridization hybridization = Hybridization.getNew(dc); 99 107 setCommonItemData(dc, (CommonItem) hybridization, rs); 100 int slideId = rs.getInt(1 0);108 int slideId = rs.getInt(11); 101 109 if (slideId != 0) 102 110 { … … 111 119 } 112 120 } 121 BioMaterialEvent creationEvent = hybridization.getCreationEvent(); 122 creationEvent.setEventDate(rs.getDate(9)); 123 creationEvent.setProtocol(protocolT.getProtocolById(dc, rs.getInt(10))); 124 connectToLabeledExtracts(dc, hybridization, rs.getInt(ID)); 113 125 return hybridization; 114 126 } 115 127 116 128 /** 117 Returns an Hybridization from the given base 1 slide id. 129 Connects labled extracts to a hybridization 130 131 @param dc <code>DbControl</code> 132 @param hybridization The hybridization 133 @param base1Id The corresponding base 1 id for this hybridization 134 */ 135 private void connectToLabeledExtracts(DbControl dc, Hybridization hybridization, 136 int base1HybridizationId) 137 { 138 ResultSet rs = null; 139 try 140 { 141 PreparedStatement ps = prepareStatementFromFile("selectLabeledExtractsByHybridization"); 142 ps.setInt(1, base1HybridizationId); 143 rs = ps.executeQuery(); 144 BioMaterialEvent creationEvent = hybridization.getCreationEvent(); 145 while (rs.next()) 146 { 147 LabeledExtract le = labeledExtractT.getLabeledExtractById(dc, rs.getInt(1)); 148 if (le != null) 149 { 150 creationEvent.addSource(le, rs.getFloat(2)); 151 } 152 } 153 } 154 catch (Exception e) 155 { 156 stop("connectReportersToWells", e, rs); 157 } 158 } 159 160 161 /** 162 Returns a Hybridization from the given base 1 slide id. 118 163 119 164 @param dc {@link DbControl} used to get this hybridization. -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/LabeledExtractTransfer.java
r2614 r2622 30 30 import net.sf.basedb.core.LabeledExtract; 31 31 import net.sf.basedb.core.MeasuredBioMaterial; 32 32 33 import java.sql.ResultSet; 33 34 import java.sql.SQLException; … … 78 79 public void start() 79 80 { 80 startProgress(getInt("countLabeledExtracts")); 81 int count = getInt("countLabeledExtracts"); 82 initIdMap(count); 83 startProgress(count); 81 84 run(prepareStatementFromFile("selectLabeledExtracts"), 0, 1000); 82 85 done(); … … 118 121 return null; 119 122 } 123 124 /** 125 Returns a Labeled extract from a base1 id. 126 127 @param dbc DbControl 128 @param base1LabeledExtractId Base1 labeled extract id 129 */ 130 public LabeledExtract getLabeledExtractById(DbControl dbc, int base1LabeledExtractId) 131 { 132 try 133 { 134 Integer id = getBase2Id(base1LabeledExtractId); 135 return id == null ? null : LabeledExtract.getById(dbc, id); 136 } 137 catch (BaseException e) 138 { 139 log("getLabeledExtractById", e); 140 } 141 return null; 142 } 143 120 144 } -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/Migrater.java
r2614 r2622 83 83 RoleTransfer roleT = new RoleTransfer(); 84 84 startTransfer(roleT, "Role"); 85 UserTransfer userT = new UserTransfer(roleT); 85 QuotaTransfer quotaT = new QuotaTransfer(); 86 startTransfer(quotaT, "Quota"); 87 UserTransfer userT = new UserTransfer(roleT, quotaT); 86 88 startTransfer(userT, "User"); 87 GroupTransfer groupT = new GroupTransfer(userT );89 GroupTransfer groupT = new GroupTransfer(userT, quotaT); 88 90 startTransfer(groupT, "Group"); 89 91 WizzzardTransfer wizzzardT = new WizzzardTransfer(userT, groupT); … … 156 158 startTransfer(arraySlideT, "ArraySlide"); 157 159 HybridizationTransfer hybridizationT = new HybridizationTransfer( 158 userT, groupT, arraySlideT );160 userT, groupT, arraySlideT, labeledExtractT, protocolT); 159 161 startTransfer(hybridizationT, "Hybridization"); 160 162 ScanTransfer scanT = new ScanTransfer(userT, groupT, … … 165 167 startTransfer(imageFT, "Image"); 166 168 RawBioAssayTransfer rawBioAssayT = new RawBioAssayTransfer(userT, 167 groupT, scanT, arrayTypeT, uploadFT );169 groupT, scanT, arrayTypeT, uploadFT, softwareT); 168 170 startTransfer(rawBioAssayT, "RawBioAssay"); 169 171 RawBioAssayDataTransfer rawBioAssayDataT = new RawBioAssayDataTransfer( … … 173 175 groupT, rawBioAssayT); 174 176 startTransfer(experimentT, "Experiment"); 177 userT.finalizeQuota(); 175 178 print("END MIGRATION"); 176 179 log("END MIGRATION"); … … 444 447 System.err.println("NOTE!!! We have found that the migration program has some serious bugs."); 445 448 System.err.println("We do not recommend using the migration program except for testing."); 449 System.err.println("-----------------------------------------------------------------------"); 446 450 447 451 if (args == null || args.length == 0 || !"debug".equals(args[0])) 448 452 { 449 453 System.err.println("Use: \"./migrate_from_1.2.sh debug\" to start the program"); 450 System.err.println("-----------------------------------------------------------------------");451 454 System.exit(0); 452 455 } … … 455 458 System.err.println("Debug switch found, press ENTER to continue with migration..."); 456 459 waitForEnter(); 457 System.err.println("-----------------------------------------------------------------------");458 460 } 459 461 -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/NewsTransfer.java
r2304 r2622 62 62 public void start() 63 63 { 64 startProgress(getInt("countNews")); 64 int count = getInt("countNews"); 65 initIdMap(count); 66 startProgress(count); 65 67 run(prepareStatementFromFile("selectNews")); 66 68 done(); -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/PlateEventTransfer.java
r2614 r2622 72 72 public void start() 73 73 { 74 startProgress(getInt("countPlateEvents")); 74 int count = getInt("countPlateEvents"); 75 initIdMap(count); 76 startProgress(count); 75 77 run(prepareStatementFromFile("selectPlateEvents")); 76 78 done(); -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/ProtocolTransfer.java
r2614 r2622 59 59 { 60 60 super(userT, groupT); 61 if ( uploadFT.isDone() &&protocolTypeT.isDone())61 if (protocolTypeT.isDone()) 62 62 { 63 63 this.uploadFT = uploadFT; … … 137 137 return null; 138 138 } 139 140 /** 141 Returns a Protocol by the given base 1 protocol id. 142 143 @param dbc <code>DbControl</code> used to get the Protocol. 144 @param base1ProtocolId 145 @return <code>Protocol</code> or null if the given protocol id does not exsist. 146 */ 147 public Protocol getProtocolById(DbControl dbc, int base1ProtocolId) 148 { 149 try 150 { 151 Integer base2Id = getBase2Id(base1ProtocolId); 152 return base2Id == null ? null : Protocol.getById(dbc, base2Id); 153 } 154 catch (BaseException e) 155 { 156 log("getProtocolById", e); 157 } 158 return null; 159 } 160 139 161 } -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/RawBioAssayDataTransfer.java
r2614 r2622 85 85 public void start() 86 86 { 87 startProgress(getInt("countRawBioAssayData")); 87 int count = getInt("countRawBioAssayData"); 88 startProgress(count); 88 89 runUnBatched( 89 90 prepareStatementFromFile("selectRawBioAssaysWithSpotData"), 0, -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/RawBioAssayTransfer.java
r2614 r2622 46 46 private ArrayTypeTransfer arrayTypeT = null; 47 47 private UploadFileTransfer uploadFT = null; 48 private SoftwareTransfer softwareT = null; 48 49 49 50 /** … … 55 56 RawBioAssayTransfer(UserTransfer userT, GroupTransfer groupT, 56 57 ScanTransfer scanT, ArrayTypeTransfer arrayTypeT, 57 UploadFileTransfer uploadFT )58 UploadFileTransfer uploadFT, SoftwareTransfer softwareT) 58 59 { 59 60 super(userT, groupT); … … 64 65 this.scanT = scanT; 65 66 this.arrayTypeT = arrayTypeT; 67 this.softwareT = softwareT; 66 68 } 67 69 else … … 100 102 Scan scan = scanT.getScanById(dc, rs.getInt(9)); 101 103 rawBioAssay.setScan(scan); 104 rawBioAssay.setSoftware(softwareT.getSoftwareById(dc, rs.getInt(11))); 102 105 // rawBioAssay.setFile(file); 103 106 ArrayDesign ad = arrayTypeT.getArrayDesignById(dc, rs.getInt(20)); -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/ReporterTransfer.java
r2614 r2622 84 84 { 85 85 int count = getInt("countReporters"); 86 startProgress(count*2); 86 startProgress(count*2); // First pass creates reporters, second one reads in the new ID:s 87 87 PreparedStatement ps = QUICK_TRANSFER ? prepareStatementFromFile("selectMinimumReporters") 88 88 : prepareStatementFromFile("selectReporters"); -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/RoleTransfer.java
r2581 r2622 24 24 package net.sf.basedb.clients.migrate; 25 25 26 import net.sf.basedb.core.BaseException; 26 27 import net.sf.basedb.core.DbControl; 27 28 import net.sf.basedb.core.Item; … … 30 31 import net.sf.basedb.core.RoleKey; 31 32 import net.sf.basedb.core.SystemItems; 32 import java.util.ArrayList; 33 34 import java.util.EnumSet; 33 35 import java.util.HashMap; 34 36 import java.util.HashSet; 35 37 import java.util.Map; 38 import java.util.Set; 36 39 37 40 /** … … 42 45 public class RoleTransfer extends Transfer 43 46 { 44 // BASE 1 description47 // BASE 1 access masks 45 48 private final int SUPERUSER = (1 << 0); // Almighty 46 49 private final int SUPERREADER = (1 << 30); // Full read access 47 50 private final int SHARE_WORLD = (1 << 25); // Share with 'world' 48 51 private final int ADMIN_USER = (1 << 1); // Edit users 49 //private final int USER_READ = (1 << 2); // Read user list52 private final int USER_READ = (1 << 2); // Read user list 50 53 private final int NEWS_EDIT = (1 << 3); // Edit site news 51 //private final int USER_READ_MORE = (1 << 4); // Read more user info54 private final int USER_READ_MORE = (1 << 4); // Read more user info 52 55 private final int ARRAY_READ = (1 << 6); // Read array and plate info 53 56 private final int ARRAY_EDIT = (1 << 7); // Edit arrays and plates … … 57 60 private final int BIO_READ = (1 << 11); // Read sample/extract/label 58 61 private final int BIO_EDIT = (1 << 12); // Edit sample/extract/label 59 //private final int BIO_TISSUE = (1 << 13); // Edit sample origins62 private final int BIO_TISSUE = (1 << 13); // Edit sample origins 60 63 private final int BIO_ANNOT = (1 << 14); // Edit sample annotation types 61 64 private final int PROGRAM_READ = (1 << 15); // Read plugins … … 63 66 private final int HYB_EDIT = (1 << 17); // Edit hybridizations 64 67 private final int UPLOAD = (1 << 18); // Upload files 65 //private final int WIZZZARD_EDIT = (1 << 19); // Edit file formats66 //private final int EXPER_READ = (1 << 20); // Read experiments67 //private final int EXPER_EDIT = (1 << 21); // Edit experiments68 //private final int EXPER_CREATE = (1 << 22); // Create experiments69 //private final int EXPER_MAGEML = (1 << 23); // Create MAGE-ML for68 private final int WIZZZARD_EDIT = (1 << 19); // Edit file formats 69 private final int EXPER_READ = (1 << 20); // Read experiments 70 private final int EXPER_EDIT = (1 << 21); // Edit experiments 71 private final int EXPER_CREATE = (1 << 22); // Create experiments 72 private final int EXPER_MAGEML = (1 << 23); // Create MAGE-ML for 70 73 // experiments 71 //private final int BROADCAST = (1 << 24); // Chat in left frame74 private final int BROADCAST = (1 << 24); // Chat in left frame 72 75 private final int REPORTER_READ = (1 << 26); // Read reporters 73 76 private final int REPORTER_EDIT = (1 << 27); // Edit reporters 74 private final int RESTRICTED_ARRAY_READ = -1 * ARRAY_READ; 75 private final int RESTRICTED_HYB_READ = -1 * HYB_READ; 76 private final int RESTRICTED_BIO_READ = -1 * BIO_READ; 77 // BASE 2 roles and their corresponding base 1 permissions 78 private final int GUEST = (UPLOAD | ARRAY_EDIT | WARE_EDIT | REPORTER_READ | ARRAY_READ); 79 private final int USER = (GUEST | HYB_EDIT | BIO_EDIT | REPORTER_EDIT); 80 private final int POWER_USER = (USER | PROTOCOL_EDIT | BIO_ANNOT); 77 78 // The access masks corresponding to BASE 2 predefined roles 79 private final int GUEST = UPLOAD | REPORTER_READ; 80 private final int USER = GUEST | BIO_EDIT | HYB_EDIT | EXPER_CREATE; 81 private final int POWER_USER = USER | WIZZZARD_EDIT | REPORTER_EDIT | WARE_EDIT | BIO_ANNOT | ARRAY_EDIT | PROTOCOL_EDIT; 81 82 private final int SUPERVISOR = SUPERREADER; 82 83 private final int ADMINISTRATOR = SUPERUSER; 83 // Map role id to 84 private Map<Integer, Integer> roleIdMaskMap = new HashMap<Integer, Integer>();85 private Map<Integer, Integer> systemRoleIds = new HashMap<Integer, Integer>();86 private int ADMINISTRATOR_ID; 87 private int SUPERVISOR_ID;88 private int POWER_USER_ID;89 private int USER_ID;90 private int GUEST_ID;91 private int RESTRICTED_ARRAY_READ_ID;92 84 85 // The meaningless access masks are not used in BASE 2 86 private final int MEANINGLESS = BROADCAST | BIO_TISSUE | EXPER_EDIT | EXPER_MAGEML | USER_READ_MORE; 87 88 // Access masks that corresponds to a DENIED permission in BASE 2 if missing 89 private final int DENIED = PROGRAM_READ | ARRAY_READ | USER_READ | BIO_READ | HYB_READ | EXPER_READ; 90 91 // Maps access mask to roles (for the new roles only) 92 private Map<Integer, Role> maskMap = null; 93 93 94 RoleTransfer() 94 95 {} … … 97 98 { 98 99 // The number of roles created is static 99 startProgress( 19);100 startProgress(21); 100 101 log("start", "Administrator has mask " + ADMINISTRATOR); 101 102 log("start", "Supervisor has mask " + SUPERVISOR); … … 103 104 log("start", "User has mask " + USER); 104 105 log("start", "Guest has mask" + GUEST); 106 maskMap = new HashMap<Integer, Role>(); 107 DbControl dc = newDbControl(); 105 108 try 106 109 { 107 setDefaultRoleIds(); 108 createRole( 109 "User Administrator", ADMIN_USER, "CREATE,READ,DELETE", 110 "USER,GROUP,ROLE,QUOTA"); 111 createRole( 112 "Plugin Administrator", PROGRAM_EDIT, "CREATE,READ", 113 "PLUGINDEFINITION,PLUGINCONFIGURATION"); 114 createRole( 115 "News Administrator", NEWS_EDIT, "CREATE,READ,DELETE", 116 "NEWS"); 117 createRole( 118 "Protocols Administrator", PROTOCOL_EDIT, "CREATE,READ", 119 "PROTOCOL"); 120 Role role = createRole("Arrays/Plates Administrator", ARRAY_EDIT); 121 addPermission(role, "READ,USE", "PLATEGEOMETRY,PROTOCOLTYPE"); 122 addPermission( 123 role, "CREATE,READ", 124 "PLATETYPE,PLATE,PLATEMAPPING,ARRAYBATCH,ARRAYDESIGN,ARRAYSLIDE"); 125 createRole( 126 "Annotation Types Administrator", BIO_ANNOT, "CREATE,READ", 127 "ANNOTATIONTYPE"); 128 role = createRole("Hardware/Software Administrator", WARE_EDIT); 129 addPermission(role, "CREATE,READ", "HARDWARE,SOFTWARE"); 130 addPermission(role, "READ,USE", "HARDWARETYPE,SOFTWARETYPE"); 131 // "0x00002000","Sample Origins Administrator" ,"", 132 createRole( 133 "Reporter Administrator", REPORTER_EDIT, 134 "CREATE,READ,DELETE", "REPORTER,REPORTERTYPE"); 135 createRole( "File Formats Administrator", PROGRAM_READ, 136 "CREATE,READ", "PLUGINCONFIGURATION" ); 137 //READ,USE:STANDARD INPUT 138 // PLUGIN 139 createRole( 140 "Biomaterials Administrator", BIO_EDIT, 141 "CREATE,READ,DELETE", 142 "EXTRACT,LABEL,LABELEDEXTRACT,SAMPLE,BIOSOURCE"); 143 createRole( 144 "Hybridizations Administrator", HYB_EDIT, "CREATE,READ", 145 "HYBRIDIZATION,SCAN,RAWBIOASSAY"); 146 createRole("Uploader", UPLOAD, "CREATE,READ", "FILE,DIRECTORY"); 147 createRole( 148 "Arrays/Plates Viewer", 149 ARRAY_READ, 150 "READ", 151 "ARRAYBATCH,ARRAYDESIGN,ARRAYSLIDE,PLATEGEOMETRY,PLATETYPE,PLATE,PLATEMAPPING,PROTOCOLTYPE"); 152 createRole( 153 "Hybridizations Viewer", HYB_READ, "READ", 154 "HYBRIDIZATION,SCAN,RAWBIOASSAY"); 155 role = createRole("Reporters Viewer", REPORTER_READ); 156 addPermission(role, "READ,USE", "REPORTER"); 157 addPermission(role, "READ", "REPORTERTYPE"); 158 createRole( 159 "Biomaterials Viewer", BIO_READ, "READ", 160 "BIOSOURCE,EXTRACT,LABEL,LABELEDEXTRACT,SAMPLE"); 161 createRole( 162 "Share With World", SHARE_WORLD, "SHARE_TO_EVERYONE", 163 "SYSTEM"); 164 role = createRole( 165 "Restricted Arrays/Plates", 166 RESTRICTED_ARRAY_READ, 167 "DENIED", 168 "ARRAYBATCH,ARRAYDESIGN,ARRAYSLIDE,PLATEGEOMETRY,PLATETYPE,PLATE,PLATEMAPPING,PROTOCOLTYPE"); 169 // This role is specific to the Guest user 170 RESTRICTED_ARRAY_READ_ID = role.getId(); 171 createRole( 172 "Restricted Hybridizations", RESTRICTED_HYB_READ, "DENIED", 173 "HYBRIDIZATION,SCAN,RAWBIOASSAY"); 174 createRole( 175 "Restricted Biomaterials", RESTRICTED_BIO_READ, "DENIED", 176 "BIOSOURCE,EXTRACT,LABEL,LABELEDEXTRACT,SAMPLE"); 110 // Permissions that are used for the new roles 111 Set<Permission> create = EnumSet.of(Permission.CREATE); 112 Set<Permission> admin = EnumSet.of(Permission.CREATE, Permission.READ, Permission.USE, Permission.WRITE, Permission.DELETE); 113 Set<Permission> denied = EnumSet.of(Permission.DENIED); 114 Set<Permission> use = EnumSet.of(Permission.READ, Permission.USE); 115 116 String migrationInfo = "This role was created by the migration tool and corresponds to the BASE 1 "; 117 createRole(dc, "Administer users", migrationInfo + "\"Administer users\" permission.", 118 ADMIN_USER, 119 new ItemPermission[] 120 { 121 new ItemPermission(Item.USER, admin), 122 new ItemPermission(Item.GROUP, admin), 123 new ItemPermission(Item.ROLE, admin), 124 new ItemPermission(Item.QUOTA, admin), 125 new ItemPermission(Item.QUOTATYPE, use), 126 new ItemPermission(Item.DIRECTORY, create) 127 } 128 ); 129 130 createRole(dc, "Add plugins", migrationInfo + "\"Add plug-ins\" permission.", 131 PROGRAM_EDIT, 132 new ItemPermission[] 133 { 134 new ItemPermission(Item.PLUGINDEFINITION, create), 135 new ItemPermission(Item.PLUGINCONFIGURATION, create), 136 new ItemPermission(Item.PLUGINTYPE, admin) 137 } 138 ); 139 140 createRole(dc, "News administrator", migrationInfo + "\"Add news\" permission.", 141 NEWS_EDIT, 142 new ItemPermission[] 143 { 144 new ItemPermission(Item.NEWS, admin) 145 } 146 ); 147 148 createRole(dc, "Add protocols", migrationInfo + "\"Add protocols\" permission.", 149 PROTOCOL_EDIT, 150 new ItemPermission[] 151 { 152 new ItemPermission(Item.PROTOCOL, create), 153 new ItemPermission(Item.PROTOCOLTYPE, use) 154 } 155 ); 156 157 createRole(dc, "Add arrays/plates", migrationInfo + "\"Add arrays/plates\" permission.", 158 ARRAY_EDIT, 159 new ItemPermission[] 160 { 161 new ItemPermission(Item.PLATETYPE, create), 162 new ItemPermission(Item.PLATEGEOMETRY, use), 163 new ItemPermission(Item.PLATE, create), 164 new ItemPermission(Item.PLATEMAPPING, use), 165 new ItemPermission(Item.ARRAYDESIGN, create), 166 new ItemPermission(Item.ARRAYBATCH, create), 167 new ItemPermission(Item.ARRAYSLIDE, create), 168 new ItemPermission(Item.PROTOCOLTYPE, use) 169 } 170 ); 171 172 createRole(dc, "Add annotation types", migrationInfo + "\"Add annotation types\" permission.", 173 BIO_ANNOT, 174 new ItemPermission[] 175 { 176 new ItemPermission(Item.ANNOTATIONTYPE, create), 177 new ItemPermission(Item.ANNOTATIONTYPECATEGORY, create) 178 } 179 ); 180 181 createRole(dc, "Add hardware/software", migrationInfo + "\"Add hardware/software\" permission.", 182 WARE_EDIT, 183 new ItemPermission[] 184 { 185 new ItemPermission(Item.HARDWARE, create), 186 new ItemPermission(Item.HARDWARETYPE, use), 187 new ItemPermission(Item.SOFTWARE, create), 188 new ItemPermission(Item.SOFTWARETYPE, use) 189 } 190 ); 191 192 createRole(dc, "Add reporters", migrationInfo + "\"Add reporters\" permission.", 193 REPORTER_EDIT, 194 new ItemPermission[] 195 { 196 new ItemPermission(Item.REPORTER, admin), 197 new ItemPermission(Item.REPORTERTYPE, admin), 198 new ItemPermission(Item.REPORTERLIST, create) 199 } 200 ); 201 202 createRole(dc, "Add file formats", migrationInfo + "\"Add file formats\" permission.", 203 WIZZZARD_EDIT, 204 new ItemPermission[] 205 { 206 new ItemPermission(Item.PLUGINCONFIGURATION, create) 207 } 208 ); 209 210 createRole(dc, "Denied plugins", migrationInfo + "\"Read plugins\" permission.", 211 PROGRAM_READ, 212 new ItemPermission[] 213 { 214 new ItemPermission(Item.PLUGINCONFIGURATION, denied), 215 new ItemPermission(Item.PLUGINDEFINITION, denied) 216 } 217 ); 218 219 createRole(dc, "Share with world", migrationInfo + "\"Share with world\" permission.", 220 SHARE_WORLD, 221 new ItemPermission[] 222 { 223 new ItemPermission(Item.SYSTEM, EnumSet.of(Permission.SHARE_TO_EVERYONE)) 224 } 225 ); 226 227 createRole(dc, "Add biomaterials", migrationInfo + "\"Add biomaterials\" permission.", 228 BIO_EDIT, 229 new ItemPermission[] 230 { 231 new ItemPermission(Item.BIOSOURCE, create), 232 new ItemPermission(Item.SAMPLE, create), 233 new ItemPermission(Item.EXTRACT, create), 234 new ItemPermission(Item.LABELEDEXTRACT, create), 235 new ItemPermission(Item.LABEL, create) 236 } 237 ); 238 239 createRole(dc, "Add hybridizations", migrationInfo + "\"Add hybridizations\" permission.", 240 HYB_EDIT, 241 new ItemPermission[] 242 { 243 new ItemPermission(Item.HYBRIDIZATION, create), 244 new ItemPermission(Item.SCAN, create), 245 new ItemPermission(Item.RAWBIOASSAY, create) 246 } 247 ); 248 249 createRole(dc, "Create experiments", migrationInfo + "\"Create experiments\" permission.", 250 EXPER_CREATE, 251 new ItemPermission[] 252 { 253 new ItemPermission(Item.EXPERIMENT, create) 254 } 255 ); 256 257 createRole(dc, "Upload files", migrationInfo + "\"Upload files\" permission.", 258 UPLOAD, 259 new ItemPermission[] 260 { 261 new ItemPermission(Item.FILE, create), 262 new ItemPermission(Item.FILETYPE, use), 263 new ItemPermission(Item.DIRECTORY, create) 264 } 265 ); 266 267 createRole(dc, "Denied arrays/plates", migrationInfo + "\"Read arrays/plates\" permission.", 268 ARRAY_READ, 269 new ItemPermission[] 270 { 271 new ItemPermission(Item.PLATETYPE, denied), 272 new ItemPermission(Item.PLATEGEOMETRY, denied), 273 new ItemPermission(Item.PLATEMAPPING, denied), 274 new ItemPermission(Item.PLATE, denied), 275 new ItemPermission(Item.ARRAYDESIGN, denied), 276 new ItemPermission(Item.ARRAYBATCH, denied), 277 new ItemPermission(Item.ARRAYSLIDE, denied) 278 } 279 ); 280 281 createRole(dc, "Denied users", migrationInfo + "\"Read user info\" permission.", 282 USER_READ, 283 new ItemPermission[] 284 { 285 new ItemPermission(Item.USER, denied) 286 } 287 ); 288 289 createRole(dc, "Denied biomaterials", migrationInfo + "\"Read biomaterials\" permission.", 290 BIO_READ, 291 new ItemPermission[] 292 { 293 new ItemPermission(Item.BIOSOURCE, denied), 294 new ItemPermission(Item.SAMPLE, denied), 295 new ItemPermission(Item.EXTRACT, denied), 296 new ItemPermission(Item.LABELEDEXTRACT, denied), 297 new ItemPermission(Item.LABEL, denied) 298 } 299 ); 300 301 createRole(dc, "Denied hybridizations", migrationInfo + "\"Read hybridizations\" permission.", 302 HYB_READ, 303 new ItemPermission[] 304 { 305 new ItemPermission(Item.HYBRIDIZATION, denied), 306 new ItemPermission(Item.SCAN, denied), 307 new ItemPermission(Item.RAWBIOASSAY, denied) 308 } 309 ); 310 311 createRole(dc, "Denied experiments", migrationInfo + "\"Read experiments\" permission.", 312 EXPER_READ, 313 new ItemPermission[] 314 { 315 new ItemPermission(Item.EXPERIMENT, denied) 316 } 317 ); 318 319 createRole(dc, "Read reporters", migrationInfo + "\"Read reporters\" permission.", 320 REPORTER_READ, 321 new ItemPermission[] 322 { 323 new ItemPermission(Item.REPORTER, use), 324 new ItemPermission(Item.REPORTERTYPE, use) 325 } 326 ); 327 dc.commit(); 177 328 progress.stop(); 178 329 } … … 190 341 @return A list of roles matching a given base 1 accessMask 191 342 */ 192 public ArrayList<Integer> getRoleIds(Integer accessMask)343 public Set<Integer> getRoleIds(Integer accessMask) 193 344 { 194 345 int mask = accessMask.intValue(); 195 346 log("getRoleIds", "" + mask); 196 ArrayList<Integer> roleIds = new ArrayList<Integer>(); 347 348 Set<Integer> roleIds = new HashSet<Integer>(); 349 350 // Check if BASE1 superuser 197 351 if ((mask & ADMINISTRATOR) == ADMINISTRATOR) 198 352 { 199 roleIds.add( ADMINISTRATOR_ID);353 roleIds.add(SystemItems.getId(Role.ADMINISTRATOR)); 200 354 return roleIds; 201 355 } 202 /* Predefinde roles have a combination of permissions see above. */ 203 int systemRoleMask = 0; 204 boolean isSupervisor = false; 205 boolean hasRestrictedArrayRead = false; 356 357 // Remove BASE 1 permission that have no meaining in BASE 2 358 mask &= ~MEANINGLESS; 359 360 // All "Read Item X" permissions are converted to DENIED permissions 361 mask ^= DENIED; 362 206 363 if ((mask & SUPERVISOR) == SUPERVISOR) 207 364 { 208 roleIds.add(SUPERVISOR_ID); 209 isSupervisor = true; 210 systemRoleMask = (systemRoleIds.get(SUPERVISOR_ID)).intValue(); 211 } 212 else 213 { 214 if (matchRole(mask, RESTRICTED_ARRAY_READ, true)) 365 roleIds.add(SystemItems.getId(Role.SUPERVISOR)); 366 mask &= ~SUPERVISOR; 367 mask &= ~DENIED; 368 } 369 370 // We use either POWER_USER, USER or GUEST as the basis for 371 if ((mask & POWER_USER) == POWER_USER) 372 { 373 roleIds.add(SystemItems.getId(Role.POWER_USER)); 374 mask &= ~POWER_USER; 375 } 376 else if ((mask & USER) == USER) 377 { 378 roleIds.add(SystemItems.getId(Role.USER)); 379 mask &= ~USER; 380 } 381 else if ((mask & GUEST) == GUEST) 382 { 383 roleIds.add(SystemItems.getId(Role.GUEST)); 384 mask &= ~GUEST; 385 } 386 387 if (mask != 0) 388 { 389 // The remaining bits in the access mask didn't fit the predefined roles 390 // Use the newly created roles to map the last bits 391 for (Map.Entry<Integer, Role> entry : maskMap.entrySet()) 215 392 { 216 log("getRoleIds", mask + " matches Restricted Arrays/Plates"); 217 mask = (mask | ARRAY_READ); 218 hasRestrictedArrayRead = true; 393 int roleMask = entry.getKey(); 394 if ((mask & roleMask) == roleMask) 395 { 396 roleIds.add(entry.getValue().getId()); 397 mask &= ~roleMask; 398 } 219 399 } 220 400 } 221 if ((mask & POWER_USER) == POWER_USER) 222 { 223 roleIds.add(POWER_USER_ID); 224 systemRoleMask = (systemRoleMask | POWER_USER); 225 } 226 else 227 { 228 if ((mask & USER) == USER) 229 { 230 roleIds.add(USER_ID); 231 systemRoleMask = (systemRoleMask | USER); 232 } 233 else 234 { 235 if ((mask & GUEST) == GUEST) 236 { 237 systemRoleMask = (systemRoleMask | GUEST); 238 roleIds.add(GUEST_ID); 239 } 240 } 241 } 242 if (hasRestrictedArrayRead) 243 { 244 if (systemRoleMask != 0) 245 { 246 roleIds.add(RESTRICTED_ARRAY_READ_ID); 247 roleIdMaskMap.put(RESTRICTED_ARRAY_READ_ID, 0); 248 log("getRoleIds", "Adding Arrays/Plates Viewer to " 249 + systemRoleMask); 250 } 251 else 252 { 253 // If the user doesn't belong to any of the above system roles 254 // we remove the added array_read bit which we added before 255 mask = mask ^ ARRAY_READ; 256 } 257 } 258 // Add additional roles 259 for (Map.Entry<Integer, Integer> entry : roleIdMaskMap.entrySet()) 260 { 261 int roleMask = entry.getValue(); 262 int roleId = entry.getKey(); 263 boolean matchRestrictiveRoles = true; 264 if (isSupervisor) 265 { 266 matchRestrictiveRoles = false; 267 } 268 if ((systemRoleMask == 0 || !matchRole( 269 systemRoleMask, roleMask, matchRestrictiveRoles)) 270 && matchRole(mask, roleMask, matchRestrictiveRoles)) 271 { 272 roleIds.add(roleId); 273 } 401 402 // If there are more bits in the mask it is a bug 403 // We must either map or ignore (see MEANINGLESS) all bits 404 if (mask != 0) 405 { 406 throw new BaseException("Access mask could not be completely converted to roles: " + 407 "original mask=" + accessMask + "; end mask="+mask+"; assigned roles=" + roleIds.toString()); 274 408 } 275 409 return roleIds; 276 410 } 277 411 278 /** 279 @param mask Permission mask which we want to match 280 @param roleMask The mask that specifies a role. 281 @param matchRestrictiveRoles Some roles should match if a given mask is 282 missing. 283 */ 284 private boolean matchRole(int mask, int roleMask, 285 boolean matchRestrictiveRoles) 412 private Role createRole(DbControl dc, String name, String description, int base1Mask, ItemPermission[] permissions) 286 413 { 287 if (roleMask > 0 && ((roleMask & mask) == roleMask)) 288 { 289 return true; 290 } 291 else if (matchRestrictiveRoles 292 && (roleMask < 0 && (-roleMask & ~mask) == -roleMask)) 293 { 294 return true; 295 } 296 return false; 297 } 298 299 /** 300 Creates a Role with the given permissions. 301 302 @param name Role name 303 @param mask Mask that represents this role 304 @param permissions A string of comma seperated permissions e.g. 305 READ,WRITE,USE 306 @param items A string of comma seperated items that the permissions apply 307 to e.g. LABEL,EXTRACT 308 */ 309 private Role createRole(String name, int mask, String permissions, 310 String items) 311 { 312 Role role = createRole(name, mask); 313 log("createRole", name + " has mask " + mask); 314 addPermission(role, permissions, items); 414 Role role = Role.getNew(dc); 415 role.setName("BASE 1.2: " + name); 416 role.setDescription(description); 417 for (ItemPermission ip : permissions) 418 { 419 RoleKey key = RoleKey.getByItemType(dc, ip.getItem()); 420 key.setPermissions(role, ip.getPermissions()); 421 } 422 maskMap.put(base1Mask, role); 423 dc.saveItem(role); 315 424 return role; 316 425 } 317 318 /**319 Creates a role without setting any permissions.320 426 321 @param name Role name 322 @param mask Mask that represents this role 323 @see #addPermission(Role, String, String) 324 */ 325 private Role createRole(String name, int mask) 427 static class ItemPermission 326 428 { 327 try 328 { 329 DbControl dc = newDbControl(); 330 Role role = Role.getNew(dc); 331 role.setName(name); 332 dc.saveItem(role); 333 commit(dc); 334 roleIdMaskMap.put(role.getId(), mask); 335 progress.increase(); 336 return role; 337 } 338 catch (Exception e) 339 { 340 stop("createRole", e); 341 } 342 return null; 429 private final Item item; 430 private final Set<Permission> permissions; 431 432 ItemPermission(Item item, Set<Permission> permissions) 433 { 434 this.item = item; 435 this.permissions = permissions; 436 } 437 438 public Item getItem() 439 { 440 return item; 441 } 442 443 public Set<Permission> getPermissions() 444 { 445 return permissions; 446 } 447 343 448 } 344 345 /**346 Adds permission to a given role347 449 348 @param role Role349 @param permissionsString A string of comma seperated permissions e.g.350 READ,WRITE,USE351 @param items A string of comma seperated items that the permissions apply352 to e.g. LABEL,EXTRACT353 */354 private void addPermission(Role role, String permissionsString, String items)355 {356 DbControl dc = newDbControl();357 dc.reattachItem(role);358 Item logitem = null;359 try360 {361 HashSet<Permission> permissions = new HashSet<Permission>();362 for (String permission : permissionsString.split(","))363 {364 permissions.add(Permission.valueOf(permission));365 }366 for (String itemstr : items.split(","))367 {368 Item item = Item.valueOf(itemstr);369 logitem = item;370 RoleKey rk = RoleKey.getById(dc, SystemItems.getRoleKeyId(item));371 rk.setPermissions(role, permissions);372 }373 }374 catch (Exception e)375 {376 // This should only happend until BASE 2 is complete377 warn("addPermission() for " + logitem.toString() + " : "378 + e.getMessage());379 }380 dc.commit();381 }382 383 /**384 Sets the BASE 2 ids for the default roles.385 */386 private void setDefaultRoleIds()387 {388 try389 {390 ADMINISTRATOR_ID = SystemItems.getId(Role.ADMINISTRATOR);391 systemRoleIds.put(ADMINISTRATOR_ID, ADMINISTRATOR);392 SUPERVISOR_ID = SystemItems.getId(Role.SUPERVISOR);393 systemRoleIds.put(SUPERVISOR_ID, SUPERVISOR);394 POWER_USER_ID = SystemItems.getId(Role.POWER_USER);395 systemRoleIds.put(POWER_USER_ID, POWER_USER);396 USER_ID = SystemItems.getId(Role.USER);397 systemRoleIds.put(USER_ID, USER);398 GUEST_ID = SystemItems.getId(Role.GUEST);399 systemRoleIds.put(GUEST_ID, GUEST);400 }401 catch (Exception e)402 {403 stop("setDefaultRoleIds", e);404 }405 }406 450 } -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/SampleTissueTransfer.java
r2614 r2622 50 50 public void start() 51 51 { 52 startProgress(getInt("countSampleTissues")); 52 int count = getInt("countSampleTissues"); 53 initIdMap(count); 54 startProgress(count); 53 55 run(prepareStatementFromFile("selectSampleTissues"), 0, getBatchSize()); 54 56 done(); -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/SoftwareTransfer.java
r2614 r2622 57 57 { 58 58 softwareTypeId = SystemItems.getId(SoftwareType.FEATURE_EXTRACTION); 59 startProgress(getInt("countSoftware")); 59 int count = getInt("countSoftware"); 60 initIdMap(count); 61 startProgress(count); 60 62 run(prepareStatementFromFile("selectSoftware"), 0, getBatchSize()); 61 63 done(); … … 77 79 return software; 78 80 } 81 82 /** 83 Returns a Software by the given base 1 software id. 84 85 @param dbc <code>DbControl</code> used to get the Software. 86 @param base1SoftwareId 87 @return <code>Software</code> or null if the given software id does not exist. 88 */ 89 public Software getSoftwareById(DbControl dbc, int base1SoftwareId) 90 { 91 try 92 { 93 Integer base2Id = getBase2Id(base1SoftwareId); 94 return base2Id == null ? null : Software.getById(dbc, base2Id); 95 } 96 catch (BaseException e) 97 { 98 log("getSoftwareById", e); 99 } 100 return null; 101 } 102 79 103 } -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/Transfer.java
r2614 r2622 289 289 if (item != null) 290 290 { 291 if (!item.isInDatabase()) dc.saveItem(item); 291 292 WrappedItem<BasicItem> wi = new WrappedItem<BasicItem>( 292 293 item, rs.getInt(1), rowCount); … … 299 300 progress.increase(); 300 301 } 301 dc.c lose();302 dc.commit(); 302 303 // Reset our ResultSet 303 rs.beforeFirst(); 304 processItemList(rs); 304 //rs.beforeFirst(); 305 305 rs.close(); 306 processItemList(); 306 307 if (rowCount > 0 && rowCount == size) 307 308 { … … 346 347 if (item != null) 347 348 { 349 if (!item.isInDatabase()) dc.saveItem(item); 348 350 WrappedItem<BasicItem> wi = new WrappedItem<BasicItem>( 349 351 item, rs.getInt(1), rowCount); … … 356 358 progress.increase(); 357 359 } 358 dc.close(); 360 dc.commit(); 361 rs.close(); 359 362 // Reset our ResultSet 360 rs.beforeFirst(); 361 processItemList(rs); 362 rs.close(); 363 //rs.beforeFirst(); 364 processItemList(); 363 365 } 364 366 catch (SQLException e) … … 413 415 } 414 416 415 private void processItemList( ResultSet rs)416 { 417 DbControl dc = newDbControl();418 saveItemList(dc);419 commit(dc);417 private void processItemList() 418 { 419 //DbControl dc = newDbControl(); 420 //saveItemList(dc); 421 //commit(dc); 420 422 if (mapIds) 421 423 { 422 424 mapItemList(); 423 425 } 424 processSavedItemList(itemList, rs);426 //processSavedItemList(itemList, rs); 425 427 itemList.clear(); 426 428 cleanUpMemory(); 427 429 } 428 430 431 /* 429 432 protected void processSavedItemList( 430 433 List<WrappedItem<BasicItem>> itemList, ResultSet rs) 431 434 {} 435 */ 432 436 433 437 private void mapItemList() … … 438 442 int base2Id = wi.getId(); 439 443 idMap.put(base1Id, base2Id); 440 }441 }442 443 private void saveItemList(DbControl dc)444 {445 for (WrappedItem<BasicItem> wi : itemList)446 {447 if (wi != null)448 {449 BasicItem<?> item = wi.getItem();450 if (!item.isInDatabase())451 {452 dc.saveItem(item);453 }454 }455 else456 {457 log("saveItemList", "wi is null");458 }459 444 } 460 445 } -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/UserTransfer.java
r2614 r2622 24 24 package net.sf.basedb.clients.migrate; 25 25 26 import net.sf.basedb.core.DateUtil;27 26 import net.sf.basedb.core.DbControl; 28 27 import net.sf.basedb.core.Directory; … … 30 29 import net.sf.basedb.core.ItemQuery; 31 30 import net.sf.basedb.core.ItemResultList; 32 import net.sf.basedb.core.Location;33 31 import net.sf.basedb.core.Quota; 34 import net.sf.basedb.core.QuotaType;35 32 import net.sf.basedb.core.Role; 36 33 import net.sf.basedb.core.SystemItems; … … 39 36 import java.sql.ResultSet; 40 37 import java.sql.SQLException; 41 import java.util.ArrayList;42 38 import java.util.HashMap; 43 39 import java.util.Map; 44 import java.util. TreeMap;40 import java.util.Set; 45 41 46 42 /** … … 53 49 defaultGid, defaultGroupAccess, defaultWorldAccess<br/> <b>UserGroupParent</b>: 54 50 isReviewer</dd> 55 <dt><b>Notes</b></dt> 56 <dd> 57 <ul> 58 <li>The database must support the BIT_OR method</li> 59 </ul> 60 </dd> 51 61 52 </dl> 62 53 … … 69 60 */ 70 61 private RoleTransfer roleT = null; 62 63 private QuotaTransfer quotaT = null; 64 71 65 /** 72 66 File quotas are stored and later used to calculate a users new filequota. 67 Maps Base 1 ID -> total quota min bytes 73 68 */ 74 69 private Map<Integer, Long> base1FileQuota = null; … … 86 81 87 82 /** 88 Maps base 1 ids to Base 2 user objects89 */90 // private User[] idUserMap = null;91 /**92 83 @param roleT {@link RoleTransfer} 93 84 */ 94 UserTransfer(RoleTransfer roleT )95 { 96 if (roleT.isDone() )85 UserTransfer(RoleTransfer roleT, QuotaTransfer quotaT) 86 { 87 if (roleT.isDone() && quotaT.isDone()) 97 88 { 98 89 this.roleT = roleT; 90 this.quotaT = quotaT; 99 91 existingUsers = new HashMap<String, User>(); 100 92 } … … 158 150 { 159 151 home = Directory.createHomeDirectory(b2c, user, true); 160 user.setHomeDirectory(home);161 152 progress.increase(); 162 153 } … … 225 216 user.setName(name); 226 217 // fileQuota is saved for later use in finalizeQuota() 227 base1FileQuota.put(userId, rs.getLong(11)); 218 long byteQuota = rs.getLong(11); 219 if (rs.wasNull()) byteQuota = Quota.UNLIMITED; 220 base1FileQuota.put(userId, byteQuota); 228 221 /* 229 222 * Initially quota is set to unlimited. When all transfers are 230 223 * finished quota is updated to a suitible level. 231 224 */ 232 Quota quota = Quota.getById( 233 dc, SystemItems.getId(Quota.UNRESTRICTED)); 234 user.setQuota(quota); 225 Quota unlimitedQuota = Quota.getById(dc, SystemItems.getId(Quota.UNRESTRICTED)); 226 user.setQuota(unlimitedQuota); 235 227 try 236 228 { 237 user.setExpirationDate( DateUtil.parseString(rs.getString(12)));229 user.setExpirationDate(rs.getDate(12)); 238 230 } 239 231 catch (SQLException e) … … 248 240 user.setPhone(rs.getString(9)); 249 241 user.setRemoved(rs.getBoolean(10)); 250 QuotaType quotaType = QuotaType.getById( 251 dc, SystemItems.getId(QuotaType.TOTAL)); 252 long byteQuota = rs.getLong(11); 253 if (rs.wasNull()) 254 { 255 byteQuota = -1; 256 } 257 ItemQuery<Quota> query = Quota.getQuery(); 258 ItemResultList<Quota> quotas = query.list(dc); 259 TreeMap<Long, Quota> sortedQuotas = new TreeMap<Long, Quota>(); 260 for (Quota quota : quotas) 261 { 262 long quotaValue = quota.getQuotaValue( 263 quotaType, Location.PRIMARY); 264 sortedQuotas.put(new Long(quotaValue), quota); 265 } 266 Object[] sortedKeys = sortedQuotas.keySet().toArray(); 267 for (Object quotaValue : sortedKeys) 268 { 269 if (byteQuota <= ((Long) quotaValue).longValue()) 270 { 271 user.setQuota(sortedQuotas.get((Long) quotaValue)); 272 break; 273 } 274 } 242 dc.saveItem(user); 243 275 244 // Combine(OR) user accessMask with group accessMask 276 245 Integer mask = rs.getInt(13); 277 246 Integer groupMask = groupUserAccessMap.get(userId); 278 247 if (groupMask != null) mask |= groupMask; 279 ArrayList<Integer> roleIds = roleT.getRoleIds(mask); 280 dc.saveItem(user); 281 dc.commit(); 282 mapId(userId, user.getId()); 283 dc = newDbControl(); 248 Set<Integer> roleIds = roleT.getRoleIds(mask); 284 249 for (Integer roleId : roleIds) 285 250 { … … 291 256 } 292 257 dc.commit(); 258 mapId(userId, user.getId()); 293 259 } 294 260 catch (Exception e) … … 302 268 } 303 269 270 public void finalizeQuota() 271 { 272 startProgress(base1FileQuota.size()); 273 DbControl dc = newDbControl(); 274 try 275 { 276 for (Map.Entry<Integer, Long> entry : base1FileQuota.entrySet()) 277 { 278 Integer base1Id = entry.getKey(); 279 Long base1Quota = entry.getValue(); 280 281 User user = getUserById(dc, base1Id); 282 Quota quota = quotaT.getQuotaForTotal(dc, base1Quota); 283 user.setQuota(quota); 284 progress.increase(); 285 } 286 dc.commit(); 287 } 288 finally 289 { 290 if (dc != null) dc.close(); 291 progress.stop(); 292 } 293 } 294 304 295 public User getUserById(DbControl dc, int base1Id) 305 296 { -
branches/2.0/src/clients/migrate/net/sf/basedb/clients/migrate/WizzzardTransfer.java
r2614 r2622 66 66 public void start() 67 67 { 68 startProgress(getInt("countWizzzards")); 68 int count = getInt("countWizzzards"); 69 initIdMap(count); 70 startProgress(count); 69 71 runUnBatched(prepareStatementFromFile("selectWizzzards"), 0, getBatchSize()); 70 72 done(); … … 83 85 setCommonItemData(dc, pluginConfiguration, rs); 84 86 PluginConfigurationRequest request = pluginConfiguration.configure(); 85 String fieldSeparator = rs.getString(17); 86 fieldSeparator = fieldSeparator.replaceAll("\\t", "\\\\t"); // Replace tab character with \t 87 88 String dataHeaderRegexp = fixRegexp(rs.getString(12)); 89 String dataFooterRegexp = fixRegexp(rs.getString(16)); 90 String fieldSeparator = fixRegexp(rs.getString(17)); 91 int minDataColumns = rs.getInt(10); 92 int maxDataColumns = rs.getInt(11); 93 87 94 HashMap<String, String> mappings = getParameterMappings(rs.getString(15)); 88 95 // Plugin dependent parameters … … 100 107 // General parameters 101 108 request = response.getNextRequest(); 102 request.setParameterValue( 103 "dataSplitterRegexp", fieldSeparator); 104 request.setParameterValue( 105 "dataHeaderRegexp", rs.getString(12)); 106 request.setParameterValue( 107 "dataFooterRegexp", rs.getString(16)); 108 request.setParameterValue("minDataColumns", rs.getInt(10)); 109 request.setParameterValue("maxDataColumns", rs.getInt(11)); 109 request.setParameterValue("dataSplitterRegexp", fieldSeparator); 110 request.setParameterValue("dataHeaderRegexp", dataHeaderRegexp); 111 request.setParameterValue("dataFooterRegexp", dataFooterRegexp); 112 request.setParameterValue("minDataColumns", minDataColumns); 113 request.setParameterValue("maxDataColumns", maxDataColumns); 110 114 // RawBioAssayData 111 115 request.setParameterValue( … … 197 201 { 198 202 request.setParameterValue("dataSplitterRegexp", fieldSeparator); 199 request.setParameterValue("dataHeaderRegexp", rs.getString(12));200 request.setParameterValue("dataFooterRegexp", rs.getString(16));201 request.setParameterValue("minDataColumns", rs.getInt(10));202 request.setParameterValue("maxDataColumns", rs.getInt(11));203 request.setParameterValue("dataHeaderRegexp", dataHeaderRegexp); 204 request.setParameterValue("dataFooterRegexp", dataFooterRegexp); 205 request.setParameterValue("minDataColumns", minDataColumns); 206 request.setParameterValue("maxDataColumns", maxDataColumns); 203 207 request.setParameterValue( 204 208 "nameColumnMapping", mappings.get("_p_name")); … … 215 219 { 216 220 request.setParameterValue("dataSplitterRegexp", fieldSeparator); 217 request.setParameterValue("dataHeaderRegexp", rs.getString(12)); 221 request.setParameterValue("dataHeaderRegexp", dataHeaderRegexp); 222 request.setParameterValue("dataFooterRegexp", dataFooterRegexp); 223 request.setParameterValue("minDataColumns", minDataColumns); 224 request.setParameterValue("maxDataColumns", maxDataColumns); 218 225 request.setParameterValue( 219 226 "reporterIdColumnMapping", mappings.get("reporterId")); … … 255 262 "extendedColumnMapping.locusLink", 256 263 mappings.get("locusLink")); 257 request.setParameterValue("minDataColumns", rs.getInt(10));258 request.setParameterValue("maxDataColumns", rs.getInt(11));259 264 } 260 265 else if (formatType != null && formatType.equals("reportermap")) 261 266 { 262 267 request.setParameterValue("dataSplitterRegexp", fieldSeparator); 263 request.setParameterValue("dataHeaderRegexp", rs.getString(12)); 268 request.setParameterValue("dataHeaderRegexp", dataHeaderRegexp); 269 request.setParameterValue("dataFooterRegexp", dataFooterRegexp); 270 request.setParameterValue("minDataColumns", minDataColumns); 271 request.setParameterValue("maxDataColumns", maxDataColumns); 264 272 request.setParameterValue( 265 273 "reporterIdColumnMapping", mappings.get("reporterId")); … … 305 313 private HashMap<String, String> getParameterMappings(String mapping) 306 314 { 307 log("getParameterMappings", mapping);308 315 String regexp = "([^:]+):([^,]*),?"; 309 316 // Split on comma, group by colon: key1:value1,key2:value2 … … 318 325 } 319 326 } 320 log("getParameterMappings", mappings.toString());321 327 return mappings; 322 328 } … … 362 368 return pluginDefinition; 363 369 } 370 371 private String fixRegexp(String base1Regexp) 372 { 373 String fixedRegexp = null; 374 if (base1Regexp != null) 375 { 376 fixedRegexp = base1Regexp.replaceAll("\\t", "\\\\t"); // Replace tab character with \t 377 } 378 return fixedRegexp; 379 } 380 364 381 } -
branches/2.0/src/clients/migrate/sql/mysql-migration-queries.sql
r2614 r2622 93 93 94 94 /* selectGroups */ 95 SELECT `id`, `name`, `descr`, `removed`, `accessMask` 95 SELECT `id`, `name`, `descr`, `removed`, `accessMask`, `byteQuota` 96 96 FROM `UserGroup` 97 97 WHERE `isAccount` = 0 … … 542 542 SELECT `h`.`id`, `h`.`owner`, `h`.`gid`, `h`.`groupAccess`, `h`.`worldAccess`, `h`.`name`, `h`.`descr`, `h`.`removed`, 543 543 `h`.`hybridizationDate`, 544 `h`.`protocol`, 544 545 `s`.`id` as arraySlideId, 545 546 `s`.`hybridization` … … 647 648 LIMIT ?,?; 648 649 649 650 /* selectLabeledExtractsByHybridization */ 651 SELECT `labeled`, `quantity` 652 FROM `HybridizedLabeled` 653 WHERE hybridization = ? 654 ORDER BY `channel`; 650 655 651 656
Note: See TracChangeset
for help on using the changeset viewer.