Package com.jada.admin

Examples of com.jada.admin.AdminBean


    public ActionForward save(ActionMapping actionMapping,
            ActionForm actionForm,
            HttpServletRequest request,
            HttpServletResponse response) throws Throwable {
      InvoiceMaintActionForm form = (InvoiceMaintActionForm) actionForm;
      AdminBean adminBean = getAdminBean(request);
      User user = adminBean.getUser();
    EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
    OrderHeader orderHeader = (OrderHeader) em.find(OrderHeader.class, Format.getLong(form.getOrderHeaderId()));
    getMissingFormInformation(form, adminBean.getSiteId());

      String invoiceHeaderId = form.getInvoiceHeaderId();
      InvoiceHeader invoiceHeader = null;
      if (!Format.isNullOrEmpty(invoiceHeaderId)) {
        invoiceHeader = (InvoiceHeader) em.find(InvoiceHeader.class, Format.getLong(form.getInvoiceHeaderId()));
View Full Code Here


            ActionForm actionForm,
            HttpServletRequest request,
            HttpServletResponse response) throws Throwable {
      InvoiceMaintActionForm form = (InvoiceMaintActionForm) actionForm;
    MessageResources resources = this.getResources(request);
      AdminBean adminBean = getAdminBean(request);
      User user = adminBean.getUser();
    EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
    OrderHeader orderHeader = (OrderHeader) em.find(OrderHeader.class, Format.getLong(form.getOrderHeaderId()));
     
      InvoiceHeader invoiceHeader = (InvoiceHeader) em.find(InvoiceHeader.class, Format.getLong(form.getInvoiceHeaderId()));
      InvoiceEngine invoiceEngine = new InvoiceEngine(invoiceHeader, user);
View Full Code Here

    public ActionForward capture(ActionMapping actionMapping,
            ActionForm actionForm,
            HttpServletRequest request,
            HttpServletResponse response) throws Throwable {
      InvoiceMaintActionForm form = (InvoiceMaintActionForm) actionForm;
      AdminBean adminBean = getAdminBean(request);
      User user = adminBean.getUser();
    EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
    OrderHeader orderHeader = (OrderHeader) em.find(OrderHeader.class, Format.getLong(form.getOrderHeaderId()));
    getMissingFormInformation(form, adminBean.getSiteId());

      String invoiceHeaderId = form.getInvoiceHeaderId();
      InvoiceHeader invoiceHeader = null;
      if (!Format.isNullOrEmpty(invoiceHeaderId)) {
        invoiceHeader = (InvoiceHeader) em.find(InvoiceHeader.class, Format.getLong(form.getInvoiceHeaderId()));
View Full Code Here

    public ActionForward voidOrder(ActionMapping actionMapping,
            ActionForm actionForm,
            HttpServletRequest request,
            HttpServletResponse response) throws Throwable {
      InvoiceMaintActionForm form = (InvoiceMaintActionForm) actionForm;
      AdminBean adminBean = getAdminBean(request);
      User user = adminBean.getUser();
    EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
    OrderHeader orderHeader = (OrderHeader) em.find(OrderHeader.class, Format.getLong(form.getOrderHeaderId()));
    InvoiceHeader invoiceHeader = (InvoiceHeader) em.find(InvoiceHeader.class, Format.getLong(form.getInvoiceHeaderId()));
    getMissingFormInformation(form, adminBean.getSiteId());

      InvoiceEngine invoiceEngine = new InvoiceEngine(invoiceHeader, user);
      try {
        invoiceEngine.voidOrder();
        invoiceEngine.saveOrder();
View Full Code Here

    OrderHeader orderHeader = (OrderHeader) em.find(OrderHeader.class, Format.getLong(form.getOrderHeaderId()));
    InvoiceHeader invoiceHeader = (InvoiceHeader) em.find(InvoiceHeader.class, Format.getLong(form.getInvoiceHeaderId()));
    getMissingFormInformation(form, getAdminBean(request).getSiteId());
      String orderTrackingMessage = form.getOrderTrackingMessage();
      if (!Format.isNullOrEmpty(orderTrackingMessage)) {
        AdminBean adminBean = getAdminBean(request);
        User user = adminBean.getUser();
        OrderTracking orderTracking = new OrderTracking();
        orderTracking.setOrderTrackingCode("");
        orderTracking.setOrderTrackingMessage(orderTrackingMessage);
        if (form.isOrderTrackingInternal()) {
          orderTracking.setOrderTrackingInternal(String.valueOf(Constants.VALUE_YES));
View Full Code Here

            ActionForm actionForm,
            HttpServletRequest request,
            HttpServletResponse response) throws Throwable {
      InvoiceMaintActionForm form = (InvoiceMaintActionForm) actionForm;
    EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
    AdminBean adminBean = getAdminBean(request);
    User user = adminBean.getUser();
      OrderHeader orderHeader = (OrderHeader) em.find(OrderHeader.class, Format.getLong(form.getOrderHeaderId()));
    InvoiceHeader invoiceHeader = (InvoiceHeader) em.find(InvoiceHeader.class, Format.getLong(form.getInvoiceHeaderId()));
      OrderTrackingDisplayForm trackingForms[] = form.getOrderTrackings();
      for (int i = 0 ; i < trackingForms.length; i++) {
        OrderTracking orderTracking = (OrderTracking) em.find(OrderTracking.class, Format.getLong(trackingForms[i].getOrderTrackingId()));
View Full Code Here

    CustomAttributeMaintActionForm form = (CustomAttributeMaintActionForm) actionForm;
    if (form.getMode().equals("C")) {
      insertMode = true;
    }

    AdminBean adminBean = getAdminBean(request);
    Site site = adminBean.getSite();
    initSiteProfiles(form, site);
    CustomAttribute customAttribute = new CustomAttribute();
    if (!insertMode) {
      customAttribute = CustomAttributeDAO.load(site.getSiteId(), Format.getLong(form.getCustomAttribId()));
    }

    ActionMessages errors = validate(form, request);
    if (errors.size() != 0) {
      saveMessages(request, errors);
      return mapping.findForward("error");
    }

    if (insertMode) {
      customAttribute.setRecCreateBy(adminBean.getUser().getUserId());
      customAttribute.setRecCreateDatetime(new Date(System.currentTimeMillis()));
      form.setCustomAttribDataTypeCodeDesc(resources.getMessage("customAttrib.dataTypeCode." + form.getCustomAttribDataTypeCode()));
      form.setCustomAttribTypeCodeDesc(resources.getMessage("customAttrib.typeCode." + form.getCustomAttribTypeCode()));
     
      CustomAttributeLanguage customAttribLanguage = new CustomAttributeLanguage();
      customAttribute.setSystemRecord(Constants.VALUE_NO);
      customAttribLanguage.setRecCreateBy(adminBean.getUser().getUserId());
      customAttribLanguage.setRecCreateDatetime(new Date(System.currentTimeMillis()));
        SiteProfileClass siteProfileClass = (SiteProfileClass) em.find(SiteProfileClass.class, form.getSiteProfileClassDefaultId());
        customAttribLanguage.setSiteProfileClass(siteProfileClass);
        customAttribLanguage.setCustomAttribute(customAttribute);
        customAttribute.setCustomAttributeLanguage(customAttribLanguage);
        customAttribute.getCustomAttributeLanguages().add(customAttribLanguage);
    }
    customAttribute.setSite(site);
    customAttribute.setCustomAttribName(form.getCustomAttribName());
    customAttribute.setRecUpdateBy(adminBean.getUser().getUserId());
    customAttribute.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
   
    if (form.isSiteProfileClassDefault() && form.isSiteCurrencyClassDefault()) {
      saveDefault(customAttribute, form, adminBean);
    }
View Full Code Here

            ActionForm actionForm,
            HttpServletRequest request,
            HttpServletResponse response) throws Exception {
     
      EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
        AdminBean adminBean = getAdminBean(request);
   
        String sql = "select   tax " +
               "from     Tax tax " +
               "left     join tax.site site " +
               "where    site.siteId = :siteId " +
               "order    by tax.taxLanguage.taxName ";
        Query query = em.createQuery(sql);
        query.setParameter("siteId", adminBean.getSite().getSiteId());
        Iterator<?> iterator = query.getResultList().iterator();
      JSONEscapeObject jsonResult = new JSONEscapeObject();
      Vector<JSONEscapeObject> vector = new Vector<JSONEscapeObject>();
        while (iterator.hasNext()) {
          Tax tax = (Tax) iterator.next();
View Full Code Here

        HttpServletRequest request,
        HttpServletResponse response)
    throws Throwable {
   
    EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
    AdminBean adminBean = getAdminBean(request);
    Site site = adminBean.getSite();
    JSONEscapeObject jsonResult = new JSONEscapeObject();
    CustomAttributeMaintActionForm form = (CustomAttributeMaintActionForm) actionForm;
   
    String customAttribOptionIds[] = form.getCustomAttribOptionIds();
    if (customAttribOptionIds != null) {
View Full Code Here

        ActionForm actionForm,
        HttpServletRequest request,
        HttpServletResponse response)
    throws Throwable {
    CustomAttributeMaintActionForm form = (CustomAttributeMaintActionForm) actionForm;
    AdminBean adminBean = getAdminBean(request);
    Site site = adminBean.getSite();
    initSiteProfiles(form, site);
 
    Long customAttribId = Format.getLong(form.getCustomAttribId());
    CustomAttribute customAttribute = CustomAttributeDAO.load(site.getSiteId(), customAttribId);
    JSONEscapeObject jsonResult = new JSONEscapeObject();
View Full Code Here

TOP

Related Classes of com.jada.admin.AdminBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.