private ResourceTypes getResourceType(String url) {
        if (url == null) {
            throw new IllegalStateException("Resource link can not be null");
        }

        String[] paths = url.split(ResourceDescriptor.PATH_SEPARATOR);

        if (paths.length < 2) {
            throw new IllegalStateException("Invalid resource link provided: " + url);
        }

        return ResourceTypes.of(paths[0]);
    }
Revoke share access for provided resources. Only resource owner can perform this operation

@param bucket              - user bucket
@param location            - storage location
@param permissionsToRevoke - collection of resources and permissions to revoke access
server/src/main/java/com/epam/aidial/core/server/service/ShareService.java