Revision 2641
Added by Jing Tao over 18 years ago
AccessControlList.java | ||
---|---|---|
118 | 118 |
* @param serverCode the serverid from xml_replication on which this document |
119 | 119 |
* resides. |
120 | 120 |
*/ |
121 |
public AccessControlList(DBConnection conn, String aclid, //Reader acl, |
|
121 |
public AccessControlList(DBConnection conn, String aclid, int rev,//Reader acl,
|
|
122 | 122 |
String user, String[] groups, int serverCode) |
123 | 123 |
throws SAXException, IOException, McdbException |
124 | 124 |
{ |
... | ... | |
143 | 143 |
this.serverCode = serverCode; |
144 | 144 |
|
145 | 145 |
// read the access file from db connection |
146 |
DocumentImpl acldoc = new DocumentImpl(aclid); |
|
146 |
DocumentImpl acldoc = new DocumentImpl(aclid+sep+rev);
|
|
147 | 147 |
String acl = acldoc.toString(); |
148 | 148 |
this.rev = acldoc.getRev(); |
149 | 149 |
|
... | ... | |
326 | 326 |
for (int i=0; i < aclObjects.size(); i++) { |
327 | 327 |
// docid of the current object |
328 | 328 |
String docid = (String)aclObjects.elementAt(i); |
329 |
DocumentIdentifier docID = new DocumentIdentifier(docid); |
|
330 |
docid = docID.getIdentifier(); |
|
329 |
//DocumentIdentifier docID = new DocumentIdentifier(docid); |
|
330 |
//docid = docID.getIdentifier(); |
|
331 |
// the docid get here has revision number, so we need to |
|
332 |
// remove it. |
|
333 |
//docid = MetaCatUtil.getDocIdFromAccessionNumber(docid); |
|
334 |
//System.out.println("The docid insert is!!!!!!!!!! "+ docid); |
|
331 | 335 |
insertPermissions(docid,leavingTagName); |
332 | 336 |
} |
333 | 337 |
|
... | ... | |
429 | 433 |
ResultSet rs = pstmt.getResultSet(); |
430 | 434 |
boolean hasRows = rs.next(); |
431 | 435 |
while (hasRows) { |
432 |
aclObjects.addElement(rs.getString(1)); |
|
436 |
String object = rs.getString(1); |
|
437 |
//System.out.println("add acl object into vector !!!!!!!!!!!!!!!!!"+object); |
|
438 |
aclObjects.addElement(object); |
|
433 | 439 |
hasRows = rs.next(); |
434 | 440 |
}//whil |
435 | 441 |
} |
Also available in: Unified diff
Change the code to make sure DocumentImpl class's constructor should have rev attached.