@Override
    public boolean isReady(ClientVersionBean client) throws Exception {
        List<ContractSummaryBean> contracts = storageQuery.getClientContracts(client.getClient().getOrganization().getId(), client
                .getClient().getId(), client.getVersion());
        // If empty, not ready
        if (contracts.isEmpty()) {
            return false;
        }
        // None must be in unapproved state
        return contracts.stream().allMatch(c -> c.getStatus() == ContractStatus.Created);
    }
@see io.apiman.manager.api.core.IClientValidator#isReady(io.apiman.manager.api.beans.clients.ClientVersionBean)
manager/api/core/src/main/java/io/apiman/manager/api/core/util/EntityValidator.java