Class AclDAOImpl
- java.lang.Object
-
- org.alfresco.repo.domain.permissions.AclDAOImpl
-
-
Constructor Summary
Constructors Constructor Description AclDAOImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.LongcreateAccessControlList()Create a new ACL with default propertiesAclcreateAccessControlList(AccessControlListProperties properties)Create a new ACL with the given properties.AclcreateAccessControlList(AccessControlListProperties properties, java.util.List<AccessControlEntry> aces, java.lang.Long inherited)AclcreateLayeredAcl(java.lang.Long indirectedAcl)java.util.List<AclChange>deleteAccessControlEntries(java.lang.Long id, AccessControlEntry pattern)Delete some locally set ACLs according to the patternjava.util.List<AclChange>deleteAccessControlEntries(java.lang.String authority)Delete all ACEs that reference this authority as no longer valid.java.util.List<AclChange>deleteAccessControlList(java.lang.Long id)Delete an ACLvoiddeleteAclForNode(long aclId)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 acljava.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 aclsjava.util.List<AclChange>disableInheritance(java.lang.Long id, boolean setInheritedOnAcl)Disable inheritancejava.util.List<AclChange>enableInheritance(java.lang.Long id, java.lang.Long parent)Enable inheritancevoidfixSharedAcl(java.lang.Long shared, java.lang.Long defining)AccessControlListgetAccessControlList(java.lang.Long id)Get an ACL (including entries)AccessControlListPropertiesgetAccessControlListProperties(java.lang.Long id)Get the ACL propertiesAclgetAcl(java.lang.Long id)Get an ACLAclgetAclCopy(java.lang.Long toCopy, java.lang.Long toInheritFrom, ACLCopyMode mode)java.util.List<java.lang.Long>getADMNodesByAcl(long aclEntityId, int maxResults)AccessControlListPropertiesgetDefaultProperties()Get the default ACL propertiesjava.lang.LonggetInheritedAccessControlList(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 chainjava.lang.LonggetMaxChangeSetCommitTime()java.lang.LonggetMaxChangeSetIdByCommitTime(long maxCommitTime)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 +1voidrenameAuthority(java.lang.String before, java.lang.String after)java.util.List<AclChange>setAccessControlEntry(java.lang.Long id, AccessControlEntry ace)Add an access control entryvoidsetAclCache(org.alfresco.repo.cache.SimpleCache<java.io.Serializable,AccessControlList> aclCache)Set the ACL cachevoidsetAclCrudDAO(AclCrudDAO aclCrudDAO)voidsetCheckAclConsistency()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.voidsetNodeDAO(NodeDAO nodeDAO)voidsetQnameDAO(QNameDAO qnameDAO)voidsetTenantService(org.alfresco.repo.tenant.TenantService tenantService)
-
-
-
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
-
createAccessControlList
public java.lang.Long createAccessControlList()
Create a new ACL with default properties- Specified by:
createAccessControlListin interfaceAclDAO- See Also:
AclDAO.getDefaultProperties(),AclDAO.createAccessControlList(AccessControlListProperties)
-
getDefaultProperties
public AccessControlListProperties getDefaultProperties()
Get the default ACL properties- Specified by:
getDefaultPropertiesin interfaceAclDAO- Returns:
- the default properties
-
createAccessControlList
public Acl createAccessControlList(AccessControlListProperties properties)
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, java.util.List<AccessControlEntry> aces, java.lang.Long inherited)
- Specified by:
createAccessControlListin interfaceAclDAO- Returns:
- Acl
- See Also:
AclDAO.createAccessControlList(AccessControlListProperties)
-
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:
deleteAccessControlEntriesin interfaceAclDAO- Returns:
- - the id of all ACLs affected
-
deleteAclForNode
public void deleteAclForNode(long aclId)
- Specified by:
deleteAclForNodein interfaceAclDAO
-
deleteAccessControlList
public java.util.List<AclChange> deleteAccessControlList(java.lang.Long id)
Delete an ACL- Specified by:
deleteAccessControlListin interfaceAclDAO- 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:
deleteLocalAccessControlEntriesin interfaceAclDAO- 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:
deleteInheritedAccessControlEntriesin interfaceAclDAO- 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:
deleteAccessControlEntriesin interfaceAclDAOpattern- - non null elements are used for the match- Returns:
- - the id of all ACLs affected
-
getAccessControlListProperties
public AccessControlListProperties getAccessControlListProperties(java.lang.Long id)
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
public AccessControlList getAccessControlList(java.lang.Long id)
Get an ACL (including entries)- Specified by:
getAccessControlListin interfaceAclDAO
-
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:
getInheritedAccessControlListin interfaceAclDAO
-
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:
mergeInheritedAccessControlListin interfaceAclDAO
-
setAccessControlEntry
public java.util.List<AclChange> setAccessControlEntry(java.lang.Long id, AccessControlEntry ace)
Add an access control entry- Specified by:
setAccessControlEntryin interfaceAclDAO
-
enableInheritance
public java.util.List<AclChange> enableInheritance(java.lang.Long id, java.lang.Long parent)
Enable inheritance- Specified by:
enableInheritancein interfaceAclDAO
-
disableInheritance
public java.util.List<AclChange> disableInheritance(java.lang.Long id, boolean setInheritedOnAcl)
Disable inheritance- Specified by:
disableInheritancein interfaceAclDAO
-
getAclCopy
public Acl getAclCopy(java.lang.Long toCopy, java.lang.Long toInheritFrom, ACLCopyMode mode)
- Specified by:
getAclCopyin interfaceAclDAO
-
getADMNodesByAcl
public java.util.List<java.lang.Long> getADMNodesByAcl(long aclEntityId, int maxResults)- Specified by:
getADMNodesByAclin interfaceAclDAO
-
createLayeredAcl
public Acl createLayeredAcl(java.lang.Long indirectedAcl)
- Specified by:
createLayeredAclin interfaceAclDAO
-
renameAuthority
public void renameAuthority(java.lang.String before, java.lang.String after)- Specified by:
renameAuthorityin interfaceAclDAO
-
fixSharedAcl
public void fixSharedAcl(java.lang.Long shared, java.lang.Long defining)- Specified by:
fixSharedAclin interfaceAclDAO- Parameters:
shared- Longdefining- Long
-
getMaxChangeSetCommitTime
public java.lang.Long getMaxChangeSetCommitTime()
- Specified by:
getMaxChangeSetCommitTimein interfaceAclDAO- Returns:
- Long
-
getMaxChangeSetIdByCommitTime
public java.lang.Long getMaxChangeSetIdByCommitTime(long maxCommitTime)
- Specified by:
getMaxChangeSetIdByCommitTimein interfaceAclDAO- Parameters:
maxCommitTime- long- Returns:
- Long
-
-