use of org.mifos.customers.checklist.business.service.CheckListBusinessService in project head by mifos.
the class CheckListServiceFacadeWebTier method retreiveAllCustomerCheckLists.
@Override
public List<CustomerCheckBoxItemDto> retreiveAllCustomerCheckLists() {
try {
List<CustomerCheckListBO> customerCheckLists = new CheckListBusinessService().retreiveAllCustomerCheckLists();
List<CustomerCheckBoxItemDto> dtoList = new ArrayList<CustomerCheckBoxItemDto>();
for (CustomerCheckListBO bo : customerCheckLists) {
String lookUpName = bo.getCustomerStatus().getLookUpValue() != null ? bo.getCustomerStatus().getLookUpValue().getLookUpName() : null;
CustomerCheckBoxItemDto dto = new CustomerCheckBoxItemDto(bo.getChecklistId(), bo.getChecklistName(), bo.getChecklistStatus(), null, lookUpName, bo.getCustomerStatus().getId(), bo.getCustomerLevel().getId());
if (dto.getLookUpName() != null) {
dto.setName(ApplicationContextProvider.getBean(MessageLookup.class).lookup(dto.getLookUpName()));
}
dtoList.add(dto);
}
return dtoList;
} catch (ServiceException e) {
throw new MifosRuntimeException(e);
}
}
use of org.mifos.customers.checklist.business.service.CheckListBusinessService in project head by mifos.
the class CheckListServiceFacadeWebTier method retreiveAllAccountCheckLists.
@Override
public List<AccountCheckBoxItemDto> retreiveAllAccountCheckLists() {
try {
List<AccountCheckListBO> accountCheckLists = new CheckListBusinessService().retreiveAllAccountCheckLists();
List<AccountCheckBoxItemDto> dtoList = new ArrayList<AccountCheckBoxItemDto>();
for (AccountCheckListBO bo : accountCheckLists) {
String lookUpName = bo.getAccountStateEntity().getLookUpValue() != null ? bo.getAccountStateEntity().getLookUpValue().getLookUpName() : null;
AccountCheckBoxItemDto dto = new AccountCheckBoxItemDto(bo.getChecklistId(), bo.getChecklistName(), bo.getChecklistStatus(), null, lookUpName, bo.getAccountStateEntity().getId(), bo.getProductTypeEntity().getProductTypeID());
if (dto.getLookUpName() != null) {
dto.setName(ApplicationContextProvider.getBean(MessageLookup.class).lookup(dto.getLookUpName()));
}
dtoList.add(dto);
}
return dtoList;
} catch (ServiceException e) {
throw new MifosRuntimeException(e);
}
}
Aggregations