Class AclDAOImpl

  • All Implemented Interfaces:
    AclDAO

    public class AclDAOImpl
    extends java.lang.Object
    implements AclDAO
    DAO to manage ACL persistence Note: based on earlier AclDaoComponentImpl
    Since:
    3.4
    Author:
    Andy Hind, janv
    • Constructor Detail

      • AclDAOImpl

        public AclDAOImpl()
    • Method Detail

      • setQnameDAO

        public void setQnameDAO​(QNameDAO qnameDAO)
      • setTenantService

        public void setTenantService​(org.alfresco.repo.tenant.TenantService tenantService)
      • setAclCrudDAO

        public void setAclCrudDAO​(AclCrudDAO aclCrudDAO)
      • setNodeDAO

        public void setNodeDAO​(NodeDAO nodeDAO)
      • setAclCache

        public void setAclCache​(org.alfresco.repo.cache.SimpleCache<java.io.Serializable,​AccessControlList> aclCache)
        Set the ACL cache
      • deleteAccessControlEntries

        public java.util.List<AclChange> deleteAccessControlEntries​(java.lang.String authority)
        Delete all ACEs that reference this authority as no longer valid. THIS DOES NOT CAUSE ANY ACL TO VERSION Used when deleting a user. No ACL is updated - the user has gone the aces and all related info is deleted.
        Specified by:
        deleteAccessControlEntries in interface AclDAO
        Returns:
        - the id of all ACLs affected
      • deleteAclForNode

        public void deleteAclForNode​(long aclId)
        Specified by:
        deleteAclForNode in interface AclDAO
      • deleteAccessControlList

        public java.util.List<AclChange> deleteAccessControlList​(java.lang.Long id)
        Delete an ACL
        Specified by:
        deleteAccessControlList in interface AclDAO
        Returns:
        - the id of all ACLs affected
      • deleteLocalAccessControlEntries

        public java.util.List<AclChange> deleteLocalAccessControlEntries​(java.lang.Long id)
        Delete the ACEs in position 0 (those set directly on the ACL and not inherited) Cleans up existing acls
        Specified by:
        deleteLocalAccessControlEntries in interface AclDAO
        Returns:
        - the id of all ACLs affected
      • deleteInheritedAccessControlEntries

        public java.util.List<AclChange> deleteInheritedAccessControlEntries​(java.lang.Long id)
        Delete the ACEs in position > 0 (those not set directly on the ACL but inherited) No affect on any other acl
        Specified by:
        deleteInheritedAccessControlEntries in interface AclDAO
        Returns:
        - the id of all ACLs affected
      • deleteAccessControlEntries

        public java.util.List<AclChange> deleteAccessControlEntries​(java.lang.Long id,
                                                                    AccessControlEntry pattern)
        Delete some locally set ACLs according to the pattern
        Specified by:
        deleteAccessControlEntries in interface AclDAO
        pattern - - non null elements are used for the match
        Returns:
        - the id of all ACLs affected
      • getAcl

        public Acl getAcl​(java.lang.Long id)
        Get an ACL
        Specified by:
        getAcl in interface AclDAO
      • setCheckAclConsistency

        public void setCheckAclConsistency()
        Description copied from interface: AclDAO
        Transaction-scope setting to make the DAO guarantee the validity of all caches: some cache data will be reloaded; some cache data will be considered safe.
        Specified by:
        setCheckAclConsistency in interface AclDAO
      • getInheritedAccessControlList

        public java.lang.Long getInheritedAccessControlList​(java.lang.Long id)
        Get the id of the ACL inherited from the one given May return null if there is nothing to inherit -> OLD world where nodes have their own ACL and we walk the parent chain
        Specified by:
        getInheritedAccessControlList in interface AclDAO
      • mergeInheritedAccessControlList

        public java.util.List<AclChange> mergeInheritedAccessControlList​(java.lang.Long inherited,
                                                                         java.lang.Long target)
        Merge inherited ACEs in to target - the merged ACEs will go in at their current position +1
        Specified by:
        mergeInheritedAccessControlList in interface AclDAO
      • enableInheritance

        public java.util.List<AclChange> enableInheritance​(java.lang.Long id,
                                                           java.lang.Long parent)
        Enable inheritance
        Specified by:
        enableInheritance in interface AclDAO
      • disableInheritance

        public java.util.List<AclChange> disableInheritance​(java.lang.Long id,
                                                            boolean setInheritedOnAcl)
        Disable inheritance
        Specified by:
        disableInheritance in interface AclDAO
      • getAclCopy

        public Acl getAclCopy​(java.lang.Long toCopy,
                              java.lang.Long toInheritFrom,
                              ACLCopyMode mode)
        Specified by:
        getAclCopy in interface AclDAO
      • getADMNodesByAcl

        public java.util.List<java.lang.Long> getADMNodesByAcl​(long aclEntityId,
                                                               int maxResults)
        Specified by:
        getADMNodesByAcl in interface AclDAO
      • createLayeredAcl

        public Acl createLayeredAcl​(java.lang.Long indirectedAcl)
        Specified by:
        createLayeredAcl in interface AclDAO
      • renameAuthority

        public void renameAuthority​(java.lang.String before,
                                    java.lang.String after)
        Specified by:
        renameAuthority in interface AclDAO
      • fixSharedAcl

        public void fixSharedAcl​(java.lang.Long shared,
                                 java.lang.Long defining)
        Specified by:
        fixSharedAcl in interface AclDAO
        Parameters:
        shared - Long
        defining - Long
      • getMaxChangeSetCommitTime

        public java.lang.Long getMaxChangeSetCommitTime()
        Specified by:
        getMaxChangeSetCommitTime in interface AclDAO
        Returns:
        Long
      • getMaxChangeSetIdByCommitTime

        public java.lang.Long getMaxChangeSetIdByCommitTime​(long maxCommitTime)
        Specified by:
        getMaxChangeSetIdByCommitTime in interface AclDAO
        Parameters:
        maxCommitTime - long
        Returns:
        Long