Project

General

Profile

« Previous | Next » 

Revision 9956

Added by Jing Tao over 7 years ago

Add the feature to support the noNamespaceSchemalLocation and refactory the code.

View differences:

DocumentImplWrapper.java
59 59
	}//Constructor
60 60

  
61 61
	public String write(DBConnection conn, String xml, String pub, Reader dtd,
62
			String action, String docid, String user, String[] groups, byte[]xmlBytes, String formatId) throws Exception {
62
			String action, String docid, String user, String[] groups, byte[]xmlBytes, String schemaLocalLocation) throws Exception {
63 63
		return DocumentImpl.write(conn, xml, pub, dtd, action, docid, user, groups,
64
				ruleBase, needValidation, writeAccessRules, xmlBytes, formatId);
64
				ruleBase, needValidation, writeAccessRules, xmlBytes, schemaLocalLocation);
65 65
	}
66 66

  
67 67
	public String writeReplication(DBConnection conn, String xml, byte[]xmlBytes, String pub, Reader dtd,
......
72 72
		// so rule base is null and need validation is false (first false)
73 73
		// this method is for force replication. so the table name is xml_documents
74 74
		// and timed replication is false (last false)
75
	    String schemaLocation = null;
76
	    boolean needValidate = false;
75 77
		return DocumentImpl.writeReplication(conn, xml, xmlBytes, pub, dtd, action, accnum, user,
76
				groups, homeServer, notifyServer, ruleBase, false,
77
				DocumentImpl.DOCUMENTTABLE, false, createDate, updateDate, formatId);
78
				groups, homeServer, notifyServer, ruleBase, needValidate,
79
				DocumentImpl.DOCUMENTTABLE, false, createDate, updateDate, schemaLocation);
78 80
		// last false means is not timed replication
79 81

  
80 82
	}
......
103 105
			throws Exception {
104 106
		//we don't need to check validation in replication
105 107
		// so rule base is null and need validation is false
108
	    String schemaLocation = null;
109
	    boolean needValidate = false;
106 110
		return DocumentImpl.writeReplication(conn, xml, xmlBytes, pub, dtd, action, accnum, user,
107
				groups, homeServer, notifyServer, ruleBase, false, tableName,
108
				timedReplication, createDate, updateDate, formatId);
111
				groups, homeServer, notifyServer, ruleBase, needValidate, tableName,
112
				timedReplication, createDate, updateDate, schemaLocation);
109 113
	}
110 114

  
111 115
}

Also available in: Unified diff