Package com.jada.content

Examples of com.jada.content.ContentBean


  public OrderHeader getOrderHeader() {
    return orderHeader;
  }

  public void sendCustSaleConfirmEmail(HttpServletRequest request, ServletContext servletContext) throws Exception {
    ContentBean contentBean = ContentLookupDispatchAction.getContentBean(request);
    SiteDomain siteDomain = contentBean.getContentSessionBean().getSiteDomain();
    Long siteProfileClassId = contentBean.getContentSessionKey().getSiteProfileClassId();
    SiteDomainLanguage siteDomainLanguage = contentBean.getContentSessionBean().getSiteDomain().getSiteDomainLanguage();
    if (!contentBean.getContentSessionBean().isSiteProfileClassDefault()) {
      for (SiteDomainLanguage language : contentBean.getContentSessionBean().getSiteDomain().getSiteDomainLanguages()) {
        if (language.getSiteProfileClass().getSiteProfileClassId().equals(siteProfileClassId)) {
          siteDomainLanguage = language;
          break;
        }
      }
    }
    SiteDomainParamBean siteDomainParamBean = SiteDomainDAO.getSiteDomainParamBean(contentBean.getContentSessionBean().getSiteDomain().getSiteDomainLanguage(), siteDomainLanguage);
    Site site = siteDomain.getSite();

    TemplateEngine engine = TemplateEngine.getInstance();
    engine.init(request, servletContext, true);
    engine.setParameter("orderHeaderId", orderHeader.getOrderHeaderId());
View Full Code Here


            HttpServletResponse response)
        throws Throwable {
     
      init(request);
      ShoppingCartActionForm form = (ShoppingCartActionForm) actionForm;
      ContentBean contentBean = getContentBean(request);
      Site site = contentBean.getContentSessionBean().getSiteDomain().getSite();
    ShoppingCart shoppingCart = ShoppingCart.getSessionInstance(request, true);
    maintainOpenOrder(request, shoppingCart);
      ActionMessages messages = new ActionMessages();
      CustomerAddress customerAddress = shoppingCart.getEstimateAddress();
      if (customerAddress != null) {
View Full Code Here

            HttpServletRequest request,
            HttpServletResponse response)
        throws Throwable {
     
      init(request);
    ContentBean contentBean = getContentBean(request);
    Site site = contentBean.getContentSessionBean().getSiteDomain().getSite();
      ShoppingCartActionForm form = (ShoppingCartActionForm) actionForm;
    ShoppingCart shoppingCart = ShoppingCart.getSessionInstance(request, true);
    ActionMessages messages = new ActionMessages();
   
      try {
      String itemAttribDetailIds[] = form.getItemAttribDetailIds();
      Vector<ItemAttributeInfo> itemAttributeInfos = new Vector<ItemAttributeInfo>();
      if (itemAttribDetailIds != null) {
        String customAttribValues[] = form.getCustomAttribValues();
        String customAttribTypeCodes[] = form.getCustomAttribTypeCodes();
        for (int i = 0; i < itemAttribDetailIds.length; i++) {
          ItemAttributeInfo itemAttributeInfo = new ItemAttributeInfo();
          itemAttributeInfo.setCustomAttribTypeCode(customAttribTypeCodes[i]);
          itemAttributeInfo.setItemAttribDetailId(Format.getLong(itemAttribDetailIds[i]));
          if (customAttribTypeCodes[i].equals(String.valueOf(Constants.CUSTOM_ATTRIBUTE_TYPE_CUST_INPUT))) {
            itemAttributeInfo.setItemAttribDetailValue(customAttribValues[i]);
          }
          else {
            itemAttributeInfo.setCustomAttribOptionId(Format.getLong(customAttribValues[i]));
          }
          itemAttributeInfos.add(itemAttributeInfo);
        }
      }
     
        Language language = contentBean.getContentSessionBean().getSiteProfile().getSiteProfileClass().getLanguage();
          String itemNauralKeys[] = form.getItemNaturalKeys();
          if (itemNauralKeys != null) {
            for (int i = 0; i < itemNauralKeys.length; i++) {
              Item item = DataApi.getInstance().getItem(site.getSiteId(), itemNauralKeys[i]);
              try {
View Full Code Here

            HttpServletRequest request,
            HttpServletResponse response)
        throws Throwable {
     
      init(request);
      ContentBean contentBean = getContentBean(request);
    Site site = contentBean.getContentSessionBean().getSiteDomain().getSite();
      ShoppingCartActionForm form = (ShoppingCartActionForm) actionForm;
      ShoppingCart shoppingCart = ShoppingCart.getSessionInstance(request, true);
      ActionMessages messages = new ActionMessages();
    shoppingCart.removeItem(form.getItemNaturalKey(), getContentBean(request));
   
View Full Code Here

            HttpServletRequest request,
            HttpServletResponse response)
        throws Throwable {
     
      init(request);
      ContentBean contentBean = getContentBean(request);
    Site site = contentBean.getContentSessionBean().getSiteDomain().getSite();
      ShoppingCartActionForm form = (ShoppingCartActionForm) actionForm;
      ShoppingCart shoppingCart = ShoppingCart.getSessionInstance(request, true);
      shoppingCart.setShippingQuoteLock(false);
    this.uplockShippingQuote(shoppingCart, Constants.ORDER_STEP_REVIEWPURCHASE);
      ActionMessages messages = new ActionMessages();
View Full Code Here

            HttpServletRequest request,
            HttpServletResponse response)
        throws Throwable {
     
      init(request);
      ContentBean contentBean = getContentBean(request);
    Site site = contentBean.getContentSessionBean().getSiteDomain().getSite();
      ShoppingCartActionForm form = (ShoppingCartActionForm) actionForm;
      ShoppingCart shoppingCart = ShoppingCart.getSessionInstance(request, true);
      ActionMessages messages = new ActionMessages();
    shoppingCart.removeCoupon(Format.getLong(form.getCouponId()), getContentBean(request));
   
View Full Code Here

            HttpServletRequest request,
            HttpServletResponse response)
        throws Throwable {
     
      init(request);
      ContentBean contentBean = getContentBean(request);
    Site site = contentBean.getContentSessionBean().getSiteDomain().getSite();
      ShoppingCartActionForm form = (ShoppingCartActionForm) actionForm;
      ShoppingCart shoppingCart = ShoppingCart.getSessionInstance(request, true);
      ActionMessages messages = new ActionMessages();
      this.initCartInfo(form, site, shoppingCart, request, messages);
      boolean hasError = validateUpdateQty(form, getContentBean(request));
View Full Code Here

    public ActionForward applyCoupon(ActionMapping actionMapping,
            ActionForm actionForm,
            HttpServletRequest request,
            HttpServletResponse response)
        throws Throwable {
      ContentBean contentBean = getContentBean(request);
    Site site = contentBean.getContentSessionBean().getSiteDomain().getSite();
      ShoppingCartActionForm form = (ShoppingCartActionForm) actionForm;
      ShoppingCart shoppingCart = ShoppingCart.getSessionInstance(request, true);
      String couponCode = form.getCouponCode().toUpperCase();
    createEmptySecureTemplateInfo(request);
      ActionMessages messages = new ActionMessages();
View Full Code Here

    public ActionForward estimate(ActionMapping actionMapping,
            ActionForm actionForm,
            HttpServletRequest request,
            HttpServletResponse response)
        throws Throwable {
      ContentBean contentBean = getContentBean(request);
    Site site = contentBean.getContentSessionBean().getSiteDomain().getSite();
      ShoppingCartActionForm form = (ShoppingCartActionForm) actionForm;
      ShoppingCart shoppingCart = ShoppingCart.getSessionInstance(request, true);
      shoppingCart.setEstimateAddress(request, form.getEstimateCountryCode(), form.getEstimateStateCode(), form.getEstimateZipCode(), form.isEstimatePickUp());
      shoppingCart.recalculate(contentBean);
     
View Full Code Here

  }
*/
  static public ShoppingCart getSessionInstance(HttpServletRequest request, boolean create) throws Exception {
    HttpSession em = request.getSession();
    ShoppingCart shoppingCart = (ShoppingCart) em.getAttribute("shoppingCart");
    ContentBean contentBean = ContentLookupDispatchAction.getContentBean(request);
    if (shoppingCart == null) {
      if (!create) {
        return null;
      }
     
      shoppingCart = new ShoppingCart(contentBean);
      Customer customer = ContentLookupDispatchAction.getCustomer(request);
      if (customer != null) {
        shoppingCart.initCustomer(customer, contentBean);
      }
     
      PaymentEngine engine = PaymentManager.getPaymentEngine(contentBean.getContentSessionBean().getSiteCurrency(), request);
      if (engine != null) {
        shoppingCart.setPaymentEngine(engine);
      }
      else {
        shoppingCart.setCashPayment(true);
View Full Code Here

TOP

Related Classes of com.jada.content.ContentBean

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.