use of org.mifos.dto.screen.ProductCategoryTypeDto in project head by mifos.
the class DefineProductCategoryPreviewController method getProductCategoryTypes.
private Map<String, String> getProductCategoryTypes() {
String pType = "";
Map<String, String> categoryTypes = new LinkedHashMap<String, String>();
for (ProductCategoryTypeDto productCategoryTypeDto : this.adminServiceFacade.retrieveProductCategoryTypes()) {
if (!pType.equals(productCategoryTypeDto.getProductName())) {
categoryTypes.put(productCategoryTypeDto.getProductTypeID().toString(), productCategoryTypeDto.getProductName());
}
pType = productCategoryTypeDto.getProductName();
}
return categoryTypes;
}
use of org.mifos.dto.screen.ProductCategoryTypeDto in project head by mifos.
the class DefineProductCategoryController method getProductCategoryTypes.
public Map<String, String> getProductCategoryTypes() {
String pType = "";
Map<String, String> categoryTypes = new LinkedHashMap<String, String>();
for (ProductCategoryTypeDto productCategoryTypeDto : this.adminServiceFacade.retrieveProductCategoryTypes()) {
if (!pType.equals(productCategoryTypeDto.getProductName())) {
categoryTypes.put(productCategoryTypeDto.getProductTypeID().toString(), productCategoryTypeDto.getProductName());
}
pType = productCategoryTypeDto.getProductName();
}
return categoryTypes;
}
use of org.mifos.dto.screen.ProductCategoryTypeDto in project head by mifos.
the class AdminServiceFacadeWebTier method retrieveAllProductMix.
@Override
public ProductDto retrieveAllProductMix() {
try {
List<ProductCategoryBO> productCategoryList = new ProductCategoryBusinessService().getAllCategories();
List<PrdOfferingBO> prdOfferingList = new ProductMixBusinessService().getPrdOfferingMix();
List<ProductCategoryTypeDto> pcList = new ArrayList<ProductCategoryTypeDto>();
for (ProductCategoryBO pcBO : productCategoryList) {
ProductCategoryTypeDto pcDto = new ProductCategoryTypeDto(pcBO.getProductType().getProductTypeID(), pcBO.getProductType().getLookUpValue().getLookUpName());
pcList.add(pcDto);
}
List<ProductMixDto> pmList = new ArrayList<ProductMixDto>();
for (PrdOfferingBO poBO : prdOfferingList) {
ProductMixDto pmDto = new ProductMixDto(poBO.getPrdCategory().getProductType().getProductTypeID(), poBO.getPrdOfferingId(), poBO.getPrdType().getProductTypeID(), poBO.getPrdOfferingName());
pmList.add(pmDto);
}
ProductDto productDto = new ProductDto(pcList, pmList);
return productDto;
} catch (ServiceException e) {
throw new MifosRuntimeException(e);
}
}
use of org.mifos.dto.screen.ProductCategoryTypeDto in project head by mifos.
the class AdminServiceFacadeWebTier method retrieveAllProductCategories.
@Override
public ProductCategoryDisplayDto retrieveAllProductCategories() {
try {
List<ProductCategoryBO> productCategoryList = new ProductCategoryBusinessService().getAllCategories();
List<ProductCategoryTypeDto> pcTypeList = new ArrayList<ProductCategoryTypeDto>();
List<ProductCategoryDto> pcList = new ArrayList<ProductCategoryDto>();
for (ProductCategoryBO pcBO : productCategoryList) {
ProductCategoryTypeDto pcTypeDto = new ProductCategoryTypeDto(pcBO.getProductType().getProductTypeID(), pcBO.getProductType().getLookUpValue().getLookUpName());
pcTypeList.add(pcTypeDto);
ProductCategoryDto pcDto = new ProductCategoryDto(pcBO.getProductCategoryName(), pcBO.getPrdCategoryStatus().getId(), pcBO.getGlobalPrdCategoryNum());
pcList.add(pcDto);
}
ProductCategoryDisplayDto productCategoryDisplayDto = new ProductCategoryDisplayDto(pcTypeList, pcList);
return productCategoryDisplayDto;
} catch (ServiceException e) {
throw new MifosRuntimeException(e);
}
}
use of org.mifos.dto.screen.ProductCategoryTypeDto in project head by mifos.
the class AdminServiceFacadeWebTier method retrieveProductCategoryTypes.
@Override
public List<ProductCategoryTypeDto> retrieveProductCategoryTypes() {
try {
List<ProductTypeEntity> productCategoryList = new ProductCategoryBusinessService().getProductTypes();
List<ProductCategoryTypeDto> productCategoryTypeDtoList = new ArrayList<ProductCategoryTypeDto>();
for (ProductTypeEntity productType : productCategoryList) {
ProductCategoryTypeDto productCategoryTypeDto = new ProductCategoryTypeDto(productType.getProductTypeID(), productType.getLookUpValue().getLookUpName());
productCategoryTypeDtoList.add(productCategoryTypeDto);
}
return productCategoryTypeDtoList;
} catch (ServiceException e) {
throw new MifosRuntimeException(e);
}
}
Aggregations