class LoanAccountAction extends AccountAppAction implements QuestionnaireAction {

    @TransactionDemarcate(saveToken = true)
    public ActionForward getLoanRepaymentSchedule(final ActionMapping mapping,
                                                  final ActionForm form, final HttpServletRequest request,
                                                  @SuppressWarnings("unused") final HttpServletResponse response) throws Exception {

        LoanAccountActionForm loanAccountActionForm = (LoanAccountActionForm) form;
        UserContext userContext = getUserContext(request);
        Integer loanId = Integer.valueOf(request.getParameter(ACCOUNT_ID));
        Locale locale = userContext.getPreferredLocale();
        Date viewDate = loanAccountActionForm.getScheduleViewDateValue(locale);

        LoanBO loan = getLoan(loanId);
        setSessionAtributeForGLIM(request, loan);
        loan.updateDetails(userContext);
        Errors errors = loanBusinessService.computeExtraInterest(loan, viewDate);
        if (errors.hasErrors()) {
            loanAccountActionForm.resetScheduleViewDate();
        }

        OriginalScheduleInfoDto originalSchedule = this.loanServiceFacade.retrieveOriginalLoanSchedule(loanId);

        String memberAccountIdParam = request.getParameter("memberAccountId");
        if (StringUtils.isNotBlank(memberAccountIdParam)) {
            Integer memberId = Integer.valueOf(memberAccountIdParam);
            LoanBO member = loan.findMemberById(memberId);
            if (member != null) {
                SessionUtils.setAttribute(CustomerConstants.CUSTOMER_NAME, member.getCustomer().getDisplayName(), request);
                SessionUtils.setAttribute(CustomerConstants.GLOBAL_CUST_NUM, member.getCustomer().getGlobalCustNum(), request);
            }
        }

        SessionUtils.setAttribute(Constants.BUSINESS_KEY, loan, request);
        SessionUtils.setAttribute(Constants.ORIGINAL_SCHEDULE_AVAILABLE, originalSchedule.hasOriginalInstallments(), request);
        SessionUtils.setAttribute(Constants.VIEW_DATE, viewDate, request);

        String forward = errors.hasErrors() ? ActionForwards.getLoanRepaymentScheduleFailure.toString() : ActionForwards.getLoanRepaymentSchedule.toString();
        addErrors(request, getActionErrors(errors));
        return mapping.findForward(forward);
    }

    public  LoanAccountAction();
    public  LoanAccountAction(final ConfigurationBusinessService configService,
                             final LoanBusinessService loanBusinessService, final GlimLoanUpdater glimLoanUpdater,
                             final LoanPrdBusinessService loanPrdBusinessService,
                             final ConfigurationPersistence configurationPersistence,
                             final AccountBusinessService accountBusinessService,
                             final GroupLoanAccountServiceFacade groupLoanAccountServiceFacade,
                             final InformationOrderServiceFacade informationOrderServiceFacade);
    @Deprecated  LoanAccountAction(final LoanBusinessService loanBusinessService, final ConfigurationBusinessService configService,
                      final GlimLoanUpdater glimLoanUpdater);
    @Deprecated private  LoanAccountAction(final ConfigurationBusinessService configService,
                              final LoanBusinessService loanBusinessService, final GlimLoanUpdater glimLoanUpdater);

}