use of org.mifos.customers.group.struts.actionforms.GroupTransferActionForm in project head by mifos.
the class GroupTransferAction method transferToCenter.
@TransactionDemarcate(validateAndResetToken = true)
@CloseSession
public ActionForward transferToCenter(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
GroupTransferActionForm actionForm = (GroupTransferActionForm) form;
GroupBO groupInSession = (GroupBO) SessionUtils.getAttribute(Constants.BUSINESS_KEY, request);
CustomerDetailDto groupDetail = this.groupServiceFacade.transferGroupToCenter(groupInSession.getGlobalCustNum(), actionForm.getCenterSystemId(), groupInSession.getVersionNo());
GroupBO group = this.customerDao.findGroupBySystemId(groupDetail.getGlobalCustNum());
SessionUtils.setAttribute(Constants.BUSINESS_KEY, group, request);
return mapping.findForward(ActionForwards.update_success.toString());
}
use of org.mifos.customers.group.struts.actionforms.GroupTransferActionForm in project head by mifos.
the class GroupTransferAction method transferToBranch.
@TransactionDemarcate(validateAndResetToken = true)
@CloseSession
public ActionForward transferToBranch(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
GroupTransferActionForm actionForm = (GroupTransferActionForm) form;
GroupBO groupInSession = (GroupBO) SessionUtils.getAttribute(Constants.BUSINESS_KEY, request);
CustomerDetailDto groupDetail = this.groupServiceFacade.transferGroupToBranch(groupInSession.getGlobalCustNum(), actionForm.getOfficeIdValue(), groupInSession.getVersionNo());
GroupBO group = this.customerDao.findGroupBySystemId(groupDetail.getGlobalCustNum());
SessionUtils.setAttribute(Constants.BUSINESS_KEY, group, request);
return mapping.findForward(ActionForwards.update_success.toString());
}
use of org.mifos.customers.group.struts.actionforms.GroupTransferActionForm in project head by mifos.
the class GroupTransferAction method removeGroupMemberShip.
@CloseSession
@TransactionDemarcate(validateAndResetToken = true)
public ActionForward removeGroupMemberShip(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
GroupTransferActionForm actionForm = (GroupTransferActionForm) form;
CustomerBO customerBOInSession = (CustomerBO) SessionUtils.getAttribute(Constants.BUSINESS_KEY, request);
ClientBO client = this.customerDao.findClientBySystemId(customerBOInSession.getGlobalCustNum());
checkVersionMismatch(customerBOInSession.getVersionNo(), client.getVersionNo());
Short loanOfficerId = null;
if (StringUtils.isNotBlank(actionForm.getAssignedLoanOfficerId())) {
loanOfficerId = Short.valueOf(actionForm.getAssignedLoanOfficerId());
}
this.clientServiceFacade.removeGroupMembership(customerBOInSession.getGlobalCustNum(), loanOfficerId, actionForm.getComment());
return mapping.findForward(ActionForwards.view_client_details_page.toString());
}
use of org.mifos.customers.group.struts.actionforms.GroupTransferActionForm in project head by mifos.
the class GroupTransferAction method loadGrpMemberShip.
@TransactionDemarcate(joinToken = true)
public ActionForward loadGrpMemberShip(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
GroupTransferActionForm actionForm = (GroupTransferActionForm) form;
actionForm.setComment(null);
ClientBO clientInSession = (ClientBO) SessionUtils.getAttribute(Constants.BUSINESS_KEY, request);
ClientRemovalFromGroupDto clientRemovalFromGroupDetail = this.clientServiceFacade.retreiveClientDetailsForRemovalFromGroup(clientInSession.getGlobalCustNum());
actionForm.setAssignedLoanOfficerId(clientRemovalFromGroupDetail.getLoanOfficerId().toString());
actionForm.setIsActive(clientRemovalFromGroupDetail.isActive() ? Constants.YES : Constants.NO);
ClientBO client = this.customerDao.findClientBySystemId(clientInSession.getGlobalCustNum());
SessionUtils.removeAttribute(Constants.BUSINESS_KEY, request);
SessionUtils.setAttribute(Constants.BUSINESS_KEY, client, request);
SessionUtils.setCollectionAttribute(OfficeConstants.OFFICESBRANCHOFFICESLIST, clientRemovalFromGroupDetail.getActiveBranches(), request);
SessionUtils.setAttribute(CollectionSheetEntryConstants.ISCENTERHIERARCHYEXISTS, clientRemovalFromGroupDetail.isCenterHierarchyExists() ? Constants.YES : Constants.NO, request);
SessionUtils.setCollectionAttribute(CustomerConstants.LOAN_OFFICER_LIST, clientRemovalFromGroupDetail.getLoanOfficers(), request);
return mapping.findForward(ActionForwards.loadGrpMemberShip_success.toString());
}
Aggregations