@When("^I delete all clients from the list \"(.*)\"$") public void deleteAllClientsFromList(String lstKey) throws KapuaException { Account account = (Account) stepData.get("LastAccount"); ClientInfoListResult tmpList = (ClientInfoListResult) stepData.get(lstKey); for (ClientInfo tmpItem : tmpList.getItems()) { clientInfoRegistryServiceProxy.delete(account.getId(), tmpItem.getId()); } }
@When("^I delete client number (\\d+) from the list \"(.*)\"$") public void deleteClientFromList(int index, String lstKey) throws KapuaException { Account account = (Account) stepData.get("LastAccount"); ClientInfoListResult tmpList = (ClientInfoListResult) stepData.get(lstKey); clientInfoRegistryServiceProxy.delete(account.getId(), tmpList.getItem(index).getId()); }
ArgumentValidator.notNull(clientInfo.getFirstMessageOn(), "clientInfo.firstPublishedMessageTimestamp"); String clientInfoId = ClientInfoField.getOrDeriveId(clientInfo.getId(), clientInfo); StorableId storableId = new StorableIdImpl(clientInfoId); String kapuaIndexName = metadata.getRegistryIndexName(); UpdateRequest request = new UpdateRequest(clientInfo.getId().toString(), new TypeDescriptor(kapuaIndexName, ClientInfoSchema.CLIENT_TYPE_NAME), clientInfo); response = client.upsert(request);
String id = clients.getResult().get(i).getId().toString(); if (clientsCache.get(id)) { clientsCache.remove(id);