|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ajanta.security.fileacl.FileAcl
This class provides Access Control List for determining whether user has read and write permission for a given file.
ajanta.security.acl
Field Summary | |
protected java.util.Hashtable |
fileAclTable
HashTable to maintain ACL entries |
protected java.security.acl.Permission |
inherit
|
protected java.security.Principal |
owner
Owner of the acl entries |
protected ajanta.naming.URN |
ownerURN
Owner URN of the acl entries |
protected java.security.acl.Permission |
read
|
protected java.lang.String |
rootPath
path to the root directory where .acl file can be obtained |
protected java.lang.String |
urnPart
this is domain part of file URNs |
protected java.security.acl.Permission |
write
|
Constructor Summary | |
FileAcl(java.lang.String root)
|
Method Summary | |
void |
addFilePermission(ajanta.naming.URN userURN,
java.lang.String fileName,
java.lang.String perm)
Add file permission for a given user |
protected boolean |
checkFilePermission(ajanta.naming.URN userURN,
ajanta.naming.URN fileName,
java.lang.String perm)
Check permission for a user |
boolean |
checkPermission(java.lang.String user,
java.lang.String file,
java.lang.String perm)
Check permission for a user |
boolean |
checkPermission(ajanta.naming.URN userURN,
java.lang.String file,
java.lang.String perm)
Check permission for a user |
boolean |
checkPermission(ajanta.naming.URN userURN,
ajanta.naming.URN file,
java.lang.String perm)
Check permission for a user |
protected void |
createAclEntry(java.lang.String line)
Create ACL entries : read for "r","write" for "w" and inherit for "i" |
void |
deleteFilePermission(ajanta.naming.URN userURN,
java.lang.String fileName,
java.lang.String perm)
delete file permission for a given user |
protected void |
initAclTable()
It reads .acl file under "root" directory and initializes the ACL table. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ajanta.naming.URN ownerURN
protected java.lang.String rootPath
protected java.security.Principal owner
protected java.security.acl.Permission read
protected java.security.acl.Permission write
protected java.security.acl.Permission inherit
protected java.util.Hashtable fileAclTable
protected java.lang.String urnPart
Constructor Detail |
public FileAcl(java.lang.String root)
root
- path to the root directory where .acl file can be obtainedMethod Detail |
protected void initAclTable()
protected void createAclEntry(java.lang.String line)
public void deleteFilePermission(ajanta.naming.URN userURN, java.lang.String fileName, java.lang.String perm)
userURN
- urn of the user who'e permission is being deletedfileName
- name of the fileperm
- permission string "read","write" or "inherit"public void addFilePermission(ajanta.naming.URN userURN, java.lang.String fileName, java.lang.String perm)
userURN
- urn of the user who'e permission is being addedfileName
- name of the fileperm
- permission string "read","write" or "inherit"protected boolean checkFilePermission(ajanta.naming.URN userURN, ajanta.naming.URN fileName, java.lang.String perm)
userURN
- urn of the userfileName
- urn of the file ( urn:ans:root/somefile )public boolean checkPermission(java.lang.String user, java.lang.String file, java.lang.String perm)
public boolean checkPermission(ajanta.naming.URN userURN, java.lang.String file, java.lang.String perm)
userURN
- urn of the userpublic boolean checkPermission(ajanta.naming.URN userURN, ajanta.naming.URN file, java.lang.String perm)
userURN
- urn of the user
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |