Examples of CategoryType


Examples of com.ebay.soap.eBLBaseComponents.CategoryType

            }

            //Get all categories
            Map<String, CategoryType> allCatsMap = this.getAllCategories();
            for (CategoryType cat : allCatsMap.values()) {
                CategoryType csCat = csCatsMap.get(cat.getCategoryID());
                if (csCat != null) {
                    //copy category name and leaf category fields, since these
                    //fields are not set when using GetCategoryCS call.
                    csCat.setCategoryName(cat.getCategoryName());
                    csCat.setLeafCategory(cat.isLeafCategory());
                } else {
                    //some category has no characteristic sets,
                    //but it may has custom item specifics
                    csCatsMap.put(cat.getCategoryID(), cat);
                }
View Full Code Here

Examples of com.ebay.soap.eBLBaseComponents.CategoryType

        try {
            List<GenericValue> attrs = delegator.findByAnd("EbayProductListingAttribute", UtilMisc.toMap("productListingId", attribute.getString("productListingId")));
            AmountType amount = new AmountType();
            AmountType shippingServiceCost = new AmountType();
            PictureDetailsType picture = new PictureDetailsType();
            CategoryType category = new CategoryType();
            ListingDesignerType designer = new ListingDesignerType();
            ShippingDetailsType shippingDetail = new ShippingDetailsType();
            ShippingServiceOptionsType shippingOption = new ShippingServiceOptionsType();
            for (int index = 0; index < attrs.size(); index++) {
                if ("Title".equals(attrs.get(index).getString("attrName"))) {
                    item.setTitle(attrs.get(index).getString("attrValue"));
                } else if ("SKU".equals(attrs.get(index).getString("attrName"))) {
                    item.setSKU(attrs.get(index).getString("attrValue"));
                } else if ("Currency".equals(attrs.get(index).getString("attrName"))) {
                    amount.setCurrencyID(CurrencyCodeType.valueOf(attrs.get(index).getString("attrValue")));
                } else if ("Description".equals(attrs.get(index).getString("attrName"))) {
                    item.setDescription(attrs.get(index).getString("attrValue"));
                } else if ("ApplicationData".equals(attrs.get(index).getString("attrName"))) {
                    item.setApplicationData(attrs.get(index).getString("attrValue"));
                } else if ("Country".equals(attrs.get(index).getString("attrName"))) {
                    item.setCountry(CountryCodeType.valueOf(attrs.get(index).getString("attrValue")));
                } else if ("PictureURL".equals(attrs.get(index).getString("attrName"))) {
                    String[] pictureUrl = {attrs.get(index).getString("attrValue")};
                    picture.setPictureURL(pictureUrl);
                } else if ("Site".equals(attrs.get(index).getString("attrName"))) {
                    item.setSite(SiteCodeType.valueOf(attrs.get(index).getString("attrValue")));
                } else if ("UseTaxTable".equals(attrs.get(index).getString("attrName"))) {
                    item.setUseTaxTable(Boolean.valueOf(attrs.get(index).getString("attrValue")));
                } else if ("BestOfferEnabled".equals(attrs.get(index).getString("attrName"))) {
                    item.setBestOfferEnabled(Boolean.valueOf(attrs.get(index).getString("attrValue")));
                } else if ("AutoPayEnabled".equals(attrs.get(index).getString("attrName"))) {
                    item.setAutoPay(Boolean.valueOf(attrs.get(index).getString("attrValue")));
                } else if ("CategoryID".equals(attrs.get(index).getString("attrName"))) {
                    category.setCategoryID(attrs.get(index).getString("attrValue"));
                } else if ("CategoryLevel".equals(attrs.get(index).getString("attrName"))) {
                    category.setCategoryLevel(Integer.parseInt(attrs.get(index).getString("attrValue")));
                } else if ("CategoryName".equals(attrs.get(index).getString("attrName"))) {
                    category.setCategoryName(attrs.get(index).getString("attrValue"));
                } else if ("CategoryParentID".equals(attrs.get(index).getString("attrName"))) {
                    String[] parent = {attrs.get(index).getString("attrValue")};
                    category.setCategoryParentID(parent );
                } else if ("LeafCategory".equals(attrs.get(index).getString("attrName"))) {
                    category.setLeafCategory(Boolean.valueOf(attrs.get(index).getString("attrValue")));
                } else if ("LSD".equals(attrs.get(index).getString("attrName"))) {
                    category.setLSD(Boolean.valueOf(attrs.get(index).getString("attrValue")));
                } else if ("ReturnsAcceptedOption".equals(attrs.get(index).getString("attrName"))) {
                    ReturnPolicyType policy = new ReturnPolicyType();
                    policy.setReturnsAcceptedOption(attrs.get(index).getString("attrValue"));
                    item.setReturnPolicy(policy);
                } else if ("LayoutID".equals(attrs.get(index).getString("attrName"))) {
View Full Code Here

Examples of com.ebay.soap.eBLBaseComponents.CategoryType

   
    // Add identification tags.
    Integer  csID;
    String catID;
    for(i = 0; i < categories.length; i++ ) {
      CategoryType cat = categories[i];
      catID = cat.getCategoryID();
      if( catID == null ) {
        throw new SdkException("Category ID is not set for the category.");
      }

      CharacteristicsSetType[] sets = cat.getCharacteristicsSets();
      if( sets == null || sets.length == 0 ) {
        throw new SdkException("CharacteristicsSet is not set for the category.");
      }
        csID = sets[0].getAttributeSetID();

    ExtendedProductFinderIDType[] prodFinders = cat.getProductFinderIDs();
    if(prodFinders != null && prodFinders.length > 0) {
      for(int k = 0; k < prodFinders.length; k++) {
        pfIdSet.add(prodFinders[k].getProductFinderID());
      }
    }  
View Full Code Here

Examples of com.ebay.soap.eBLBaseComponents.CategoryType

    return html;
  }

  private CategoryType extractOneCat(String catCsName, Map request) throws SdkException, Exception {
    CategoryType cat = null;

    Object obj = request.get(catCsName);
    if (obj != null)
    {
      String cat_pf = ((String[])obj)[0];

      String[] delim = cat_pf.split("_");
      if( delim == null || delim.length != 2 ) {
        throw new SdkException("Invalid PF_ID_TAG tag found in the query string array.");
      }
      String pfID = delim[0];
      String catID = delim[0];
      int csID = Integer.parseInt(delim[1]);

      if( pfID.length() > 0 ) {
        cat = new CategoryType();
        cat.setCategoryID(catID);

        CharacteristicsSetType cs = new CharacteristicsSetType();
        cs.setAttributeSetID(new Integer(csID));
        cat.setCharacteristicsSets(new CharacteristicsSetType[] {cs});
      }
    }

    return cat;
  }
View Full Code Here

Examples of com.ebay.soap.eBLBaseComponents.CategoryType

    return cat;
  }

  static CategoryType findCategoryByProductFinderID(CategoryType[] cats, int pfid) {
    for(int i = 0; i < cats.length; i++ ) {
      CategoryType cat = cats[i];
      ExtendedProductFinderIDType[] prodFinders = cat.getProductFinderIDs();
      boolean hasPF = prodFinders != null && prodFinders.length > 0;
         if(!hasPF) {
           continue;
         }
        for(int j = 0; i < prodFinders.length; j++) {
View Full Code Here

Examples of com.ebay.soap.eBLBaseComponents.CategoryType

    ArrayList<CategoryType> catsList = new ArrayList<CategoryType>();

    for (int ordinal = 0; ; ordinal++) {
      String ordStr = String.valueOf(ordinal);
      CategoryType cat = extractOneCat(PF_ID_TAG + ordStr, nameValues);
      if ( cat != null) {
        catsList.add(cat);
      }
      else
        break;
    }

    //
    CategoryType cats[] = new CategoryType[catsList.size()];
    for(int i = 0; i < catsList.size(); i++ ) {
      cats[i] = (CategoryType)catsList.get(i);
    }
    //
    SearchAttributeSet[] sets = ProductFinderParamParser.parseProductFinderPostData(nameValues);
    for(int i = 0; i < sets.length; i++ )
    {
      SearchAttributeSet set = sets[i];
      CategoryType cat = findCategoryByProductFinderID(cats, set.getProductFinderID());
//      CategoryType cat = cats[0];

      if( cat == null ) {
        throw new SdkException("findCategoryByProductFinderID failed.");
      }
      set.setCategoryID(Integer.parseInt(cat.getCategoryID()));
      //set.setCategoryOrdinal(i);
//     set.setProductFinderID(cat.getProductFinderID().intValue());

      // Set to the first CSID.
      CharacteristicsSetType[] css = cat.getCharacteristicsSets();
      if( css != null && css.length > 0 )
        set.setAttributeSetID(css[0].getAttributeSetID().intValue());
    }

    return sets;
View Full Code Here

Examples of com.ebay.soap.eBLBaseComponents.CategoryType

      if(cats == null || cats.length == 0) {
        vcsIdMap.put(Integer.valueOf("-1"), Integer.valueOf("-1")); // dummy value
        return vcsIdMap;
      }
      for(int i = 0; i < cats.length; i++) {
        CategoryType cat = cats[i];
        CharacteristicsSetType[] sets = cat.getCharacteristicsSets();
        if(sets != null && sets.length > 0)
          vcsIdMap.put(Integer.valueOf(cat.getCategoryID()), sets);
      }
      return vcsIdMap;
    }
View Full Code Here

Examples of lineage2.gameserver.model.worldstatistics.CategoryType

      statement = con.prepareStatement(SELECT_PERSONAL_STATISTIC);
      statement.setInt(1, charId);
      rset = statement.executeQuery();
      while (rset.next())
      {
        CategoryType categoryType = CategoryType.getCategoryById(rset.getInt(1), rset.getInt(2));
        statistics.add(new CharacterStatisticElement(categoryType, rset.getLong(3), rset.getLong(4)));
      }
    }
    catch (Exception e)
    {
View Full Code Here

Examples of lineage2.gameserver.model.worldstatistics.CategoryType

  {

    for (Element statuesElement : rootElement.elements())
    {
      int type = Integer.parseInt(statuesElement.attributeValue("type"));
      CategoryType categoryType = CategoryType.getCategoryById(type, 0);

      List<Location> locations = new ArrayList<>();
      for (Element spawnElement : statuesElement.elements())
      {
        String[] loc = spawnElement.attributeValue("loc").split(",");
View Full Code Here

Examples of lineage2.gameserver.model.worldstatistics.CategoryType

    Player activeChar = getClient().getActiveChar();

    if (activeChar == null)
      return;

    CategoryType cat = CategoryType.getCategoryById(_section, _subSection);

    if (cat == null)
    {
      _log.warn("RequestWorldStatistics: Not found category for section: " + _section + " subsection: " + _subSection);
      return;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.