Class AbstractPermissionsDaoComponentImpl

  • All Implemented Interfaces:
    PermissionsDaoComponent
    Direct Known Subclasses:
    ADMPermissionsDaoComponentImpl

    public abstract class AbstractPermissionsDaoComponentImpl
    extends Object
    implements PermissionsDaoComponent
    Common support for permisisons dao Sub classes determine how ACLs are cascaded to children and how changes may COW/version children as ACLs are pushed down. TODO: remove the protocol to dao mapping
    Author:
    andyh
    • Field Detail

      • INHERIT_PERMISSIONS_DEFAULT

        protected static final boolean INHERIT_PERMISSIONS_DEFAULT
        See Also:
        Constant Field Values
      • aclDaoComponent

        protected AclDAO aclDaoComponent
    • Method Detail

      • setAclDAO

        public void setAclDAO​(AclDAO aclDaoComponent)
        Set the ACL DAO component
        Parameters:
        aclDaoComponent - AclDAO
      • equals

        public boolean equals​(Object obj)
        Checks equality by type and uuid
        Overrides:
        equals in class Object
      • setDefaultACLDAO

        public void setDefaultACLDAO​(AccessControlListDAO defaultACLDAO)
        Set the default DAO
        Parameters:
        defaultACLDAO - AccessControlListDAO
      • getACLDAO

        protected AccessControlListDAO getACLDAO​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Helper to choose appropriate NodeService for the given NodeRef
        Parameters:
        nodeRef - The NodeRef to dispatch from.
        Returns:
        The appropriate NodeService.
      • getAccessControlList

        protected Acl getAccessControlList​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
      • getMutableAccessControlList

        protected org.alfresco.repo.domain.permissions.AbstractPermissionsDaoComponentImpl.CreationReport getMutableAccessControlList​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
      • getAllSetPermissions

        public Map<org.alfresco.service.cmr.repository.NodeRef,​Set<org.alfresco.service.cmr.security.AccessPermission>> getAllSetPermissions​(String authority)
      • findNodeByPermission

        public Set<org.alfresco.service.cmr.repository.NodeRef> findNodeByPermission​(String authority,
                                                                                     PermissionReference permission,
                                                                                     boolean allow)
      • getInheritParentPermissions

        public boolean getInheritParentPermissions​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Description copied from interface: PermissionsDaoComponent
        Return the inheritance behaviour for permissions on a given node.
        Specified by:
        getInheritParentPermissions in interface PermissionsDaoComponent
        Returns:
        inheritParentPermissions
      • deletePermissions

        public void deletePermissions​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                      String authority)
        Description copied from interface: PermissionsDaoComponent
        Delete permission entries for the given node and authority
        Specified by:
        deletePermissions in interface PermissionsDaoComponent
        Parameters:
        nodeRef - the node to query against
        authority - the specific authority to query against
      • deletePermission

        public void deletePermission​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                     String authority,
                                     PermissionReference permission)
        Deletes all permission entries (access control list entries) that match the given criteria. Note that the access control list for the node is not deleted.
        Specified by:
        deletePermission in interface PermissionsDaoComponent
        Parameters:
        nodeRef - the node with the access control list
        authority - the specific authority to look for
        permission - the permission to look for
      • setPermission

        public void setPermission​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                  String authority,
                                  PermissionReference permission,
                                  boolean allow)
        Description copied from interface: PermissionsDaoComponent
        Set a permission on a node. If the node has no permissions set then a default node permission (allowing inheritance) will be created to contain the permission entry.
        Specified by:
        setPermission in interface PermissionsDaoComponent
      • setInheritParentPermissions

        public void setInheritParentPermissions​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                                boolean inheritParentPermissions)
        Description copied from interface: PermissionsDaoComponent
        Set the inheritance behaviour for permissions on a given node.
        Specified by:
        setInheritParentPermissions in interface PermissionsDaoComponent
      • createAccessControlList

        protected abstract org.alfresco.repo.domain.permissions.AbstractPermissionsDaoComponentImpl.CreationReport createAccessControlList​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                                                                                                                           boolean inherit,
                                                                                                                                           Acl existing)