use of org.openkilda.store.model.SwitchStoreConfigDto in project open-kilda by telstra.
the class StoreService method getSwitchStoreConfig.
/**
* Gets the switch store config.
*
* @return the switch store config
*/
@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
public SwitchStoreConfigDto getSwitchStoreConfig() {
LOGGER.info("Get switch store configuration");
SwitchStoreConfigDto switchStoreConfigDto = new SwitchStoreConfigDto();
List<SwitchStoreRequestUrlsEntity> switchStoreRequestUrlsEntitiesList = switchStoreRequestUrlsRepository.findAll();
Map<String, UrlDto> urls = new HashMap<String, UrlDto>();
for (SwitchStoreRequestUrlsEntity switchStoreRequestUrlsEntity : switchStoreRequestUrlsEntitiesList) {
urls.put(switchStoreRequestUrlsEntity.getUrlEntity().getName(), UrlConverter.toUrlDto(switchStoreRequestUrlsEntity.getUrlEntity()));
}
switchStoreConfigDto.setUrls(urls);
return switchStoreConfigDto;
}
Aggregations