|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.locomotive.loco.perm.AccessControlList
Defines permission ACLs. An ACL consists of a list of permissions. Each permission in the ACL has a polarity, a list of users, and a list of groups. Polarity determines whether that permission has an allow or deny list. Therefore the list of users and the list of groups associated with the permission are allowed access to that permission if it has positive polarity, or are denied that permission if that permission has negative polarity.
Constructor Summary | |
AccessControlList(int ownerId)
Creates an ACL for an object with owner id. |
Method Summary | |
void |
addGroup(java.lang.String groupName,
java.lang.String permName)
Adds a group to a particular permission in the ACL. |
void |
addPermission(java.lang.String permName)
Adds a permission to the ACL. |
void |
addUser(java.lang.String userName,
java.lang.String permName)
Adds a user corresponding to a permission in the ACL. |
java.util.Vector |
getGroups(java.lang.String permName)
Returns a Vector of group names associated with a particular permission |
int |
getId()
Returns the owner id of the ACL. |
java.util.Vector |
getPermissions()
Returns a Vector containing all of the permission names contained in the ACL. |
boolean |
getPolarity(java.lang.String permName)
Gets the polarity value of a permission in the ACL. |
java.util.Vector |
getUsers(java.lang.String permName)
Returns a Vector containing the user names associated with a particular permission. |
void |
removeGroup(java.lang.String groupName,
java.lang.String permName)
Removes a group from a particular permission in the ACL. |
void |
removePermission(java.lang.String permName)
Removes a permission from the ACL. |
void |
removeUser(java.lang.String userName,
java.lang.String permName)
Removes a user corresponding to a permission in the ACL. |
void |
setPolarity(boolean pol,
java.lang.String permName)
Sets the polarity (allow or deny list) of a permission in the ACL. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public AccessControlList(int ownerId)
ownerId
- id of the object to which the ACL is attachedMethod Detail |
public int getId()
public void addPermission(java.lang.String permName)
permName
- name of the permission being added to the ACLpublic void removePermission(java.lang.String permName)
permName
- name of the permission to be removed from the ACL.public java.util.Vector getPermissions()
public void addUser(java.lang.String userName, java.lang.String permName)
userName
- name of the user to be addedpermName
- name of the permission to which the user is being addedpublic void removeUser(java.lang.String userName, java.lang.String permName)
userName
- name of the user to be removedpermName
- name of the permission from which the user is being
removedpublic java.util.Vector getUsers(java.lang.String permName)
permName
- name of the permissionpublic void addGroup(java.lang.String groupName, java.lang.String permName)
groupName
- name of group to be addedpermName
- name of the permission to which the group is being addedpublic void removeGroup(java.lang.String groupName, java.lang.String permName)
groupName
- name of the group to be removedpermName
- name of the permission from which the group is being
removedpublic java.util.Vector getGroups(java.lang.String permName)
permName
- name of the permissionpublic void setPolarity(boolean pol, java.lang.String permName)
pol
- boolean polarity valuepermName
- permission of the ACL whose polarity is being setpublic boolean getPolarity(java.lang.String permName)
permName
- name of the permission whose polarity is in question
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |