All Packages Class Hierarchy This Package Previous Next Index
Class sun.security.acl.AclEntryImpl
java.lang.Object
|
+----sun.security.acl.AclEntryImpl
- public class AclEntryImpl
- extends Object
- implements AclEntry
This is a class that describes one entry that associates users
or groups with permissions in the ACL.
The entry may be used as a way of granting or denying permissions.
-
AclEntryImpl()
- Construct a null ACL entry
-
AclEntryImpl(Principal)
- Construct an ACL entry that associates a user with permissions
in the ACL.
-
addPermission(Permission)
- A principal or a group can be associated with multiple
permissions.
-
checkPermission(Permission)
- Checks if the passed permission is part of the allowed
permission set in this entry.
-
clone()
- Clones an AclEntry.
-
getPrincipal()
- Return the Principal associated in this ACL entry.
-
isNegative()
- Returns true if this is a negative ACL.
-
permissions()
- return an enumeration of the permissions in this ACL entry.
-
removePermission(Permission)
- The method disassociates the permission from the Principal
or the Group in this ACL entry.
-
setNegativePermissions()
- This method sets the ACL to have negative permissions.
-
setPrincipal(Principal)
- Sets the principal in the entity.
-
toString()
- Return a string representation of the contents of the ACL entry.
AclEntryImpl
public AclEntryImpl(Principal user)
- Construct an ACL entry that associates a user with permissions
in the ACL.
- Parameters:
- user - The user that is associated with this entry.
AclEntryImpl
public AclEntryImpl()
- Construct a null ACL entry
setPrincipal
public boolean setPrincipal(Principal user)
- Sets the principal in the entity. If a group or a
principal had already been set, a false value is
returned, otherwise a true value is returned.
- Parameters:
- user - The user that is associated with this entry.
- Returns:
- true if the principal is set, false if there is
one already.
setNegativePermissions
public void setNegativePermissions()
- This method sets the ACL to have negative permissions.
That is the user or group is denied the permission set
specified in the entry.
isNegative
public boolean isNegative()
- Returns true if this is a negative ACL.
addPermission
public boolean addPermission(Permission permission)
- A principal or a group can be associated with multiple
permissions. This method adds a permission to the ACL entry.
- Parameters:
- permission - The permission to be associated with
the principal or the group in the entry.
- Returns:
- true if the permission was added, false if the
permission was already part of the permission set.
removePermission
public boolean removePermission(Permission permission)
- The method disassociates the permission from the Principal
or the Group in this ACL entry.
- Parameters:
- permission - The permission to be disassociated with
the principal or the group in the entry.
- Returns:
- true if the permission is removed, false if the
permission is not part of the permission set.
checkPermission
public boolean checkPermission(Permission permission)
- Checks if the passed permission is part of the allowed
permission set in this entry.
- Parameters:
- permission - The permission that has to be part of
the permission set in the entry.
- Returns:
- true if the permission passed is part of the
permission set in the entry, false otherwise.
permissions
public Enumeration permissions()
- return an enumeration of the permissions in this ACL entry.
toString
public String toString()
- Return a string representation of the contents of the ACL entry.
- Overrides:
- toString in class Object
clone
public synchronized Object clone()
- Clones an AclEntry.
- Overrides:
- clone in class Object
getPrincipal
public Principal getPrincipal()
- Return the Principal associated in this ACL entry.
The method returns null if the entry uses a group
instead of a principal.
All Packages Class Hierarchy This Package Previous Next Index