Revision 6014
Added by ben leinfelder almost 14 years ago
src/edu/ucsb/nceas/metacat/replication/ReplicationHandler.java | ||
---|---|---|
396 | 396 |
null, /* the dtd text */ |
397 | 397 |
actions, |
398 | 398 |
accNumber, |
399 |
docinfoHash.get("user_owner"), |
|
399 |
docinfoHash.get("user_updated"), |
|
400 |
//docinfoHash.get("user_owner"), |
|
400 | 401 |
null, /* null for groups[] */ |
401 | 402 |
docHomeServer, |
402 | 403 |
remoteserver, tableName, true,// true is for time replication |
... | ... | |
555 | 556 |
docinfoParser.parse(new InputSource(new StringReader(docInfoStr))); |
556 | 557 |
Hashtable<String, String> docinfoHash = dih.getDocInfo(); |
557 | 558 |
// Get docid owner |
558 |
String user = docinfoHash.get("user_owner"); |
|
559 |
//String user = docinfoHash.get("user_owner"); |
|
560 |
String user = docinfoHash.get("user_updated"); |
|
559 | 561 |
// Get docid name (such as acl or dataset) |
560 | 562 |
String docName = docinfoHash.get("docname"); |
561 | 563 |
// Get doc type (eml public id) |
src/edu/ucsb/nceas/metacat/replication/ReplicationService.java | ||
---|---|---|
558 | 558 |
Hashtable<String, String> docinfoHash = dih.getDocInfo(); |
559 | 559 |
|
560 | 560 |
// Get user owner of this docid |
561 |
String user = (String) docinfoHash.get("user_owner"); |
|
561 |
String user = (String) docinfoHash.get("user_updated"); |
|
562 |
//String user = (String) docinfoHash.get("user_owner"); |
|
562 | 563 |
// Get home server of this docid |
563 | 564 |
String homeServer = (String) docinfoHash.get("home_server"); |
564 | 565 |
String guid = (String) docinfoHash.get("guid"); |
... | ... | |
833 | 834 |
XMLReader docinfoParser = ReplicationHandler.initParser(dih); |
834 | 835 |
docinfoParser.parse(new InputSource(new StringReader(docInfoStr))); |
835 | 836 |
Hashtable<String, String> docinfoHash = dih.getDocInfo(); |
836 |
String user = (String) docinfoHash.get("user_owner"); |
|
837 |
String user = (String) docinfoHash.get("user_updated"); |
|
838 |
//String user = (String) docinfoHash.get("user_owner"); |
|
837 | 839 |
|
838 | 840 |
String docName = (String) docinfoHash.get("docname"); |
839 | 841 |
|
Also available in: Unified diff
use 'user_updated' field when writing the replicated document - allows most recent ownership/permissions to be used (in case LDAP groups have shifted) and is more accurate for both updates and initial inserts (hopefully addresses the replication issue we are having with pisco)