Interface PermissionService

    • Method Detail

      • createAcl

        void createAcl​(org.springframework.security.acls.model.ObjectIdentity objectIdentity)
        Creates an access control list for the given object identity
        Throws:
        org.springframework.security.acls.model.AlreadyExistsException - if this ACL already exists
        UnknownUserException - if no user could be found for a PrincipalSid
        UnknownRoleException - if no role could be found for a GrantedAuthoritySid
        PermissionNotSuitableException - if the permission is not suitable for the type of object
        UnknownEntityException - if the combination of Type and Identifier of the object identity does not corresponds to an entity
        UnknownEntityTypeException - if the Type of the object identity does not corresponds to an existing entity type
      • deletePermission

        void deletePermission​(org.springframework.security.acls.model.Sid sid,
                              org.springframework.security.acls.model.ObjectIdentity objectIdentity)
        Deletes a existing permission for a user on an object identity
        Throws:
        UnknownAceException - if there can be no permission found to delete
        UnknownUserException - if no user could be found for a PrincipalSid
        UnknownRoleException - if no role could be found for a GrantedAuthoritySid
        UnknownEntityException - if the combination of Type and Identifier of the object identity does not corresponds to an entity
        UnknownEntityTypeException - if the Type of the object identity does not corresponds to an existing entity type
      • addType

        void addType​(String typeId)
        Add a Type to the database
        Throws:
        UnknownEntityTypeException - if the Type of the object identity does not corresponds to an existing entity type
      • deleteType

        void deleteType​(String typeId)
        Removes a Type from the database
        Throws:
        UnknownEntityTypeException - if the Type of the object identity does not corresponds to an existing entity type
      • getLabelledTypes

        Set<LabelledType> getLabelledTypes()
        Retrieves the types that are available in the system
      • getObjects

        Set<LabelledObject> getObjects​(String typeId,
                                       int page,
                                       int pageSize)
        Retrieves the objects of a type in the system
        Throws:
        UnknownEntityTypeException - if the Type of the object identity does not corresponds to an existing entity type
      • getSuitablePermissionsForType

        Set<PermissionSet> getSuitablePermissionsForType​(String typeId)
        Retrieves the permissions that can be granted of objects of a certain type
      • exists

        boolean exists​(org.springframework.security.acls.model.ObjectIdentity objectIdentity,
                       org.springframework.security.acls.model.Sid sid)
        Checks if a there is a permission in the system for the combination of a sid and an objectIdentity
        Throws:
        ReadPermissionDeniedException - if the user misses the permissions required to retrieve permissions for this object
        SidPermissionException - if the user misses the permissions required to retrieve permissions for
        UnknownUserException - if no user could be found for a PrincipalSid
        UnknownRoleException - if no role could be found for a GrantedAuthoritySid
        UnknownEntityException - if the combination of Type and Identifier of the object identity does not corresponds to an entity
        UnknownEntityTypeException - if the Type of the object identity does not corresponds to an existing entity type