org.alfresco.repo.domain.permissions
Interface AclDAO

All Known Implementing Classes:
AclDAOImpl

public interface AclDAO

Provides data access support for persistence in alf_access_control_list.

Since:
3.4

Method Summary
 java.lang.Long createAccessControlList()
          Create a new ACL with default properties
 Acl createAccessControlList(AccessControlListProperties properties)
          Create a new ACL with the given properties.
 Acl createAccessControlList(AccessControlListProperties properties, java.util.List aces, java.lang.Long inherited)
           
 Acl createLayeredAcl(java.lang.Long indirectedAcl)
           
 java.util.List deleteAccessControlEntries(java.lang.Long id, AccessControlEntry pattern)
          Delete some locally set ACLs according to the pattern
 java.util.List deleteAccessControlEntries(java.lang.String authority)
          Delete all ACEs that reference this authority as no longer valid.
 java.util.List deleteAccessControlList(java.lang.Long id)
          Delete an ACL
 void deleteAclForNode(long aclId, boolean isAVMNode)
           
 java.util.List 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
 java.util.List deleteLocalAccessControlEntries(java.lang.Long id)
          Delete the ACEs in position 0 (those set directly on the ACL and not inherited) Cleans up existing acls
 java.util.List disableInheritance(java.lang.Long id, boolean setInheritedOnAcl)
          Disable inheritance
 java.util.List enableInheritance(java.lang.Long id, java.lang.Long parent)
          Enable inheritance
 void fixSharedAcl(java.lang.Long shared, java.lang.Long defining)
           
 AccessControlList getAccessControlList(java.lang.Long id)
          Get an ACL (including entries)
 AccessControlListProperties getAccessControlListProperties(java.lang.Long id)
          Get the ACL properties
 Acl getAcl(java.lang.Long id)
          Get an ACL
 Acl getAclCopy(java.lang.Long toCopy, java.lang.Long toInheritFrom, ACLCopyMode mode)
           
 java.util.List getADMNodesByAcl(long aclEntityId, int maxResults)
           
 java.util.List getAVMNodesByAcl(long aclEntityId, int maxResults)
           
 AccessControlListProperties getDefaultProperties()
          Get the default ACL properties
 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
 java.util.List 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
 void renameAuthority(java.lang.String before, java.lang.String after)
           
 java.util.List setAccessControlEntry(java.lang.Long id, AccessControlEntry ace)
          Add an access control entry
 

Method Detail

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 deleteAccessControlList(java.lang.Long id)
Delete an ACL

Returns:
- the id of all ACLs affected

deleteLocalAccessControlEntries

java.util.List 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 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 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 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 setAccessControlEntry(java.lang.Long id,
                                     AccessControlEntry ace)
Add an access control entry


enableInheritance

java.util.List enableInheritance(java.lang.Long id,
                                 java.lang.Long parent)
Enable inheritance


disableInheritance

java.util.List disableInheritance(java.lang.Long id,
                                  boolean setInheritedOnAcl)
Disable inheritance


createAccessControlList

java.lang.Long createAccessControlList()
Create a new ACL with default properties

See Also:
AclDAO.getDefaultProperties(), AclDAO.createAccessControlList(AccessControlListProperties)

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 aces,
                            java.lang.Long inherited)
Returns:
Acl
See Also:
AclDAO.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 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)

getAVMNodesByAcl

java.util.List getAVMNodesByAcl(long aclEntityId,
                                int maxResults)

getADMNodesByAcl

java.util.List 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,
                      boolean isAVMNode)

fixSharedAcl

void fixSharedAcl(java.lang.Long shared,
                  java.lang.Long defining)
Parameters:
inheritedAclId -
aclId -


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.