use of org.mifos.framework.util.helpers.TransactionDemarcate in project head by mifos.
the class CenterCustAction method chooseOffice.
@TransactionDemarcate(saveToken = true)
public ActionForward chooseOffice(ActionMapping mapping, @SuppressWarnings("unused") ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
OnlyBranchOfficeHierarchyDto officeHierarchy = customerServiceFacade.retrieveBranchOnlyOfficeHierarchy();
SessionUtils.setAttribute(OnlyBranchOfficeHierarchyDto.IDENTIFIER, officeHierarchy, request);
SessionUtils.setAttribute(CustomerConstants.URL_MAP, null, request.getSession(false));
return mapping.findForward(ActionForwards.chooseOffice_success.toString());
}
use of org.mifos.framework.util.helpers.TransactionDemarcate in project head by mifos.
the class ChkListAction method create.
@TransactionDemarcate(validateAndResetToken = true)
public ActionForward create(ActionMapping mapping, ActionForm form, @SuppressWarnings("unused") HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
ChkListActionForm chkListActionForm = (ChkListActionForm) form;
Short stateId = getShortValue(chkListActionForm.getStateId());
String checklistName = chkListActionForm.getChecklistName();
List<String> checklistDetails = chkListActionForm.getValidCheckListDetails();
if (chkListActionForm.getIsCustomer()) {
Short levelId = getShortValue(chkListActionForm.getMasterTypeId());
this.checkListServiceFacade.createCustomerChecklist(levelId, stateId, checklistName, checklistDetails);
} else {
Short productId = getShortValue(chkListActionForm.getMasterTypeId());
this.checkListServiceFacade.createAccountChecklist(productId, stateId, checklistName, checklistDetails);
}
return mapping.findForward(ActionForwards.create_success.toString());
}
use of org.mifos.framework.util.helpers.TransactionDemarcate in project head by mifos.
the class ChkListAction method managePreview.
@TransactionDemarcate(joinToken = true)
public ActionForward managePreview(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
ChkListActionForm chkListActionForm = (ChkListActionForm) form;
List<String> details = chkListActionForm.getValidCheckListDetails();
SessionUtils.setCollectionAttribute(CheckListConstants.DETAILS, details, request);
return mapping.findForward(ActionForwards.managepreview_success.toString());
}
use of org.mifos.framework.util.helpers.TransactionDemarcate in project head by mifos.
the class ChkListAction method update.
@CloseSession
@TransactionDemarcate(validateAndResetToken = true)
public ActionForward update(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
ChkListActionForm chkListActionForm = (ChkListActionForm) form;
Short stateId = getShortValue(chkListActionForm.getStateId());
String checklistName = chkListActionForm.getChecklistName();
Short checklistStatus = getShortValue(chkListActionForm.getChecklistStatus());
List<String> details = chkListActionForm.getValidCheckListDetails();
if (chkListActionForm.getIsCustomer()) {
CustomerCheckListBO customerCheckList = (CustomerCheckListBO) SessionUtils.getAttribute(Constants.BUSINESS_KEY, request);
Short levelId = getShortValue(chkListActionForm.getMasterTypeId());
this.checkListServiceFacade.updateCustomerChecklist(customerCheckList.getChecklistId(), levelId, stateId, checklistStatus, checklistName, details);
} else {
AccountCheckListBO accountCheckList = (AccountCheckListBO) SessionUtils.getAttribute(Constants.BUSINESS_KEY, request);
Short productId = getShortValue(chkListActionForm.getMasterTypeId());
this.checkListServiceFacade.updateAccountChecklist(accountCheckList.getChecklistId(), productId, stateId, checklistStatus, checklistName, details);
}
return mapping.findForward(ActionForwards.update_success.toString());
}
use of org.mifos.framework.util.helpers.TransactionDemarcate in project head by mifos.
the class ChkListAction method preview.
@TransactionDemarcate(joinToken = true)
public ActionForward preview(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
ChkListActionForm chkListActionForm = (ChkListActionForm) form;
List<String> details = chkListActionForm.getValidCheckListDetails();
SessionUtils.setCollectionAttribute(CheckListConstants.DETAILS, details, request);
Short masterTypeId = getShortValue(chkListActionForm.getMasterTypeId());
Short stateId = getShortValue(chkListActionForm.getStateId());
boolean isCustomer = chkListActionForm.getIsCustomer();
this.checkListServiceFacade.validateIsValidCheckListState(masterTypeId, stateId, isCustomer);
return mapping.findForward(ActionForwards.preview_success.toString());
}
Aggregations