Revision 5324
Added by berkley almost 14 years ago
ReplicationHandler.java | ||
---|---|---|
40 | 40 |
import edu.ucsb.nceas.metacat.properties.PropertyService; |
41 | 41 |
import edu.ucsb.nceas.metacat.shared.HandlerException; |
42 | 42 |
import edu.ucsb.nceas.metacat.util.MetacatUtil; |
43 |
import edu.ucsb.nceas.metacat.IdentifierManager; |
|
43 | 44 |
import edu.ucsb.nceas.utilities.PropertyNotFoundException; |
44 | 45 |
|
45 | 46 |
import java.sql.*; |
... | ... | |
405 | 406 |
} |
406 | 407 |
} |
407 | 408 |
|
409 |
//process guid |
|
410 |
logReplication.debug("Processing guid information from docinfoHash: " + docinfoHash.toString()); |
|
411 |
String guid = docinfoHash.get("guid"); |
|
412 |
IdentifierManager idman = IdentifierManager.getInstance(); |
|
413 |
if(guid != null && !idman.identifierExists(guid)) |
|
414 |
{ //if the guid was passed in, put it in the identifiers table |
|
415 |
logReplication.debug("Creating guid/docid mapping for docid " + |
|
416 |
docinfoHash.get("docid") + " and guid: " + guid); |
|
417 |
idman.createMapping(guid, docinfoHash.get("docid")); |
|
418 |
} |
|
419 |
else |
|
420 |
{ |
|
421 |
logReplication.debug("No guid information was included with the replicated document"); |
|
422 |
} |
|
423 |
|
|
408 | 424 |
logReplication.info("ReplicationHandler.handleSingleXMLDocument - Successfully replicated doc " + accNumber); |
409 | 425 |
if (tableName.equals(DocumentImpl.DOCUMENTTABLE)) |
410 | 426 |
{ |
Also available in: Unified diff
replication of guids now works. tested this for both forced replication and update/insert/delete triggered replication