Revision 1368
Added by Jing Tao almost 22 years ago
src/edu/ucsb/nceas/metacat/AccessControlList.java | ||
---|---|---|
52 | 52 |
* document into relational DB. It extends DefaultHandler class to handle |
53 | 53 |
* SAX parsing events when processing the XML stream. |
54 | 54 |
*/ |
55 |
public class AccessControlList extends DefaultHandler { |
|
55 |
public class AccessControlList extends DefaultHandler |
|
56 |
implements AccessControlInterface |
|
57 |
{ |
|
56 | 58 |
|
57 |
private static final int CHMOD = 1; |
|
58 |
private static final int WRITE = 2; |
|
59 |
private static final int READ = 4; |
|
60 |
private static final int ALL = 7; |
|
61 |
private static final String ALLOWFIRST="allowFirst"; |
|
62 |
private static final String DENYFIRST="denyFirst"; |
|
63 |
private static final String ALLOW="allow"; |
|
64 |
private static final String DENY="deny"; |
|
65 |
private static final String PUBLIC="public"; |
|
59 |
|
|
66 | 60 |
private static String sysdate = MetaCatUtil.dbAdapter.getDateTimeFunction(); |
67 | 61 |
private static String isnull = MetaCatUtil.dbAdapter.getIsNULLFunction(); |
68 | 62 |
|
... | ... | |
620 | 614 |
} |
621 | 615 |
|
622 | 616 |
/* Get the int value of READ, WRITE or ALL. */ |
623 |
private static int intValue ( String permission )
|
|
617 |
public static int intValue ( String permission )
|
|
624 | 618 |
{ |
625 |
if ( permission.equals("READ") ) { |
|
619 |
if ( permission.equalsIgnoreCase("READ") ) {
|
|
626 | 620 |
return READ; |
627 |
} else if ( permission.equals("WRITE") ) { |
|
621 |
} else if ( permission.equalsIgnoreCase("WRITE") ) {
|
|
628 | 622 |
return WRITE; |
629 |
} else if ( permission.equals("ALL") ) { |
|
623 |
} else if ( permission.equalsIgnoreCase("ALL") ) {
|
|
630 | 624 |
return ALL; |
631 | 625 |
} |
632 | 626 |
|
Also available in: Unified diff
Remove some genric stuff to AccessControlInterface.