Class AbstractPermissionsDaoComponentImpl
java.lang.Object
org.alfresco.repo.domain.permissions.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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract org.alfresco.repo.domain.permissions.AbstractPermissionsDaoComponentImpl.CreationReportcreateAccessControlList(NodeRef nodeRef, boolean inherit, Acl existing) voiddeletePermission(NodeRef nodeRef, String authority, PermissionReference permission) Deletes all permission entries (access control list entries) that match the given criteria.voiddeletePermission(StoreRef storeRef, String authority, PermissionReference permission) Remove part of a permission mask from a storevoiddeletePermissions(String authority) Remove all permissions for the specified authorityvoiddeletePermissions(NodeRef nodeRef, String authority) Delete permission entries for the given node and authorityvoiddeletePermissions(StoreRef storeRef) Remove all permission masks from a storevoiddeletePermissions(StoreRef storeRef, String authority) Delete entries from a permission mask on a store by authoritybooleanChecks equality by type and uuidfindNodeByPermission(String authority, PermissionReference permission, boolean allow) protected AclgetAccessControlList(NodeRef nodeRef) getAccessControlListProperties(NodeRef nodeRef) Get the properties for the access control listprotected AccessControlListDAOHelper to choose appropriate NodeService for the given NodeRefgetAllSetPermissions(String authority) booleangetInheritParentPermissions(NodeRef nodeRef) Return the inheritance behaviour for permissions on a given node.protected org.alfresco.repo.domain.permissions.AbstractPermissionsDaoComponentImpl.CreationReportgetMutableAccessControlList(NodeRef nodeRef) getPermissions(NodeRef nodeRef) Get the permissions that have been set on a given node.getPermissions(StoreRef storeRef) Get permission masks set on a storeinthashCode()voidSet the ACL DAO componentvoidsetDefaultACLDAO(AccessControlListDAO defaultACLDAO) Set the default DAOvoidsetInheritParentPermissions(NodeRef nodeRef, boolean inheritParentPermissions) Set the inheritance behaviour for permissions on a given node.voidsetPermission(NodePermissionEntry nodePermissionEntry) Create a persisted node permission entry given a template object from which to copy.voidsetPermission(PermissionEntry permissionEntry) Create a persisted permission entry given and other representation of a permission entry.voidsetPermission(NodeRef nodeRef, String authority, PermissionReference permission, boolean allow) Set a permission on a node.voidsetPermission(StoreRef storeRef, String authority, PermissionReference permission, boolean allow) Set part of a permission mask on a store.voidSet the mapping of protocol to DAOMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.repo.security.permissions.impl.PermissionsDaoComponent
deletePermissions
-
Field Details
-
INHERIT_PERMISSIONS_DEFAULT
protected static final boolean INHERIT_PERMISSIONS_DEFAULT- See Also:
-
aclDaoComponent
-
-
Method Details
-
setAclDAO
Set the ACL DAO component- Parameters:
aclDaoComponent- AclDAO
-
equals
Checks equality by type and uuid -
hashCode
public int hashCode() -
setProtocolToACLDAO
Set the mapping of protocol to DAO -
setDefaultACLDAO
Set the default DAO- Parameters:
defaultACLDAO- AccessControlListDAO
-
getACLDAO
Helper to choose appropriate NodeService for the given NodeRef- Parameters:
nodeRef- The NodeRef to dispatch from.- Returns:
- The appropriate NodeService.
-
getAccessControlList
-
getMutableAccessControlList
protected org.alfresco.repo.domain.permissions.AbstractPermissionsDaoComponentImpl.CreationReport getMutableAccessControlList(NodeRef nodeRef) -
getPermissions
Description copied from interface:PermissionsDaoComponentGet the permissions that have been set on a given node.- Specified by:
getPermissionsin interfacePermissionsDaoComponent- Returns:
- the node permission entry
-
getAllSetPermissions
-
findNodeByPermission
public Set<NodeRef> findNodeByPermission(String authority, PermissionReference permission, boolean allow) -
getInheritParentPermissions
Description copied from interface:PermissionsDaoComponentReturn the inheritance behaviour for permissions on a given node.- Specified by:
getInheritParentPermissionsin interfacePermissionsDaoComponent- Returns:
- inheritParentPermissions
-
deletePermissions
Description copied from interface:PermissionsDaoComponentRemove all permissions for the specified authority- Specified by:
deletePermissionsin interfacePermissionsDaoComponent
-
deletePermissions
Description copied from interface:PermissionsDaoComponentDelete permission entries for the given node and authority- Specified by:
deletePermissionsin interfacePermissionsDaoComponent- Parameters:
nodeRef- the node to query againstauthority- the specific authority to query against
-
deletePermission
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:
deletePermissionin interfacePermissionsDaoComponent- Parameters:
nodeRef- the node with the access control listauthority- the specific authority to look forpermission- the permission to look for
-
setPermission
public void setPermission(NodeRef nodeRef, String authority, PermissionReference permission, boolean allow) Description copied from interface:PermissionsDaoComponentSet 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:
setPermissionin interfacePermissionsDaoComponent
-
setPermission
Description copied from interface:PermissionsDaoComponentCreate a persisted permission entry given and other representation of a permission entry.- Specified by:
setPermissionin interfacePermissionsDaoComponent
-
setPermission
Description copied from interface:PermissionsDaoComponentCreate a persisted node permission entry given a template object from which to copy.- Specified by:
setPermissionin interfacePermissionsDaoComponent
-
setInheritParentPermissions
Description copied from interface:PermissionsDaoComponentSet the inheritance behaviour for permissions on a given node.- Specified by:
setInheritParentPermissionsin interfacePermissionsDaoComponent
-
deletePermission
Description copied from interface:PermissionsDaoComponentRemove part of a permission mask from a store- Specified by:
deletePermissionin interfacePermissionsDaoComponent
-
deletePermissions
Description copied from interface:PermissionsDaoComponentDelete entries from a permission mask on a store by authority- Specified by:
deletePermissionsin interfacePermissionsDaoComponent
-
deletePermissions
Description copied from interface:PermissionsDaoComponentRemove all permission masks from a store- Specified by:
deletePermissionsin interfacePermissionsDaoComponent
-
setPermission
public void setPermission(StoreRef storeRef, String authority, PermissionReference permission, boolean allow) Description copied from interface:PermissionsDaoComponentSet part of a permission mask on a store.- Specified by:
setPermissionin interfacePermissionsDaoComponent
-
getPermissions
Description copied from interface:PermissionsDaoComponentGet permission masks set on a store- Specified by:
getPermissionsin interfacePermissionsDaoComponent- Returns:
- the node permission entry
-
getAccessControlListProperties
Description copied from interface:PermissionsDaoComponentGet the properties for the access control list- Specified by:
getAccessControlListPropertiesin interfacePermissionsDaoComponent- Returns:
- the properties for the access control list
-
createAccessControlList
-