Interface AclDAO
-
- All Known Implementing Classes:
AclDAOImpl
public interface AclDAOProvides data access support for persistence in alf_access_control_list.- Since:
- 3.4
- Author:
- Andy Hind, janv
-
-
Method Summary
All Methods Instance Methods Abstract 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 entryvoidsetCheckAclConsistency()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.
-
-
-
Method Detail
-
setCheckAclConsistency
void setCheckAclConsistency()
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.
-
getAccessControlList
AccessControlList getAccessControlList(java.lang.Long id)
Get an ACL (including entries)
-
getAcl
Acl getAcl(java.lang.Long id)
Get an ACL
-
getAccessControlListProperties
AccessControlListProperties getAccessControlListProperties(java.lang.Long id)
Get the ACL properties- Returns:
- - the id of all ACLs affected
-
deleteAccessControlList
java.util.List<AclChange> deleteAccessControlList(java.lang.Long id)
Delete an ACL- Returns:
- - the id of all ACLs affected
-
deleteLocalAccessControlEntries
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- Returns:
- - the id of all ACLs affected
-
deleteInheritedAccessControlEntries
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- Returns:
- - the id of all ACLs affected
-
deleteAccessControlEntries
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.- Returns:
- - the id of all ACLs affected
-
deleteAccessControlEntries
java.util.List<AclChange> deleteAccessControlEntries(java.lang.Long id, AccessControlEntry pattern)
Delete some locally set ACLs according to the pattern- Parameters:
pattern- - non null elements are used for the match- Returns:
- - the id of all ACLs affected
-
setAccessControlEntry
java.util.List<AclChange> setAccessControlEntry(java.lang.Long id, AccessControlEntry ace)
Add an access control entry
-
enableInheritance
java.util.List<AclChange> enableInheritance(java.lang.Long id, java.lang.Long parent)
Enable inheritance
-
disableInheritance
java.util.List<AclChange> disableInheritance(java.lang.Long id, boolean setInheritedOnAcl)
Disable inheritance
-
createAccessControlList
java.lang.Long createAccessControlList()
Create a new ACL with default properties
-
getDefaultProperties
AccessControlListProperties getDefaultProperties()
Get the default ACL properties- Returns:
- the default properties
-
createAccessControlList
Acl createAccessControlList(AccessControlListProperties properties)
Create a new ACL with the given properties. Unset properties are assigned defaults.- Returns:
- Acl
-
createAccessControlList
Acl createAccessControlList(AccessControlListProperties properties, java.util.List<AccessControlEntry> aces, java.lang.Long inherited)
- Returns:
- Acl
- See Also:
createAccessControlList(AccessControlListProperties)
-
getInheritedAccessControlList
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
-
mergeInheritedAccessControlList
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
-
getAclCopy
Acl getAclCopy(java.lang.Long toCopy, java.lang.Long toInheritFrom, ACLCopyMode mode)
-
getADMNodesByAcl
java.util.List<java.lang.Long> getADMNodesByAcl(long aclEntityId, int maxResults)
-
createLayeredAcl
Acl createLayeredAcl(java.lang.Long indirectedAcl)
-
renameAuthority
void renameAuthority(java.lang.String before, java.lang.String after)
-
deleteAclForNode
void deleteAclForNode(long aclId)
-
fixSharedAcl
void fixSharedAcl(java.lang.Long shared, java.lang.Long defining)- Parameters:
shared- Longdefining- Long
-
getMaxChangeSetCommitTime
java.lang.Long getMaxChangeSetCommitTime()
- Returns:
- Long
-
getMaxChangeSetIdByCommitTime
java.lang.Long getMaxChangeSetIdByCommitTime(long maxCommitTime)
- Parameters:
maxCommitTime- long- Returns:
- Long
-
-