Revision 7003
Added by ben leinfelder almost 13 years ago
src/edu/ucsb/nceas/metacat/admin/D1Admin.java | ||
---|---|---|
315 | 315 |
// services |
316 | 316 |
PropertyService.setPropertyNoPersist("dataone.mn.services.enabled", Boolean.toString(servicesEnabled)); |
317 | 317 |
|
318 |
// process a memberNodeId update
|
|
318 |
// get the current node id so we know if we updated the value
|
|
319 | 319 |
String existingMemberNodeId = PropertyService.getProperty("dataone.memberNodeId"); |
320 |
if (!existingMemberNodeId.equals(memberNodeId)) { |
|
321 |
// update all existing system Metadata for this node id |
|
322 |
IdentifierManager.getInstance().updateAuthoritativeMemberNodeId(existingMemberNodeId, memberNodeId); |
|
323 |
} |
|
320 |
|
|
321 |
// update the property value |
|
324 | 322 |
PropertyService.setPropertyNoPersist("dataone.memberNodeId", memberNodeId); |
325 | 323 |
|
324 |
// persist them all |
|
326 | 325 |
PropertyService.persistProperties(); |
327 | 326 |
|
328 | 327 |
// Register/update as a DataONE Member Node |
329 | 328 |
registerDataONEMemberNode(); |
330 |
|
|
329 |
|
|
330 |
// did we end up changing the member node id from what it used to be? |
|
331 |
if (!existingMemberNodeId.equals(memberNodeId)) { |
|
332 |
// update all existing system Metadata for this node id |
|
333 |
IdentifierManager.getInstance().updateAuthoritativeMemberNodeId(existingMemberNodeId, memberNodeId); |
|
334 |
} |
|
335 |
|
|
331 | 336 |
// dataone system metadata generation |
332 | 337 |
boolean smGenerated = Boolean.parseBoolean(PropertyService.getProperty("dataone.systemmetadata.generated")); |
333 | 338 |
if (!smGenerated) { |
Also available in: Unified diff
update the memberNodeId in existing system metadata only after the register/update is successful with the CN -- we can avoid unneeded SM updates in cases when the register/update fails because we gave the CN bad info that it rejects.
https://redmine.dataone.org/issues/2308