Class AclDAOImpl
java.lang.Object
org.alfresco.repo.domain.permissions.AclDAOImpl
- All Implemented Interfaces:
AclDAO
DAO to manage ACL persistence
Note: based on earlier AclDaoComponentImpl
- Since:
- 3.4
- Author:
- Andy Hind, janv
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a new ACL with default propertiescreateAccessControlList(AccessControlListProperties properties) Create a new ACL with the given properties.createAccessControlList(AccessControlListProperties properties, List<AccessControlEntry> aces, Long inherited) createLayeredAcl(Long indirectedAcl) deleteAccessControlEntries(Long id, AccessControlEntry pattern) Delete some locally set ACLs according to the patterndeleteAccessControlEntries(String authority) Delete all ACEs that reference this authority as no longer valid.Delete an ACLvoiddeleteAclForNode(long aclId) Delete the ACEs in position > 0 (those not set directly on the ACL but inherited) No affect on any other aclDelete the ACEs in position 0 (those set directly on the ACL and not inherited) Cleans up existing aclsdisableInheritance(Long id, boolean setInheritedOnAcl) Disable inheritanceenableInheritance(Long id, Long parent) Enable inheritancevoidfixSharedAcl(Long shared, Long defining) Get an ACL (including entries)Get the ACL propertiesGet an ACLgetAclCopy(Long toCopy, Long toInheritFrom, ACLCopyMode mode) getADMNodesByAcl(long aclEntityId, int maxResults) Get the default ACL propertiesGet 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 chaingetMaxChangeSetIdByCommitTime(long maxCommitTime) mergeInheritedAccessControlList(Long inherited, Long target) Merge inherited ACEs in to target - the merged ACEs will go in at their current position +1voidrenameAuthority(String before, String after) setAccessControlEntry(Long id, AccessControlEntry ace) Add an access control entryvoidsetAclCache(SimpleCache<Serializable, AccessControlList> aclCache) Set the ACL cachevoidsetAclCrudDAO(AclCrudDAO aclCrudDAO) voidTransaction-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.voidsetNodeDAO(NodeDAO nodeDAO) voidsetQnameDAO(QNameDAO qnameDAO) voidsetTenantService(TenantService tenantService)
-
Constructor Details
-
AclDAOImpl
public AclDAOImpl()
-
-
Method Details
-
setQnameDAO
-
setTenantService
-
setAclCrudDAO
-
setNodeDAO
-
setAclCache
Set the ACL cache -
createAccessControlList
Create a new ACL with default properties- Specified by:
createAccessControlListin interfaceAclDAO- See Also:
-
getDefaultProperties
Get the default ACL properties- Specified by:
getDefaultPropertiesin interfaceAclDAO- Returns:
- the default properties
-
createAccessControlList
Create a new ACL with the given properties. Unset properties are assigned defaults.- Specified by:
createAccessControlListin interfaceAclDAO- Returns:
- Acl
-
createAccessControlList
public Acl createAccessControlList(AccessControlListProperties properties, List<AccessControlEntry> aces, Long inherited) - Specified by:
createAccessControlListin interfaceAclDAO- Returns:
- Acl
- See Also:
-
deleteAccessControlEntries
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:
deleteAccessControlEntriesin interfaceAclDAO- Returns:
- - the id of all ACLs affected
-
deleteAclForNode
public void deleteAclForNode(long aclId) - Specified by:
deleteAclForNodein interfaceAclDAO
-
deleteAccessControlList
Delete an ACL- Specified by:
deleteAccessControlListin interfaceAclDAO- Returns:
- - the id of all ACLs affected
-
deleteLocalAccessControlEntries
Delete the ACEs in position 0 (those set directly on the ACL and not inherited) Cleans up existing acls- Specified by:
deleteLocalAccessControlEntriesin interfaceAclDAO- Returns:
- - the id of all ACLs affected
-
deleteInheritedAccessControlEntries
Delete the ACEs in position > 0 (those not set directly on the ACL but inherited) No affect on any other acl- Specified by:
deleteInheritedAccessControlEntriesin interfaceAclDAO- Returns:
- - the id of all ACLs affected
-
deleteAccessControlEntries
Delete some locally set ACLs according to the pattern- Specified by:
deleteAccessControlEntriesin interfaceAclDAOpattern- - non null elements are used for the match- Returns:
- - the id of all ACLs affected
-
getAcl
Get an ACL -
getAccessControlListProperties
Get the ACL properties- Specified by:
getAccessControlListPropertiesin interfaceAclDAO- Returns:
- - the id of all ACLs affected
-
setCheckAclConsistency
public void setCheckAclConsistency()Description copied from interface:AclDAOTransaction-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:
setCheckAclConsistencyin interfaceAclDAO
-
getAccessControlList
Get an ACL (including entries)- Specified by:
getAccessControlListin interfaceAclDAO
-
getInheritedAccessControlList
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:
getInheritedAccessControlListin interfaceAclDAO
-
mergeInheritedAccessControlList
Merge inherited ACEs in to target - the merged ACEs will go in at their current position +1- Specified by:
mergeInheritedAccessControlListin interfaceAclDAO
-
setAccessControlEntry
Add an access control entry- Specified by:
setAccessControlEntryin interfaceAclDAO
-
enableInheritance
Enable inheritance- Specified by:
enableInheritancein interfaceAclDAO
-
disableInheritance
Disable inheritance- Specified by:
disableInheritancein interfaceAclDAO
-
getAclCopy
- Specified by:
getAclCopyin interfaceAclDAO
-
getADMNodesByAcl
- Specified by:
getADMNodesByAclin interfaceAclDAO
-
createLayeredAcl
- Specified by:
createLayeredAclin interfaceAclDAO
-
getCurrentChangeSetCommitTime
- Specified by:
getCurrentChangeSetCommitTimein interfaceAclDAO- Returns:
- the commit time of the current ACL change set entry or null if there have not been any modifications.
-
renameAuthority
- Specified by:
renameAuthorityin interfaceAclDAO
-
getMaxChangeSetCommitTime
- Specified by:
getMaxChangeSetCommitTimein interfaceAclDAO- Returns:
- Long
-
getMaxChangeSetIdByCommitTime
- Specified by:
getMaxChangeSetIdByCommitTimein interfaceAclDAO- Parameters:
maxCommitTime- long- Returns:
- Long
-