Interface IPermissionService


public interface IPermissionService
  • Field Details

  • Method Details

    • getPermissionsFast

      Map<String,PermissionValue> getPermissionsFast(NodeRef node)
      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

      Map<String,PermissionValue> getPermissions(NodeRef node)
      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

      void setPermission(NodeRef node, String authority, String permission)
    • deletePermission

      void deletePermission(NodeRef node, String authority, String permission)
      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

      void setInheritParentPermissions(NodeRef node, boolean inheritPermissions)
      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

      NodePermission getNodePermissions(NodeRef nodeRef)
      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

      void setNodePermissions(NodeRef nodeRef, NodePermission permissions)
      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

      boolean hasPermission(NodeRef nodeRef, String permission)
      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.