use of org.mifos.dto.domain.SavingsStatusChangeHistoryDto in project head by mifos.
the class SavingsAction method getStatusHistory.
@TransactionDemarcate(joinToken = true)
public ActionForward getStatusHistory(ActionMapping mapping, @SuppressWarnings("unused") ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
logger.debug("In SavingsAction::getRecentActivity()");
String globalAccountNum = request.getParameter("globalAccountNum");
List<SavingsStatusChangeHistoryDto> savingsStatusHistoryDtoList = this.savingsServiceFacade.retrieveStatusChangeHistory(globalAccountNum);
SavingsBO savings = this.savingsDao.findBySystemId(globalAccountNum);
Hibernate.initialize(savings.getAccountStatusChangeHistory());
savings.setUserContext((UserContext) SessionUtils.getAttribute(Constants.USER_CONTEXT_KEY, request.getSession()));
List<AccountStatusChangeHistoryEntity> savingsStatusHistoryViewList = new ArrayList<AccountStatusChangeHistoryEntity>(savings.getAccountStatusChangeHistory());
SessionUtils.setCollectionAttribute(SavingsConstants.STATUS_CHANGE_HISTORY_LIST, savingsStatusHistoryViewList, request);
return mapping.findForward("getStatusHistory_success");
}
use of org.mifos.dto.domain.SavingsStatusChangeHistoryDto in project head by mifos.
the class SavingsServiceFacadeWebTier method retrieveStatusChangeHistory.
@Override
public List<SavingsStatusChangeHistoryDto> retrieveStatusChangeHistory(String globalAccountNum) {
MifosUser user = (MifosUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
UserContext userContext = toUserContext(user);
SavingsBO savingsAccount = this.savingsDao.findBySystemId(globalAccountNum);
savingsAccount.updateDetails(userContext);
List<SavingsStatusChangeHistoryDto> dtoList = new ArrayList<SavingsStatusChangeHistoryDto>();
List<AccountStatusChangeHistoryEntity> statusChangeHistory = savingsAccount.getAccountStatusChangeHistory();
for (AccountStatusChangeHistoryEntity accountStatusChangeHistory : statusChangeHistory) {
dtoList.add(accountStatusChangeHistory.toDto());
}
return dtoList;
}
Aggregations