public final Response executeCommand( Object inputPar, UserSessionParameters userSessionPars, HttpServletRequest request, HttpServletResponse response, HttpSession userSession, ServletContext context) { try { Object[] pars = (Object[]) inputPar; String companyCodeSys01 = (String) pars[0]; String warehouseCodeWAR01 = (String) pars[1]; BigDecimal progressiveWAR06 = (BigDecimal) pars[2]; Inventories bean = (Inventories) JAIOBeanFactory.getInstance().getBean(Inventories.class); Response answer = bean.confirmInventory( companyCodeSys01, warehouseCodeWAR01, progressiveWAR06, ((JAIOUserSessionParameters) userSessionPars).getServerLanguageId(), userSessionPars.getUsername()); return answer; } catch (Throwable ex) { Logger.error( userSessionPars.getUsername(), this.getClass().getName(), "executeCommand", "Error while processing request", ex); return new ErrorResponse(ex.getMessage()); } }
public final Response executeCommand( Object inputPar, UserSessionParameters userSessionPars, HttpServletRequest request, HttpServletResponse response, HttpSession userSession, ServletContext context) { ArrayList vos = (ArrayList) inputPar; try { ItemDiscounts bean = (ItemDiscounts) JAIOBeanFactory.getInstance().getBean(ItemDiscounts.class); Response answer = bean.deleteItemDiscounts( vos, ((JAIOUserSessionParameters) userSessionPars).getServerLanguageId(), userSessionPars.getUsername()); return answer; } catch (Throwable ex) { Logger.error( userSessionPars.getUsername(), this.getClass().getName(), "executeCommand", "Error while processing request", ex); return new ErrorResponse(ex.getMessage()); } }
public final Response executeCommand( Object inputPar, UserSessionParameters userSessionPars, HttpServletRequest request, HttpServletResponse response, HttpSession userSession, ServletContext context) { String companyCode = (String) inputPar; try { Companies bean = (Companies) JAIOBeanFactory.getInstance().getBean(Companies.class); Response answer = bean.loadCompany( companyCode, ((JAIOUserSessionParameters) userSessionPars).getServerLanguageId(), userSessionPars.getUsername()); return answer; } catch (Throwable ex) { Logger.error( userSessionPars.getUsername(), this.getClass().getName(), "executeCommand", "Error while processing request", ex); return new ErrorResponse(ex.getMessage()); } }
public final Response executeCommand( Object inputPar, UserSessionParameters userSessionPars, HttpServletRequest request, HttpServletResponse response, HttpSession userSession, ServletContext context) { GridParams gridParams = (GridParams) inputPar; try { String companyCode = (String) gridParams.getOtherGridParams().get(ApplicationConsts.COMPANY_CODE_SYS01); BigDecimal progressiveHie02 = (BigDecimal) gridParams.getOtherGridParams().get(ApplicationConsts.PROGRESSIVE_HIE02); ItemFields bean = (ItemFields) JAIOBeanFactory.getInstance().getBean(ItemFields.class); Response answer = bean.loadItemFields( companyCode, progressiveHie02, ((JAIOUserSessionParameters) userSessionPars).getServerLanguageId(), userSessionPars.getUsername()); return answer; } catch (Throwable ex) { Logger.error( userSessionPars.getUsername(), this.getClass().getName(), "executeCommand", "Error while processing request", ex); return new ErrorResponse(ex.getMessage()); } }
public final Response executeCommand( Object inputPar, UserSessionParameters userSessionPars, HttpServletRequest request, HttpServletResponse response, HttpSession userSession, ServletContext context) { try { String tableName = ((Object[]) inputPar)[0].toString(); ArrayList oldVOs = (ArrayList) ((Object[]) inputPar)[1]; ArrayList newVOs = (ArrayList) ((Object[]) inputPar)[2]; VariantTypes bean = (VariantTypes) JAIOBeanFactory.getInstance().getBean(VariantTypes.class); Response answer = bean.updateVariantTypes( tableName, oldVOs, newVOs, ((JAIOUserSessionParameters) userSessionPars).getServerLanguageId(), userSessionPars.getUsername()); return answer; } catch (Throwable ex) { Logger.error( userSessionPars.getUsername(), this.getClass().getName(), "executeCommand", "Error while processing request", ex); return new ErrorResponse(ex.getMessage()); } }
public final Response executeCommand( Object inputPar, UserSessionParameters userSessionPars, HttpServletRequest request, HttpServletResponse response, HttpSession userSession, ServletContext context) { try { // retrieve internationalization settings (Resources object)... ServerResourcesFactory factory = (ServerResourcesFactory) context.getAttribute(Controller.RESOURCES_FACTORY); String serverLanguageId = ((JAIOUserSessionParameters) userSessionPars).getServerLanguageId(); String t1 = factory .getResources(serverLanguageId) .getResource("there is already another people with the same first and last name."); String t2 = factory .getResources(serverLanguageId) .getResource("there is already another organization with the same corporate name."); String imagePath = (String) ((JAIOUserSessionParameters) userSessionPars) .getAppParams() .get(ApplicationConsts.IMAGE_PATH); Subjects bean = (Subjects) JAIOBeanFactory.getInstance().getBean(Subjects.class); Response answer = null; if (inputPar instanceof PeopleVO) answer = bean.insertPeople( (PeopleVO) inputPar, t1, t2, ((JAIOUserSessionParameters) userSessionPars).getServerLanguageId(), userSessionPars.getUsername()); else answer = bean.insertOrganization( (OrganizationVO) inputPar, imagePath, t1, t2, ((JAIOUserSessionParameters) userSessionPars).getServerLanguageId(), userSessionPars.getUsername()); return answer; } catch (Throwable ex) { Logger.error( userSessionPars.getUsername(), this.getClass().getName(), "executeCommand", "Error while processing request", ex); return new ErrorResponse(ex.getMessage()); } }
public final Response executeCommand( Object inputPar, UserSessionParameters userSessionPars, HttpServletRequest request, HttpServletResponse response, HttpSession userSession, ServletContext context) { try { DetailSaleDocRowVO rowVO = (DetailSaleDocRowVO) inputPar; VariantDescriptionsVO vo = (VariantDescriptionsVO) ((JAIOUserSessionParameters) userSessionPars) .getVariantDescriptionsVO() .get(rowVO.getCompanyCodeSys01DOC02()); InsertSaleItem bean = (InsertSaleItem) JAIOBeanFactory.getInstance().getBean(InsertSaleItem.class); Response answer = bean.insertSaleItem( vo.getVariant1Descriptions(), vo.getVariant2Descriptions(), vo.getVariant3Descriptions(), vo.getVariant4Descriptions(), vo.getVariant5Descriptions(), rowVO, ((JAIOUserSessionParameters) userSessionPars).getServerLanguageId(), userSessionPars.getUsername()); return answer; } catch (Throwable ex) { Logger.error( userSessionPars.getUsername(), this.getClass().getName(), "executeCommand", "Error while processing request", ex); return new ErrorResponse(ex.getMessage()); } }