@When("^I pick the ID of the channel number (\\d+) in the list \"(.*)\" and remember it as \"(.*)\"$") public void pickAChannelIdFromAList(int index, String lstKey, String idKey) { ChannelInfoListResult tmpLst = (ChannelInfoListResult) stepData.get(lstKey); StorableId tmpId = tmpLst.getItem(index).getId(); stepData.put(idKey, tmpId); }
@When("^I delete all channels from the list \"(.*)\"$") public void deleteAllChannelsFromList(String lstKey) throws KapuaException { Account account = (Account) stepData.get("LastAccount"); ChannelInfoListResult tmpList = (ChannelInfoListResult) stepData.get(lstKey); for (ChannelInfo tmpItem : tmpList.getItems()) { channelInfoRegistryServiceProxy.delete(account.getId(), tmpItem.getId()); } }
ArgumentValidator.notNull(channelInfo.getFirstMessageOn(), "channelInfo.messageTimestamp"); String channelInfoId = ChannelInfoField.getOrDeriveId(channelInfo.getId(), channelInfo); StorableId storableId = new StorableIdImpl(channelInfoId); String registryIndexName = metadata.getRegistryIndexName(); UpdateRequest request = new UpdateRequest(channelInfo.getId().toString(), new TypeDescriptor(metadata.getRegistryIndexName(), ChannelInfoSchema.CHANNEL_TYPE_NAME), channelInfo); response = client.upsert(request);
String id = channels.getResult().get(0).getId().toString(); if (channelsCache.get(id)) { channelsCache.remove(id);