This is an automated email from the ASF dual-hosted git repository.
surajk pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git The following commit(s) were added to refs/heads/trunk by this push: new f8e17a5 Improved: Corrected remaining ', is not followed by whitespace' checkstyle errors in plugin component. (OFBIZ-11805) f8e17a5 is described below commit f8e17a5b00b6467c403c50348f3777a7b03dfdd1 Author: Suraj Khurana <[hidden email]> AuthorDate: Tue Jul 7 14:59:53 2020 +0530 Improved: Corrected remaining ', is not followed by whitespace' checkstyle errors in plugin component. (OFBIZ-11805) --- .../ofbiz/assetmaint/FixedAssetMaintServices.java | 2 +- .../ofbiz/ebaystore/EbayBestOfferAutoPref.java | 10 ++-- .../org/apache/ofbiz/ebaystore/EbayEvents.java | 10 ++-- .../org/apache/ofbiz/ebaystore/EbayFeedback.java | 2 +- .../java/org/apache/ofbiz/ebaystore/EbayStore.java | 67 +++++++++++----------- .../apache/ofbiz/ebaystore/EbayStoreHelper.java | 6 +- .../ebaystore/EbayStoreInventoryServices.java | 8 +-- .../java/org/apache/ofbiz/scrum/ScrumEvents.java | 2 +- .../java/org/apache/ofbiz/scrum/ScrumServices.java | 2 +- 9 files changed, 55 insertions(+), 54 deletions(-) diff --git a/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java b/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java index 5edad42..df96a32 100644 --- a/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java +++ b/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java @@ -102,7 +102,7 @@ public class FixedAssetMaintServices { itemIssuanceCtx.put("maintHistSeqId", maintHistSeqId); itemIssuanceCtx.put("quantity", issueQuantity); // Call issuance service - result = dispatcher.runSync("issueInventoryItemToFixedAssetMaint",itemIssuanceCtx); + result = dispatcher.runSync("issueInventoryItemToFixedAssetMaint", itemIssuanceCtx); if (ServiceUtil.isError(result)) { return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "AssetMaintProblemCallingService", locale), null, null, result); } diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayBestOfferAutoPref.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayBestOfferAutoPref.java index 8c41390..a2e0cfe 100644 --- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayBestOfferAutoPref.java +++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayBestOfferAutoPref.java @@ -197,10 +197,10 @@ public class EbayBestOfferAutoPref { } Map<String, Object> ebayPref = UtilMisc.<String, Object>toMap("userLogin", userLogin, "serviceName", "autoBestOffer"); - ebayPref.put("parentPrefCondId",parentPrefCondId); + ebayPref.put("parentPrefCondId", parentPrefCondId); ebayPref.put("enabled", enabled); ebayPref.put("autoPrefEnumId", "EBAY_AUTO_BEST_OFFER"); - ebayPref.put("productStoreId",productStoreId); + ebayPref.put("productStoreId", productStoreId); result = dispatcher.runSync("createEbayProductStorePref", ebayPref); if (ServiceUtil.isError(result)) { return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result)); @@ -209,19 +209,19 @@ public class EbayBestOfferAutoPref { Map<String, Object> ebayPref = UtilMisc.<String, Object>toMap("userLogin", userLogin, "serviceName", "autoBestOffer"); ebayPref.put("enabled", enabled); ebayPref.put("autoPrefEnumId", "EBAY_AUTO_BEST_OFFER"); - ebayPref.put("productStoreId",productStoreId); + ebayPref.put("productStoreId", productStoreId); result = dispatcher.runSync("updateEbayProductStorePref", ebayPref); if (ServiceUtil.isError(result)) { return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result)); } String parentPrefCondId = productStorePref.getString("parentPrefCondId"); - List<GenericValue> productPref = EntityQuery.use(delegator).from("EbayProductStorePrefCond").where("parentPrefCondId",parentPrefCondId).queryList(); + List<GenericValue> productPref = EntityQuery.use(delegator).from("EbayProductStorePrefCond").where("parentPrefCondId", parentPrefCondId).queryList(); if (productPref.size() != 0) { String[] condition = {condition1, condition2, condition3, condition4, condition5, condition6, condition7, condition8, condition9, condition10, condition11}; Map<String, Object> ebayPrefCond = UtilMisc.<String, Object>toMap("userLogin", userLogin); for (int i = 0; i < productPref.size(); i++) { - ebayPrefCond.put("prefCondId",productPref.get(i).getString("prefCondId")); + ebayPrefCond.put("prefCondId", productPref.get(i).getString("prefCondId")); ebayPrefCond.put("acceptanceCondition", condition[i]); result = dispatcher.runSync("updateEbayProductStorePrefCond", ebayPrefCond); if (ServiceUtil.isError(result)) { diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java index d02db1d..fe5c13a 100644 --- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java +++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java @@ -284,7 +284,7 @@ public class EbayEvents { request.setAttribute("productStoreId", request.getParameter("productStoreId")); return "prepare"; } - getSiteFacade(apiContext,request); + getSiteFacade(apiContext, request); } else { request.setAttribute("_ERROR_MESSAGE_","No apiContext for this account or this site please register on ebay or check you user account."); return "error"; @@ -317,7 +317,7 @@ public class EbayEvents { } if (UtilValidate.isEmpty(session.getAttribute(siteFacadeName))) { - session.setAttribute(siteFacadeName,new EbayStoreSiteFacade(apiContext)); + session.setAttribute(siteFacadeName, new EbayStoreSiteFacade(apiContext)); if (UtilValidate.isNotEmpty(session.getAttribute(siteFacadeName))) { siteFacade = (EbayStoreSiteFacade)session.getAttribute(siteFacadeName); } @@ -388,7 +388,7 @@ public class EbayEvents { } ApiContext apiContext = getApiContext(request); - sf = getSiteFacade(apiContext,request); + sf = getSiteFacade(apiContext, request); if (UtilValidate.isNotEmpty(sf)) { Map<SiteCodeType, List<CategoryType>> csCateMaps = sf.getSiteCategoriesCSMap(); List<CategoryType> csCateList = csCateMaps.get(apiContext.getSite()); @@ -445,7 +445,7 @@ public class EbayEvents { } ApiContext apiContext = getApiContext(request); - sf = getSiteFacade(apiContext,request); + sf = getSiteFacade(apiContext, request); if (UtilValidate.isNotEmpty(sf)) { Map<SiteCodeType, List<StoreCustomCategoryType>> csCateMaps = sf.getSiteStoreCategoriesMap(); csCateList = csCateMaps.get(apiContext.getSite()); @@ -497,7 +497,7 @@ public class EbayEvents { } ApiContext apiContext = getApiContext(request); - sf = getSiteFacade(apiContext,request); + sf = getSiteFacade(apiContext, request); if (UtilValidate.isNotEmpty(sf)) { Map<SiteCodeType, List<CategoryType>> csCateMaps = sf.getSiteCategoriesCSMap(); List<CategoryType> csCateList = csCateMaps.get(apiContext.getSite()); diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java index 007a658..c1af76d 100644 --- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java +++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java @@ -74,7 +74,7 @@ public class EbayFeedback { String userID = (String)resultUser.get("userLoginId"); GetFeedbackCall feedbackCall = new GetFeedbackCall(); feedbackCall.setApiContext(apiContext); - SiteCodeType siteCodeType = EbayStoreHelper.getSiteCodeType(productStoreId,locale, delegator); + SiteCodeType siteCodeType = EbayStoreHelper.getSiteCodeType(productStoreId, locale, delegator); feedbackCall.setSite(siteCodeType); feedbackCall.setUserID(userID); DetailLevelCodeType[] detailLevelCodeType = {DetailLevelCodeType.RETURN_ALL}; diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java index 83b76a3..84c5308 100644 --- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java +++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java @@ -216,7 +216,6 @@ public class EbayStore { } return outputBuilder.toString(); } - /* add/update/delete categories and child into your ebay store category */ public static Map<String,Object> exportCategoriesSelectedToEbayStore(DispatchContext dctx, Map<String,? extends Object> context) { Locale locale = (Locale) context.get("locale"); @@ -244,7 +243,8 @@ public class EbayStore { for (GenericValue catalogCategory : catalogCategories) { GenericValue productCategory = catalogCategory.getRelatedOne("ProductCategory", false); if (productCategory != null) { - String ebayCategoryId = EbayStoreHelper.retriveEbayCategoryIdByPartyId(delegator,productCategory.getString("productCategoryId"), context.get("partyId").toString()); + String ebayCategoryId = EbayStoreHelper.retriveEbayCategoryIdByPartyId(delegator, + productCategory.getString("productCategoryId"), context.get("partyId").toString()); StoreCustomCategoryType categoryType = new StoreCustomCategoryType(); if (ebayCategoryId == null) { categoryType.setName(productCategory.getString("categoryName")); @@ -318,15 +318,17 @@ public class EbayStore { for (GenericValue catalogCategory : catalogCategories) { GenericValue productCategory = catalogCategory.getRelatedOne("ProductCategory", false); if (productCategory != null) { - List<GenericValue> productParentCategoryRollupList = EntityQuery.use(delegator).from("ProductCategoryRollup").where("parentProductCategoryId",productCategory.getString("productCategoryId")).orderBy("sequenceNum ASC").queryList(); + List<GenericValue> productParentCategoryRollupList = EntityQuery.use(delegator).from("ProductCategoryRollup").where("parentProductCategoryId", productCategory.getString("productCategoryId")).orderBy("sequenceNum ASC").queryList(); for (GenericValue productParentCategoryRollup : productParentCategoryRollupList) { - String ebayParentCategoryId = EbayStoreHelper.retriveEbayCategoryIdByPartyId(delegator,productParentCategoryRollup.getString("productCategoryId"), context.get("partyId").toString()); + String ebayParentCategoryId = EbayStoreHelper.retriveEbayCategoryIdByPartyId(delegator, productParentCategoryRollup.getString("productCategoryId"), context.get("partyId").toString()); if (ebayParentCategoryId != null) { - List<GenericValue> productChildCategoryRollupList = EntityQuery.use(delegator).from("ProductCategoryRollup").where("parentProductCategoryId",productParentCategoryRollup.getString("productCategoryId")).orderBy("sequenceNum ASC").queryList(); + List<GenericValue> productChildCategoryRollupList = EntityQuery.use(delegator).from("ProductCategoryRollup") + .where("parentProductCategoryId", productParentCategoryRollup.getString("productCategoryId")) + .orderBy("sequenceNum ASC").queryList(); for (GenericValue productChildCategoryRollup : productChildCategoryRollupList) { productCategory = EntityQuery.use(delegator).from("ProductCategory").where("productCategoryId", productChildCategoryRollup.getString("productCategoryId")).queryOne(); StoreCustomCategoryType childCategoryType = new StoreCustomCategoryType(); - String ebayChildCategoryId = EbayStoreHelper.retriveEbayCategoryIdByPartyId(delegator,productCategory.getString("productCategoryId"), context.get("partyId").toString()); + String ebayChildCategoryId = EbayStoreHelper.retriveEbayCategoryIdByPartyId(delegator, productCategory.getString("productCategoryId"), context.get("partyId").toString()); if (ebayChildCategoryId == null) { childCategoryType.setName(productCategory.getString("categoryName")); listAdd.add(childCategoryType); @@ -367,7 +369,6 @@ public class EbayStore { } return result; } - public static StoreCustomCategoryType[] toStoreCustomCategoryTypeArray(List<StoreCustomCategoryType> list) { StoreCustomCategoryType[] storeCustomCategoryTypeArry = null; if (list != null && list.size() > 0) { @@ -383,8 +384,8 @@ public class EbayStore { } return storeCustomCategoryTypeArry; } - - public static Map<String, Object> excuteExportCategoryToEbayStore(SetStoreCategoriesCall call, SetStoreCategoriesRequestType req, StoreCategoryUpdateActionCodeType actionCode,Delegator delegator, String partyId,List<GenericValue> catalogCategories, Locale locale) { + public static Map<String, Object> excuteExportCategoryToEbayStore(SetStoreCategoriesCall call, SetStoreCategoriesRequestType req, + StoreCategoryUpdateActionCodeType actionCode, Delegator delegator, String partyId,List<GenericValue> catalogCategories, Locale locale) { Map<String, Object> result = new HashMap<>(); SetStoreCategoriesResponseType resp = null; try { @@ -396,9 +397,9 @@ public class EbayStore { if (actionCode.equals(StoreCategoryUpdateActionCodeType.ADD) && returnedCustomCategory != null) { StoreCustomCategoryType[] returnCategoryTypeList = returnedCustomCategory.getCustomCategory(); for (StoreCustomCategoryType returnCategoryType : returnCategoryTypeList) { - List<GenericValue> productCategoryList = EntityQuery.use(delegator).from("ProductCategory").where("categoryName",returnCategoryType.getName(),"productCategoryTypeId","EBAY_CATEGORY").queryList(); + List<GenericValue> productCategoryList = EntityQuery.use(delegator).from("ProductCategory").where("categoryName", returnCategoryType.getName(),"productCategoryTypeId","EBAY_CATEGORY").queryList(); for (GenericValue productCategory : productCategoryList) { - if (EbayStoreHelper.veriflyCategoryInCatalog(delegator, catalogCategories,productCategory.getString("productCategoryId"))) { + if (EbayStoreHelper.veriflyCategoryInCatalog(delegator, catalogCategories, productCategory.getString("productCategoryId"))) { if (EbayStoreHelper.createEbayCategoryIdByPartyId(delegator, productCategory.getString("productCategoryId"), partyId, String.valueOf(returnCategoryType.getCategoryID()))) { Debug.logInfo("Create new ProductCategoryRollup with partyId "+partyId+" categoryId "+productCategory.getString("productCategoryId")+ " and ebayCategoryId "+String.valueOf(returnCategoryType.getCategoryID()), MODULE); } @@ -797,7 +798,7 @@ public class EbayStore { //CustomListingHeader MerchDisplayCodeType merchDisplayCodeType = returnedStoreType.getMerchDisplay(); - ebayResp.put("storeMerchDisplay",merchDisplayCodeType.value()); + ebayResp.put("storeMerchDisplay", merchDisplayCodeType.value()); MerchDisplayCodeType[] merchDisplayCodeTypeList = MerchDisplayCodeType.values(); if (merchDisplayCodeTypeList != null) { List<Map<String,Object>> merchDisplayCodeList = new LinkedList<>(); @@ -810,7 +811,7 @@ public class EbayStore { merchDisplayCodeList.add(merchDisplayCodeMap); i++; } - ebayResp.put("storeMerchDisplayList",merchDisplayCodeList); + ebayResp.put("storeMerchDisplayList", merchDisplayCodeList); } Calendar calendar = returnedStoreType.getLastOpenedTime(); @@ -966,7 +967,8 @@ public class EbayStore { result = ServiceUtil.returnSuccess(UtilProperties.getMessage(RESOURCE, "EbayStoreLoadLogoSuccess", locale)); result.put("storeLogoOptList", logoList); } else { - EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get store option : retrievePredesignedLogoOption", resp.getErrors(0).getLongMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), + resp.getAck().toString(), "Get store option : retrievePredesignedLogoOption", resp.getErrors(0).getLongMessage()); } } } catch (ApiException e) { @@ -978,7 +980,6 @@ public class EbayStore { } return result; } - public static Map<String,Object> retrieveBasicThemeArray(DispatchContext dctx, Map<String,Object> context) { Map<String,Object> result = new HashMap<>(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -1126,7 +1127,7 @@ public class EbayStore { nameFaces.add(storeFontNameFaceCodeTypeMap); j++; } - advanceFontTheme.put("storeFontTypeFontFaceList",nameFaces); + advanceFontTheme.put("storeFontTypeFontFaceList", nameFaces); j = 0; storeFontType.getNameSize(); StoreFontSizeCodeType[] storeFontSizeCodeTypes = StoreFontSizeCodeType.values(); @@ -1311,7 +1312,7 @@ public class EbayStore { resp = (SetStoreResponseType) call.execute(req); if (resp != null && "SUCCESS".equals(resp.getAck().toString())) { - result = ServiceUtil.returnSuccess(UtilProperties.getMessage(RESOURCE, "EbayStoreSaveSuccess",locale)); + result = ServiceUtil.returnSuccess(UtilProperties.getMessage(RESOURCE, "EbayStoreSaveSuccess", locale)); } else { result = ServiceUtil.returnError(resp.getMessage()); } @@ -1365,7 +1366,7 @@ public class EbayStore { } else { entry.put("pictureURL", null); } - entry.put("timeLeft",item.getTimeLeft()); + entry.put("timeLeft", item.getTimeLeft()); if (item.getBuyItNowPrice() != null) { entry.put("buyItNowPrice", item.getBuyItNowPrice().getValue()); } else { @@ -1557,7 +1558,9 @@ public class EbayStore { if (UtilValidate.isNotEmpty(context.get("productCategoryId"))) { GenericValue prodCategoryMember = EntityQuery.use(delegator).from("ProductCategoryMember").where("productCategoryId", context.get("productCategoryId"),"productId", context.get("productId")).filterByDate().queryFirst(); if (prodCategoryMember != null) { - GenericValue prodCategoryRole = EntityQuery.use(delegator).from("ProductCategoryRole").where("productCategoryId", prodCategoryMember.get("productCategoryId").toString(), "partyId", userLogin.get("partyId"),"roleTypeId", "EBAY_ACCOUNT").filterByDate().queryFirst(); + GenericValue prodCategoryRole = EntityQuery.use(delegator).from("ProductCategoryRole").where("productCategoryId", + prodCategoryMember.get("productCategoryId").toString(), "partyId", userLogin.get("partyId"),"roleTypeId", "EBAY_ACCOUNT") + .filterByDate().queryFirst(); if (prodCategoryRole != null) { context.put("ebayCategory", prodCategoryRole.get("comments")); } else { @@ -1570,9 +1573,13 @@ public class EbayStore { Iterator<GenericValue> prodCategoryMemberIter = prodCategoryMember.iterator(); while (prodCategoryMemberIter.hasNext()) { GenericValue prodCategory = prodCategoryMemberIter.next(); - GenericValue prodCatalogCategory = EntityQuery.use(delegator).from("ProdCatalogCategory").where("prodCatalogId", context.get("prodCatalogId"), "productCategoryId", prodCategory.get("productCategoryId").toString()).filterByDate().queryFirst(); + GenericValue prodCatalogCategory = EntityQuery.use(delegator).from("ProdCatalogCategory").where("prodCatalogId", + context.get("prodCatalogId"), "productCategoryId", prodCategory.get("productCategoryId").toString()) + .filterByDate().queryFirst(); if (prodCatalogCategory != null) { - GenericValue prodCategoryRole = EntityQuery.use(delegator).from("ProductCategoryRole").where("productCategoryId", prodCatalogCategory.get("productCategoryId").toString(), "partyId", userLogin.get("partyId"),"roleTypeId", "EBAY_ACCOUNT").filterByDate().queryFirst(); + GenericValue prodCategoryRole = EntityQuery.use(delegator).from("ProductCategoryRole").where("productCategoryId", + prodCatalogCategory.get("productCategoryId").toString(), "partyId", userLogin.get("partyId"), + "roleTypeId", "EBAY_ACCOUNT").filterByDate().queryFirst(); if (prodCategoryRole != null) { context.put("ebayCategory", prodCategoryRole.get("comments")); } else { @@ -1591,7 +1598,9 @@ public class EbayStore { StringBuffer dataItemsXml = new StringBuffer(); Map<String, Object> resultMap = ProductsExportToEbay.buildDataItemsXml(dctx, context, dataItemsXml, eBayConfigResult.get("token").toString(), product); if (!ServiceUtil.isFailure(resultMap)) { - response = postItem(eBayConfigResult.get("xmlGatewayUri").toString(), dataItemsXml, eBayConfigResult.get("devID").toString(), eBayConfigResult.get("appID").toString(), eBayConfigResult.get("certID").toString(), "AddItem", eBayConfigResult.get("compatibilityLevel").toString(), eBayConfigResult.get("siteID").toString()); + response = postItem(eBayConfigResult.get("xmlGatewayUri").toString(), dataItemsXml, eBayConfigResult.get("devID").toString(), + eBayConfigResult.get("appID").toString(), eBayConfigResult.get("certID").toString(), "AddItem", + eBayConfigResult.get("compatibilityLevel").toString(), eBayConfigResult.get("siteID").toString()); if (ServiceUtil.isFailure(response)) { return ServiceUtil.returnFailure(ServiceUtil.getErrorMessage(response)); } @@ -1610,7 +1619,9 @@ public class EbayStore { StringBuffer dataItemsXml = new StringBuffer(); Map<String, Object> resultMap = ProductsExportToEbay.buildDataItemsXml(dctx, context, dataItemsXml, eBayConfigResult.get("token").toString(), product); if (!ServiceUtil.isFailure(resultMap)) { - response = postItem(eBayConfigResult.get("xmlGatewayUri").toString(), dataItemsXml, eBayConfigResult.get("devID").toString(), eBayConfigResult.get("appID").toString(), eBayConfigResult.get("certID").toString(), "AddItem", eBayConfigResult.get("compatibilityLevel").toString(), eBayConfigResult.get("siteID").toString()); + response = postItem(eBayConfigResult.get("xmlGatewayUri").toString(), dataItemsXml, eBayConfigResult.get("devID").toString(), + eBayConfigResult.get("appID").toString(), eBayConfigResult.get("certID").toString(), "AddItem", + eBayConfigResult.get("compatibilityLevel").toString(), eBayConfigResult.get("siteID").toString()); if (ServiceUtil.isFailure(response)) { return ServiceUtil.returnFailure(ServiceUtil.getErrorMessage(response)); } @@ -1622,7 +1633,6 @@ public class EbayStore { } } } - if (UtilValidate.isNotEmpty(ProductsExportToEbay.getProductExportSuccessMessageList())) { if ((facilityId != "") && (intAtp != 0)) { int newAtp = intAtp - 1; @@ -1640,7 +1650,6 @@ public class EbayStore { result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS); result.put(ModelService.SUCCESS_MESSAGE, "Export products listing success.."); } - if (UtilValidate.isNotEmpty(ProductsExportToEbay.getproductExportFailureMessageList())) { result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_FAIL); result.put(ModelService.ERROR_MESSAGE_LIST, ProductsExportToEbay.getproductExportFailureMessageList()); @@ -1650,7 +1659,6 @@ public class EbayStore { } return result; } - public static DisputeExplanationCodeType getEbayDisputeExplanationCodeType(String disputeExplanationCode) { DisputeExplanationCodeType disputeExplanationCodeType = null; if (disputeExplanationCode != null) { @@ -1682,7 +1690,6 @@ public class EbayStore { } return disputeExplanationCodeType; } - public static DisputeReasonCodeType getEbayDisputeReasonCodeType(String disputeReasonCode) { DisputeReasonCodeType disputeReasonCodeType = null; if (disputeReasonCode != null) { @@ -1694,7 +1701,6 @@ public class EbayStore { } return disputeReasonCodeType; } - public static Map<String, Object> addEbayDispute(DispatchContext dctx, Map<String, ? extends Object> context) { Map<String, Object> result = new HashMap<>(); Delegator delegator = dctx.getDelegator(); @@ -1725,7 +1731,6 @@ public class EbayStore { } return result; } - public static Map<String, Object> verifyEbayAddSecondChanceItem(DispatchContext dctx, Map<String, ? extends Object> context) { Map<String, Object> result = new HashMap<>(); boolean checkVerify = false; @@ -1765,7 +1770,6 @@ public class EbayStore { } return result; } - public static Map<String, Object> getEbayAllBidders(DispatchContext dctx, Map<String, ? extends Object> context) { Map<String, Object> result = new HashMap<>(); List<Map<String, Object>> allBidders = new LinkedList<>(); @@ -2215,7 +2219,6 @@ public class EbayStore { } return result; } - public Map<String, Object> reviseEbayStoreProductItem(DispatchContext dctx, Map<String, ? extends Object> context) { Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); @@ -2226,7 +2229,6 @@ public class EbayStore { String price = (String) context.get("price"); String imageFileName = (String) context.get("_imageData_fileName"); String currencyId = (String) context.get("currencyId"); - try { ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator); String sandboxEPSURL = "https://api.sandbox.ebay.com/ws/api.dll"; @@ -2349,7 +2351,6 @@ public class EbayStore { } return result; } - public static Map<String ,Object> getClosedItem(ItemType tempItems) { Map <String, Object> result = new HashMap<>(); if (UtilValidate.isNotEmpty(tempItems)) { diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java index 42280d6..606396f 100644 --- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java +++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java @@ -213,7 +213,7 @@ public class EbayStoreHelper { return false; } GenericValue productCategoryRole = delegator.makeValue("ProductCategoryRole"); - productCategoryRole.put("productCategoryId",productCategoryId); + productCategoryRole.put("productCategoryId", productCategoryId); productCategoryRole.put("partyId", partyId); productCategoryRole.put("roleTypeId","EBAY_ACCOUNT"); productCategoryRole.put("fromDate",UtilDateTime.nowTimestamp()); @@ -243,7 +243,7 @@ public class EbayStoreHelper { break; } else { // check from level 2 - List<GenericValue> prodCategoryRollupList = EntityQuery.use(delegator).from("ProductCategoryRollup").where("parentProductCategoryId",productCategoryRollup.getString("productCategoryId")).queryList(); + List<GenericValue> prodCategoryRollupList = EntityQuery.use(delegator).from("ProductCategoryRollup").where("parentProductCategoryId", productCategoryRollup.getString("productCategoryId")).queryList(); for (GenericValue prodCategoryRollup : prodCategoryRollupList) { if (prodCategoryRollup.containsValue(productCategoryId)) { flag = true; @@ -736,7 +736,7 @@ public class EbayStoreHelper { } public static String convertDate(Date date, Locale locale) { - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",locale); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", locale); return simpleDateFormat.format(date); } } diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreInventoryServices.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreInventoryServices.java index 5e0fcac..bf4d0f0 100644 --- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreInventoryServices.java +++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreInventoryServices.java @@ -330,10 +330,10 @@ public class EbayStoreInventoryServices { SellingManagerProductDetailsType productDetail = sellingManagerProductType.getSellingManagerProductDetails(); if (String.valueOf(productDetail.getFolderID()).equals(folderId) && String.valueOf(productDetail.getProductID()).equals(ebayProductId) && String.valueOf(productDetail.getCustomLabel()).equals(productId)) { SellingManagerProductInventoryStatusType prodInventoryStatus = sellingManagerProductType.getSellingManagerProductInventoryStatus(); - ebayProductStoreInventory.put("activeListing",new BigDecimal(prodInventoryStatus.getQuantityActive())); - ebayProductStoreInventory.put("scheduled",new BigDecimal(prodInventoryStatus.getQuantityScheduled())); - ebayProductStoreInventory.put("sold",new BigDecimal(prodInventoryStatus.getQuantitySold())); - ebayProductStoreInventory.put("unSold",new BigDecimal(prodInventoryStatus.getQuantityUnsold())); + ebayProductStoreInventory.put("activeListing", new BigDecimal(prodInventoryStatus.getQuantityActive())); + ebayProductStoreInventory.put("scheduled", new BigDecimal(prodInventoryStatus.getQuantityScheduled())); + ebayProductStoreInventory.put("sold", new BigDecimal(prodInventoryStatus.getQuantitySold())); + ebayProductStoreInventory.put("unSold", new BigDecimal(prodInventoryStatus.getQuantityUnsold())); ebayProductStoreInventory.store(); result = ServiceUtil.returnSuccess(UtilProperties.getMessage(RESOURCE, "EbayStoreInventoryStatusUpdated", UtilMisc.toMap("productId", productId), locale)); break; diff --git a/scrum/src/main/java/org/apache/ofbiz/scrum/ScrumEvents.java b/scrum/src/main/java/org/apache/ofbiz/scrum/ScrumEvents.java index 8b0cfb5..2ad30df 100644 --- a/scrum/src/main/java/org/apache/ofbiz/scrum/ScrumEvents.java +++ b/scrum/src/main/java/org/apache/ofbiz/scrum/ScrumEvents.java @@ -83,7 +83,7 @@ public class ScrumEvents { //compare week and compare date if ((timesheetDate.compareTo(weekStart) <= 0) && (realTimeDate.compareTo(nowStartDate) < 0)) { //check time entry - List<GenericValue> timeEntryList = timesheetMap.getRelated("TimeEntry", UtilMisc.toMap("partyId", partyId, "timesheetId",timesheetId, "fromDate",realTimeDate), null, false); + List<GenericValue> timeEntryList = timesheetMap.getRelated("TimeEntry", UtilMisc.toMap("partyId", partyId, "timesheetId",timesheetId, "fromDate", realTimeDate), null, false); //check EmplLeave List<GenericValue> emplLeaveList = EntityQuery.use(delegator).from("EmplLeave").where("partyId", partyId, "fromDate", realTimeDate).cache(true).queryList(); if (UtilValidate.isEmpty(timeEntryList) && UtilValidate.isEmpty(emplLeaveList)) { diff --git a/scrum/src/main/java/org/apache/ofbiz/scrum/ScrumServices.java b/scrum/src/main/java/org/apache/ofbiz/scrum/ScrumServices.java index c2f69f3..71ff91c 100644 --- a/scrum/src/main/java/org/apache/ofbiz/scrum/ScrumServices.java +++ b/scrum/src/main/java/org/apache/ofbiz/scrum/ScrumServices.java @@ -80,7 +80,7 @@ public class ScrumServices { communicationEventProduct.create(); } try { - GenericValue productRoleMap = EntityQuery.use(delegator).from("ProductRole").where("productId",productId, "partyId", communicationEvent.getString("partyIdFrom"), "roleTypeId","PRODUCT_OWNER").queryFirst(); + GenericValue productRoleMap = EntityQuery.use(delegator).from("ProductRole").where("productId", productId, "partyId", communicationEvent.getString("partyIdFrom"), "roleTypeId","PRODUCT_OWNER").queryFirst(); GenericValue userLogin = (GenericValue) context.get("userLogin"); // also close the incoming communication event if (UtilValidate.isNotEmpty(productRoleMap)) { |
Free forum by Nabble | Edit this page |