Examples of ApiContext


Examples of com.alu.e3.data.model.sub.APIContext

  }


  private static final APIContext toDataModel(com.alu.e3.prov.restapi.model.ApiContext context) {
    if (context==null) throw new IllegalArgumentException("environment must not be null");
    APIContext apiContext = new APIContext();

    apiContext.setId            (context.getId());
    apiContext.setDefaultContext      (context.isDefaultContext());
    apiContext.setStatus          (toDataModel(context.getStatus()));
    apiContext.setMaxRateLimitTPMThreshold  (context.getMaxRateLimitTPMThreshold());
    apiContext.setMaxRateLimitTPMWarning  (context.getMaxRateLimitTPMWarning());
    apiContext.setMaxRateLimitTPSThreshold  (context.getMaxRateLimitTPSThreshold());
    apiContext.setMaxRateLimitTPSWarning  (context.getMaxRateLimitTPSWarning());
    if (context.getLoadBalancing() != null)
      apiContext.setLoadBalancing        (toDataModel(context.getLoadBalancing()));

    // Since the addition of MO call support
    // We can have no TargetHosts
    if (context.getTargetHosts()!=null)
      apiContext.getTargetHosts().addAll    (BeanConverterUtil.<TargetHost, com.alu.e3.prov.restapi.model.TargetHost>toDataModels(context.getTargetHosts()));

    return apiContext;
  }
View Full Code Here

Examples of com.alu.e3.prov.restapi.model.ApiContext

  }

  private void setupExchange(Exchange exchange, ProvisionAuthentication auth){
    Api api = new Api();

    ApiContext env = new ApiContext();
    env.setId("test");

    api.setType(ApiType.PASS_THROUGH);
    api.setContexts(Arrays.asList(env));

    List<TargetHost> targetList = new ArrayList<TargetHost>();

    api.setEndpoint("www.yahoo.fr");

    TargetHost to1 = new TargetHost();
    to1.setUrl("http://www.google.com");
    targetList.add(to1);

    TargetHost to2 = new TargetHost();
    to2.setUrl("http://www.google.com?toto=tutu");
    targetList.add(to2);

    TargetHost to3 = new TargetHost();
    to3.setUrl("http://www.google.com?toto=tutu&tata=tete&titi=toto");
    targetList.add(to3);

    env.setTargetHosts(targetList);

    TdrEnabled tdr = new TdrEnabled();
    tdr.setEnabled("true");
    api.setTdrEnabled(tdr);
View Full Code Here

Examples of com.ebay.sdk.ApiContext

        Map <String, Object> result = FastMap.newInstance();
        try {
            String itemId = (String) context.get("itemId");
            String bestOfferId = (String) context.get("bestOfferId");
            String productStoreId = (String) context.get("productStoreId");
            ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
            DetailLevelCodeType[] detailLevel = new DetailLevelCodeType[] {
                    DetailLevelCodeType.RETURN_ALL,
                    DetailLevelCodeType.ITEM_RETURN_ATTRIBUTES,
                    DetailLevelCodeType.ITEM_RETURN_DESCRIPTION
                    };
View Full Code Here

Examples of com.ebay.sdk.ApiContext

        String price = (String) context.get("price");
        String email = (String) context.get("email");
        String quantity = (String) context.get("quantity");
        Map <String, Object> result = FastMap.newInstance();
        try {
            ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
            String[] bestOfferIDs = {offerId};
            RespondToBestOfferCall respondToBestOfferCall = new RespondToBestOfferCall(apiContext);
            respondToBestOfferCall.setItemID(itemId);
            respondToBestOfferCall.setBestOfferIDs(bestOfferIDs);
            if (contactStatus.equals("ACCEPT")) {
View Full Code Here

Examples of com.ebay.sdk.ApiContext

           apiAccount.setApplication(appID);
           apiAccount.setCertificate(certID);
           apiAccount.setDeveloper(devID);
           apiCredential.setApiAccount(apiAccount);
       }
       ApiContext apiContext = new ApiContext();
       apiContext.setApiCredential(apiCredential);
       apiContext.setApiServerUrl(apiServerUrl);
       apiContext.setApiLogging(apiLogging);
       apiContext.setErrorLanguage("en_US");
       return apiContext;
    }
View Full Code Here

Examples of com.ebay.sdk.ApiContext

        if (UtilValidate.isNotEmpty(orderHeader)) {
            String externalId = orderHeader.getString("externalId").toString();
            List<GenericValue> orderShipment = orderHeader.getRelated("OrderShipment");
            if (orderShipment.size() > 0) {
                List<GenericValue> trackingOrders = orderHeader.getRelated("TrackingCodeOrder");
                ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
                GetOrdersCall ordersCall = new GetOrdersCall(apiContext);
                OrderIDArrayType orderIdArr = new OrderIDArrayType();
                String[] orderIdStr = {""+externalId};
                orderIdArr.setOrderID(orderIdStr);
                req.setOrderIDArray(orderIdArr);
View Full Code Here

Examples of com.ebay.sdk.ApiContext

        Delegator delegator = dctx.getDelegator();
        Locale locale = (Locale) context.get("locale");
        String productStoreId = (String) context.get("productStoreId");
        List<Map<String, Object>> activeItems = FastList.newInstance();
        try {
            ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
            GetMyeBaySellingCall getMyeBaySellingCall = new GetMyeBaySellingCall(apiContext);
            ItemListCustomizationType activeList = new ItemListCustomizationType();
            getMyeBaySellingCall.setActiveList(activeList );
            DetailLevelCodeType[] level = {DetailLevelCodeType.RETURN_ALL};
            getMyeBaySellingCall.setDetailLevel(level);
View Full Code Here

Examples of com.ebay.sdk.ApiContext

        String itemId = (String) context.get("itemId");
        String buyerId = (String) context.get("buyerId");
        List<Map<String, Object>> soldItems = FastList.newInstance();
        double reservPrice = 0;
        try {
            ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
            GetSellingManagerSoldListingsCall sellingManagerSoldListings = new GetSellingManagerSoldListingsCall(apiContext);
            if (UtilValidate.isNotEmpty(filter)) {
                SellingManagerSoldListingsPropertyTypeCodeType[] filterObject = {SellingManagerSoldListingsPropertyTypeCodeType.valueOf(filter)};
                sellingManagerSoldListings.setFilter(filterObject );
            }
View Full Code Here

Examples of com.ebay.sdk.ApiContext

            DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {
                    DetailLevelCodeType.RETURN_ALL,
                    DetailLevelCodeType.ITEM_RETURN_ATTRIBUTES,
                    DetailLevelCodeType.ITEM_RETURN_DESCRIPTION
                };
            ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
            AddDisputeCall api = new AddDisputeCall(apiContext);
            api.setDetailLevel(detailLevels);
            api.setItemID(itemId);
            api.setTransactionID(transactionId);
            api.setDisputeExplanation(dect);
View Full Code Here

Examples of com.ebay.sdk.ApiContext

        GenericValue userLogin = (GenericValue) context.get("userLogin");
        Delegator delegator = dctx.getDelegator();
        Locale locale = (Locale) context.get("locale");
        String productStoreId = (String) context.get("productStoreId");
        String itemID = (String) context.get("itemId");
        ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
        try {
            DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {
                    DetailLevelCodeType.RETURN_ALL,
                    DetailLevelCodeType.ITEM_RETURN_ATTRIBUTES,
                    DetailLevelCodeType.ITEM_RETURN_DESCRIPTION
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.