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 b18669c Improved: Corrected checkstyle formatting issues, 'is
preceded/not preceded with whitespace' for plugins component. (OFBIZ-11874)
This fixes following checkstyle issues: '{' is not preceded with whitespace.
b18669c is described below
commit b18669cddc5ea458baf8b36d920bc1e64e72c5ea
Author: Suraj Khurana <[email protected]>
AuthorDate: Sat Jul 11 14:27:09 2020 +0530
Improved: Corrected checkstyle formatting issues, 'is preceded/not preceded
with whitespace' for plugins component.
(OFBIZ-11874)
This fixes following checkstyle issues:
'{' is not preceded with whitespace.
'{' is not followed by whitespace.
'}' is not followed by whitespace.
'}' is not preceded with whitespace.
'typecast' is not followed by whitespace.
'try' is not followed by whitespace.
';' is preceded with whitespace.
---
.../ofbiz/assetmaint/FixedAssetMaintServices.java | 10 +--
.../java/org/apache/ofbiz/birt/BirtFactory.java | 2 +-
.../java/org/apache/ofbiz/birt/BirtWorker.java | 2 +-
.../org/apache/ofbiz/birt/flexible/BirtUtil.java | 2 +-
.../org/apache/ofbiz/ebay/EbayOrderServices.java | 4 +-
.../apache/ofbiz/ebay/ImportOrdersFromEbay.java | 12 +--
.../apache/ofbiz/ebay/ProductsExportToEbay.java | 50 ++++++------
.../org/apache/ofbiz/ebaystore/EbayEvents.java | 10 +--
.../java/org/apache/ofbiz/ebaystore/EbayStore.java | 94 +++++++++++-----------
.../ofbiz/ebaystore/EbayStoreAutoPrefEvents.java | 2 +-
.../ofbiz/ebaystore/EbayStoreAutoPreferences.java | 6 +-
.../apache/ofbiz/ebaystore/EbayStoreHelper.java | 2 +-
.../ebaystore/EbayStoreInventoryServices.java | 34 ++++----
.../apache/ofbiz/ebaystore/EbayStoreOptions.java | 2 +-
.../ofbiz/ecommerce/janrain/JanrainHelper.java | 2 +-
.../apache/ofbiz/example/ExampleWebSockets.java | 4 +-
.../FirstDataPaymentServices.java | 16 ++--
.../ldap/cas/OFBizCasAuthenticationHandler.java | 2 +-
.../ofbiz/content/search/DocumentIndexer.java | 6 +-
.../apache/ofbiz/content/search/SearchWorker.java | 2 +-
.../java/org/apache/ofbiz/msg91/Msg91Services.java | 1 -
.../org/apache/ofbiz/htmlreport/HtmlReport.java | 8 --
.../ofbiz/pricat/PricatParseExcelHtmlThread.java | 2 +-
.../ofbiz/pricat/sample/SamplePricatParser.java | 6 +-
.../java/org/apache/ofbiz/solr/CategoryUtil.java | 25 +++---
.../java/org/apache/ofbiz/solr/ProductUtil.java | 4 +-
.../org/apache/ofbiz/solr/SolrProductSearch.java | 2 +-
.../main/java/org/apache/ofbiz/solr/SolrUtil.java | 9 +--
.../ofbiz/solr/control/OFBizSolrLoginWorker.java | 2 +-
.../java/org/apache/ofbiz/solr/test/SolrTests.java | 2 +-
.../java/org/apache/ofbiz/webpos/WebPosEvents.java | 2 +-
.../apache/ofbiz/webpos/search/WebPosSearch.java | 16 +---
32 files changed, 163 insertions(+), 180 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 df96a32..fe00ae5 100644
---
a/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java
+++
b/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java
@@ -50,11 +50,11 @@ public class FixedAssetMaintServices {
LocalDispatcher dispatcher = ctx.getDispatcher();
Delegator delegator = ctx.getDelegator();
Locale locale = (Locale) context.get("locale");
- String fixedAssetId = (String)context.get("fixedAssetId");
- String maintHistSeqId = (String)context.get("maintHistSeqId");
- String productId = (String)context.get("productId");
- String facilityId = (String)context.get("facilityId");
- Double quantity = (Double)context.get("quantity");
+ String fixedAssetId = (String) context.get("fixedAssetId");
+ String maintHistSeqId = (String) context.get("maintHistSeqId");
+ String productId = (String) context.get("productId");
+ String facilityId = (String) context.get("facilityId");
+ Double quantity = (Double) context.get("quantity");
double requestedQty = quantity;
try {
diff --git a/birt/src/main/java/org/apache/ofbiz/birt/BirtFactory.java
b/birt/src/main/java/org/apache/ofbiz/birt/BirtFactory.java
index 331f1f4..83e251a 100644
--- a/birt/src/main/java/org/apache/ofbiz/birt/BirtFactory.java
+++ b/birt/src/main/java/org/apache/ofbiz/birt/BirtFactory.java
@@ -66,7 +66,7 @@ public class BirtFactory {
* @throws ParserConfigurationException
*/
public static InputStream getReportInputStreamFromLocation(String
resourceName)
- throws IOException, SAXException, ParserConfigurationException{
+ throws IOException, SAXException, ParserConfigurationException {
InputStream reportInputStream = null;
synchronized (BirtFactory.class) {
diff --git a/birt/src/main/java/org/apache/ofbiz/birt/BirtWorker.java
b/birt/src/main/java/org/apache/ofbiz/birt/BirtWorker.java
index ecca4cd..3b34f72 100644
--- a/birt/src/main/java/org/apache/ofbiz/birt/BirtWorker.java
+++ b/birt/src/main/java/org/apache/ofbiz/birt/BirtWorker.java
@@ -72,7 +72,7 @@ public final class BirtWorker {
private final static HTMLServerImageHandler imageHandler = new
HTMLServerImageHandler();
- private BirtWorker() {}
+ private BirtWorker() { }
private static final Map<Integer, Level> levelIntMap = new HashMap<>();
static {
diff --git a/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtUtil.java
b/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtUtil.java
index d3bb482..322534f 100644
--- a/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtUtil.java
+++ b/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtUtil.java
@@ -113,7 +113,7 @@ public final class BirtUtil {
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"docx",
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
"pptx");
- private BirtUtil() {}
+ private BirtUtil() { }
/**
* Return birt field type corresponding to given entity field type
diff --git a/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java
b/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java
index ae81d85..1bd98d3 100644
--- a/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java
+++ b/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java
@@ -209,8 +209,8 @@ public class EbayOrderServices {
private static Map<String, Object>
buildGetSellerTransactionsRequest(Map<String, Object> context, StringBuffer
sellerTransactionsItemsXml, String token) {
Locale locale = (Locale)context.get("locale");
- String fromDate = (String)context.get("fromDate");
- String thruDate = (String)context.get("thruDate");
+ String fromDate = (String) context.get("fromDate");
+ String thruDate = (String) context.get("thruDate");
try {
Document transDoc =
UtilXml.makeEmptyXmlDocument("GetSellerTransactionsRequest");
Element transElem = transDoc.getDocumentElement();
diff --git a/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java
b/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java
index 791e579..f9337bd 100755
--- a/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java
+++ b/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java
@@ -170,7 +170,7 @@ public class ImportOrdersFromEbay {
String successMessage = (String)result.get("successMessage");
if (successMessage != null) {
return readCompleteSaleResponse(successMessage, locale);
- } else{
+ } else {
ServiceUtil.returnFailure(UtilProperties.getMessage(RESOURCE,
"ordersImportFromEbay.errorDuringPostCompleteSaleRequest", locale));
}
}
@@ -183,7 +183,7 @@ public class ImportOrdersFromEbay {
private static Map<String, Object> checkOrders(Delegator delegator,
LocalDispatcher dispatcher, Locale locale, Map<String, Object> context, String
response) {
StringBuffer errorMessage = new StringBuffer();
- List<Map<String, Object>> orders = readResponseFromEbay(response,
locale, (String)context.get("productStoreId"), delegator, errorMessage);
+ List<Map<String, Object>> orders = readResponseFromEbay(response,
locale, (String) context.get("productStoreId"), delegator, errorMessage);
if (orders == null) {
Debug.logError("Error :" + errorMessage.toString(), MODULE);
return ServiceUtil.returnFailure(errorMessage.toString());
@@ -213,8 +213,8 @@ public class ImportOrdersFromEbay {
private static Map<String, Object>
buildGetSellerTransactionsRequest(Map<String, Object> context, StringBuffer
dataItemsXml, String token) {
Locale locale = (Locale)context.get("locale");
- String fromDate = (String)context.get("fromDate");
- String thruDate = (String)context.get("thruDate");
+ String fromDate = (String) context.get("fromDate");
+ String thruDate = (String) context.get("thruDate");
try {
Document transDoc =
UtilXml.makeEmptyXmlDocument("GetSellerTransactionsRequest");
Element transElem = transDoc.getDocumentElement();
@@ -250,8 +250,8 @@ public class ImportOrdersFromEbay {
}
public static Map<String, Object> buildCompleteSaleRequest(Delegator
delegator, Locale locale, String externalId, String transactionId, Map<String,
Object> context, StringBuffer dataItemsXml, String token) {
- String paid = (String)context.get("paid");
- String shipped = (String)context.get("shipped");
+ String paid = (String) context.get("paid");
+ String shipped = (String) context.get("shipped");
try {
if (externalId == null) {
diff --git a/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java
b/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java
index 7cd1cca..3658e1d 100755
--- a/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java
+++ b/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java
@@ -177,7 +177,7 @@ public class ProductsExportToEbay {
Locale locale = (Locale)context.get("locale");
try {
Delegator delegator = dctx.getDelegator();
- String webSiteUrl = (String)context.get("webSiteUrl");
+ String webSiteUrl = (String) context.get("webSiteUrl");
UtilCodec.SimpleEncoder encoder = UtilCodec.getEncoder("xml");
@@ -190,7 +190,7 @@ public class ProductsExportToEbay {
appendRequesterCredentials(itemRequestElem, itemDocument,
token);
String title = prod.getString("internalName");
- String qnt = (String)context.get("quantity");
+ String qnt = (String) context.get("quantity");
if (UtilValidate.isEmpty(qnt)) {
qnt = "1";
}
@@ -204,7 +204,7 @@ public class ProductsExportToEbay {
} else if
(UtilValidate.isNotEmpty(prod.getString("productName"))) {
productDescription = prod.getString("productName");
}
- String startPrice = (String)context.get("startPrice");
+ String startPrice = (String) context.get("startPrice");
String startPriceCurrencyUomId = null;
if (UtilValidate.isEmpty(startPrice)) {
GenericValue startPriceValue =
EntityUtil.getFirst(EntityUtil.filterByDate(prod.getRelated("ProductPrice",
UtilMisc.toMap("productPricePurposeId", "EBAY", "productPriceTypeId",
"MINIMUM_PRICE"), null, false)));
@@ -215,7 +215,7 @@ public class ProductsExportToEbay {
}
// Buy it now is the optional value for a product that you
send to eBay. Once this value is entered by user - this option allow user to
win auction immediately.
- String buyItNowPrice = (String)context.get("buyItNowPrice");
+ String buyItNowPrice = (String) context.get("buyItNowPrice");
String buyItNowCurrencyUomId = null;
if (UtilValidate.isEmpty(buyItNowPrice)) {
GenericValue buyItNowPriceValue =
EntityUtil.getFirst(EntityUtil.filterByDate(prod.getRelated("ProductPrice",
UtilMisc.toMap("productPricePurposeId", "EBAY", "productPriceTypeId",
"MAXIMUM_PRICE"), null, false)));
@@ -227,15 +227,15 @@ public class ProductsExportToEbay {
Element itemElem = UtilXml.addChildElement(itemRequestElem,
"Item", itemDocument);
- UtilXml.addChildElementValue(itemElem, "Country",
(String)context.get("country"), itemDocument);
- String location = (String)context.get("location");
+ UtilXml.addChildElementValue(itemElem, "Country", (String)
context.get("country"), itemDocument);
+ String location = (String) context.get("location");
if (UtilValidate.isNotEmpty(location)) {
UtilXml.addChildElementValue(itemElem, "Location",
location, itemDocument);
}
UtilXml.addChildElementValue(itemElem, "ApplicationData",
prod.getString("productId"), itemDocument);
UtilXml.addChildElementValue(itemElem, "SKU",
prod.getString("productId"), itemDocument);
UtilXml.addChildElementValue(itemElem, "Title", title,
itemDocument);
- UtilXml.addChildElementValue(itemElem, "ListingDuration",
(String)context.get("listingDuration"), itemDocument);
+ UtilXml.addChildElementValue(itemElem, "ListingDuration",
(String) context.get("listingDuration"), itemDocument);
UtilXml.addChildElementValue(itemElem, "Quantity", qnt,
itemDocument);
String listingFormat = "";
@@ -289,7 +289,7 @@ public class ProductsExportToEbay {
setPaymentMethodAccepted(itemDocument, itemElem, context);
setMiscDetails(itemDocument, itemElem, context, delegator);
- String categoryCode = (String)context.get("ebayCategory");
+ String categoryCode = (String) context.get("ebayCategory");
String primaryCategoryId = "";
if (categoryCode != null) {
if (categoryCode.indexOf("_") != -1) {
@@ -299,7 +299,7 @@ public class ProductsExportToEbay {
} else {
primaryCategoryId = params[1];
}
- }else{
+ } else {
primaryCategoryId = categoryCode;
}
} else {
@@ -418,19 +418,19 @@ public class ProductsExportToEbay {
*/
private static void setPaymentMethodAccepted(Document itemDocument,
Element itemElem, Map<String, Object> context) {
- String payPal = (String)context.get("paymentPayPal");
- String payPalEmail = (String)context.get("payPalEmail");
- String visaMC = (String)context.get("paymentVisaMC");
- String amEx = (String)context.get("paymentAmEx");
- String discover = (String)context.get("paymentDiscover");
- String ccAccepted = (String)context.get("paymentCCAccepted");
- String cashInPerson = (String)context.get("paymentCashInPerson");
- String cashOnPickup = (String)context.get("paymentCashOnPickup");
- String cod = (String)context.get("paymentCOD");
- String codPrePayDelivery =
(String)context.get("paymentCODPrePayDelivery");
- String mocc = (String)context.get("paymentMOCC");
- String moneyXferAccepted =
(String)context.get("paymentMoneyXferAccepted");
- String personalCheck = (String)context.get("paymentPersonalCheck");
+ String payPal = (String) context.get("paymentPayPal");
+ String payPalEmail = (String) context.get("payPalEmail");
+ String visaMC = (String) context.get("paymentVisaMC");
+ String amEx = (String) context.get("paymentAmEx");
+ String discover = (String) context.get("paymentDiscover");
+ String ccAccepted = (String) context.get("paymentCCAccepted");
+ String cashInPerson = (String) context.get("paymentCashInPerson");
+ String cashOnPickup = (String) context.get("paymentCashOnPickup");
+ String cod = (String) context.get("paymentCOD");
+ String codPrePayDelivery = (String)
context.get("paymentCODPrePayDelivery");
+ String mocc = (String) context.get("paymentMOCC");
+ String moneyXferAccepted = (String)
context.get("paymentMoneyXferAccepted");
+ String personalCheck = (String) context.get("paymentPersonalCheck");
// PayPal
if (UtilValidate.isNotEmpty(payPal) && "on".equals(payPal)) {
@@ -509,7 +509,7 @@ public class ProductsExportToEbay {
public static Map<String, Object> getEbayCategories(DispatchContext dctx,
Map<String, Object> context) {
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
- String categoryCode = (String)context.get("categoryCode");
+ String categoryCode = (String) context.get("categoryCode");
Map<String, Object> result = null;
try {
@@ -605,11 +605,11 @@ public class ProductsExportToEbay {
}
return result;
}
- public static List<String> getProductExportSuccessMessageList(){
+ public static List<String> getProductExportSuccessMessageList() {
return productExportSuccessMessageList;
}
- public static List<String> getproductExportFailureMessageList(){
+ public static List<String> getproductExportFailureMessageList() {
return productExportFailureMessageList;
}
}
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 db9a11d..d6cc4d5 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java
@@ -302,7 +302,7 @@ public class EbayEvents {
return "success";
}
- public static EbayStoreSiteFacade getSiteFacade(ApiContext apiContext,
HttpServletRequest request) throws ApiException, SdkException, Exception{
+ public static EbayStoreSiteFacade getSiteFacade(ApiContext apiContext,
HttpServletRequest request) throws ApiException, SdkException, Exception {
String siteFacadeName = null;
EbayStoreSiteFacade siteFacade = null;
@@ -371,7 +371,7 @@ public class EbayEvents {
}
// make ebay category list
- public static List<CategoryType> getChildCategories(HttpServletRequest
request) throws ApiException, SdkException, Exception{
+ public static List<CategoryType> getChildCategories(HttpServletRequest
request) throws ApiException, SdkException, Exception {
List<CategoryType> categories = new LinkedList<CategoryType>();
EbayStoreSiteFacade sf = null;
String categoryId = null;
@@ -479,7 +479,7 @@ public class EbayEvents {
return categories;
}
- public static CategoryType getCsCategoriesMapped(HttpServletRequest
request) throws ApiException, SdkException, Exception{
+ public static CategoryType getCsCategoriesMapped(HttpServletRequest
request) throws ApiException, SdkException, Exception {
EbayStoreSiteFacade sf = null;
String categoryId = null;
CategoryType cate = null;
@@ -667,7 +667,7 @@ public class EbayEvents {
valueListType = (String)
paramMap.remove("categorySpecifics" + thisSuffix);
}
- if ((UtilValidate.isNotEmpty(nameValueListType)) &&
(UtilValidate.isNotEmpty(valueListType))){
+ if ((UtilValidate.isNotEmpty(nameValueListType)) &&
(UtilValidate.isNotEmpty(valueListType))) {
nameSpecificList.add(nameValueListType);
valueSpecificList.add(valueListType);
}
@@ -987,7 +987,7 @@ public class EbayEvents {
}
}
request.setAttribute("productStoreId",
requestParams.get("productStoreId"));
- } catch(Exception e) {
+ } catch (Exception e) {
Debug.logError(e.getMessage(), MODULE);
request.setAttribute("_ERROR_MESSAGE_","Exception:
".concat(e.getMessage()));
return "error";
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 c5d2880..de13fd5 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java
@@ -233,7 +233,7 @@ public class EbayStore {
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,
"EbayStorePartyWithoutRoleEbayAccount", UtilMisc.toMap("partyId",
context.get("partyId").toString()), locale));
}
try {
- SetStoreCategoriesCall call = new
SetStoreCategoriesCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"),
locale, delegator));
+ SetStoreCategoriesCall call = new
SetStoreCategoriesCall(EbayStoreHelper.getApiContext((String)
context.get("productStoreId"), locale, delegator));
catalogCategories =
EntityQuery.use(delegator).from("ProdCatalogCategory").where("prodCatalogId",
context.get("prodCatalogId").toString(),"prodCatalogCategoryTypeId","PCCT_EBAY_ROOT").orderBy("sequenceNum
ASC").queryList();
if (catalogCategories != null && catalogCategories.size() > 0) {
@@ -373,7 +373,7 @@ public class EbayStore {
StoreCustomCategoryType[] storeCustomCategoryTypeArry = null;
if (list != null && list.size() > 0) {
storeCustomCategoryTypeArry = new
StoreCustomCategoryType[list.size()];
- int i=0;
+ int i = 0;
for (StoreCustomCategoryType val : list) {
storeCustomCategoryTypeArry[i] = val;
}
@@ -517,7 +517,7 @@ public class EbayStore {
UtilXml.addChildElementValue(storeRequestElem, "Action", "Add",
storeDocument);
Element StoreCategoriesElem =
UtilXml.addChildElement(storeRequestElem, "StoreCategories", storeDocument);
- //UtilXml.addChildElementValue(StoreCategoriesElem, "Country",
(String)context.get("country"), storeDocument);
+ //UtilXml.addChildElementValue(StoreCategoriesElem, "Country",
(String) context.get("country"), storeDocument);
GenericValue category = null;
if (UtilValidate.isNotEmpty(context.get("prodCatalogId"))) {
category =
EntityQuery.use(delegator).from("ProductCategory").where("productCategoryId",
productCategoryId).cache().queryOne();
@@ -638,8 +638,8 @@ public class EbayStore {
e1.printStackTrace();
}
Debug.logInfo("userLoginId is "+userLoginId+" and productStoreId
is "+ context.get("productStoreId"), MODULE);
- GetStoreCall call = new
GetStoreCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"),
locale, delegator));
-
//call.setSite(EbayHelper.getSiteCodeType((String)context.get("productStoreId"),
locale, delegator));
+ GetStoreCall call = new
GetStoreCall(EbayStoreHelper.getApiContext((String)
context.get("productStoreId"), locale, delegator));
+ //call.setSite(EbayHelper.getSiteCodeType((String)
context.get("productStoreId"), locale, delegator));
call.setCategoryStructureOnly(false);
call.setUserID(userLoginId);
@@ -705,7 +705,7 @@ public class EbayStore {
StoreHeaderStyleCodeType[] storeHeaderStyleCodeList =
StoreHeaderStyleCodeType.values();
if (storeHeaderStyleCodeList != null) {
List<Map<String, Object>> storeHeaderStyleList = new
LinkedList<>();
- int i=0;
+ int i = 0;
while (i<storeHeaderStyleCodeList.length) {
Map<String, Object> storeHeaderStyleMap = new
HashMap<>();
StoreHeaderStyleCodeType storeHeaderStyleCode =
storeHeaderStyleCodeList[i];
@@ -881,9 +881,9 @@ public class EbayStore {
try {
if (context.get("productStoreId") != null) {
- String themeId = (String)context.get("themeId");
+ String themeId = (String) context.get("themeId");
- GetStoreOptionsCall call = new
GetStoreOptionsCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"),
locale, delegator));
+ GetStoreOptionsCall call = new
GetStoreOptionsCall(EbayStoreHelper.getApiContext((String)
context.get("productStoreId"), locale, delegator));
req = new GetStoreOptionsRequestType();
resp = (GetStoreOptionsResponseType) call.execute(req);
@@ -945,7 +945,7 @@ public class EbayStore {
GetStoreOptionsResponseType resp = null;
try {
if (context.get("productStoreId") != null) {
- GetStoreOptionsCall call = new
GetStoreOptionsCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"),
locale, delegator));
+ GetStoreOptionsCall call = new
GetStoreOptionsCall(EbayStoreHelper.getApiContext((String)
context.get("productStoreId"), locale, delegator));
req = new GetStoreOptionsRequestType();
resp = (GetStoreOptionsResponseType) call.execute(req);
@@ -990,7 +990,7 @@ public class EbayStore {
GetStoreOptionsResponseType resp = null;
try {
if (context.get("productStoreId") != null) {
- GetStoreOptionsCall call = new
GetStoreOptionsCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"),
locale, delegator));
+ GetStoreOptionsCall call = new
GetStoreOptionsCall(EbayStoreHelper.getApiContext((String)
context.get("productStoreId"), locale, delegator));
req = new GetStoreOptionsRequestType();
resp = (GetStoreOptionsResponseType) call.execute(req);
@@ -1042,7 +1042,7 @@ public class EbayStore {
GetStoreOptionsResponseType resp = null;
try {
if (context.get("productStoreId") != null) {
- GetStoreOptionsCall call = new
GetStoreOptionsCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"),
locale, delegator));
+ GetStoreOptionsCall call = new
GetStoreOptionsCall(EbayStoreHelper.getApiContext((String)
context.get("productStoreId"), locale, delegator));
req = new GetStoreOptionsRequestType();
resp = (GetStoreOptionsResponseType) call.execute(req);
@@ -1100,7 +1100,7 @@ public class EbayStore {
GetStoreOptionsResponseType resp = null;
try {
if (context.get("productStoreId") != null) {
- GetStoreOptionsCall call = new
GetStoreOptionsCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"),
locale, delegator));
+ GetStoreOptionsCall call = new
GetStoreOptionsCall(EbayStoreHelper.getApiContext((String)
context.get("productStoreId"), locale, delegator));
req = new GetStoreOptionsRequestType();
resp = (GetStoreOptionsResponseType) call.execute(req);
@@ -1227,20 +1227,20 @@ public class EbayStore {
StoreType storeType = null;
try {
if (context.get("productStoreId") != null) {
- SetStoreCall call = new
SetStoreCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"),
locale, delegator));
+ SetStoreCall call = new
SetStoreCall(EbayStoreHelper.getApiContext((String)
context.get("productStoreId"), locale, delegator));
req = new SetStoreRequestType();
storeType = new StoreType();
- storeType.setName((String)context.get("storeName"));
- storeType.setDescription((String)context.get("storeDesc"));
- storeType.setURL((String)context.get("storeUrl"));
+ storeType.setName((String) context.get("storeName"));
+ storeType.setDescription((String) context.get("storeDesc"));
+ storeType.setURL((String) context.get("storeUrl"));
storeType.setURLPath("");
StoreLogoType storeLogo = new StoreLogoType();
if (context.get("storeLogoURL") == null) {
- if (context.get("storeLogoId") != null)
storeLogo.setLogoID(Integer.parseInt((String)context.get("storeLogoId")));
- storeLogo.setName((String)context.get("storeLogoName"));
+ if (context.get("storeLogoId") != null)
storeLogo.setLogoID(Integer.parseInt((String) context.get("storeLogoId")));
+ storeLogo.setName((String) context.get("storeLogoName"));
} else {
- storeLogo.setURL((String)context.get("storeLogoURL"));
+ storeLogo.setURL((String) context.get("storeLogoURL"));
}
storeType.setLogo(storeLogo);
@@ -1250,20 +1250,20 @@ public class EbayStore {
StoreFontType storeFont = null;
if ("Advanced".equals(context.get("themeType"))) {
storeColorScheme = new StoreColorSchemeType();
- if (context.get("storeAdvancedThemeColor") != null)
storeColorScheme.setColorSchemeID(Integer.parseInt((String)context.get("storeAdvancedThemeColor")));
+ if (context.get("storeAdvancedThemeColor") != null)
storeColorScheme.setColorSchemeID(Integer.parseInt((String)
context.get("storeAdvancedThemeColor")));
storecolor = new StoreColorType();
-
storecolor.setPrimary((String)context.get("storePrimaryColor"));
-
storecolor.setSecondary((String)context.get("storeSecondaryColor"));
-
storecolor.setAccent((String)context.get("storeAccentColor"));
+ storecolor.setPrimary((String)
context.get("storePrimaryColor"));
+ storecolor.setSecondary((String)
context.get("storeSecondaryColor"));
+ storecolor.setAccent((String)
context.get("storeAccentColor"));
storeColorScheme.setColor(storecolor);
storeTheme.setColorScheme(storeColorScheme);
storeTheme.setName(null);
-
storeTheme.setThemeID(Integer.parseInt((String)context.get("storeAdvancedTheme")));
+ storeTheme.setThemeID(Integer.parseInt((String)
context.get("storeAdvancedTheme")));
} else if ("Basic".equals(context.get("themeType"))) {
storeColorScheme = new StoreColorSchemeType();
if (context.get("storeBasicTheme")!=null) {
- String storeBasicTheme =
(String)context.get("storeBasicTheme");
+ String storeBasicTheme = (String)
context.get("storeBasicTheme");
String storeThemeId = null;
String storeColorSchemeId = null;
if (storeBasicTheme.indexOf("-") != -1) {
@@ -1273,23 +1273,23 @@ public class EbayStore {
if (storeColorSchemeId != null)
storeColorScheme.setColorSchemeID(Integer.parseInt(storeColorSchemeId));
storecolor = new StoreColorType();
-
storecolor.setPrimary((String)context.get("storePrimaryColor"));
-
storecolor.setSecondary((String)context.get("storeSecondaryColor"));
-
storecolor.setAccent((String)context.get("storeAccentColor"));
+ storecolor.setPrimary((String)
context.get("storePrimaryColor"));
+ storecolor.setSecondary((String)
context.get("storeSecondaryColor"));
+ storecolor.setAccent((String)
context.get("storeAccentColor"));
storeColorScheme.setColor(storecolor);
storeFont = new StoreFontType();
-
storeFont.setNameColor((String)context.get("storeNameFontColor"));
-
storeFont.setNameFace(StoreFontFaceCodeType.valueOf((String)context.get("storeNameFont")));
-
storeFont.setNameSize(StoreFontSizeCodeType.valueOf((String)context.get("storeNameFontSize")));
+ storeFont.setNameColor((String)
context.get("storeNameFontColor"));
+
storeFont.setNameFace(StoreFontFaceCodeType.valueOf((String)
context.get("storeNameFont")));
+
storeFont.setNameSize(StoreFontSizeCodeType.valueOf((String)
context.get("storeNameFontSize")));
-
storeFont.setTitleColor((String)context.get("storeTitleFontColor"));
-
storeFont.setTitleFace(StoreFontFaceCodeType.valueOf((String)context.get("storeTitleFont")));
-
storeFont.setTitleSize(StoreFontSizeCodeType.valueOf((String)context.get("storeTitleFontSize")));
+ storeFont.setTitleColor((String)
context.get("storeTitleFontColor"));
+
storeFont.setTitleFace(StoreFontFaceCodeType.valueOf((String)
context.get("storeTitleFont")));
+
storeFont.setTitleSize(StoreFontSizeCodeType.valueOf((String)
context.get("storeTitleFontSize")));
-
storeFont.setDescColor((String)context.get("storeDescFontColor"));
-
storeFont.setDescFace(StoreFontFaceCodeType.valueOf((String)context.get("storeDescFont")));
-
storeFont.setDescSize(StoreFontSizeCodeType.valueOf((String)context.get("storeDescFontSize")));
+ storeFont.setDescColor((String)
context.get("storeDescFontColor"));
+
storeFont.setDescFace(StoreFontFaceCodeType.valueOf((String)
context.get("storeDescFont")));
+
storeFont.setDescSize(StoreFontSizeCodeType.valueOf((String)
context.get("storeDescFontSize")));
storeColorScheme.setFont(storeFont);
@@ -1299,14 +1299,14 @@ public class EbayStore {
}
}
storeType.setTheme(storeTheme);
-
storeType.setHeaderStyle(StoreHeaderStyleCodeType.valueOf((String)context.get("storeHeaderStyle")));
-
storeType.setItemListLayout(StoreItemListLayoutCodeType.valueOf((String)context.get("storeItemLayout")));
-
storeType.setItemListSortOrder(StoreItemListSortOrderCodeType.valueOf((String)context.get("storeItemSortOrder")));
-
storeType.setMerchDisplay(MerchDisplayCodeType.valueOf((String)context.get("storeMerchDisplay")));
-
storeType.setSubscriptionLevel(StoreSubscriptionLevelCodeType.valueOf((String)context.get("storeSubscriptionDisplay")));
+
storeType.setHeaderStyle(StoreHeaderStyleCodeType.valueOf((String)
context.get("storeHeaderStyle")));
+
storeType.setItemListLayout(StoreItemListLayoutCodeType.valueOf((String)
context.get("storeItemLayout")));
+
storeType.setItemListSortOrder(StoreItemListSortOrderCodeType.valueOf((String)
context.get("storeItemSortOrder")));
+
storeType.setMerchDisplay(MerchDisplayCodeType.valueOf((String)
context.get("storeMerchDisplay")));
+
storeType.setSubscriptionLevel(StoreSubscriptionLevelCodeType.valueOf((String)
context.get("storeSubscriptionDisplay")));
-
storeType.setCustomHeader((String)context.get("storeCustomHeader"));
-
storeType.setCustomHeaderLayout(StoreCustomHeaderLayoutCodeType.valueOf((String)context.get("storeCustomHeaderLayout")));
+ storeType.setCustomHeader((String)
context.get("storeCustomHeader"));
+
storeType.setCustomHeaderLayout(StoreCustomHeaderLayoutCodeType.valueOf((String)
context.get("storeCustomHeaderLayout")));
req.setStore(storeType);
resp = (SetStoreResponseType) call.execute(req);
@@ -1709,7 +1709,7 @@ public class EbayStore {
try {
String itemId = (String) context.get("itemId");
String transactionId = (String) context.get("transactionId");
- DisputeReasonCodeType drct =
EbayStore.getEbayDisputeReasonCodeType((String)context.get("disputeReasonCodeType"));
+ DisputeReasonCodeType drct =
EbayStore.getEbayDisputeReasonCodeType((String)
context.get("disputeReasonCodeType"));
DisputeExplanationCodeType dect =
EbayStore.getEbayDisputeExplanationCodeType((String)
context.get("disputeExplanationCodeType"));
DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {
DetailLevelCodeType.RETURN_ALL,
@@ -2074,7 +2074,7 @@ public class EbayStore {
return colsList;
}
- public static Map<String, Object> getTransaction(TransactionType
transaction){
+ public static Map<String, Object> getTransaction(TransactionType
transaction) {
Map<String, Object> cols = new HashMap<>();
ItemType item = transaction.getItem();
String itemId = null;
@@ -2467,7 +2467,7 @@ public class EbayStore {
if (product != null) {
checkResult = true;
}
- } catch(GenericEntityException e) {
+ } catch (GenericEntityException e) {
return false;
}
return checkResult;
diff --git
a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java
b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java
index 2aeac7e..3ef494c 100644
---
a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java
+++
b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java
@@ -31,7 +31,7 @@ import org.apache.ofbiz.entity.GenericValue;
import org.apache.ofbiz.service.GenericServiceException;
import org.apache.ofbiz.service.LocalDispatcher;
-public class EbayStoreAutoPrefEvents{
+public class EbayStoreAutoPrefEvents {
private static final String MODULE =
EbayStoreAutoPrefEvents.class.getName();
diff --git
a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPreferences.java
b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPreferences.java
index f4a1e0e..e77fa60 100644
---
a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPreferences.java
+++
b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPreferences.java
@@ -1077,7 +1077,7 @@ public class EbayStoreAutoPreferences {
GetSellingManagerInventoryResponseType resp = null;
if (context.get("productStoreId") != null) {
- GetSellingManagerInventoryCall call = new
GetSellingManagerInventoryCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"),
locale, delegator));
+ GetSellingManagerInventoryCall call = new
GetSellingManagerInventoryCall(EbayStoreHelper.getApiContext((String)
context.get("productStoreId"), locale, delegator));
try {
SellingManagerProductType[] returnedSellingManagerProductType
= null;
@@ -1379,9 +1379,9 @@ public class EbayStoreAutoPreferences {
}
}
}
- } catch (ApiException e){
+ } catch (ApiException e) {
return ServiceUtil.returnError(e.getMessage());
- }catch(Exception e){
+ } catch (Exception e) {
return ServiceUtil.returnError(e.getMessage());
}
return ServiceUtil.returnSuccess();
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 6296b82..2d7541c 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java
@@ -416,7 +416,7 @@ public class EbayStoreHelper {
item.setShipToLocations(tempShipLocation);
}
}
- } catch(Exception e) {
+ } catch (Exception e) {
Debug.logError(e.getMessage(), MODULE);
}
}
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 084bf14..9402213 100644
---
a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreInventoryServices.java
+++
b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreInventoryServices.java
@@ -86,11 +86,11 @@ public class EbayStoreInventoryServices {
return result;
}
- String productId = (String)context.get("productId");
- String folderId = (String)context.get("folderId");
+ String productId = (String) context.get("productId");
+ String folderId = (String) context.get("folderId");
// start upload/update products which selected to an ebay
inventory
if (folderId != null) {
- GetSellingManagerInventoryCall invenCall = new
GetSellingManagerInventoryCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"),
locale, delegator));
+ GetSellingManagerInventoryCall invenCall = new
GetSellingManagerInventoryCall(EbayStoreHelper.getApiContext((String)
context.get("productStoreId"), locale, delegator));
invenReq = new GetSellingManagerInventoryRequestType();
invenResp = (GetSellingManagerInventoryResponseType)
invenCall.execute(invenReq);
if (invenResp != null &&
"SUCCESS".equals(invenResp.getAck().toString())) {
@@ -143,9 +143,9 @@ public class EbayStoreInventoryServices {
try {
if (context.get("productStoreId") != null &&
context.get("productId") != null && context.get("folderId") != null) {
- String productId = (String)context.get("productId");
- String folderId = (String)context.get("folderId");
- AddSellingManagerProductCall productCall = new
AddSellingManagerProductCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"),
locale, delegator));
+ String productId = (String) context.get("productId");
+ String folderId = (String) context.get("folderId");
+ AddSellingManagerProductCall productCall = new
AddSellingManagerProductCall(EbayStoreHelper.getApiContext((String)
context.get("productStoreId"), locale, delegator));
productReq = new AddSellingManagerProductRequestType();
productReq.setFolderID(new Long(folderId));
SellingManagerProductDetailsType
sellingManagerProductDetailsType = new SellingManagerProductDetailsType();
@@ -187,9 +187,9 @@ public class EbayStoreInventoryServices {
try {
if (context.get("productStoreId") != null &&
context.get("productId") != null && context.get("folderId") != null) {
- String productId = (String)context.get("productId");
- String folderId = (String)context.get("folderId");
- ReviseSellingManagerProductCall call = new
ReviseSellingManagerProductCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"),
locale, delegator));
+ String productId = (String) context.get("productId");
+ String folderId = (String) context.get("folderId");
+ ReviseSellingManagerProductCall call = new
ReviseSellingManagerProductCall(EbayStoreHelper.getApiContext((String)
context.get("productStoreId"), locale, delegator));
req = new ReviseSellingManagerProductRequestType();
SellingManagerProductDetailsType
sellingManagerProductDetailsType = new SellingManagerProductDetailsType();
GenericValue ebayProductStoreInventory =
EntityQuery.use(delegator).from("EbayProductStoreInventory").where("productId",
productId, "facilityId", context.get("facilityId"), "productStoreId",
context.get("productStoreId")).queryOne();
@@ -239,7 +239,7 @@ public class EbayStoreInventoryServices {
try {
if (context.get("productStoreId") != null) {
- GetSellingManagerInventoryFolderCall call = new
GetSellingManagerInventoryFolderCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"),
locale, delegator));
+ GetSellingManagerInventoryFolderCall call = new
GetSellingManagerInventoryFolderCall(EbayStoreHelper.getApiContext((String)
context.get("productStoreId"), locale, delegator));
req = new GetSellingManagerInventoryFolderRequestType();
resp = (GetSellingManagerInventoryFolderResponseType)
call.execute(req);
if (resp != null &&
"SUCCESS".equals(resp.getAck().toString())) {
@@ -282,7 +282,7 @@ public class EbayStoreInventoryServices {
try {
if (context.get("productStoreId") != null) {
- AddSellingManagerInventoryFolderCall call = new
AddSellingManagerInventoryFolderCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"),
locale, delegator));
+ AddSellingManagerInventoryFolderCall call = new
AddSellingManagerInventoryFolderCall(EbayStoreHelper.getApiContext((String)
context.get("productStoreId"), locale, delegator));
req = new AddSellingManagerInventoryFolderRequestType();
req.setFolderName(defaultFolderName);//req.setComment(value);//req.setParentFolderID(value)
resp = (AddSellingManagerInventoryFolderResponseType)
call.execute(req);
@@ -306,10 +306,10 @@ public class EbayStoreInventoryServices {
GenericValue userLogin = (GenericValue) context.get("userLogin");
Map<String, Object> result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
- String productStoreId = (String)context.get("productStoreId");
- String facilityId = (String)context.get("facilityId");
- String folderId = (String)context.get("folderId");
- String productId = (String)context.get("productId");
+ String productStoreId = (String) context.get("productStoreId");
+ String facilityId = (String) context.get("facilityId");
+ String folderId = (String) context.get("folderId");
+ String productId = (String) context.get("productId");
String ebayProductId = null;
GetSellingManagerInventoryRequestType req = null;
GetSellingManagerInventoryResponseType resp = null;
@@ -364,10 +364,10 @@ 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")));
+ 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")));
if (ServiceUtil.isError(result)) {
return
ServiceUtil.returnError(ServiceUtil.getErrorMessage(result));
}
diff --git
a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOptions.java
b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOptions.java
index 17b32c0..64bb800 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOptions.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOptions.java
@@ -80,7 +80,7 @@ public class EbayStoreOptions {
returnedBasicThemeArray = resp.getBasicThemeArray();
StoreThemeType[] storeBasicTheme =
returnedBasicThemeArray.getTheme();
- int i=0;
+ int i = 0;
String colorSchemeId =
themeId.substring(themeId.indexOf("-")+1);
themeId = themeId.substring(0, themeId.indexOf("-"));
diff --git
a/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java
b/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java
index 877f108..3bc7e11 100644
---
a/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java
+++
b/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java
@@ -186,7 +186,7 @@ public class JanrainHelper {
}
}
- public static String janrainCheckLogin(HttpServletRequest request,
HttpServletResponse response){
+ public static String janrainCheckLogin(HttpServletRequest request,
HttpServletResponse response) {
Delegator delegator = (Delegator) request.getAttribute("delegator");
String token = request.getParameter("token");
String errMsg = "";
diff --git
a/example/src/main/java/org/apache/ofbiz/example/ExampleWebSockets.java
b/example/src/main/java/org/apache/ofbiz/example/ExampleWebSockets.java
index 6c15c1b..c0afba4 100644
--- a/example/src/main/java/org/apache/ofbiz/example/ExampleWebSockets.java
+++ b/example/src/main/java/org/apache/ofbiz/example/ExampleWebSockets.java
@@ -44,8 +44,8 @@ public class ExampleWebSockets {
try {
if (session.isOpen()) {
synchronized (clients) {
- for(Session client : clients){
- if (!client.equals(session)){
+ for (Session client : clients) {
+ if (!client.equals(session)) {
client.getBasicRemote().sendText(msg);
}
}
diff --git
a/firstdatapaymentgateway/src/main/java/org/apache/ofbiz/firstdatapaymentgateway/FirstDataPaymentServices.java
b/firstdatapaymentgateway/src/main/java/org/apache/ofbiz/firstdatapaymentgateway/FirstDataPaymentServices.java
index f7ea155..96ce016 100644
---
a/firstdatapaymentgateway/src/main/java/org/apache/ofbiz/firstdatapaymentgateway/FirstDataPaymentServices.java
+++
b/firstdatapaymentgateway/src/main/java/org/apache/ofbiz/firstdatapaymentgateway/FirstDataPaymentServices.java
@@ -115,12 +115,12 @@ public class FirstDataPaymentServices {
String responseString = EntityUtils.toString(entity);
ObjectMapper objectMapper = new ObjectMapper();
- Map<String, Object> convertedMap =
objectMapper.readValue(responseString, new TypeReference<Map<String,
Object>>(){});
+ Map<String, Object> convertedMap =
objectMapper.readValue(responseString, new TypeReference<Map<String, Object>>()
{});
String transactionStatus = (String)
convertedMap.get("transactionStatus");
String transactionId = (String)
convertedMap.get("ipgTransactionId");
String fdOrderId = (String) convertedMap.get("orderId");
- Map<String, Object> processor =
objectMapper.convertValue(convertedMap.get("processor"), new
TypeReference<Map<String, Object>>(){});
+ Map<String, Object> processor =
objectMapper.convertValue(convertedMap.get("processor"), new
TypeReference<Map<String, Object>>() {});
String gatewayMessage = (String) processor.get("responseMessage");
int statusCode = response.getStatusLine().getStatusCode();
result.put("authCode", String.valueOf(statusCode));
@@ -196,12 +196,12 @@ public class FirstDataPaymentServices {
String responseString = EntityUtils.toString(entity);
ObjectMapper objectMapper = new ObjectMapper();
- Map<String, Object> convertedMap =
objectMapper.readValue(responseString, new TypeReference<Map<String,
Object>>(){});
+ Map<String, Object> convertedMap =
objectMapper.readValue(responseString, new TypeReference<Map<String, Object>>()
{});
String transactionStatus = (String)
convertedMap.get("transactionStatus");
String transactionId = (String)
convertedMap.get("ipgTransactionId");
String fdOrderId = (String) convertedMap.get("orderId");
- Map<String, Object> processor =
objectMapper.convertValue(convertedMap.get("processor"), new
TypeReference<Map<String, Object>>(){});
+ Map<String, Object> processor =
objectMapper.convertValue(convertedMap.get("processor"), new
TypeReference<Map<String, Object>>() {});
String gatewayMessage = (String) processor.get("responseMessage");
int statusCode = response.getStatusLine().getStatusCode();
result.put("captureCode", String.valueOf(statusCode));
@@ -280,12 +280,12 @@ public class FirstDataPaymentServices {
String responseString = EntityUtils.toString(entity);
ObjectMapper objectMapper = new ObjectMapper();
- Map<String, Object> convertedMap =
objectMapper.readValue(responseString, new TypeReference<Map<String,
Object>>(){});
+ Map<String, Object> convertedMap =
objectMapper.readValue(responseString, new TypeReference<Map<String, Object>>()
{});
String transactionStatus = (String)
convertedMap.get("transactionStatus");
String transactionId = (String)
convertedMap.get("ipgTransactionId");
String fdOrderId = (String) convertedMap.get("orderId");
- Map<String, Object> processor =
objectMapper.convertValue(convertedMap.get("processor"), new
TypeReference<Map<String, Object>>(){});
+ Map<String, Object> processor =
objectMapper.convertValue(convertedMap.get("processor"), new
TypeReference<Map<String, Object>>() {});
String gatewayMessage = (String) processor.get("responseMessage");
int statusCode = response.getStatusLine().getStatusCode();
result.put("refundCode", String.valueOf(statusCode));
@@ -360,12 +360,12 @@ public class FirstDataPaymentServices {
String responseString = EntityUtils.toString(entity);
ObjectMapper objectMapper = new ObjectMapper();
- Map<String, Object> convertedMap =
objectMapper.readValue(responseString, new TypeReference<Map<String,
Object>>(){});
+ Map<String, Object> convertedMap =
objectMapper.readValue(responseString, new TypeReference<Map<String, Object>>()
{});
String transactionStatus = (String)
convertedMap.get("transactionStatus");
String transactionId = (String)
convertedMap.get("ipgTransactionId");
String fdOrderId = (String) convertedMap.get("orderId");
- Map<String, Object> processor =
objectMapper.convertValue(convertedMap.get("processor"), new
TypeReference<Map<String, Object>>(){});
+ Map<String, Object> processor =
objectMapper.convertValue(convertedMap.get("processor"), new
TypeReference<Map<String, Object>>() {});
String gatewayMessage = (String) processor.get("responseMessage");
int statusCode = response.getStatusLine().getStatusCode();
result.put("releaseCode", String.valueOf(statusCode));
diff --git
a/ldap/src/main/java/org/apache/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java
b/ldap/src/main/java/org/apache/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java
index 47f43ca..12f407a 100644
---
a/ldap/src/main/java/org/apache/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java
+++
b/ldap/src/main/java/org/apache/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java
@@ -184,7 +184,7 @@ public final class OFBizCasAuthenticationHandler extends
AbstractOFBizAuthentica
String casUrl = UtilXml.childElementValue(rootElement, "CasUrl",
"https://localhost:8443/cas");
Cookie[] cookies = request.getCookies();
if (cookies == null) return true;
- for (int i=0; i < cookies.length; i++) {
+ for (int i = 0; i < cookies.length; i++) {
Cookie cookie = cookies[i];
if (cookie.getName().equals(casTGC) &&
casUrl.indexOf(cookie.getDomain()) > -1) {
return false;
diff --git
a/lucene/src/main/java/org/apache/ofbiz/content/search/DocumentIndexer.java
b/lucene/src/main/java/org/apache/ofbiz/content/search/DocumentIndexer.java
index 6417d5e..10721eb 100644
--- a/lucene/src/main/java/org/apache/ofbiz/content/search/DocumentIndexer.java
+++ b/lucene/src/main/java/org/apache/ofbiz/content/search/DocumentIndexer.java
@@ -88,7 +88,7 @@ public class DocumentIndexer extends Thread {
try {
indexWriter.close();
indexWriter = null;
- } catch(IOException ioe) {
+ } catch (IOException ioe) {
Debug.logError(ioe, MODULE);
}
}
@@ -121,13 +121,13 @@ public class DocumentIndexer extends Thread {
indexWriter.updateDocument(documentIdentifier, document);
if (Debug.infoOn()) Debug.logInfo(getName() + ": indexed
Lucene document: " + ofbizDocument, MODULE);
}
- } catch(Exception e) {
+ } catch (Exception e) {
Debug.logError(e, getName() + ": error processing Lucene
document: " + ofbizDocument, MODULE);
if (documentIndexQueue.peek() == null) {
try {
indexWriter.close();
indexWriter = null;
- } catch(IOException ioe) {
+ } catch (IOException ioe) {
Debug.logError(ioe, MODULE);
}
}
diff --git
a/lucene/src/main/java/org/apache/ofbiz/content/search/SearchWorker.java
b/lucene/src/main/java/org/apache/ofbiz/content/search/SearchWorker.java
index 920b8ba..7baf988 100644
--- a/lucene/src/main/java/org/apache/ofbiz/content/search/SearchWorker.java
+++ b/lucene/src/main/java/org/apache/ofbiz/content/search/SearchWorker.java
@@ -43,7 +43,7 @@ public final class SearchWorker {
private static final Version LUCENE_VERSION = Version.LUCENE_8_5_0;
- private SearchWorker() {}
+ private SearchWorker() { }
public static void indexContentTree(LocalDispatcher dispatcher, Delegator
delegator, String siteId) throws Exception {
GenericValue content = delegator.makeValue("Content",
UtilMisc.toMap("contentId", siteId));
diff --git a/msggateway/src/main/java/org/apache/ofbiz/msg91/Msg91Services.java
b/msggateway/src/main/java/org/apache/ofbiz/msg91/Msg91Services.java
index 10d5bf2..fbc6d11 100644
--- a/msggateway/src/main/java/org/apache/ofbiz/msg91/Msg91Services.java
+++ b/msggateway/src/main/java/org/apache/ofbiz/msg91/Msg91Services.java
@@ -40,7 +40,6 @@ public class Msg91Services {
public static Map<String, Object> sendMsg91Sms(DispatchContext ctx,
Map<String, ? extends Object> context) {
Delegator delegator = ctx.getDelegator();
Map<String, Object> result = ServiceUtil.returnSuccess();
-
List<String> numbers = UtilGenerics.cast(context.get("numbers"));
String message = (String) context.get("message");
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 4aa0070..9b0885d 100644
--- a/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java
+++ b/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java
@@ -1272,7 +1272,6 @@ public class HtmlReport extends AbstractReport {
public String dialogEnd() {
return dialog(HTML_END, null);
}
-
/**
* Returns the http URI of the current dialog, to be used
* as value for the "action" attribute of a html form.<p>
@@ -1284,7 +1283,6 @@ public class HtmlReport extends AbstractReport {
public String getDialogRealUri(HttpServletRequest request) {
return String.valueOf(request.getAttribute(DIALOG_URI));
}
-
/**
* Set the report form uri.
*
@@ -1294,7 +1292,6 @@ public class HtmlReport extends AbstractReport {
public void setFormRealUri(HttpServletRequest request, String formUri) {
request.setAttribute(FORM_URI, formUri);
}
-
/**
* Get the report form uri.
*
@@ -1304,7 +1301,6 @@ public class HtmlReport extends AbstractReport {
public String getFormRealUri(HttpServletRequest request) {
return (String) request.getAttribute(FORM_URI);
}
-
@Override
public void addLogFile(String logFileName) {
if (logFile == null || logFileOutputStream == null) {
@@ -1317,7 +1313,6 @@ public class HtmlReport extends AbstractReport {
}
}
}
-
@Override
public String closeLogFile() {
if (logFileOutputStream != null) {
@@ -1338,16 +1333,13 @@ public class HtmlReport extends AbstractReport {
}
return logFileName;
}
-
public String getLogFileName() {
return logFileName;
}
-
@Override
public long getSequenceNum() {
return sequenceNum;
}
-
@Override
public void setSequenceNum(long sequenceNum) {
this.sequenceNum = sequenceNum;
diff --git
a/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlThread.java
b/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlThread.java
index 8ce0884..88feda6 100644
---
a/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlThread.java
+++
b/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlThread.java
@@ -322,7 +322,7 @@ public class PricatParseExcelHtmlThread extends
AbstractReportThread {
}
}
}
- }catch (GenericEntityException e) {
+ } catch (GenericEntityException e) {
Debug.logError(e.getMessage(), MODULE);
}
return facilities;
diff --git
a/pricat/src/main/java/org/apache/ofbiz/pricat/sample/SamplePricatParser.java
b/pricat/src/main/java/org/apache/ofbiz/pricat/sample/SamplePricatParser.java
index cfa03b0..dedd6a9 100644
---
a/pricat/src/main/java/org/apache/ofbiz/pricat/sample/SamplePricatParser.java
+++
b/pricat/src/main/java/org/apache/ofbiz/pricat/sample/SamplePricatParser.java
@@ -83,7 +83,7 @@ public class SamplePricatParser extends AbstractPricatParser {
try {
workbook = new XSSFWorkbook(is);
report.println(UtilProperties.getMessage(RESOURCE, "ok",
locale), InterfaceReport.FORMAT_OK);
- } catch(IOException e) {
+ } catch (IOException e) {
report.println(e);
report.println(UtilProperties.getMessage(RESOURCE,
"PricatSuggestion", locale), InterfaceReport.FORMAT_ERROR);
return;
@@ -170,7 +170,7 @@ public class SamplePricatParser extends
AbstractPricatParser {
errorMessages.put(new CellReference(currencyIdCell),
errorMessage);
return false;
}
- } catch(GenericEntityException e) {
+ } catch (GenericEntityException e) {
String errorMessage = UtilProperties.getMessage(RESOURCE,
"CurrencyIdNotFound", new Object[] {currencyId}, locale);
report.println(errorMessage, InterfaceReport.FORMAT_ERROR);
errorMessages.put(new CellReference(currencyIdCell),
errorMessage);
@@ -469,7 +469,7 @@ public class SamplePricatParser extends
AbstractPricatParser {
* @param version
* @return List of Object[]
*/
- private static List<Object[]> genExcelHeaderNames(String version){
+ private static List<Object[]> genExcelHeaderNames(String version) {
switch (version) {
case "V1.1":
default:
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 d8617ba..c5e2762 100644
--- a/solr/src/main/java/org/apache/ofbiz/solr/CategoryUtil.java
+++ b/solr/src/main/java/org/apache/ofbiz/solr/CategoryUtil.java
@@ -41,7 +41,7 @@ public final class CategoryUtil {
private static final String MODULE = CategoryUtil.class.getName();
- private CategoryUtil () {}
+ private CategoryUtil() { }
/**
* Gets catalog IDs for specified product category.
@@ -130,7 +130,7 @@ public final class CategoryUtil {
for (List<String> trailElement : trailElements) {
for (Iterator<String> trailIter = trailElement.iterator();
trailIter.hasNext();) {
String trailString = trailIter.next();
- if (catMember.length() > 0){
+ if (catMember.length() > 0) {
catMember.append("/");
i++;
}
@@ -139,10 +139,11 @@ public final class CategoryUtil {
}
}
- if (catMember.length() == 0){catMember.append(productCategoryId);}
-
+ if (catMember.length() == 0) {
+ catMember.append(productCategoryId);
+ }
if (showDepth) {
- cm = i +"/"+ catMember.toString();
+ cm = i + "/" + catMember.toString();
} else {
cm = catMember.toString();
}
@@ -155,7 +156,7 @@ public final class CategoryUtil {
* Ie for "1/SYRACUS2_CATEGORY/FICTION_C/" the returned value would be 2.
*/
public static int getNextLevelFromCategoryId(String productCategoryId,
DispatchContext dctx) {
- try{
+ try {
if (productCategoryId.contains("/")) {
String[] productCategories = productCategoryId.split("/");
int level = Integer.parseInt(productCategories[0]);
@@ -163,7 +164,7 @@ public final class CategoryUtil {
} else {
return 0;
}
- } catch(Exception e) {
+ } catch (Exception e) {
return 0;
}
}
@@ -175,13 +176,13 @@ public final class CategoryUtil {
* "2/SYRACUS2_CATEGORY/FICTION_C/".
*/
public static String getFacetFilterForCategory(String productCategoryId,
DispatchContext dctx) {
- try{
+ try {
String[] productCategories = productCategoryId.split("/");
int level = Integer.parseInt(productCategories[0]);
- int nextLevel = level+1;
- productCategories[0] = ""+nextLevel;
- return StringUtils.join(productCategories,"/");
- } catch(Exception e) {
+ int nextLevel = level + 1;
+ productCategories[0] = "" + nextLevel;
+ return StringUtils.join(productCategories, "/");
+ } catch (Exception e) {
return productCategoryId;
}
}
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 bb55dfa..b800f15 100644
--- a/solr/src/main/java/org/apache/ofbiz/solr/ProductUtil.java
+++ b/solr/src/main/java/org/apache/ofbiz/solr/ProductUtil.java
@@ -47,7 +47,7 @@ import org.apache.ofbiz.service.ServiceUtil;
public final class ProductUtil {
private static final String MODULE = ProductUtil.class.getName();
- private ProductUtil () {}
+ private ProductUtil() { }
public static Map<String, Object> getProductContent(GenericValue product,
DispatchContext dctx, Map<String, Object> context) {
GenericDelegator delegator = (GenericDelegator) dctx.getDelegator();
@@ -98,7 +98,7 @@ public final class ProductUtil {
while (trailIter.hasNext()) {
String trailString = trailIter.next();
- if (catMember.length() > 0){
+ if (catMember.length() > 0) {
catMember.append("/");
i++;
}
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 dd8026c..c3fc78c 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 d9ff384..017a31b 100644
--- a/solr/src/main/java/org/apache/ofbiz/solr/SolrUtil.java
+++ b/solr/src/main/java/org/apache/ofbiz/solr/SolrUtil.java
@@ -52,7 +52,7 @@ import org.apache.ofbiz.entity.GenericEntityException;
*/
public final class SolrUtil {
- private SolrUtil() {}
+ private SolrUtil() { }
private static final String MODULE = SolrUtil.class.getName();
private static final String[] solrProdAttribute = { "productId",
"internalName", "manu", "size", "smallImage", "mediumImage", "largeImage",
"listPrice", "defaultPrice", "inStock", "isVirtual" };
@@ -138,14 +138,13 @@ public final class SolrUtil {
WebappInfo solrApp = null;
try {
ComponentConfig cc = ComponentConfig.getComponentConfig("solr");
- for(WebappInfo currApp : cc.getWebappInfos()) {
+ for (WebappInfo currApp : cc.getWebappInfos()) {
if ("solr".equals(currApp.getName())) {
solrApp = currApp;
break;
}
}
- }
- catch(ComponentException e) {
+ } catch (ComponentException e) {
throw new IllegalStateException(e);
}
return solrApp;
@@ -268,7 +267,7 @@ public final class SolrUtil {
solrQuery.setRows(0);
}
- if (UtilValidate.isNotEmpty(facetPrefix)){
+ if (UtilValidate.isNotEmpty(facetPrefix)) {
solrQuery.setFacetPrefix(facetPrefix);
}
diff --git
a/solr/src/main/java/org/apache/ofbiz/solr/control/OFBizSolrLoginWorker.java
b/solr/src/main/java/org/apache/ofbiz/solr/control/OFBizSolrLoginWorker.java
index dcc278b..ef2d0d6 100644
--- a/solr/src/main/java/org/apache/ofbiz/solr/control/OFBizSolrLoginWorker.java
+++ b/solr/src/main/java/org/apache/ofbiz/solr/control/OFBizSolrLoginWorker.java
@@ -27,7 +27,7 @@ import org.apache.ofbiz.webapp.control.LoginWorker;
/**
* OFBiz Solr Login Workers
*/
-public final class OFBizSolrLoginWorker{
+public final class OFBizSolrLoginWorker {
private final static String MODULE = OFBizSolrLoginWorker.class.getName();
protected OFBizSolrLoginWorker() { }
diff --git a/solr/src/main/java/org/apache/ofbiz/solr/test/SolrTests.java
b/solr/src/main/java/org/apache/ofbiz/solr/test/SolrTests.java
index 440e337..948949a 100644
--- a/solr/src/main/java/org/apache/ofbiz/solr/test/SolrTests.java
+++ b/solr/src/main/java/org/apache/ofbiz/solr/test/SolrTests.java
@@ -73,7 +73,7 @@ public class SolrTests extends OFBizTestCase {
}
- public void testAddToSolrIndex() throws Exception{
+ public void testAddToSolrIndex() throws Exception {
context = new HashMap<>();
context.put("productId", validTestProductId);
response = dispatcher.runSync("addToSolrIndex", context);
diff --git a/webpos/src/main/java/org/apache/ofbiz/webpos/WebPosEvents.java
b/webpos/src/main/java/org/apache/ofbiz/webpos/WebPosEvents.java
index 9a5ff1b..6858051 100755
--- a/webpos/src/main/java/org/apache/ofbiz/webpos/WebPosEvents.java
+++ b/webpos/src/main/java/org/apache/ofbiz/webpos/WebPosEvents.java
@@ -198,7 +198,7 @@ public class WebPosEvents {
request.setAttribute("variantTree", variantTree);
request.setAttribute("variantTreeSize", variantTree.size());
List<String> featureOrder = new
LinkedList<>(featureSet);
- for (int i=0; i <
featureOrder.size(); i++) {
+ for (int i = 0; i <
featureOrder.size(); i++) {
String featureKey =
featureOrder.get(i);
GenericValue featureValue =
EntityQuery.use(delegator).from("ProductFeatureType").where("productFeatureTypeId",
featureOrder.get(i)).cache().queryOne();
if (featureValue != null &&
diff --git
a/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java
b/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java
index 91b378a..fae3dfc 100644
--- a/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java
+++ b/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java
@@ -42,7 +42,7 @@ import org.apache.ofbiz.service.ServiceUtil;
public class WebPosSearch {
private static final String MODULE = WebPosSearch.class.getName();
-
+
public static Map<String, Object> findProducts(DispatchContext dctx,
Map<String, ? extends Object> context) {
Delegator delegator = dctx.getDelegator();
String searchByProductIdValue = (String)
context.get("searchByProductIdValue");
@@ -50,11 +50,10 @@ public class WebPosSearch {
String searchByProductDescription = (String)
context.get("searchByProductDescription");
String goodIdentificationTypeId = (String)
context.get("goodIdentificationTypeId");
Map<String, Object> result = ServiceUtil.returnSuccess();
-
+
List<EntityCondition> andExprs = new LinkedList<>();
EntityCondition mainCond = null;
String entityName = "Product";
-
// search by product name
if (UtilValidate.isNotEmpty(searchByProductName)) {
searchByProductName = searchByProductName.toUpperCase().trim();
@@ -84,7 +83,6 @@ public class WebPosSearch {
result.put("productsList", products);
return result;
}
-
public static Map<String, Object> findParties(DispatchContext dctx,
Map<String, ? extends Object> context) {
Delegator delegator = dctx.getDelegator();
String searchByPartyLastName = (String)
context.get("searchByPartyLastName");
@@ -94,12 +92,12 @@ public class WebPosSearch {
String billingLocation = (String) context.get("billingLocation");
String shippingLocation = (String) context.get("shippingLocation");
Map<String, Object> result = ServiceUtil.returnSuccess();
-
+
List<EntityCondition> andExprs = new LinkedList<>();
List<EntityCondition> orExprs = new LinkedList<>();
EntityCondition mainCond = null;
List<String> orderBy = new LinkedList<>();
-
+
// default view settings
DynamicViewEntity dynamicView = new DynamicViewEntity();
dynamicView.addMemberEntity("PT", "Party");
@@ -132,29 +130,23 @@ public class WebPosSearch {
dynamicView.addAlias("PA", "countryGeoId");
dynamicView.addAlias("PA", "stateProvinceGeoId");
dynamicView.addViewLink("CM", "PA", Boolean.TRUE,
ModelKeyMap.makeKeyMapList("contactMechId"));
-
if (UtilValidate.isNotEmpty(billingLocation) &&
"Y".equalsIgnoreCase(billingLocation)) {
orExprs.add(EntityCondition.makeCondition("contactMechPurposeTypeId",
EntityOperator.EQUALS, "BILLING_LOCATION"));
}
-
if (UtilValidate.isNotEmpty(shippingLocation) &&
"Y".equalsIgnoreCase(shippingLocation)) {
orExprs.add(EntityCondition.makeCondition("contactMechPurposeTypeId",
EntityOperator.EQUALS, "SHIPPING_LOCATION"));
}
-
if (orExprs.size() > 0) {
andExprs.add(EntityCondition.makeCondition(orExprs,
EntityOperator.OR));
}
andExprs.add(EntityCondition.makeCondition("partyTypeId",
EntityOperator.EQUALS, "PERSON"));
andExprs.add(EntityCondition.makeCondition("contactMechTypeId",
EntityOperator.EQUALS, "POSTAL_ADDRESS"));
-
if (UtilValidate.isNotEmpty(shippingLocation) &&
"N".equalsIgnoreCase(shippingLocation) &&
UtilValidate.isNotEmpty(billingLocation) &&
"N".equalsIgnoreCase(billingLocation)) {
andExprs.add(EntityCondition.makeCondition("contactMechPurposeTypeId",
EntityOperator.IN, UtilMisc.toList("SHIPPING_LOCATION", "BILLING_LOCATION")));
}
mainCond = EntityCondition.makeCondition(andExprs, EntityOperator.AND);
-
orderBy.add("lastName");
orderBy.add("firstName");
-
// search by last name
if (UtilValidate.isNotEmpty(searchByPartyLastName)) {
searchByPartyLastName = searchByPartyLastName.toUpperCase().trim();