Project

General

Profile

« Previous | Next » 

Revision 9958

Added by Jing Tao over 8 years ago

Removed a unused parameter - formatId from method writeReplication.

View differences:

src/edu/ucsb/nceas/metacat/DocumentImplWrapper.java
66 66

  
67 67
	public String writeReplication(DBConnection conn, String xml, byte[]xmlBytes, String pub, Reader dtd,
68 68
			String action, String accnum, String user, String[] groups,
69
			String homeServer, String notifyServer, Date createDate, Date updateDate, String formatId)
69
			String homeServer, String notifyServer, Date createDate, Date updateDate)
70 70
			throws Exception {
71 71
		//we don't need to check validation in replication
72 72
		// so rule base is null and need validation is false (first false)
......
101 101
	public String writeReplication(DBConnection conn, String xml, byte[]xmlBytes, String pub, Reader dtd,
102 102
			String action, String accnum, String user, String[] groups,
103 103
			String homeServer, String notifyServer, String tableName,
104
			boolean timedReplication, Date createDate, Date updateDate, String formatId)
104
			boolean timedReplication, Date createDate, Date updateDate)
105 105
			throws Exception {
106 106
		//we don't need to check validation in replication
107 107
		// so rule base is null and need validation is false
src/edu/ucsb/nceas/metacat/replication/ReplicationHandler.java
457 457
        parserBase = DocumentImpl.EML210;
458 458
      }
459 459
      
460
      String formatId = null;
460
      /*String formatId = null;
461 461
      //get the format id from the system metadata 
462 462
      if(sysMeta != null && sysMeta.getFormatId() != null) {
463 463
          logMetacat.debug("ReplicationService.handleForceReplicateRequest - the format id will be got from the system metadata for the object "+accNumber);
464 464
          formatId = sysMeta.getFormatId().getValue();
465
      }
465
      }*/
466 466
      // Write the document into local host
467 467
      DocumentImplWrapper wrapper = new DocumentImplWrapper(parserBase, false, false);
468 468
      String newDocid = wrapper.writeReplication(dbConn,
......
476 476
                              docHomeServer,
477 477
                              remoteserver, tableName, true,// true is for time replication 
478 478
                              createdDate,
479
                              updatedDate, formatId);
479
                              updatedDate);
480 480
      
481 481
      if(sysMeta != null) {
482 482
			// submit for indexing. When the doc writing process fails, the index process will fail as well. But this failure
src/edu/ucsb/nceas/metacat/replication/ReplicationService.java
733 733
			}
734 734
			logReplication.warn("ReplicationService.handleForceReplicateRequest - The parserBase is: " + parserBase);
735 735
			
736
			String formatId = null;
736
			/*String formatId = null;
737 737
		    //get the format id from the system metadata 
738 738
		    if(sysMeta != null && sysMeta.getFormatId() != null) {
739 739
		          logMetacat.debug("ReplicationService.handleForceReplicateRequest - the format id will be got from the system metadata for the object "+docid);
740 740
		          formatId = sysMeta.getFormatId().getValue();
741
		    }
741
		    }*/
742 742
		      
743 743
			// Get DBConnection from pool
744 744
			dbConn = DBConnectionPool
......
750 750
			try {
751 751
				wrapper.writeReplication(dbConn, xmldoc, xmlBytes, null, null,
752 752
						dbaction, docid, null, null, homeServer, server, createdDate,
753
						updatedDate, formatId);
753
						updatedDate);
754 754
			} finally {
755 755
				if(sysMeta != null) {
756 756
					// submit for indexing. When the doc writing process fails, the index process will fail as well. But this failure

Also available in: Unified diff