Revision 4698
Added by daigle over 15 years ago
PermissionController.java | ||
---|---|---|
37 | 37 |
import org.apache.log4j.Logger; |
38 | 38 |
|
39 | 39 |
import edu.ucsb.nceas.metacat.service.PropertyService; |
40 |
import edu.ucsb.nceas.metacat.util.MetaCatUtil;
|
|
40 |
import edu.ucsb.nceas.metacat.util.MetacatUtil;
|
|
41 | 41 |
import edu.ucsb.nceas.utilities.PropertyNotFoundException; |
42 | 42 |
|
43 | 43 |
public class PermissionController |
... | ... | |
59 | 59 |
public PermissionController(String myDocid) throws McdbException |
60 | 60 |
{ |
61 | 61 |
// Get rid of rev number |
62 |
docId = MetaCatUtil.getSmartDocId(myDocid);
|
|
62 |
docId = MetacatUtil.getSmartDocId(myDocid);
|
|
63 | 63 |
//hasSubTreeAccessControl = checkSubTreeAccessControl(); |
64 | 64 |
} |
65 | 65 |
|
... | ... | |
76 | 76 |
} |
77 | 77 |
else |
78 | 78 |
{ |
79 |
docId = MetaCatUtil.getDocIdFromAccessionNumber(myDocid);
|
|
79 |
docId = MetacatUtil.getDocIdFromAccessionNumber(myDocid);
|
|
80 | 80 |
} |
81 | 81 |
} |
82 | 82 |
|
... | ... | |
431 | 431 |
*/ |
432 | 432 |
private boolean isAccessDocument(String docId) throws SQLException { |
433 | 433 |
// detele the rev number if docid contains it |
434 |
docId = MetaCatUtil.getDocIdFromString(docId);
|
|
434 |
docId = MetacatUtil.getDocIdFromString(docId);
|
|
435 | 435 |
PreparedStatement pStmt = null; |
436 | 436 |
DBConnection conn = null; |
437 | 437 |
int serialNumber = -1; |
... | ... | |
453 | 453 |
|
454 | 454 |
// if it is an access document |
455 | 455 |
if (doctype != null |
456 |
&& ((MetaCatUtil.getOptionList(PropertyService
|
|
456 |
&& ((MetacatUtil.getOptionList(PropertyService
|
|
457 | 457 |
.getProperty("xml.accessdoctype")).contains(doctype)))) { |
458 | 458 |
|
459 | 459 |
return true; |
... | ... | |
1106 | 1106 |
{ |
1107 | 1107 |
logMetacat.info("Put subtree id " + subTreeId + |
1108 | 1108 |
" and " + "inline data file name " + |
1109 |
MetaCatUtil.
|
|
1109 |
MetacatUtil.
|
|
1110 | 1110 |
getInlineDataIdWithoutRev(fileId) + |
1111 | 1111 |
" into " + "un" + permission + |
1112 | 1112 |
" hash"); |
1113 |
unAccessibleIdList.put(subTreeId, MetaCatUtil.
|
|
1113 |
unAccessibleIdList.put(subTreeId, MetacatUtil.
|
|
1114 | 1114 |
getInlineDataIdWithoutRev(fileId)); |
1115 | 1115 |
} |
1116 | 1116 |
} |
Also available in: Unified diff
Renamed MetaCatUtil to MetacatUtil