Package eu.xenit.alfred.api.permissions
Interface IPermissionService
public interface IPermissionService
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoiddeletePermission(NodeRef node, String authority, String permission) Delete the permission for a given node for a given authority.getNodePermissions(NodeRef nodeRef) returns the ACL for a given node.getPermissions(NodeRef node) getPermissions cannot be replaced yet by getPermissionsFast because getPermissionsFast is not certifiable yet.getPermissionsFast(NodeRef node) getPermissionsFast is not certifiable by Alfresco because it uses the ModelDAO, which is not part of the public API.booleanhasPermission(NodeRef nodeRef, String permission) Check that the current authentication has a particular permission for the given node.voidsetInheritParentPermissions(NodeRef node, boolean inheritPermissions) Sets whether the given node inherits permissions from its parent.voidsetNodePermissions(NodeRef nodeRef, NodePermission permissions) Applies the ACL to a given node.voidsetPermission(NodeRef node, String authority, String permission)
-
Field Details
-
WRITE
- See Also:
-
READ
- See Also:
-
DELETE
- See Also:
-
CREATE_CHILDREN
- See Also:
-
ADD_CHILDREN
- See Also:
-
READ_PERMISSIONS
- See Also:
-
CHANGE_PERMISSIONS
- See Also:
-
READ_RECORDS
- See Also:
-
FILING
- See Also:
-
-
Method Details
-
getPermissionsFast
getPermissionsFast is not certifiable by Alfresco because it uses the ModelDAO, which is not part of the public API. However, getPermissionsFast is roughly 3 times as efficient as getPermissions. I have made case on Alfresco support with case id 00930777- Parameters:
node- the noderef from which the permissions will be gathered.- Returns:
- Returns a map with the permissions and a PermissionValue that allows or denies actions on the provided node for the current authentication.
-
getPermissions
getPermissions cannot be replaced yet by getPermissionsFast because getPermissionsFast is not certifiable yet. However, in the future that is what we want to do. Returns the set of permissions that are present on this object. Possible values are Read, Write, Delete, CreateChildren, ReadPermissions, ChangePermissions and custom permissions- Parameters:
node- the noderef from which the permissions will be gathered- Returns:
- Returns a map with the permissions and a PermissionValue that allows or denies actions on the provided node for the current authentication
-
setPermission
-
deletePermission
Delete the permission for a given node for a given authority.- Parameters:
node- The node on which the permission is deleted.authority- The authority for which the permission is deleted.permission- The permission that is removed.
-
setInheritParentPermissions
Sets whether the given node inherits permissions from its parent.- Parameters:
node- The node to set wether it inherits permissions from its parent.inheritPermissions- Whether to inherit or not.
-
getNodePermissions
returns the ACL for a given node.- Parameters:
nodeRef- the node from which the permissions will be returned.- Returns:
- NodePermission object informing the fact that permissions are inherited or not and which permissions are directly applied to this specific node.
-
setNodePermissions
Applies the ACL to a given node.- Parameters:
nodeRef- noderef for which the permissions will be applied.permissions- object informing the fact that permissions are inherited or not and which permissions are directly applied to this specific node.
-
hasPermission
Check that the current authentication has a particular permission for the given node.- Parameters:
nodeRef- the noderef on which the permission is queried.permission- the String representation of the Permission that is being checked.- Returns:
- - Boolean indicating whether the asked permission is present.
-