Class ADMAccessControlListDAO
java.lang.Object
org.alfresco.repo.domain.permissions.ADMAccessControlListDAO
- All Implemented Interfaces:
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSimple counterstatic classCounter for each type of ACL change -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetAccessControlList(NodeRef nodeRef) Get the ACL from a node.getAccessControlList(StoreRef storeRef) getIndirectAcl(NodeRef nodeRef) getInheritedAcl(NodeRef nodeRef) booleanvoidremovePendingAclAspect(Long nodeId) voidsetAccessControlList(NodeRef nodeRef, Long aclId) Set the ACL on a node.voidsetAccessControlList(NodeRef nodeRef, Acl acl) Set the ACL on a node.voidsetAccessControlList(StoreRef storeRef, Acl acl) voidvoidsetBehaviourFilter(BehaviourFilter behaviourFilter) voidsetFixedAclMaxTransactionTime(long fixedAclMaxTransactionTime) voidsetFixedAcls(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 childrenvoidsetFixedAcls(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 childrenvoidsetFixedAcls(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 childrensetInheritanceForChildren(NodeRef parent, Long inheritFrom, Long sharedAclToReplace) Update inheritancesetInheritanceForChildren(NodeRef parent, Long inheritFrom, Long sharedAclToReplace, boolean asyncCall) Set the inheritance on a given node and it's children.setInheritanceForChildren(NodeRef parent, Long inheritFrom, Long sharedAclToReplace, boolean asyncCall, boolean forceSharedACL) Set the inheritance on a given node and it's children.voidsetNodeDAO(NodeDAO nodeDAO) voidsetPreserveAuditableData(boolean preserveAuditableData) voidupdateChangedAcls(NodeRef startingPoint, List<AclChange> changes) Update any associated ACLsvoidupdateInheritance(Long childNodeId, Long oldParentAclId, Long newParentAclId)
-
Constructor Details
-
ADMAccessControlListDAO
public ADMAccessControlListDAO()
-
-
Method Details
-
setNodeDAO
-
setAclDAO
-
setFixedAclMaxTransactionTime
public void setFixedAclMaxTransactionTime(long fixedAclMaxTransactionTime) -
setBehaviourFilter
-
setPreserveAuditableData
public void setPreserveAuditableData(boolean preserveAuditableData) -
isPreserveAuditableData
public boolean isPreserveAuditableData() -
forceCopy
- Specified by:
forceCopyin interfaceAccessControlListDAO
-
getAccessControlList
Description copied from interface:AccessControlListDAOGet the ACL from a node.- Specified by:
getAccessControlListin interfaceAccessControlListDAO- Parameters:
nodeRef- The reference to the node.- Returns:
- The ACL.
-
getAccessControlList
- Specified by:
getAccessControlListin interfaceAccessControlListDAO
-
getIndirectAcl
- Specified by:
getIndirectAclin interfaceAccessControlListDAO
-
getInheritedAcl
- Specified by:
getInheritedAclin interfaceAccessControlListDAO
-
patchAcls
- Specified by:
patchAclsin interfaceAccessControlListDAO
-
setAccessControlList
Description copied from interface:AccessControlListDAOSet the ACL on a node.- Specified by:
setAccessControlListin interfaceAccessControlListDAO- Parameters:
nodeRef- The reference to the node.aclId- The ID of the ACL entity.
-
setAccessControlList
Description copied from interface:AccessControlListDAOSet the ACL on a node.- Specified by:
setAccessControlListin interfaceAccessControlListDAO- Parameters:
nodeRef- The reference to the node.acl- The ACL.
-
setAccessControlList
- Specified by:
setAccessControlListin interfaceAccessControlListDAO
-
setInheritanceForChildren
public List<AclChange> setInheritanceForChildren(NodeRef parent, Long inheritFrom, Long sharedAclToReplace) Description copied from interface:AccessControlListDAOUpdate inheritance- Specified by:
setInheritanceForChildrenin interfaceAccessControlListDAO
-
setInheritanceForChildren
public List<AclChange> setInheritanceForChildren(NodeRef parent, Long inheritFrom, Long sharedAclToReplace, boolean asyncCall) Description copied from interface:AccessControlListDAOSet 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:
setInheritanceForChildrenin interfaceAccessControlListDAO
-
setInheritanceForChildren
public List<AclChange> setInheritanceForChildren(NodeRef parent, Long inheritFrom, Long sharedAclToReplace, boolean asyncCall, boolean forceSharedACL) Description copied from interface:AccessControlListDAOSet 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:
setInheritanceForChildrenin interfaceAccessControlListDAO
-
updateChangedAcls
Description copied from interface:AccessControlListDAOUpdate any associated ACLs- Specified by:
updateChangedAclsin interfaceAccessControlListDAO
-
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:
setFixedAclsin interfaceAccessControlListDAO- Parameters:
nodeId- the parent node idinheritFrom- the parent node's ACLmergeFrom- the shared ACL, if already known. Ifnull, will be retrieved / created lazilychanges- the list in which to record changesset- 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 nodeinheritFrom- the parent node's ACLmergeFrom- the shared ACL, if already known. Ifnull, will be retrieved / created lazilychanges- the list in which to record changesset- set the shared ACL on the parent ?asyncCall- function may require asynchronous call depending the execution time; if time exceeds configuredfixedAclMaxTransactionTimevalue, 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 inFixedAclUpdaterfor 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 nodeinheritFrom- the parent node's ACLmergeFrom- the shared ACL, if already known. Ifnull, will be retrieved / created lazilychanges- the list in which to record changesset- set the shared ACL on the parent ?asyncCall- function may require asynchronous call depending the execution time; if time exceeds configuredfixedAclMaxTransactionTimevalue, 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 inFixedAclUpdaterfor later processingforceSharedACL- When a child node has an unexpected ACL, force it to assume the new shared ACL instead of throwing a concurrency exception.
-
removePendingAclAspect
- Specified by:
removePendingAclAspectin interfaceAccessControlListDAO
-
updateInheritance
- Specified by:
updateInheritancein interfaceAccessControlListDAO
-