Project

General

Profile

« Previous | Next » 

Revision 1098

Added by Jing Tao over 22 years ago

In update method, add code to handle if a user couldn't pass a trusting test.

View differences:

src/edu/ucsb/nceas/metacat/ReplicationHandler.java
262 262
              util.getLocalReplicationServerName()+"&action=read&docid="+docid);
263 263
            //System.out.println("Sending message: " + u.toString());
264 264
            String newxmldoc = MetacatReplication.getURLContent(u);
265
            if ( newxmldoc.indexOf("error")!= -1)
266
            {
267
              return;
268
            }
265 269
            MetaCatUtil.debugMessage("xml documnet:", 50);
266 270
            MetaCatUtil.debugMessage(newxmldoc, 50);
267 271
            DocInfoHandler dih = new DocInfoHandler();
......
341 345
              
342 346
              //register data file into xml_documents table and wite data file
343 347
              //into file system
348
              if (u.openStream() != null)
349
              {
344 350
              DocumentImpl.writeDataFile(u.openStream(), datafilePath, 
345 351
                                  docName,docType, accnum, user,docHomeServer);
346 352
              
347 353
              MetacatReplication.replLog("wrote doc " + docid + " from " + 
348 354
                                         docServer);
355
              }
356
              else
357
              {
358
                return;
359
              }
349 360
              /*System.out.println("wrote doc " + docid + " from " + 
350 361
                                 docServer);*/
351 362
            }

Also available in: Unified diff