Revision 7128
Added by ben leinfelder about 12 years ago
DocumentImplWrapper.java | ||
---|---|---|
44 | 44 |
/* Attributes */ |
45 | 45 |
private String ruleBase = null; |
46 | 46 |
private boolean needValidation = false; |
47 |
private boolean writeAccessRules = true; |
|
47 | 48 |
|
48 | 49 |
/** |
49 | 50 |
* Constructor of DocumentImpleWrapper |
50 | 51 |
* @param myRuleBase the xml is base on DTD or Schema |
51 | 52 |
* @param validation if the xml document need to be validated |
52 | 53 |
*/ |
53 |
public DocumentImplWrapper(String myRuleBase, boolean validation) { |
|
54 |
public DocumentImplWrapper(String myRuleBase, boolean validation, boolean writeAccessRules) {
|
|
54 | 55 |
ruleBase = myRuleBase; |
55 | 56 |
needValidation = validation; |
57 |
this.writeAccessRules = writeAccessRules; |
|
56 | 58 |
|
57 | 59 |
}//Constructor |
58 | 60 |
|
59 | 61 |
public String write(DBConnection conn, String xml, String pub, Reader dtd, |
60 | 62 |
String action, String docid, String user, String[] groups) throws Exception { |
61 | 63 |
return DocumentImpl.write(conn, xml, pub, dtd, action, docid, user, groups, |
62 |
ruleBase, needValidation); |
|
64 |
ruleBase, needValidation, writeAccessRules);
|
|
63 | 65 |
} |
64 | 66 |
|
65 | 67 |
public String writeReplication(DBConnection conn, String xml, String pub, Reader dtd, |
Also available in: Unified diff
add a parameter for optionally writing EML-embedded access control rules to the Metacat DB.
https://redmine.dataone.org/issues/2584
https://redmine.dataone.org/issues/2583