Untitled
private List<String> getActiveInsuranceProducts() throws ApplicationException { Set<String> insuranceProduct = new HashSet<>(); log.info("calling product master for active product listing"); ProductMasterResponse productMasterResponse = productMasterService.getInsuranceProductMasterDetails(0, 0); log.info("got response from product master status: {}, current page: {}, last page: {}, data: {}" , productMasterResponse.getStatusCode(), productMasterResponse.getCurrentPage(), productMasterResponse.getLastPage(), productMasterResponse.getData()); populateActiveInsuranceProductList(productMasterResponse, insuranceProduct); log.info("data populated in the map: {}", insuranceProduct); while (productMasterResponse.getCurrentPage() < productMasterResponse.getLastPage()) { int offset = productMasterResponse.getCurrentPage() + 1; log.info("calling product master for {}", offset); productMasterResponse = productMasterService.getInsuranceProductMasterDetails(offset, 0); populateActiveInsuranceProductList(productMasterResponse, insuranceProduct); } log.info("final data:{}", insuranceProduct); return new ArrayList<>(insuranceProduct); }
Leave a Comment