Interface PermissionServiceSPI

All Superinterfaces:
PermissionService
All Known Subinterfaces:
PermissionServiceExtension, PermissionServiceTrait
All Known Implementing Classes:
AllowPermissionServiceImpl, PermissionServiceImpl, PermissionServiceNOOPImpl, VirtualPermissionServiceExtension

public interface PermissionServiceSPI extends PermissionService
The public API for a permission service The implementation may be changed in the application configuration
Author:
Andy Hind
  • Method Details

    • getAllPermissionReference

      PermissionReference getAllPermissionReference()
      Get the All Permission
      Returns:
      the All permission
    • getSettablePermissionReferences

      Set<PermissionReference> getSettablePermissionReferences(QName type)
      Get the permissions that can be set for a given type
      Parameters:
      type - QName
      Returns:
      the set of permissions
    • getSettablePermissionReferences

      Set<PermissionReference> getSettablePermissionReferences(NodeRef nodeRef)
      Get the permissions that can be set for a given type
      Parameters:
      nodeRef - NodeRef
      Returns:
      the set of permissions
    • getSetPermissions

      NodePermissionEntry getSetPermissions(NodeRef nodeRef)
      Get the permissions that have been set on the given node (it knows nothing of the parent permissions)
      Parameters:
      nodeRef - NodeRef
      Returns:
      the node permission entry
    • hasPermission

      AccessStatus hasPermission(NodeRef nodeRef, PermissionReference perm)
      Check that the given authentication has a particular permission for the given node. (The default behaviour is to inherit permissions)
      Parameters:
      nodeRef - NodeRef
      perm - PermissionReference
      Returns:
      the access status
    • explainPermission

      NodePermissionEntry explainPermission(NodeRef nodeRef, PermissionReference perm)
      Where is the permission set that controls the behaviour for the given permission for the given authentication to access the specified name.
      Parameters:
      nodeRef - NodeRef
      perm - PermissionReference
      Returns:
      the node permission entry
    • deletePermissions

      void deletePermissions(NodePermissionEntry nodePermissionEntry)
      Delete the permissions defined by the nodePermissionEntry
      Parameters:
      nodePermissionEntry - NodePermissionEntry
    • deletePermission

      void deletePermission(PermissionEntry permissionEntry)
      Delete a single permission entry
      Parameters:
      permissionEntry - PermissionEntry
    • setPermission

      void setPermission(PermissionEntry permissionEntry)
      Add or set a permission entry on a node.
      Parameters:
      permissionEntry - PermissionEntry
    • setPermission

      void setPermission(NodePermissionEntry nodePermissionEntry)
      Set the permissions on a node.
      Parameters:
      nodePermissionEntry - NodePermissionEntry
    • getPermissionReference

      PermissionReference getPermissionReference(QName qname, String permissionName)
      Get the permission reference for the given data type and permission name.
      Parameters:
      qname - - may be null if the permission name is unique
      permissionName - String
      Returns:
      the permission reference
    • getPermissionReference

      PermissionReference getPermissionReference(String permissionName)
      Get the permission reference by permission name.
      Parameters:
      permissionName - String
      Returns:
      the permission reference
    • getPermission

      String getPermission(PermissionReference permissionReference)
      Get the string that can be used to identify the given permission reference.
      Parameters:
      permissionReference - PermissionReference
      Returns:
      the permission short name
    • deletePermissions

      void deletePermissions(String recipient)
      Delete permissions for the given recipient.
      Parameters:
      recipient - String
    • getSetPermissions

      NodePermissionEntry getSetPermissions(StoreRef storeRef)
      Get the permissions set for the store
      Parameters:
      storeRef - StoreRef
      Returns:
      - the node permission entry