Class AclImpl

  • All Implemented Interfaces:
    java.security.acl.Acl, java.security.acl.Owner

    @Deprecated
    public class AclImpl
    extends OwnerImpl
    implements java.security.acl.Acl
    Deprecated.
    Owner in java.security.acl has been deprecated and marked for removal
    An Access Control List (ACL) is encapsulated by this class.
    • Constructor Summary

      Constructors 
      Constructor Description
      AclImpl​(java.security.Principal owner, java.lang.String name)
      Deprecated.
      Constructor for creating an empty ACL.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean addEntry​(java.security.Principal caller, java.security.acl.AclEntry entry)
      Deprecated.
      Adds an ACL entry to this ACL.
      boolean checkPermission​(java.security.Principal principal, java.security.acl.Permission permission)
      Deprecated.
      This method checks whether or not the specified principal has the required permission.
      java.util.Enumeration<java.security.acl.AclEntry> entries()
      Deprecated.
      returns an enumeration of the entries in this ACL.
      java.lang.String getName()
      Deprecated.
      Returns the name of the ACL.
      java.util.Enumeration<java.security.acl.Permission> getPermissions​(java.security.Principal user)
      Deprecated.
      Permission in java.security.acl has been deprecated and marked for removal
      boolean removeEntry​(java.security.Principal caller, java.security.acl.AclEntry entry)
      Deprecated.
      Removes an ACL entry from this ACL.
      void setName​(java.security.Principal caller, java.lang.String name)
      Deprecated.
      Sets the name of the ACL.
      java.lang.String toString()
      Deprecated.
      return a stringified version of the ACL.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.security.acl.Owner

        addOwner, deleteOwner, isOwner
    • Constructor Detail

      • AclImpl

        public AclImpl​(java.security.Principal owner,
                       java.lang.String name)
        Deprecated.
        Constructor for creating an empty ACL.
    • Method Detail

      • setName

        public void setName​(java.security.Principal caller,
                            java.lang.String name)
                     throws java.security.acl.NotOwnerException
        Deprecated.
        Sets the name of the ACL.
        Specified by:
        setName in interface java.security.acl.Acl
        Parameters:
        caller - the principal who is invoking this method.
        name - the name of the ACL.
        Throws:
        java.security.acl.NotOwnerException - if the caller principal is not on the owners list of the Acl.
      • getName

        public java.lang.String getName()
        Deprecated.
        Returns the name of the ACL.
        Specified by:
        getName in interface java.security.acl.Acl
        Returns:
        the name of the ACL.
      • addEntry

        public boolean addEntry​(java.security.Principal caller,
                                java.security.acl.AclEntry entry)
                         throws java.security.acl.NotOwnerException
        Deprecated.
        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.
        Specified by:
        addEntry in interface java.security.acl.Acl
        Parameters:
        caller - the principal who is invoking this method.
        entry - the ACL entry that must be added to the ACL.
        Returns:
        true on success, false if the entry is already present.
        Throws:
        java.security.acl.NotOwnerException - if the caller principal is not on the owners list of the Acl.
      • removeEntry

        public boolean removeEntry​(java.security.Principal caller,
                                   java.security.acl.AclEntry entry)
                            throws java.security.acl.NotOwnerException
        Deprecated.
        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.
        Specified by:
        removeEntry in interface java.security.acl.Acl
        Parameters:
        caller - the principal who is invoking this method.
        entry - the ACL entry that must be removed from the ACL.
        Returns:
        true on success, false if the entry is not part of the ACL.
        Throws:
        java.security.acl.NotOwnerException - if the caller principal is not the owners list of the Acl.
      • getPermissions

        @Deprecated
        public java.util.Enumeration<java.security.acl.Permission> getPermissions​(java.security.Principal user)
        Deprecated.
        Permission in java.security.acl has been deprecated and marked for removal
        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.
        Specified by:
        getPermissions in interface java.security.acl.Acl
        Parameters:
        user - the principal for which the ACL entry is returned.
        Returns:
        The resulting permission set that the principal is allowed.
      • checkPermission

        public boolean checkPermission​(java.security.Principal principal,
                                       java.security.acl.Permission permission)
        Deprecated.
        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.
        Specified by:
        checkPermission in interface java.security.acl.Acl
        Parameters:
        principal - the name of the authenticated principal
        permission - the permission that the principal must have.
        Returns:
        true of the principal has the permission desired, false otherwise.
      • entries

        public java.util.Enumeration<java.security.acl.AclEntry> entries()
        Deprecated.
        returns an enumeration of the entries in this ACL.
        Specified by:
        entries in interface java.security.acl.Acl
      • toString

        public java.lang.String toString()
        Deprecated.
        return a stringified version of the ACL.
        Specified by:
        toString in interface java.security.acl.Acl
        Overrides:
        toString in class java.lang.Object