Package com.jada.xml.ie

Examples of com.jada.xml.ie.ItemSimple


            String output = formatHtmlMessage(lineNumber, input, messages);
            form.setMessageText(output);
            return actionMapping.findForward("error");
          }
         
          ItemSimple itemSimple = transformation.fromImport(input);
          messages = itemSimple.validate();
          if (messages.length > 0) {
            String output = formatHtmlMessage(lineNumber, input, messages);
            form.setMessageText(output);
            return actionMapping.findForward("error");
          }
         
          itemSimple.save(getAdminBean(request));
        }
        catch (ItemSaveException e) {
          String output = formatHtmlMessage(lineNumber, StringEscapeUtils.escapeHtml(input), e.getMessage());
          form.setMessageText(output);
          em.getTransaction().rollback();
View Full Code Here


        for (SiteProfileClass siteProfileClass : siteProfileClasses) {
          for (SiteCurrencyClass siteCurrencyClass : siteCurrencyClasses) {
            String result = "";
            try {
              com.jada.xml.ie.Item i = itemApi.export(item);
              ItemSimple itemSimpleXml = new ItemSimple(i,
                                    siteProfileClass.getSiteProfileClassId(),
                                    siteProfileClass.getSiteProfileClassName(),
                                    siteCurrencyClass.getSiteCurrencyClassId(),
                                    siteCurrencyClass.getSiteCurrencyClassName());
              result = transformation.toExport(itemSimpleXml);
View Full Code Here

    m.copyInto(messages);
    return messages;
  }
 
  public ItemSimple fromImport(String input) throws Exception {
    ItemSimple itemSimple = new ItemSimple();
    ItemSimpleCategory categories[] = new ItemSimpleCategory[counterCategory + 1];
    for (int i = 0; i < categories.length; i++) {
      categories[i] = new ItemSimpleCategory();
    }
    itemSimple.setCategories(categories);
    ItemSimple itemsRelated[] = new ItemSimple[counterItemRelated + 1];
    for (int i = 0; i < itemsRelated.length; i++) {
      itemsRelated[i] = new ItemSimple();
    }
    itemSimple.setItemsRelated(itemsRelated);
    ItemSimple itemsUpSell[] = new ItemSimple[counterItemUpSell + 1];
    for (int i = 0; i < itemsUpSell.length; i++) {
      itemsUpSell[i] = new ItemSimple();
    }
    itemSimple.setItemsUpSell(itemsUpSell);
    ItemSimple itemsCrossSell[] = new ItemSimple[counterItemCrossSell + 1];
    for (int i = 0; i < itemsCrossSell.length; i++) {
      itemsCrossSell[i] = new ItemSimple();
    }
    itemSimple.setItemsCrossSell(itemsCrossSell);
    ItemSimpleItemTierPrice itemTierPrices[] = new ItemSimpleItemTierPrice[counterItemTierPrice + 1];
    for (int i = 0; i < itemTierPrices.length; i++) {
      itemTierPrices[i] = new ItemSimpleItemTierPrice();
View Full Code Here

      String input = reader.readLine();
      if (input == null) {
        break;
      }
      ItemSimpleCsvTransformation transformation = new ItemSimpleCsvTransformation();
      ItemSimple simple = transformation.fromImport(input);
      System.out.println(simple);
    }
  }
View Full Code Here

  public ItemSimple fromImport(String input) throws Exception {
    Unmarshaller unmarshaller = xmlContext.createUnmarshaller();
    unmarshaller.setClass(ItemSimple.class);
    StringReader reader = new StringReader(input);
    ItemSimple itemSimple = (ItemSimple) unmarshaller.unmarshal(reader);
    return itemSimple;
  }
View Full Code Here

TOP

Related Classes of com.jada.xml.ie.ItemSimple

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.