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 Modifier and Type Field Description protected AclDAOaclDaoComponentprotected static booleanINHERIT_PERMISSIONS_DEFAULT
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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 authoritybooleanequals(Object obj)Checks equality by type and uuidSet<NodeRef>findNodeByPermission(String authority, PermissionReference permission, boolean allow)protected AclgetAccessControlList(NodeRef nodeRef)AccessControlListPropertiesgetAccessControlListProperties(NodeRef nodeRef)Get the properties for the access control listprotected AccessControlListDAOgetACLDAO(NodeRef nodeRef)Helper to choose appropriate NodeService for the given NodeRefMap<NodeRef,Set<AccessPermission>>getAllSetPermissions(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)NodePermissionEntrygetPermissions(NodeRef nodeRef)Get the permissions that have been set on a given node.NodePermissionEntrygetPermissions(StoreRef storeRef)Get permission masks set on a storeinthashCode()voidsetAclDAO(AclDAO aclDaoComponent)Set 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.voidsetProtocolToACLDAO(Map<String,AccessControlListDAO> map)Set the mapping of protocol to DAO-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.alfresco.repo.security.permissions.impl.PermissionsDaoComponent
deletePermissions
-
-
-
-
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
-
setProtocolToACLDAO
public void setProtocolToACLDAO(Map<String,AccessControlListDAO> map)
Set the mapping of protocol to DAO
-
setDefaultACLDAO
public void setDefaultACLDAO(AccessControlListDAO defaultACLDAO)
Set the default DAO- Parameters:
defaultACLDAO- AccessControlListDAO
-
getACLDAO
protected AccessControlListDAO getACLDAO(NodeRef nodeRef)
Helper to choose appropriate NodeService for the given NodeRef- Parameters:
nodeRef- The NodeRef to dispatch from.- Returns:
- The appropriate NodeService.
-
getMutableAccessControlList
protected org.alfresco.repo.domain.permissions.AbstractPermissionsDaoComponentImpl.CreationReport getMutableAccessControlList(NodeRef nodeRef)
-
getPermissions
public NodePermissionEntry getPermissions(NodeRef nodeRef)
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
public Map<NodeRef,Set<AccessPermission>> getAllSetPermissions(String authority)
-
findNodeByPermission
public Set<NodeRef> findNodeByPermission(String authority, PermissionReference permission, boolean allow)
-
getInheritParentPermissions
public boolean getInheritParentPermissions(NodeRef nodeRef)
Description copied from interface:PermissionsDaoComponentReturn the inheritance behaviour for permissions on a given node.- Specified by:
getInheritParentPermissionsin interfacePermissionsDaoComponent- Returns:
- inheritParentPermissions
-
deletePermissions
public void deletePermissions(String authority)
Description copied from interface:PermissionsDaoComponentRemove all permissions for the specified authority- Specified by:
deletePermissionsin interfacePermissionsDaoComponent
-
deletePermissions
public void deletePermissions(NodeRef nodeRef, String authority)
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
public void deletePermission(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:
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
public void setPermission(PermissionEntry permissionEntry)
Description copied from interface:PermissionsDaoComponentCreate a persisted permission entry given and other representation of a permission entry.- Specified by:
setPermissionin interfacePermissionsDaoComponent
-
setPermission
public void setPermission(NodePermissionEntry nodePermissionEntry)
Description copied from interface:PermissionsDaoComponentCreate a persisted node permission entry given a template object from which to copy.- Specified by:
setPermissionin interfacePermissionsDaoComponent
-
setInheritParentPermissions
public void setInheritParentPermissions(NodeRef nodeRef, boolean inheritParentPermissions)
Description copied from interface:PermissionsDaoComponentSet the inheritance behaviour for permissions on a given node.- Specified by:
setInheritParentPermissionsin interfacePermissionsDaoComponent
-
deletePermission
public void deletePermission(StoreRef storeRef, String authority, PermissionReference permission)
Description copied from interface:PermissionsDaoComponentRemove part of a permission mask from a store- Specified by:
deletePermissionin interfacePermissionsDaoComponent
-
deletePermissions
public void deletePermissions(StoreRef storeRef, String authority)
Description copied from interface:PermissionsDaoComponentDelete entries from a permission mask on a store by authority- Specified by:
deletePermissionsin interfacePermissionsDaoComponent
-
deletePermissions
public void deletePermissions(StoreRef storeRef)
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
public NodePermissionEntry getPermissions(StoreRef storeRef)
Description copied from interface:PermissionsDaoComponentGet permission masks set on a store- Specified by:
getPermissionsin interfacePermissionsDaoComponent- Returns:
- the node permission entry
-
getAccessControlListProperties
public AccessControlListProperties getAccessControlListProperties(NodeRef nodeRef)
Description copied from interface:PermissionsDaoComponentGet the properties for the access control list- Specified by:
getAccessControlListPropertiesin interfacePermissionsDaoComponent- Returns:
- the properties for the access control list
-
-