use of org.mifos.framework.exceptions.ServiceException in project head by mifos.
the class AdminServiceFacadeWebTier method retrieveLoanProductAuditLogs.
@Override
public List<AuditLogDto> retrieveLoanProductAuditLogs(Integer productId) {
List<AuditLogDto> auditLogDtos = new ArrayList<AuditLogDto>();
AuditBusinessService auditBusinessService = new AuditBusinessService();
try {
List<AuditLogView> auditLogs = auditBusinessService.getAuditLogRecords(EntityType.LOANPRODUCT.getValue(), productId);
for (AuditLogView auditLogView : auditLogs) {
auditLogDtos.add(auditLogView.toDto());
}
return auditLogDtos;
} catch (ServiceException e) {
throw new MifosRuntimeException(e);
}
}
use of org.mifos.framework.exceptions.ServiceException 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);
}
}
use of org.mifos.framework.exceptions.ServiceException in project head by mifos.
the class AdminServiceFacadeWebTier method retrieveSavingsProductAuditLogs.
@Override
public List<AuditLogDto> retrieveSavingsProductAuditLogs(Integer productId) {
List<AuditLogDto> auditLogDtos = new ArrayList<AuditLogDto>();
AuditBusinessService auditBusinessService = new AuditBusinessService();
try {
List<AuditLogView> auditLogs = auditBusinessService.getAuditLogRecords(EntityType.SAVINGSPRODUCT.getValue(), productId);
for (AuditLogView auditLogView : auditLogs) {
auditLogDtos.add(auditLogView.toDto());
}
return auditLogDtos;
} catch (ServiceException e) {
throw new MifosRuntimeException(e);
}
}
use of org.mifos.framework.exceptions.ServiceException in project head by mifos.
the class AdminServiceFacadeWebTier method retrieveProductCateogry.
@Override
public ProductCategoryDetailsDto retrieveProductCateogry(String globalProductCategoryNumber) {
ProductCategoryBusinessService service = new ProductCategoryBusinessService();
try {
ProductCategoryBO pcBO = service.findByGlobalNum(globalProductCategoryNumber);
String productTypeName = service.getProductType(pcBO.getProductType().getProductTypeID()).getLookUpValue().getLookUpName();
ProductCategoryDetailsDto productCategoryDetailsDto = new ProductCategoryDetailsDto(pcBO.getProductCategoryName(), pcBO.getPrdCategoryStatus().getId(), pcBO.getProductType().getProductTypeID(), pcBO.getProductCategoryDesc(), productTypeName);
return productCategoryDetailsDto;
} catch (ServiceException e) {
throw new MifosRuntimeException(e);
}
}
use of org.mifos.framework.exceptions.ServiceException in project head by mifos.
the class CenterServiceFacadeWebTier method retrieveCustomersUnderBranch.
@Override
public List<CustomerDetailDto> retrieveCustomersUnderBranch(Short branchId) {
List<CustomerDetailDto> customers = null;
try {
customers = new ArrayList<CustomerDetailDto>();
List<PersonnelBO> officers = personnelBusinessService.getActiveLoanOfficersUnderOffice(branchId);
for (PersonnelBO officer : officers) {
customers.addAll(retrieveCustomersUnderUser(officer.getPersonnelId()));
}
} catch (ServiceException e) {
}
return customers;
}
Aggregations