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 c24db77 Improved: Corrected all 'if is not followed by whitespace' checkstyle errors. Also corrected few ', is not followed by whitespace' checkstyle errors. (OFBIZ-11805) Thanks Jacques Le Roux and Ritesh Kumar for review. new 40ddf41 Merge branch 'trunk' of https://gitbox.apache.org/repos/asf/ofbiz-plugins into trunk c24db77 is described below commit c24db772c9013c0c89252160e4fb66f41d777657 Author: Suraj Khurana <[hidden email]> AuthorDate: Mon Jul 6 15:28:07 2020 +0530 Improved: Corrected all 'if is not followed by whitespace' checkstyle errors. Also corrected few ', is not followed by whitespace' checkstyle errors. (OFBIZ-11805) Thanks Jacques Le Roux and Ritesh Kumar for review. --- .../apache/ofbiz/birt/flexible/BirtServices.java | 2 +- .../ofbiz/cmssite/multisite/WebSiteFilter.java | 2 +- .../ofbiz/ebaystore/EbayBestOfferAutoPref.java | 8 +-- .../org/apache/ofbiz/ebaystore/EbayEvents.java | 6 +- .../java/org/apache/ofbiz/ebaystore/EbayStore.java | 80 +++++++++++----------- .../apache/ofbiz/ebaystore/EbayStoreHelper.java | 4 +- .../ebaystore/EbayStoreInventoryServices.java | 8 +-- .../org/apache/ofbiz/htmlreport/HtmlReport.java | 2 +- .../java/org/apache/ofbiz/solr/CategoryUtil.java | 2 +- .../java/org/apache/ofbiz/solr/ProductUtil.java | 6 +- .../org/apache/ofbiz/solr/SolrProductSearch.java | 2 +- .../main/java/org/apache/ofbiz/solr/SolrUtil.java | 2 +- 12 files changed, 62 insertions(+), 62 deletions(-) diff --git a/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java b/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java index 67f4d2b..31cba18 100644 --- a/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java +++ b/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java @@ -250,7 +250,7 @@ public class BirtServices { try { Map<String, Object> resultContent = dispatcher.runSync("createFlexibleReportFromMasterEntityWorkflow", UtilMisc.toMap("entityViewName", entityViewName, "reportName", reportName, "description", description, "writeFilters", writeFilters, "masterContentId", masterContentId, "userLogin", userLogin, "locale", locale)); - if(ServiceUtil.isError(resultContent)) { + if (ServiceUtil.isError(resultContent)) { return ServiceUtil.returnError(ServiceUtil.getErrorMessage(resultContent)); } reportContentId = (String) resultContent.get("contentId"); diff --git a/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/WebSiteFilter.java b/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/WebSiteFilter.java index 5e2bffa..8be0dfc 100644 --- a/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/WebSiteFilter.java +++ b/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/WebSiteFilter.java @@ -129,7 +129,7 @@ public class WebSiteFilter implements Filter { } request.setAttribute("webSiteId", webSiteId); session.setAttribute("displayMaintenancePage", webSite.getString("displayMaintenancePage")); - if(UtilValidate.isEmpty(webSite.getString("hostedPathAlias"))) { + if (UtilValidate.isEmpty(webSite.getString("hostedPathAlias"))) { request.setAttribute("removePathAlias", false); } else { request.setAttribute("removePathAlias", true); 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 fc9b2d0..8c41390 100644 --- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayBestOfferAutoPref.java +++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayBestOfferAutoPref.java @@ -201,7 +201,7 @@ public class EbayBestOfferAutoPref { ebayPref.put("enabled", enabled); ebayPref.put("autoPrefEnumId", "EBAY_AUTO_BEST_OFFER"); ebayPref.put("productStoreId",productStoreId); - result = dispatcher.runSync("createEbayProductStorePref",ebayPref); + result = dispatcher.runSync("createEbayProductStorePref", ebayPref); if (ServiceUtil.isError(result)) { return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result)); } @@ -210,7 +210,7 @@ public class EbayBestOfferAutoPref { ebayPref.put("enabled", enabled); ebayPref.put("autoPrefEnumId", "EBAY_AUTO_BEST_OFFER"); ebayPref.put("productStoreId",productStoreId); - result = dispatcher.runSync("updateEbayProductStorePref",ebayPref); + result = dispatcher.runSync("updateEbayProductStorePref", ebayPref); if (ServiceUtil.isError(result)) { return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result)); } @@ -222,8 +222,8 @@ public class EbayBestOfferAutoPref { 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("acceptanceCondition",condition[i]); - result = dispatcher.runSync("updateEbayProductStorePrefCond",ebayPrefCond); + ebayPrefCond.put("acceptanceCondition", condition[i]); + result = dispatcher.runSync("updateEbayProductStorePrefCond", ebayPrefCond); if (ServiceUtil.isError(result)) { return ServiceUtil.returnError(ServiceUtil.getErrorMessage(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 b348f64..d02db1d 100644 --- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java +++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java @@ -537,7 +537,7 @@ public class EbayEvents { request.setAttribute("_ERROR_MESSAGE_","Please select ebay category with low level of categories."); return "error"; } else { - if (categoryId.contains("true")) categoryId = categoryId.substring(0,categoryId.indexOf(":")); + if (categoryId.contains("true")) categoryId = categoryId.substring(0, categoryId.indexOf(":")); } String productId = (String) requestParams.get("isProductId"); EbayStoreCategoryFacade cf = null; @@ -842,7 +842,7 @@ public class EbayEvents { request.setAttribute("_ERROR_MESSAGE_","Please select ebay store category with low level of categories."); return "error"; } else { - if (ebayStore1Category.contains("true")) ebayStore1Category = ebayStore1Category.substring(0,ebayStore1Category.indexOf(":")); + if (ebayStore1Category.contains("true")) ebayStore1Category = ebayStore1Category.substring(0, ebayStore1Category.indexOf(":")); } storeFront.setStoreCategoryID(new Long(ebayStore1Category)); attributeMapList.put("StoreCategoryID", ebayStore1Category); @@ -854,7 +854,7 @@ public class EbayEvents { request.setAttribute("_ERROR_MESSAGE_","Please select ebay store category with low level of categories."); return "error"; } else { - if (ebayStore2Category.contains("true")) ebayStore2Category = ebayStore2Category.substring(0,ebayStore2Category.indexOf(":")); + if (ebayStore2Category.contains("true")) ebayStore2Category = ebayStore2Category.substring(0, ebayStore2Category.indexOf(":")); } storeFront.setStoreCategory2ID(new Long(ebayStore2Category)); attributeMapList.put("StoreCategory2ID", ebayStore2Category); 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 bb8d62f..83b76a3 100644 --- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java +++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java @@ -230,7 +230,7 @@ public class EbayStore { if (UtilValidate.isEmpty(context.get("prodCatalogId")) || UtilValidate.isEmpty(context.get("productStoreId")) || UtilValidate.isEmpty(context.get("partyId"))) { return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "EbayStoreSetCatalogIdAndProductStoreId", locale)); } - if (!EbayStoreHelper.validatePartyAndRoleType(delegator,context.get("partyId").toString())) { + if (!EbayStoreHelper.validatePartyAndRoleType(delegator, context.get("partyId").toString())) { return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "EbayStorePartyWithoutRoleEbayAccount", UtilMisc.toMap("partyId", context.get("partyId").toString()), locale)); } try { @@ -244,7 +244,7 @@ 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")); @@ -261,14 +261,14 @@ public class EbayStore { categoryArrayType = new StoreCustomCategoryArrayType(); categoryArrayType.setCustomCategory(toStoreCustomCategoryTypeArray(listAdd)); req.setStoreCategories(categoryArrayType); - result = excuteExportCategoryToEbayStore(call, req, StoreCategoryUpdateActionCodeType.ADD, delegator,context.get("partyId").toString(), catalogCategories, locale); + result = excuteExportCategoryToEbayStore(call, req, StoreCategoryUpdateActionCodeType.ADD, delegator, context.get("partyId").toString(), catalogCategories, locale); } if (listEdit.size() > 0) { req = new SetStoreCategoriesRequestType(); categoryArrayType = new StoreCustomCategoryArrayType(); categoryArrayType.setCustomCategory(toStoreCustomCategoryTypeArray(listEdit)); req.setStoreCategories(categoryArrayType); - result = excuteExportCategoryToEbayStore(call, req, StoreCategoryUpdateActionCodeType.RENAME, delegator,context.get("partyId").toString(), catalogCategories, locale); + result = excuteExportCategoryToEbayStore(call, req, StoreCategoryUpdateActionCodeType.RENAME, delegator, context.get("partyId").toString(), catalogCategories, locale); } //start at level 1 of categories @@ -300,7 +300,7 @@ public class EbayStore { categoryArrayType.setCustomCategory(toStoreCustomCategoryTypeArray(listAdd)); req.setStoreCategories(categoryArrayType); req.setDestinationParentCategoryID(new Long(ebayParentCategoryId)); - result = excuteExportCategoryToEbayStore(call, req, StoreCategoryUpdateActionCodeType.ADD, delegator,context.get("partyId").toString(), catalogCategories, locale); + result = excuteExportCategoryToEbayStore(call, req, StoreCategoryUpdateActionCodeType.ADD, delegator, context.get("partyId").toString(), catalogCategories, locale); } if (listEdit.size() > 0) { req = new SetStoreCategoriesRequestType(); @@ -308,7 +308,7 @@ public class EbayStore { categoryArrayType.setCustomCategory(toStoreCustomCategoryTypeArray(listEdit)); req.setStoreCategories(categoryArrayType); req.setDestinationParentCategoryID(new Long(ebayParentCategoryId)); - result = excuteExportCategoryToEbayStore(call, req, StoreCategoryUpdateActionCodeType.RENAME, delegator,context.get("partyId").toString(), catalogCategories, locale); + result = excuteExportCategoryToEbayStore(call, req, StoreCategoryUpdateActionCodeType.RENAME, delegator, context.get("partyId").toString(), catalogCategories, locale); } } } @@ -320,13 +320,13 @@ public class EbayStore { if (productCategory != null) { 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(); 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); @@ -398,7 +398,7 @@ public class EbayStore { for (StoreCustomCategoryType returnCategoryType : returnCategoryTypeList) { 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); } @@ -649,7 +649,7 @@ public class EbayStore { result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS); //result.put(ModelService.SUCCESS_MESSAGE, UtilProperties.getMessage(RESOURCE, "EbayStoreLoadSuccess", locale)); // update product store in ofbiz - updateProductStore(dctx, context, returnedStoreType,(String) context.get("productStoreId")); + updateProductStore(dctx, context, returnedStoreType, (String) context.get("productStoreId")); Map<String,Object> ebayResp = new HashMap<>(); ebayResp.put("storeName", returnedStoreType.getName()); ebayResp.put("storeUrl", returnedStoreType.getURL()); @@ -1184,7 +1184,7 @@ public class EbayStore { descFaces.add(storeFontTypeDescFaceMap); j++; } - advanceFontTheme.put("storeFontTypeFontDescList",descFaces); + advanceFontTheme.put("storeFontTypeFontDescList", descFaces); j = 0; storeFontType.getDescSize(); @@ -1198,7 +1198,7 @@ public class EbayStore { descSizes.add(storeFontSizeCodeTypeMap); j++; } - advanceFontTheme.put("storeDescSizeList",descSizes); + advanceFontTheme.put("storeDescSizeList", descSizes); i++; } result = ServiceUtil.returnSuccess(UtilProperties.getMessage(RESOURCE, "EbayStoreLoadBasicThemeSuccess", locale)); @@ -1316,7 +1316,7 @@ public class EbayStore { result = ServiceUtil.returnError(resp.getMessage()); } LocalDispatcher dispatcher = dctx.getDispatcher(); - Map<String,Object> results = dispatcher.runSync("getEbayStoreOutput",UtilMisc.toMap("productStoreId",(String) context.get("productStoreId"),"userLogin",context.get("userLogin"))); + Map<String,Object> results = dispatcher.runSync("getEbayStoreOutput",UtilMisc.toMap("productStoreId", (String) context.get("productStoreId"),"userLogin", context.get("userLogin"))); if (ServiceUtil.isError(results)) { return ServiceUtil.returnError(ServiceUtil.getErrorMessage(results)); } @@ -2352,7 +2352,7 @@ public class EbayStore { public static Map<String ,Object> getClosedItem(ItemType tempItems) { Map <String, Object> result = new HashMap<>(); - if(UtilValidate.isNotEmpty(tempItems)) { + if (UtilValidate.isNotEmpty(tempItems)) { double hitCount = 0; int quantity = 0; int bidCount = 0; @@ -2367,26 +2367,26 @@ public class EbayStore { result.put("itemId", itemId); result.put("SKU", SKU); result.put("title", title); - if(UtilValidate.isNotEmpty(tempItems.getBuyItNowPrice())) { + if (UtilValidate.isNotEmpty(tempItems.getBuyItNowPrice())) { buyItNowPrice = tempItems.getBuyItNowPrice().getValue(); } - if(UtilValidate.isNotEmpty(tempItems.getHitCount())) { + if (UtilValidate.isNotEmpty(tempItems.getHitCount())) { hitCount = tempItems.getHitCount(); } - if(UtilValidate.isNotEmpty(tempItems.getReservePrice())) { + if (UtilValidate.isNotEmpty(tempItems.getReservePrice())) { reservePrice = tempItems.getReservePrice().getValue(); } - if(UtilValidate.isNotEmpty(tempItems.getSellingStatus().getBidCount())) { + if (UtilValidate.isNotEmpty(tempItems.getSellingStatus().getBidCount())) { bidCount= tempItems.getSellingStatus().getBidCount(); } - if(UtilValidate.isNotEmpty(tempItems.getListingDetails().getEndTime())) { + if (UtilValidate.isNotEmpty(tempItems.getListingDetails().getEndTime())) { Calendar endTimeItem = tempItems.getListingDetails().getEndTime(); endTime = eBayUtil.toAPITimeString(endTimeItem.getTime()); } - if(UtilValidate.isNotEmpty(tempItems.getListingDetails().getViewItemURL())) { + if (UtilValidate.isNotEmpty(tempItems.getListingDetails().getViewItemURL())) { viewItemURL = tempItems.getListingDetails().getViewItemURL(); } - if(UtilValidate.isNotEmpty(tempItems.getListingType().value())) { + if (UtilValidate.isNotEmpty(tempItems.getListingType().value())) { listingType = tempItems.getListingType().value(); } @@ -2403,7 +2403,7 @@ public class EbayStore { } public static Map<String, Object> getShippingDetail(AddressType shippingAddress, Locale locale) { - if(UtilValidate.isEmpty(shippingAddress)) { + if (UtilValidate.isEmpty(shippingAddress)) { return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "EbayStoreRequiredShippingAddressParameter", locale)); } Map<String, Object> result = new HashMap<>(); @@ -2417,34 +2417,34 @@ public class EbayStore { String countryName = null; String phone = null; String postalCode = null; - if(UtilValidate.isNotEmpty(shippingAddress.getName())) { + if (UtilValidate.isNotEmpty(shippingAddress.getName())) { buyerName = shippingAddress.getName(); } - if(UtilValidate.isNotEmpty(shippingAddress.getStreet())) { + if (UtilValidate.isNotEmpty(shippingAddress.getStreet())) { street = shippingAddress.getStreet(); } - if(UtilValidate.isNotEmpty(shippingAddress.getStreet1())) { + if (UtilValidate.isNotEmpty(shippingAddress.getStreet1())) { street = shippingAddress.getStreet1(); } - if(UtilValidate.isNotEmpty(shippingAddress.getStreet2())) { + if (UtilValidate.isNotEmpty(shippingAddress.getStreet2())) { street = shippingAddress.getStreet2(); } - if(UtilValidate.isNotEmpty(shippingAddress.getCityName())) { + if (UtilValidate.isNotEmpty(shippingAddress.getCityName())) { cityName = shippingAddress.getCityName(); } - if(UtilValidate.isNotEmpty(shippingAddress.getStateOrProvince())) { + if (UtilValidate.isNotEmpty(shippingAddress.getStateOrProvince())) { stateOrProvince = shippingAddress.getStateOrProvince(); } - if(UtilValidate.isNotEmpty(shippingAddress.getCountry())) { + if (UtilValidate.isNotEmpty(shippingAddress.getCountry())) { county = shippingAddress.getCountry().value(); } - if(UtilValidate.isNotEmpty(shippingAddress.getCountryName())) { + if (UtilValidate.isNotEmpty(shippingAddress.getCountryName())) { countryName = shippingAddress.getCountryName(); } - if(UtilValidate.isNotEmpty(shippingAddress.getPhone())) { + if (UtilValidate.isNotEmpty(shippingAddress.getPhone())) { phone = shippingAddress.getPhone(); } - if(UtilValidate.isNotEmpty(shippingAddress.getPostalCode())) { + if (UtilValidate.isNotEmpty(shippingAddress.getPostalCode())) { postalCode = shippingAddress.getPostalCode(); } result.put("buyerName", buyerName); @@ -2463,7 +2463,7 @@ public class EbayStore { boolean checkResult = false; try { GenericValue product = EntityQuery.use(delegator).from("Product").where("productId", productId).queryOne(); - if(product != null) { + if (product != null) { checkResult = true; } } catch(GenericEntityException e) { @@ -2473,7 +2473,7 @@ public class EbayStore { } public static Map<String, Object> getTransactionHelper(TransactionType transaction, Locale locale) { Map<String, Object> orderMap = new HashMap<>(); - if(UtilValidate.isNotEmpty(transaction)) { + if (UtilValidate.isNotEmpty(transaction)) { String orderId = null; String externalId = null; String createdDate = null; @@ -2502,7 +2502,7 @@ public class EbayStore { Map<String, Object> itemSold = new HashMap<>(); Map<String, Object> address = new HashMap<>(); - if(UtilValidate.isNotEmpty(transaction.getItem())) { + if (UtilValidate.isNotEmpty(transaction.getItem())) { ItemType item = transaction.getItem(); itemId = item.getItemID(); title = item.getTitle(); @@ -2510,7 +2510,7 @@ public class EbayStore { buyItNowPrice = item.getBuyItNowPrice().getValue(); currency = item.getCurrency().value(); - if(UtilValidate.isNotEmpty(item.getListingDetails())) { + if (UtilValidate.isNotEmpty(item.getListingDetails())) { viewItemURL = item.getListingDetails().getViewItemURL(); } } @@ -2541,7 +2541,7 @@ public class EbayStore { if (UtilValidate.isNotEmpty(transaction.getAmountPaid())) { amountPaid = transaction.getAmountPaid().getValue(); } - if(UtilValidate.isNotEmpty(transaction.getBuyer())) { + if (UtilValidate.isNotEmpty(transaction.getBuyer())) { UserType getBuyer = transaction.getBuyer(); buyer = transaction.getBuyer().getUserID(); if (UtilValidate.isNotEmpty(getBuyer.getEmail())) { @@ -2556,10 +2556,10 @@ public class EbayStore { address = getShippingDetail(shipping, locale); } } - if(UtilValidate.isNotEmpty(transaction.getStatus())) { - if(UtilValidate.isNotEmpty(transaction.getStatus().getPaymentMethodUsed())) + if (UtilValidate.isNotEmpty(transaction.getStatus())) { + if (UtilValidate.isNotEmpty(transaction.getStatus().getPaymentMethodUsed())) paymentMethod = transaction.getStatus().getPaymentMethodUsed().value(); - if(UtilValidate.isNotEmpty(transaction.getStatus().getCheckoutStatus())) + if (UtilValidate.isNotEmpty(transaction.getStatus().getCheckoutStatus())) checkoutStatus = transaction.getStatus().getCheckoutStatus().value(); } if (UtilValidate.isNotEmpty(transaction.getShippingServiceSelected())) { 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 859ad61..42280d6 100644 --- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java +++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java @@ -217,7 +217,7 @@ public class EbayStoreHelper { productCategoryRole.put("partyId", partyId); productCategoryRole.put("roleTypeId","EBAY_ACCOUNT"); productCategoryRole.put("fromDate",UtilDateTime.nowTimestamp()); - productCategoryRole.put("comments",ebayCategoryId); + productCategoryRole.put("comments", ebayCategoryId); productCategoryRole.create(); } catch (GenericEntityException e) { Debug.logError(e.getMessage(), MODULE); @@ -236,7 +236,7 @@ public class EbayStoreHelper { break; } else { // check from child category level 1 - List<GenericValue> productCategoryRollupList = EntityQuery.use(delegator).from("ProductCategoryRollup").where("parentProductCategoryId",catalogCategory.getString("productCategoryId")).queryList(); + List<GenericValue> productCategoryRollupList = EntityQuery.use(delegator).from("ProductCategoryRollup").where("parentProductCategoryId", catalogCategory.getString("productCategoryId")).queryList(); for (GenericValue productCategoryRollup : productCategoryRollupList) { if (productCategoryRollup.containsValue(productCategoryId)) { flag = true; 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 93d12d3..5e0fcac 100644 --- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreInventoryServices.java +++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreInventoryServices.java @@ -110,9 +110,9 @@ public class EbayStoreInventoryServices { // checkProduct is true then update detail but is false do create new one. if (checkProd) { - status = updateProductInEbayInventoryFolder(dctx,context); + status = updateProductInEbayInventoryFolder(dctx, context); } else { - status = createNewProductInEbayInventoryFolder(dctx,context); + status = createNewProductInEbayInventoryFolder(dctx, context); } if (status) { Debug.logInfo("Done to updated product ".concat(context.get("productId").toString()), MODULE); @@ -256,7 +256,7 @@ public class EbayStoreInventoryServices { } } if (!flag) { - folderId = createNewFolderInEbayStoreInventory(dctx,context); + folderId = createNewFolderInEbayStoreInventory(dctx, context); } } else { EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "GetSellingManagerInventoryFolderCall : getFolderInEbayStoreInventory", resp.getErrors(0).getLongMessage()); @@ -364,7 +364,7 @@ public class EbayStoreInventoryServices { try { if (context.get("productStoreId") != null && context.get("facilityId") != null) { - ebayProductStoreInventoryList = EntityQuery.use(delegator).from("EbayProductStoreInventory").where("facilityId",(String)context.get("facilityId"),"productStoreId",(String)context.get("productStoreId")).queryList(); + ebayProductStoreInventoryList = EntityQuery.use(delegator).from("EbayProductStoreInventory").where("facilityId", (String)context.get("facilityId"),"productStoreId", (String)context.get("productStoreId")).queryList(); for (GenericValue ebayProductStoreInventory : ebayProductStoreInventoryList) { if (ebayProductStoreInventory.get("ebayProductId") != null) { Map<String, Object> result = dispatcher.runSync("updateEbayInventoryStatusByProductId", UtilMisc.toMap("productStoreId", (String)context.get("productStoreId"), "facilityId", (String)context.get("facilityId"), "folderId", ebayProductStoreInventory.get("folderId"), "productId", ebayProductStoreInventory.get("productId"), "ebayProductId", ebayProductStoreInventory.get("ebayProductId"), "userLogin", context.get("userLogin"))); diff --git a/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java b/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java index 58656f9..4aa0070 100644 --- a/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java +++ b/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java @@ -579,7 +579,7 @@ public class HtmlReport extends AbstractReport { for (int j=0; j<threads.length; j++) { Thread threadInstance = threads[j]; if (threadInstance instanceof AbstractReportThread) { - if(((AbstractReportThread)threadInstance).getUUID().toString().equals(getParamThread(request))) { + if (((AbstractReportThread)threadInstance).getUUID().toString().equals(getParamThread(request))) { thread = (AbstractReportThread) threadInstance; break; } diff --git a/solr/src/main/java/org/apache/ofbiz/solr/CategoryUtil.java b/solr/src/main/java/org/apache/ofbiz/solr/CategoryUtil.java index 32df73f..573e546 100644 --- a/solr/src/main/java/org/apache/ofbiz/solr/CategoryUtil.java +++ b/solr/src/main/java/org/apache/ofbiz/solr/CategoryUtil.java @@ -141,7 +141,7 @@ public final class CategoryUtil { if (catMember.length() == 0){catMember.append(productCategoryId);} - if(showDepth) { + if (showDepth) { cm = i +"/"+ catMember.toString(); } else { cm = catMember.toString(); diff --git a/solr/src/main/java/org/apache/ofbiz/solr/ProductUtil.java b/solr/src/main/java/org/apache/ofbiz/solr/ProductUtil.java index f5277e5..bb55dfa 100644 --- a/solr/src/main/java/org/apache/ofbiz/solr/ProductUtil.java +++ b/solr/src/main/java/org/apache/ofbiz/solr/ProductUtil.java @@ -81,7 +81,7 @@ public final class ProductUtil { if (largeImage != null) dispatchContext.put("largeImage", largeImage); - // if(product.get("productWeight") != null) dispatchContext.put("weight", ""); + // if (product.get("productWeight") != null) dispatchContext.put("weight", ""); // Trying to set a correctand trail List<GenericValue> category = delegator.findList("ProductCategoryMember", EntityCondition.makeCondition(UtilMisc.toMap("productId", productId)), null, null, null, false); @@ -127,8 +127,8 @@ public final class ProductUtil { dispatchContext.put("catalog", catalogs); // Alternative - // if(category.size()>0) dispatchContext.put("category", category); - // if(product.get("popularity") != null) dispatchContext.put("popularity", ""); + // if (category.size()>0) dispatchContext.put("category", category); + // if (product.get("popularity") != null) dispatchContext.put("popularity", ""); Map<String, Object> featureSet = dispatcher.runSync("getProductFeatureSet", UtilMisc.toMap("productId", productId)); if (ServiceUtil.isError(featureSet)) { diff --git a/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java b/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java index 46f2fd2..dd8026c 100644 --- a/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java +++ b/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java @@ -339,7 +339,7 @@ public abstract class SolrProductSearch { solrQuery.setFields((String) context.get("returnFields")); } - // if((Boolean)context.get("sortByReverse"))order.reverse(); + // if ((Boolean)context.get("sortByReverse"))order.reverse(); if ((String) context.get("sortBy") != null && ((String) context.get("sortBy")).length() > 0) { SolrQuery.ORDER order; if (!((Boolean) context.get("sortByReverse"))) diff --git a/solr/src/main/java/org/apache/ofbiz/solr/SolrUtil.java b/solr/src/main/java/org/apache/ofbiz/solr/SolrUtil.java index 1d9d837..d9ff384 100644 --- a/solr/src/main/java/org/apache/ofbiz/solr/SolrUtil.java +++ b/solr/src/main/java/org/apache/ofbiz/solr/SolrUtil.java @@ -268,7 +268,7 @@ public final class SolrUtil { solrQuery.setRows(0); } - if(UtilValidate.isNotEmpty(facetPrefix)){ + if (UtilValidate.isNotEmpty(facetPrefix)){ solrQuery.setFacetPrefix(facetPrefix); } |
Free forum by Nabble | Edit this page |