Interface ModelDAO

  • All Known Implementing Classes:
    PermissionModel

    public interface ModelDAO
    The API for the alfresco permission model.
    Author:
    Andy Hind
    • Method Detail

      • getAllPermissions

        java.util.Set<PermissionReference> getAllPermissions​(org.alfresco.service.namespace.QName type)
        Get the permissions that can be set for the given type.
        Parameters:
        type - - the type in the data dictionary.
      • getAllPermissions

        java.util.Set<PermissionReference> getAllPermissions​(org.alfresco.service.namespace.QName type,
                                                             java.util.Set<org.alfresco.service.namespace.QName> aspects)
        Get the permissions that can be set for the given type.
        Parameters:
        type - - the type in the data dictionary.
      • getAllPermissions

        java.util.Set<PermissionReference> getAllPermissions​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Get the permissions that can be set for the given node. This is determined by the node type.
        Parameters:
        nodeRef - NodeRef
      • getExposedPermissions

        java.util.Set<PermissionReference> getExposedPermissions​(org.alfresco.service.namespace.QName type)
        Get the permissions that are exposed to be set for the given type.
        Parameters:
        type - - the type in the data dictionary.
      • getExposedPermissions

        java.util.Set<PermissionReference> getExposedPermissions​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Get the permissions that are exposed to be set for the given node. This is determined by the node type.
        Parameters:
        nodeRef - NodeRef
      • getGrantingPermissions

        java.util.Set<PermissionReference> getGrantingPermissions​(PermissionReference perm)
        Get all the permissions that grant this permission.
        Parameters:
        perm - PermissionReference
      • getRequiredPermissions

        java.util.Set<PermissionReference> getRequiredPermissions​(PermissionReference required,
                                                                  org.alfresco.service.namespace.QName qName,
                                                                  java.util.Set<org.alfresco.service.namespace.QName> aspectQNames,
                                                                  RequiredPermission.On on)
        Get the permissions that must also be present on the node for the required permission to apply.
        Parameters:
        required - PermissionReference
        qName - QName
        on - RequiredPermission.On
      • getGranteePermissions

        java.util.Set<PermissionReference> getGranteePermissions​(PermissionReference permissionReference)
        Get the permissions which are granted by the supplied permission.
        Parameters:
        permissionReference - PermissionReference
      • getImmediateGranteePermissions

        java.util.Set<PermissionReference> getImmediateGranteePermissions​(PermissionReference permissionReference)
        Get the permissions which are granted by the supplied permission.
        Parameters:
        permissionReference - PermissionReference
      • checkPermission

        boolean checkPermission​(PermissionReference required)
        Is this permission refernece to a permission and not a permissoinSet?
        Parameters:
        required - PermissionReference
        Returns:
        boolean
      • isUnique

        boolean isUnique​(PermissionReference permissionReference)
        Does the permission reference have a unique name?
        Parameters:
        permissionReference - PermissionReference
        Returns:
        boolean
      • getPermissionReference

        PermissionReference getPermissionReference​(org.alfresco.service.namespace.QName qname,
                                                   java.lang.String permissionName)
        Find a permission by name in the type context. If the context is null and the permission name is unique it will be found.
        Parameters:
        qname - QName
        permissionName - String
        Returns:
        PermissionReference
      • getGlobalPermissionEntries

        java.util.Set<? extends PermissionEntry> getGlobalPermissionEntries()
        Get the global permissions for the model. Permissions that apply to all nodes and take precedence over node specific permissions.
        Returns:
        Set
      • getAllExposedPermissions

        java.util.Set<PermissionReference> getAllExposedPermissions()
        Get all exposed permissions (regardless of type exposure)
      • getAllPermissions

        java.util.Set<PermissionReference> getAllPermissions()
        Get all exposed permissions (regardless of type exposure)
      • hasFull

        boolean hasFull​(PermissionReference permissionReference)
        Does this permission allow full control?
        Parameters:
        permissionReference - PermissionReference
        Returns:
        boolean