Revision 7175
Added by ben leinfelder about 12 years ago
ReplicationService.java | ||
---|---|---|
80 | 80 |
import edu.ucsb.nceas.metacat.accesscontrol.AccessControlForSingleFile; |
81 | 81 |
import edu.ucsb.nceas.metacat.accesscontrol.PermOrderException; |
82 | 82 |
import edu.ucsb.nceas.metacat.accesscontrol.XMLAccessDAO; |
83 |
import edu.ucsb.nceas.metacat.admin.upgrade.dataone.GenerateORE; |
|
83 | 84 |
import edu.ucsb.nceas.metacat.admin.upgrade.dataone.GenerateSystemMetadata; |
84 | 85 |
import edu.ucsb.nceas.metacat.client.InsufficientKarmaException; |
85 | 86 |
import edu.ucsb.nceas.metacat.database.DBConnection; |
... | ... | |
370 | 371 |
gsm.multiThreadUpgrade(); |
371 | 372 |
out.write("System Metadata generated for server " + serverid); |
372 | 373 |
|
374 |
} else if (subaction.equals("generateore")) { |
|
375 |
GenerateORE gore = new GenerateORE(); |
|
376 |
int serverLocation = -1; |
|
377 |
String serverid = ((String[]) params.get("serverid"))[0]; |
|
378 |
serverLocation = Integer.parseInt(serverid); |
|
379 |
gore.setServerLocation(serverLocation ); |
|
380 |
gore.upgrade(); |
|
381 |
out.write("Generated ORE maps for server " + serverid); |
|
382 |
|
|
373 | 383 |
} else { |
374 | 384 |
|
375 | 385 |
out.write("<error>Unkonwn subaction</error>"); |
... | ... | |
391 | 401 |
out.write("<td><b>datareplicate</b></td>"); |
392 | 402 |
out.write("<td><b>hub</b></td>"); |
393 | 403 |
if (showGenerateSystemMetadata) { |
394 |
out.write("<td><b>Action</b></td>"); |
|
404 |
out.write("<td><b>System Metadata</b></td>"); |
|
405 |
out.write("<td><b>ORE Maps</b></td>"); |
|
395 | 406 |
} |
396 | 407 |
out.write("</tr>"); |
397 | 408 |
|
... | ... | |
406 | 417 |
out.write(rs.getString(5) + "</td><td>"); |
407 | 418 |
out.write(rs.getString(6) + "</td>"); |
408 | 419 |
if (showGenerateSystemMetadata) { |
409 |
//request.getContextPath() %>/admin?configureType=replication&action=servercontrol&subaction=list"
|
|
420 |
// for SM
|
|
410 | 421 |
out.write("<td><form action='" + request.getContextPath() + "/admin'>"); |
411 | 422 |
out.write("<input name='serverid' type='hidden' value='" + rs.getString(1) + "'/>"); |
412 | 423 |
out.write("<input name='configureType' type='hidden' value='replication'/>"); |
... | ... | |
414 | 425 |
out.write("<input name='subaction' type='hidden' value='generatesystemmetadata'/>"); |
415 | 426 |
out.write("<input type='submit' value='Generate System Metadata'/>"); |
416 | 427 |
out.write("</form></td>"); |
428 |
|
|
429 |
// for ORE maps |
|
430 |
out.write("<td><form action='" + request.getContextPath() + "/admin'>"); |
|
431 |
out.write("<input name='serverid' type='hidden' value='" + rs.getString(1) + "'/>"); |
|
432 |
out.write("<input name='configureType' type='hidden' value='replication'/>"); |
|
433 |
out.write("<input name='action' type='hidden' value='servercontrol'/>"); |
|
434 |
out.write("<input name='subaction' type='hidden' value='generateore'/>"); |
|
435 |
out.write("<input type='submit' value='Generate ORE'/>"); |
|
436 |
out.write("</form></td>"); |
|
417 | 437 |
} |
418 | 438 |
out.write("</tr>"); |
419 | 439 |
|
Also available in: Unified diff
instead of generating SM and ORE maps during dataone configuration/MN registration, moved this all to the replication admin screen where we can target generation for specific nodes. That way it's more controlled as to when and where we generate DataONE required content.
https://redmine.dataone.org/issues/2740