Class ADMAccessControlListDAO

java.lang.Object
org.alfresco.repo.domain.permissions.ADMAccessControlListDAO
All Implemented Interfaces:
AccessControlListDAO

public class ADMAccessControlListDAO extends Object implements AccessControlListDAO
DAO layer for the improved ACL implementation. This layer is responsible for setting ACLs and any cascade behaviour required. It also implements the migration from the old implementation to the new.
Author:
andyh
  • Constructor Details

    • ADMAccessControlListDAO

      public ADMAccessControlListDAO()
  • Method Details

    • setNodeDAO

      public void setNodeDAO(NodeDAO nodeDAO)
    • setAclDAO

      public void setAclDAO(AclDAO aclDaoComponent)
    • setFixedAclMaxTransactionTime

      public void setFixedAclMaxTransactionTime(long fixedAclMaxTransactionTime)
    • setBehaviourFilter

      public void setBehaviourFilter(BehaviourFilter behaviourFilter)
    • setPreserveAuditableData

      public void setPreserveAuditableData(boolean preserveAuditableData)
    • isPreserveAuditableData

      public boolean isPreserveAuditableData()
    • forceCopy

      public void forceCopy(NodeRef nodeRef)
      Specified by:
      forceCopy in interface AccessControlListDAO
    • getAccessControlList

      public Acl getAccessControlList(NodeRef nodeRef)
      Description copied from interface: AccessControlListDAO
      Get the ACL from a node.
      Specified by:
      getAccessControlList in interface AccessControlListDAO
      Parameters:
      nodeRef - The reference to the node.
      Returns:
      The ACL.
    • getAccessControlList

      public Acl getAccessControlList(StoreRef storeRef)
      Specified by:
      getAccessControlList in interface AccessControlListDAO
    • getIndirectAcl

      public Long getIndirectAcl(NodeRef nodeRef)
      Specified by:
      getIndirectAcl in interface AccessControlListDAO
    • getInheritedAcl

      public Long getInheritedAcl(NodeRef nodeRef)
      Specified by:
      getInheritedAcl in interface AccessControlListDAO
    • patchAcls

      public Map<ACLType,Integer> patchAcls()
      Specified by:
      patchAcls in interface AccessControlListDAO
    • setAccessControlList

      public void setAccessControlList(NodeRef nodeRef, Long aclId)
      Description copied from interface: AccessControlListDAO
      Set the ACL on a node.
      Specified by:
      setAccessControlList in interface AccessControlListDAO
      Parameters:
      nodeRef - The reference to the node.
      aclId - The ID of the ACL entity.
    • setAccessControlList

      public void setAccessControlList(NodeRef nodeRef, Acl acl)
      Description copied from interface: AccessControlListDAO
      Set the ACL on a node.
      Specified by:
      setAccessControlList in interface AccessControlListDAO
      Parameters:
      nodeRef - The reference to the node.
      acl - The ACL.
    • setAccessControlList

      public void setAccessControlList(StoreRef storeRef, Acl acl)
      Specified by:
      setAccessControlList in interface AccessControlListDAO
    • setInheritanceForChildren

      public List<AclChange> setInheritanceForChildren(NodeRef parent, Long inheritFrom, Long sharedAclToReplace)
      Description copied from interface: AccessControlListDAO
      Update inheritance
      Specified by:
      setInheritanceForChildren in interface AccessControlListDAO
    • setInheritanceForChildren

      public List<AclChange> setInheritanceForChildren(NodeRef parent, Long inheritFrom, Long sharedAclToReplace, boolean asyncCall)
      Description copied from interface: AccessControlListDAO
      Set the inheritance on a given node and it's children. If the operation takes too long and asyncCall parameter set accordingly, fixed ACLs method will be synchronously called.
      Specified by:
      setInheritanceForChildren in interface AccessControlListDAO
    • setInheritanceForChildren

      public List<AclChange> setInheritanceForChildren(NodeRef parent, Long inheritFrom, Long sharedAclToReplace, boolean asyncCall, boolean forceSharedACL)
      Description copied from interface: AccessControlListDAO
      Set the inheritance on a given node and it's children. If an unexpected ACL occurs in a child, it can be overriden by setting forceSharedACL
      Specified by:
      setInheritanceForChildren in interface AccessControlListDAO
    • updateChangedAcls

      public void updateChangedAcls(NodeRef startingPoint, List<AclChange> changes)
      Description copied from interface: AccessControlListDAO
      Update any associated ACLs
      Specified by:
      updateChangedAcls in interface AccessControlListDAO
    • setFixedAcls

      public void setFixedAcls(Long nodeId, Long inheritFrom, Long mergeFrom, Long sharedAclToReplace, List<AclChange> changes, boolean set)
      Support to set a shared ACL on a node and all of its children
      Specified by:
      setFixedAcls in interface AccessControlListDAO
      Parameters:
      nodeId - the parent node id
      inheritFrom - the parent node's ACL
      mergeFrom - the shared ACL, if already known. If null, will be retrieved / created lazily
      changes - the list in which to record changes
      set - set the shared ACL on the parent ?
    • setFixedAcls

      public void setFixedAcls(Long nodeId, Long inheritFrom, Long mergeFrom, Long sharedAclToReplace, List<AclChange> changes, boolean set, boolean asyncCall, boolean propagateOnChildren)
      Support to set a shared ACL on a node and all of its children
      Parameters:
      nodeId - the parent node
      inheritFrom - the parent node's ACL
      mergeFrom - the shared ACL, if already known. If null, will be retrieved / created lazily
      changes - the list in which to record changes
      set - set the shared ACL on the parent ?
      asyncCall - function may require asynchronous call depending the execution time; if time exceeds configured fixedAclMaxTransactionTime value, recursion is stopped using propagateOnChildren parameter(set on false) and those nodes for which the method execution was not finished in the classical way, will have ASPECT_PENDING_FIX_ACL, which will be used in FixedAclUpdater for later processing
    • setFixedAcls

      public void setFixedAcls(Long nodeId, Long inheritFrom, Long mergeFrom, Long sharedAclToReplace, List<AclChange> changes, boolean set, boolean asyncCall, boolean propagateOnChildren, boolean forceSharedACL)
      Support to set a shared ACL on a node and all of its children
      Parameters:
      nodeId - the parent node
      inheritFrom - the parent node's ACL
      mergeFrom - the shared ACL, if already known. If null, will be retrieved / created lazily
      changes - the list in which to record changes
      set - set the shared ACL on the parent ?
      asyncCall - function may require asynchronous call depending the execution time; if time exceeds configured fixedAclMaxTransactionTime value, recursion is stopped using propagateOnChildren parameter(set on false) and those nodes for which the method execution was not finished in the classical way, will have ASPECT_PENDING_FIX_ACL, which will be used in FixedAclUpdater for later processing
      forceSharedACL - When a child node has an unexpected ACL, force it to assume the new shared ACL instead of throwing a concurrency exception.
    • removePendingAclAspect

      public void removePendingAclAspect(Long nodeId)
      Specified by:
      removePendingAclAspect in interface AccessControlListDAO
    • updateInheritance

      public void updateInheritance(Long childNodeId, Long oldParentAclId, Long newParentAclId)
      Specified by:
      updateInheritance in interface AccessControlListDAO