java.lang.Object | ||
↳ | sun.security.acl.OwnerImpl | |
↳ | sun.security.acl.AclImpl |
An Access Control List (ACL) is encapsulated by this class.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructor for creating an empty ACL.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds an ACL entry to this ACL.
| |||||||||||
This method checks whether or not the specified principal
has the required permission.
| |||||||||||
returns an enumeration of the entries in this ACL.
| |||||||||||
Returns the name of the ACL.
| |||||||||||
This method returns the set of allowed permissions for the
specified principal.
| |||||||||||
Removes an ACL entry from this ACL.
| |||||||||||
Sets the name of the ACL.
| |||||||||||
return a stringified version of the
ACL.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Adds an ACL entry to this ACL. An entry associates a group or a principal with a set of permissions. Each user or group can have one positive ACL entry and one negative ACL entry. If there is one of the type (negative or positive) already in the table, a false value is returned. The caller principal must be a part of the owners list of the ACL in order to invoke this method.
caller | the principal who is invoking this method. |
---|---|
entry | the ACL entry that must be added to the ACL. |
NotOwnerException | if the caller principal is not on the owners list of the Acl. |
---|
This method checks whether or not the specified principal has the required permission. If permission is denied permission false is returned, a true value is returned otherwise. This method does not authenticate the principal. It presumes that the principal is a valid authenticated principal.
principal | the name of the authenticated principal |
---|---|
permission | the permission that the principal must have. |
returns an enumeration of the entries in this ACL.
This method returns the set of allowed permissions for the specified principal. This set of allowed permissions is calculated as follows: If there is no entry for a group or a principal an empty permission set is assumed. The group positive permission set is the union of all the positive permissions of each group that the individual belongs to. The group negative permission set is the union of all the negative permissions of each group that the individual belongs to. If there is a specific permission that occurs in both the postive permission set and the negative permission set, it is removed from both. The group positive and negatoive permission sets are calculated. The individial positive permission set and the individual negative permission set is then calculated. Again abscence of an entry means the empty set. The set of permissions granted to the principal is then calculated using the simple rule: Individual permissions always override the Group permissions. Specifically, individual negative permission set (specific denial of permissions) overrides the group positive permission set. And the individual positive permission set override the group negative permission set.
user | the principal for which the ACL entry is returned. |
---|
Removes an ACL entry from this ACL. The caller principal must be a part of the owners list of the ACL in order to invoke this method.
caller | the principal who is invoking this method. |
---|---|
entry | the ACL entry that must be removed from the ACL. |
NotOwnerException | if the caller principal is not the owners list of the Acl. |
---|
Sets the name of the ACL.
caller | the principal who is invoking this method. |
---|---|
name | the name of the ACL. |
NotOwnerException | if the caller principal is not on the owners list of the Acl. |
---|
return a stringified version of the ACL.