use of org.mifos.accounts.business.service.AccountBusinessService in project head by mifos.
the class BirtAdminDocumentUploadAction method loadProductInstance.
@TransactionDemarcate(joinToken = true)
public ActionForward loadProductInstance(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
BirtAdminDocumentUploadActionForm uploadForm = (BirtAdminDocumentUploadActionForm) form;
SessionUtils.removeAttribute(ProductDefinitionConstants.AVAILABLEACCOUNTSTATUS, request);
SessionUtils.removeAttribute(ProductDefinitionConstants.SELECTEDACCOUNTSTATUS, request);
SessionUtils.removeAttribute(ProductDefinitionConstants.STATUS_LIST, request);
if (StringUtils.isNotBlank(uploadForm.getAccountTypeId()) && Short.valueOf(uploadForm.getAccountTypeId()).shortValue() <= 2) {
SessionUtils.setCollectionAttribute(ProductDefinitionConstants.AVAILABLEACCOUNTSTATUS, new AccountBusinessService().retrieveAllActiveAccountStateList(AccountTypes.getAccountType(Short.valueOf(uploadForm.getAccountTypeId()))), request);
} else if (StringUtils.isNotBlank(uploadForm.getAccountTypeId())) {
SessionUtils.setCollectionAttribute(ProductDefinitionConstants.AVAILABLEACCOUNTSTATUS, getAvailableLoanTransactions((Short) SessionUtils.getAttribute("CURRENT_LOCALE_ID", request)), request);
}
return mapping.findForward(ActionForwards.load_success.toString());
}
Aggregations