Examples of GetStoreOptionsResponseType


Examples of com.ebay.soap.eBLBaseComponents.GetStoreOptionsResponseType

        GenericValue userLogin = (GenericValue) context.get("userLogin");
        Locale locale = (Locale) context.get("locale");
        Delegator delegator = dctx.getDelegator();
        GetStoreOptionsRequestType req = null;
        StoreThemeArrayType returnedAdvancedThemeArray = null;
        GetStoreOptionsResponseType resp  = null;
        try {
            if (context.get("productStoreId") != null) {
                GetStoreOptionsCall  call = new GetStoreOptionsCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"), locale, delegator));
                req = new GetStoreOptionsRequestType();

                resp = (GetStoreOptionsResponseType) call.execute(req);

                if (resp != null && "SUCCESS".equals(resp.getAck().toString())) {
                    result = ServiceUtil.returnSuccess("load store advanced Theme option data success..");

                    returnedAdvancedThemeArray = resp.getAdvancedThemeArray();

                    int i = 0;
                    List<Map<String,Object>> themeList = FastList.newInstance();
                    while (i < returnedAdvancedThemeArray.getThemeLength()) {
                        Map<String,Object> advanceTheme = FastMap.newInstance();
                        StoreThemeType storeThemeType = returnedAdvancedThemeArray.getTheme(i);
                        advanceTheme.put("storeThemeId",storeThemeType.getThemeID());
                        advanceTheme.put("storeThemeName",storeThemeType.getName());
                        themeList.add(advanceTheme);
                        i++;
                    }
                    result.put("storeThemeList", themeList);
                    int j = 0;
                    StoreColorSchemeType[] storeColorSchemeTypes = returnedAdvancedThemeArray.getGenericColorSchemeArray().getColorScheme();
                    List<Map<String,Object>> themeColorList = FastList.newInstance();
                    while (j < storeColorSchemeTypes.length) {
                        Map<String,Object> advanceColorTheme = FastMap.newInstance();
                        StoreColorSchemeType storeColorSchemeType = (StoreColorSchemeType) storeColorSchemeTypes[j];
                        advanceColorTheme.put("storeColorSchemeId", storeColorSchemeType.getColorSchemeID());
                        advanceColorTheme.put("storeColorName", storeColorSchemeType.getName());
                        themeColorList.add(advanceColorTheme);
                        j++;
                    }
                    result.put("storeAdvancedThemeColorOptList", themeColorList);
                } else {
                    EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get store option : retrieveAdvancedThemeArray", resp.getErrors(0).getLongMessage());
                }
                //this.returnedSubscriptionArray = resp.getSubscriptionArray();
            }
        } catch (ApiException e) {
            e.printStackTrace();
View Full Code Here

Examples of com.ebay.soap.eBLBaseComponents.GetStoreOptionsResponseType

        GenericValue userLogin = (GenericValue) context.get("userLogin");
        Locale locale = (Locale) context.get("locale");
        Delegator delegator = dctx.getDelegator();
        GetStoreOptionsRequestType req = null;
        StoreThemeArrayType returnedThemeArray = null;
        GetStoreOptionsResponseType resp  = null;
        try {
            if (context.get("productStoreId") != null) {
                GetStoreOptionsCall  call = new GetStoreOptionsCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"), locale, delegator));
                req = new GetStoreOptionsRequestType();

                resp = (GetStoreOptionsResponseType) call.execute(req);

                StoreColorSchemeType storeFontColorSchemeType = null;
                Map<String,Object> advanceFontTheme = FastMap.newInstance();
                if (resp != null && "SUCCESS".equals(resp.getAck().toString())) {
                    returnedThemeArray = resp.getAdvancedThemeArray();
                    int i = 0;
                    List<Map<String,Object>> themeList = FastList.newInstance();

                    StoreColorSchemeType[] storeColorSchemeTypes = returnedThemeArray.getGenericColorSchemeArray().getColorScheme();
                    while (i < storeColorSchemeTypes.length) {

                        StoreColorSchemeType storeColorSchemeType = (StoreColorSchemeType) storeColorSchemeTypes[i];
                        StoreFontType storeFontType =  storeColorSchemeType.getFont();
                        advanceFontTheme.put("storeFontTypeNameFaceColor",storeFontType.getNameColor());
                        int j = 0;
                        StoreFontFaceCodeType[] storeFontNameFaceCodeTypes = storeFontType.getNameFace().values();
                        List<Map<String,Object>> nameFaces = FastList.newInstance();
                        while (j < storeFontNameFaceCodeTypes.length) {
                            Map<String,Object> storeFontNameFaceCodeTypeMap = FastMap.newInstance();
                            StoreFontFaceCodeType storeFontNameFaceCodeType = (StoreFontFaceCodeType) storeFontNameFaceCodeTypes[j];
                            storeFontNameFaceCodeTypeMap.put("storeFontValue", storeFontNameFaceCodeType.value());
                            storeFontNameFaceCodeTypeMap.put("storeFontName", storeFontNameFaceCodeType.name());
                            nameFaces.add(storeFontNameFaceCodeTypeMap);
                            j++;
                        }
                        advanceFontTheme.put("storeFontTypeFontFaceList",nameFaces);
                        j = 0;
                        StoreFontSizeCodeType[] storeFontSizeCodeTypes =  storeFontType.getNameSize().values();
                        List<Map<String,Object>> sizeFaces = FastList.newInstance();
                        while (j < storeFontSizeCodeTypes.length) {
                            Map<String,Object> storeFontSizeCodeTypeMap = FastMap.newInstance();
                            StoreFontSizeCodeType storeFontSizeCodeType = (StoreFontSizeCodeType) storeFontSizeCodeTypes[j];
                            storeFontSizeCodeTypeMap.put("storeFontSizeValue", storeFontSizeCodeType.value());
                            storeFontSizeCodeTypeMap.put("storeFontSizeName", storeFontSizeCodeType.name());
                            sizeFaces.add(storeFontSizeCodeTypeMap);
                            j++;
                        }
                        advanceFontTheme.put("storeFontTypeSizeFaceList", sizeFaces);

                        advanceFontTheme.put("storeFontTypeTitleColor", storeFontType.getTitleColor());
                        j = 0;
                        StoreFontFaceCodeType[] storeFontTypeTitleFaces = storeFontType.getTitleFace().values();
                        List<Map<String,Object>> titleFaces = FastList.newInstance();
                        while (j < storeFontTypeTitleFaces.length) {
                            Map<String,Object> storeFontTypeTitleFaceMap = FastMap.newInstance();
                            StoreFontFaceCodeType storeFontTypeTitleFace = (StoreFontFaceCodeType) storeFontTypeTitleFaces[j];
                            storeFontTypeTitleFaceMap.put("storeFontValue", storeFontTypeTitleFace.value());
                            storeFontTypeTitleFaceMap.put("storeFontName", storeFontTypeTitleFace.name());
                            titleFaces.add(storeFontTypeTitleFaceMap);
                            j++;
                        }
                        advanceFontTheme.put("storeFontTypeFontTitleList",titleFaces);

                        j = 0;
                        StoreFontSizeCodeType[] storeTitleSizeCodeTypes =  storeFontType.getTitleSize().values();
                        List<Map<String,Object>> titleSizes = FastList.newInstance();
                        while (j < storeTitleSizeCodeTypes.length) {
                            Map<String,Object> storeFontSizeCodeTypeMap = FastMap.newInstance();
                            StoreFontSizeCodeType storeFontSizeCodeType = (StoreFontSizeCodeType) storeTitleSizeCodeTypes[j];
                            storeFontSizeCodeTypeMap.put("storeFontSizeValue", storeFontSizeCodeType.value());
                            storeFontSizeCodeTypeMap.put("storeFontSizeName", storeFontSizeCodeType.name());
                            titleSizes.add(storeFontSizeCodeTypeMap);
                            j++;
                        }
                        advanceFontTheme.put("storeFontSizeTitleList",titleSizes);


                        advanceFontTheme.put("storeFontTypeDescColor", storeFontType.getDescColor());
                        j = 0;
                        StoreFontFaceCodeType[] storeFontTypeDescFaces = storeFontType.getDescFace().values();
                        List<Map<String,Object>> descFaces = FastList.newInstance();
                        while (j < storeFontTypeDescFaces.length) {
                            Map<String,Object> storeFontTypeDescFaceMap = FastMap.newInstance();
                            StoreFontFaceCodeType storeFontTypeDescFace = (StoreFontFaceCodeType) storeFontTypeDescFaces[j];
                            storeFontTypeDescFaceMap.put("storeFontValue", storeFontTypeDescFace.value());
                            storeFontTypeDescFaceMap.put("storeFontName", storeFontTypeDescFace.name());
                            descFaces.add(storeFontTypeDescFaceMap);
                            j++;
                        }
                        advanceFontTheme.put("storeFontTypeFontDescList",descFaces);

                        j = 0;
                        StoreFontSizeCodeType[] storeDescSizeCodeTypes =   storeFontType.getDescSize().values();
                        List<Map<String,Object>> descSizes = FastList.newInstance();
                        while (j < storeDescSizeCodeTypes.length) {
                            Map<String,Object> storeFontSizeCodeTypeMap = FastMap.newInstance();
                            StoreFontSizeCodeType storeFontSizeCodeType = (StoreFontSizeCodeType) storeDescSizeCodeTypes[j];
                            storeFontSizeCodeTypeMap.put("storeFontSizeValue", storeFontSizeCodeType.value());
                            storeFontSizeCodeTypeMap.put("storeFontSizeName", storeFontSizeCodeType.name());
                            descSizes.add(storeFontSizeCodeTypeMap);
                            j++;
                        }
                        advanceFontTheme.put("storeDescSizeList",descSizes);
                        i++;
                    }
                    result = ServiceUtil.returnSuccess("load store Basic Theme option data success..");
                    result.put("advanceFontTheme", advanceFontTheme);
                } else {
                    EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get store option : retrieveStoreFontTheme", resp.getErrors(0).getLongMessage());
                }
            }
        } catch (ApiException e) {
            e.printStackTrace();
        } catch (SdkSoapException e) {
View Full Code Here

Examples of com.ebay.soap.eBLBaseComponents.GetStoreOptionsResponseType

        HttpSession session = request.getSession(true);
        GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
        Delegator delegator = (Delegator) request.getAttribute("delegator");
        LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
        GetStoreOptionsRequestType req = null;
        GetStoreOptionsResponseType resp  = null;
        StoreThemeArrayType returnedBasicThemeArray = null;

        try {
            Map paramMap = UtilHttp.getCombinedMap(request);
            if (paramMap.get("productStoreId") != null) {
                String themeId = (String)paramMap.get("themeId");

                GetStoreOptionsCall  call = new GetStoreOptionsCall(EbayStoreHelper.getApiContext((String)paramMap.get("productStoreId"), locale, delegator));
                req = new GetStoreOptionsRequestType();

                resp = (GetStoreOptionsResponseType) call.execute(req);
                if (resp != null && "SUCCESS".equals(resp.getAck().toString())) {

                    returnedBasicThemeArray = resp.getBasicThemeArray();
                    StoreThemeType[] storeBasicTheme = returnedBasicThemeArray.getTheme();

                    int i=0;
                    String colorSchemeId = themeId.substring(themeId.indexOf("-")+1);
                    themeId = themeId.substring(0,themeId.indexOf("-"));

                    Map<String,Object> storeColorSchemeMap = FastMap.newInstance();
                    while (i < storeBasicTheme.length) {

                        StoreThemeType storeThemeType = (StoreThemeType)storeBasicTheme[i];
                        if (themeId.equals(storeThemeType.getThemeID().toString())) {
                            StoreColorSchemeType colorSchemeType = storeThemeType.getColorScheme();
                            if (colorSchemeType != null) {
                                if (colorSchemeId.equals(colorSchemeType.getColorSchemeID().toString())) {
                                    StoreColorType storeColor = colorSchemeType.getColor();
                                    storeColorSchemeMap.put("storeColorAccent",storeColor.getAccent());
                                    storeColorSchemeMap.put("storeColorPrimary",storeColor.getPrimary());
                                    storeColorSchemeMap.put("storeColorSecondary",storeColor.getSecondary());

                                    // get font,size and color
                                    StoreFontType storeFontType = colorSchemeType.getFont();
                                    storeColorSchemeMap.put("storeFontTypeNameFaceColor",storeFontType.getNameColor());
                                    storeColorSchemeMap.put("storeFontTypeFontFaceValue",storeFontType.getNameFace().value());
                                    storeColorSchemeMap.put("storeFontTypeSizeFaceValue",storeFontType.getNameSize().value());

                                    storeColorSchemeMap.put("storeFontTypeTitleColor",storeFontType.getTitleColor());
                                    storeColorSchemeMap.put("storeFontTypeFontTitleValue",storeFontType.getTitleFace().value());
                                    storeColorSchemeMap.put("storeFontSizeTitleValue",storeFontType.getTitleSize().value());

                                    storeColorSchemeMap.put("storeFontTypeDescColor",storeFontType.getDescColor());
                                    storeColorSchemeMap.put("storeFontTypeFontDescValue",storeFontType.getDescFace().value());
                                    storeColorSchemeMap.put("storeDescSizeValue",storeFontType.getDescSize().value());
                                    toJsonObject(storeColorSchemeMap,response);

                                    break;
                                }
                            }
                        }
                        i++;
                    }
                } else {
                    EbayStoreHelper.createErrorLogMessage(userLogin, dispatcher, paramMap.get("productStoreId").toString(), resp.getAck().toString(), "GetStoreOptionsCall : retrieveThemeColorSchemeByThemeId", resp.getErrors(0).getLongMessage());
                }
            }
        } catch (ApiException e) {
            e.printStackTrace();
            return "error";
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.