You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by pa...@apache.org on 2020/06/27 19:36:59 UTC
[ofbiz-plugins] branch trunk updated: Improved: Replace explicit
type argument with diamond operator(OFBIZ-11828)
This is an automated email from the ASF dual-hosted git repository.
pawan 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 2e41563 Improved: Replace explicit type argument with diamond operator(OFBIZ-11828)
2e41563 is described below
commit 2e415638b2d63f8caf56ef8d31a7eb9deb382e06
Author: Pawan Verma <pa...@hotwaxsystems.com>
AuthorDate: Sun Jun 28 01:06:04 2020 +0530
Improved: Replace explicit type argument with diamond operator(OFBIZ-11828)
Since Java 1.7, when defining generic types it is unnecessary to redefine those types in the constructor when it is already done in the declared type.
---
.../org/apache/ofbiz/ebaystore/EbayAccount.java | 4 +-
.../ofbiz/ebaystore/EbayBestOfferAutoPref.java | 2 +-
.../org/apache/ofbiz/ebaystore/EbayEvents.java | 36 ++--
.../org/apache/ofbiz/ebaystore/EbayFeedback.java | 12 +-
.../java/org/apache/ofbiz/ebaystore/EbayStore.java | 188 ++++++++++-----------
.../ofbiz/ebaystore/EbayStoreAutoPrefEvents.java | 2 +-
.../ofbiz/ebaystore/EbayStoreAutoPreferences.java | 68 ++++----
.../ofbiz/ebaystore/EbayStoreCategoryFacade.java | 14 +-
.../ofbiz/ebaystore/EbayStoreCustomerService.java | 6 +-
.../apache/ofbiz/ebaystore/EbayStoreHelper.java | 22 +--
.../ebaystore/EbayStoreInventoryServices.java | 8 +-
.../apache/ofbiz/ebaystore/EbayStoreOptions.java | 10 +-
.../org/apache/ofbiz/ebaystore/EbayStoreOrder.java | 10 +-
.../ofbiz/content/search/ProductDocument.java | 2 +-
14 files changed, 192 insertions(+), 192 deletions(-)
diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayAccount.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayAccount.java
index 82f54ef..72e8287 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayAccount.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayAccount.java
@@ -35,7 +35,7 @@ import com.ebay.soap.eBLBaseComponents.UserType;
public class EbayAccount {
public static Map<String, Object> getEbayUser(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object>result = new HashMap<String, Object>();
+ Map<String, Object>result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
String productStoreId = (String) context.get("productStoreId");
@@ -55,7 +55,7 @@ public class EbayAccount {
street1 = null,
street2 = null,
status = null;
- Map<String, Object>registrationAddress = new HashMap<String, Object>();
+ Map<String, Object>registrationAddress = new HashMap<>();
try {
ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
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 67ab0c9..fc9b2d0 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayBestOfferAutoPref.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayBestOfferAutoPref.java
@@ -41,7 +41,7 @@ public class EbayBestOfferAutoPref {
private static final String RESOURCE = "EbayStoreUiLabels";
public static Map<String, Object> ebayBestOfferPrefCond(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
LocalDispatcher dispatcher = dctx.getDispatcher();
Locale locale = (Locale)context.get("locale");
GenericValue userLogin = (GenericValue) context.get("userLogin");
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 5081cf6..3634e1a 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java
@@ -116,7 +116,7 @@ public class EbayEvents {
String ratingShipHand = (String)requestParams.get("ratingShipHand"+i);
String AqItemAsDescribedId = (String)requestParams.get("AqItemAsDescribedId"+i);
- Map<String, Object> leavefeedback = new HashMap<String, Object>();
+ Map<String, Object> leavefeedback = new HashMap<>();
leavefeedback.put("productStoreId", productStoreId);
leavefeedback.put("userLogin", userLogin);
leavefeedback.put("itemId", itemId);
@@ -166,7 +166,7 @@ public class EbayEvents {
try {
productIds = UtilGenerics.checkList(requestParams.get("selectResult"));
} catch (ClassCastException e) {
- if (UtilValidate.isEmpty(productIds)) productIds = new LinkedList<String>();
+ if (UtilValidate.isEmpty(productIds)) productIds = new LinkedList<>();
productIds.add((String) requestParams.get("selectResult"));
}
} else {
@@ -183,7 +183,7 @@ public class EbayEvents {
if (UtilValidate.isNotEmpty(addItemObject.get("itemListings"))) {
itemObjs = UtilGenerics.checkList(addItemObject.get("itemListings"));
} else {
- itemObjs = new LinkedList<Map<String,Object>>();
+ itemObjs = new LinkedList<>();
}
if (UtilValidate.isNotEmpty(productIds)) {
@@ -255,7 +255,7 @@ public class EbayEvents {
}
}
if (UtilValidate.isEmpty(itemListing)) {
- itemListing = new HashMap<String, Object>();
+ itemListing = new HashMap<>();
itemListing.put("addItemCall", addItemCall);
itemListing.put("productId", productId);
}
@@ -364,7 +364,7 @@ public class EbayEvents {
session.setAttribute("itemListings_".concat(siteCode), addItemObject);
}
if (addItemObject == null) {
- addItemObject = new HashMap<String, Object>();
+ addItemObject = new HashMap<>();
session.setAttribute("itemListings_".concat(siteCode), addItemObject);
}
return addItemObject;
@@ -622,7 +622,7 @@ public class EbayEvents {
Map<String,Object> requestParams = UtilHttp.getParameterMap(request);
Locale locale = UtilHttp.getLocale(request);
GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
- Map<String, Object> attributeMapList = new HashMap<String, Object>();
+ Map<String, Object> attributeMapList = new HashMap<>();
String id = "";
if (UtilValidate.isNotEmpty(requestParams.get("listype"))) {
if ("auction".equals(requestParams.get("listype"))) {
@@ -650,8 +650,8 @@ public class EbayEvents {
// initialize request parameter.
Map<String, Object> paramMap = UtilHttp.getParameterMap(request);
- List<String> nameSpecificList = new LinkedList<String>();
- List<String> valueSpecificList = new LinkedList<String>();
+ List<String> nameSpecificList = new LinkedList<>();
+ List<String> valueSpecificList = new LinkedList<>();
String nameValueListType = null;
String valueListType = null;
int rowCount = UtilHttp.getMultiFormRowCount(paramMap);
@@ -681,7 +681,7 @@ public class EbayEvents {
if (UtilValidate.isNotEmpty(addItemObject.get("itemListing"))) {
listAddItem = UtilGenerics.checkList(addItemObject.get("itemListing"));
} else {
- listAddItem = new LinkedList<Map<String,Object>>();
+ listAddItem = new LinkedList<>();
}
for (Map<String,Object> itemObj : listAddItem) {
@@ -876,7 +876,7 @@ public class EbayEvents {
int intAtp = atp.intValue();
if ((facilityId != "") && (intAtp != 0)) {
int newAtp = intAtp - 1;
- Map<String,Object> inMap = new HashMap<String, Object>();
+ Map<String,Object> inMap = new HashMap<>();
inMap.put("productStoreId", productStoreId);
inMap.put("facilityId", facilityId);
inMap.put("productId", productId);
@@ -902,7 +902,7 @@ public class EbayEvents {
addItemCall.setItem(item);
// create/update EbayProductListing entity
- Map<String, Object> prodMap = new HashMap<String, Object>();
+ Map<String, Object> prodMap = new HashMap<>();
prodMap.put("productStoreId", productStoreId);
prodMap.put("productId", productId);
prodMap.put("userLogin", userLogin);
@@ -965,7 +965,7 @@ public class EbayEvents {
// create/update EbayProductListingAttribute
if (UtilValidate.isNotEmpty(productListingId)) {
attributeMapList.put("productListingId", productListingId);
- Map<String, Object> ebayProdAttrMap = new HashMap<String, Object>();
+ Map<String, Object> ebayProdAttrMap = new HashMap<>();
ebayProdAttrMap.put("productListingId", productListingId);
ebayProdAttrMap.put("userLogin", userLogin);
ebayProdAttrMap.put("attributeMapList", attributeMapList);
@@ -1017,7 +1017,7 @@ public class EbayEvents {
if (UtilValidate.isNotEmpty(addItemObject.get("itemListing"))) {
listAddItem = UtilGenerics.checkList(addItemObject.get("itemListing"));
} else {
- listAddItem = new LinkedList<Map<String,Object>>();
+ listAddItem = new LinkedList<>();
}
double feesummary = 0.0;
for (Map<String,Object> itemObj : listAddItem) {
@@ -1072,7 +1072,7 @@ public class EbayEvents {
if (UtilValidate.isNotEmpty(addItemObject.get("itemListing"))) {
listAddItem = UtilGenerics.checkList(addItemObject.get("itemListing"));
} else {
- listAddItem = new LinkedList<Map<String,Object>>();
+ listAddItem = new LinkedList<>();
}
int i = 0;
for (Map<String,Object> itemObj : listAddItem) {
@@ -1114,7 +1114,7 @@ public class EbayEvents {
if (UtilValidate.isNotEmpty(addItemObject.get("itemListing"))) {
listAddItem = UtilGenerics.checkList(addItemObject.get("itemListing"));
} else {
- listAddItem = new LinkedList<Map<String,Object>>();
+ listAddItem = new LinkedList<>();
}
for (Map<String,Object> itemObj : listAddItem) {
updateQuantityInventoryProduct(itemObj, productStoreId, locale, delegator, dispatcher, userLogin);
@@ -1183,7 +1183,7 @@ public class EbayEvents {
}
public static Map<String, Map<String, List<String>>> categorySpecifics(String categoryId, HttpServletRequest request) {
- Map<String, Map<String, List<String>>> recommendationMap = new HashMap<String, Map<String,List<String>>>();
+ Map<String, Map<String, List<String>>> recommendationMap = new HashMap<>();
Delegator delegator = (Delegator) request.getAttribute("delegator");
Map<String,Object> requestParams = UtilHttp.getParameterMap(request);
Locale locale = UtilHttp.getLocale(request);
@@ -1204,10 +1204,10 @@ public class EbayEvents {
for (RecommendationsType recommendationsType : recommend) {
NameRecommendationType[] nameRecommend = recommendationsType.getNameRecommendation();
- Map<String, List<String>> nameRecommendationMap = new HashMap<String, List<String>>();
+ Map<String, List<String>> nameRecommendationMap = new HashMap<>();
for (NameRecommendationType nameRecommendationType : nameRecommend) {
String name = nameRecommendationType.getName();
- List<String> valueList = new LinkedList<String>();
+ List<String> valueList = new LinkedList<>();
ValueRecommendationType[] valueRecommend = nameRecommendationType.getValueRecommendation();
for (ValueRecommendationType valueRecommendationType : valueRecommend) {
String value = valueRecommendationType.getValue();
diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java
index 4a13622..007a658 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java
@@ -55,7 +55,7 @@ public class EbayFeedback {
private static final String RESOURCE = "EbayUiLabels";
public static Map<String, Object> loadFeedback(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Delegator delegator = dctx.getDelegator();
@@ -64,7 +64,7 @@ public class EbayFeedback {
ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
try {
- Map<String, Object> inMap = new HashMap<String, Object>();
+ Map<String, Object> inMap = new HashMap<>();
inMap.put("productStoreId", productStoreId);
inMap.put("userLogin", userLogin);
Map<String, Object> resultUser = dispatcher.runSync("getEbayStoreUser", inMap);
@@ -211,12 +211,12 @@ public class EbayFeedback {
}
public static Map<String, Object> getItemsAwaitingFeedback(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
String productStoreId = (String) context.get("productStoreId");
ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
- List<Map<String, Object>> itemsResult = new LinkedList<Map<String,Object>>();
+ List<Map<String, Object>> itemsResult = new LinkedList<>();
try {
GetItemsAwaitingFeedbackCall awaitingFeedbackCall = new GetItemsAwaitingFeedbackCall();
awaitingFeedbackCall.setApiContext(apiContext);
@@ -226,7 +226,7 @@ public class EbayFeedback {
GetUserCall getUserCall = new GetUserCall(apiContext);
String commentingUser = getUserCall.getUser().getUserID();
for (int i = 0;i < items.getTransactionLength(); i++) {
- Map<String, Object> entry = new HashMap<String, Object>();
+ Map<String, Object> entry = new HashMap<>();
TransactionType transection = items.getTransaction(i);
entry.put("itemID", transection.getItem().getItemID());
entry.put("commentingUser", commentingUser);
@@ -263,7 +263,7 @@ public class EbayFeedback {
}
public static Map<String, Object> leaveFeedback(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object>result = new HashMap<String, Object>();
+ Map<String, Object>result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
String productStoreId = (String) context.get("productStoreId");
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 76de7e1..bb8d62f 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java
@@ -184,7 +184,7 @@ public class EbayStore {
outputStream.close();
int responseCode = connection.getResponseCode();
InputStream inputStream;
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
String response = null;
if (responseCode == HttpURLConnection.HTTP_CREATED ||
@@ -221,7 +221,7 @@ public class EbayStore {
public static Map<String,Object> exportCategoriesSelectedToEbayStore(DispatchContext dctx, Map<String,? extends Object> context) {
Locale locale = (Locale) context.get("locale");
Delegator delegator = dctx.getDelegator();
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
SetStoreCategoriesRequestType req = null;
StoreCustomCategoryArrayType categoryArrayType = null;
@@ -385,7 +385,7 @@ public class EbayStore {
}
public static Map<String, Object> excuteExportCategoryToEbayStore(SetStoreCategoriesCall call, SetStoreCategoriesRequestType req, StoreCategoryUpdateActionCodeType actionCode,Delegator delegator, String partyId,List<GenericValue> catalogCategories, Locale locale) {
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
SetStoreCategoriesResponseType resp = null;
try {
if (req != null && actionCode != null) {
@@ -540,7 +540,7 @@ public class EbayStore {
public static Map<String, Object> readEbayGetStoreCategoriesResponse(String msg, Locale locale) {
Map<String, Object> results = null;
- List<Map<Object, Object>> categories = new LinkedList<Map<Object, Object>>();
+ List<Map<Object, Object>> categories = new LinkedList<>();
try {
Document docResponse = UtilXml.readXmlDocument(msg, true);
Element elemResponse = docResponse.getDocumentElement();
@@ -571,7 +571,7 @@ public class EbayStore {
List<Element> customCategory = UtilGenerics.checkList(UtilXml.childElementList(customCategoriesElemIterElement, "CustomCategory"));
Iterator<Element> customCategoryElemIter = customCategory.iterator();
while (customCategoryElemIter.hasNext()) {
- Map<Object, Object> categ = new HashMap<Object, Object>();
+ Map<Object, Object> categ = new HashMap<>();
Element categoryElement = customCategoryElemIter.next();
categ.put("CategoryID", UtilXml.childElementValue(categoryElement, "CategoryID"));
categ.put("CategoryName", UtilXml.childElementValue(categoryElement, "Name"));
@@ -590,7 +590,7 @@ public class EbayStore {
}
public static Map<String, Object> getEbayStoreUser(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
String productStoreId = (String) context.get("productStoreId");
try {
@@ -615,7 +615,7 @@ public class EbayStore {
Locale locale = (Locale) context.get("locale");
GenericValue userLogin = (GenericValue) context.get("userLogin");
Delegator delegator = dctx.getDelegator();
- Map<String,Object> result = new HashMap<String, Object>();
+ Map<String,Object> result = new HashMap<>();
StoreType returnedStoreType = null;
GetStoreRequestType req = new GetStoreRequestType();
GetStoreResponseType resp = null;
@@ -650,7 +650,7 @@ public class EbayStore {
//result.put(ModelService.SUCCESS_MESSAGE, UtilProperties.getMessage(RESOURCE, "EbayStoreLoadSuccess", locale));
// update product store in ofbiz
updateProductStore(dctx, context, returnedStoreType,(String) context.get("productStoreId"));
- Map<String,Object> ebayResp = new HashMap<String, Object>();
+ Map<String,Object> ebayResp = new HashMap<>();
ebayResp.put("storeName", returnedStoreType.getName());
ebayResp.put("storeUrl", returnedStoreType.getURL());
ebayResp.put("storeUrlPath", returnedStoreType.getURLPath());
@@ -703,10 +703,10 @@ public class EbayStore {
ebayResp.put("storeHeaderStyle", storeHeaderStyleCodeType.value());
StoreHeaderStyleCodeType[] storeHeaderStyleCodeList = StoreHeaderStyleCodeType.values();
if (storeHeaderStyleCodeList != null) {
- List<Map<String,Object>> storeHeaderStyleList = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> storeHeaderStyleList = new LinkedList<>();
int i=0;
while (i<storeHeaderStyleCodeList.length) {
- Map<String,Object> storeHeaderStyleMap = new HashMap<String, Object>();
+ Map<String,Object> storeHeaderStyleMap = new HashMap<>();
StoreHeaderStyleCodeType storeHeaderStyleCode = storeHeaderStyleCodeList[i];
storeHeaderStyleMap.put("storeHeaderStyleName", storeHeaderStyleCode.name());
storeHeaderStyleMap.put("storeHeaderStyleValue", storeHeaderStyleCode.value());
@@ -722,10 +722,10 @@ public class EbayStore {
ebayResp.put("storeItemLayoutSelected", storeItemListLayoutCodeType.value());
StoreItemListLayoutCodeType[] storeItemListLayoutCodeTypeList = StoreItemListLayoutCodeType.values();
if (storeItemListLayoutCodeTypeList != null) {
- List<Map<String,Object>> storeItemListLayoutCodeList = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> storeItemListLayoutCodeList = new LinkedList<>();
int i = 0;
while (i < storeItemListLayoutCodeTypeList.length) {
- Map<String,Object> storeItemListLayoutCodeMap = new HashMap<String, Object>();
+ Map<String,Object> storeItemListLayoutCodeMap = new HashMap<>();
StoreItemListLayoutCodeType storeItemListLayoutCode = storeItemListLayoutCodeTypeList[i];
storeItemListLayoutCodeMap.put("storeItemLayoutName", storeItemListLayoutCode.name());
storeItemListLayoutCodeMap.put("storeItemLayoutValue", storeItemListLayoutCode.value());
@@ -738,10 +738,10 @@ public class EbayStore {
ebayResp.put("storeItemSortOrderSelected", storeItemListSortOrderCodeType.value());
StoreItemListSortOrderCodeType[] storeItemListSortOrderCodeTypeList = StoreItemListSortOrderCodeType.values();
if (storeItemListSortOrderCodeTypeList != null) {
- List<Map<String,Object>> storeItemSortOrderCodeList = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> storeItemSortOrderCodeList = new LinkedList<>();
int i = 0;
while (i < storeItemListSortOrderCodeTypeList.length) {
- Map<String,Object> storeItemSortOrderCodeMap = new HashMap<String, Object>();
+ Map<String,Object> storeItemSortOrderCodeMap = new HashMap<>();
StoreItemListSortOrderCodeType storeItemListLayoutCode = storeItemListSortOrderCodeTypeList[i];
storeItemSortOrderCodeMap.put("storeItemSortLayoutName", storeItemListLayoutCode.name());
storeItemSortOrderCodeMap.put("storeItemSortLayoutValue", storeItemListLayoutCode.value());
@@ -756,10 +756,10 @@ public class EbayStore {
ebayResp.put("storeCustomHeaderLayout", storeCustomHeaderLayoutCodeType.value());
StoreCustomHeaderLayoutCodeType[] storeCustomHeaderLayoutCodeTypeList = StoreCustomHeaderLayoutCodeType.values();
if (storeCustomHeaderLayoutCodeTypeList != null) {
- List<Map<String,Object>> storeCustomHeaderLayoutList = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> storeCustomHeaderLayoutList = new LinkedList<>();
int i = 0;
while (i < storeCustomHeaderLayoutCodeTypeList.length) {
- Map<String,Object> storeCustomHeaderLayoutMap = new HashMap<String, Object>();
+ Map<String,Object> storeCustomHeaderLayoutMap = new HashMap<>();
StoreCustomHeaderLayoutCodeType StoreCustomHeaderLayoutCode = storeCustomHeaderLayoutCodeTypeList[i];
storeCustomHeaderLayoutMap.put("storeCustomHeaderLayoutName", StoreCustomHeaderLayoutCode.name());
storeCustomHeaderLayoutMap.put("storeCustomHeaderLayoutValue", StoreCustomHeaderLayoutCode.value());
@@ -781,10 +781,10 @@ public class EbayStore {
ebayResp.put("storeCustomListingHeaderDisplayValue", storeCustomListingHeaderDisplayCodeType.value());
StoreCustomListingHeaderDisplayCodeType[] storeCustomListingHeaderDisplayCodeTypeList = StoreCustomListingHeaderDisplayCodeType.values();
if (storeCustomListingHeaderDisplayCodeTypeList != null) {
- List<Map<String,Object>> storeCustomListingHeaderDisplayCodeList = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> storeCustomListingHeaderDisplayCodeList = new LinkedList<>();
int i = 0;
while (i < storeCustomListingHeaderDisplayCodeTypeList.length) {
- Map<String,Object> storeCustomListingHeaderDisplayCodeMap = new HashMap<String, Object>();
+ Map<String,Object> storeCustomListingHeaderDisplayCodeMap = new HashMap<>();
StoreCustomListingHeaderDisplayCodeType storeCustomListingHeaderDisplayCode = storeCustomListingHeaderDisplayCodeTypeList[i];
storeCustomListingHeaderDisplayCodeMap.put("storeCustomHeaderLayoutName", storeCustomListingHeaderDisplayCode.name());
storeCustomListingHeaderDisplayCodeMap.put("storeCustomHeaderLayoutValue", storeCustomListingHeaderDisplayCode.value());
@@ -800,10 +800,10 @@ public class EbayStore {
ebayResp.put("storeMerchDisplay",merchDisplayCodeType.value());
MerchDisplayCodeType[] merchDisplayCodeTypeList = MerchDisplayCodeType.values();
if (merchDisplayCodeTypeList != null) {
- List<Map<String,Object>> merchDisplayCodeList = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> merchDisplayCodeList = new LinkedList<>();
int i = 0;
while (i < merchDisplayCodeTypeList.length) {
- Map<String,Object> merchDisplayCodeMap = new HashMap<String, Object>();
+ Map<String,Object> merchDisplayCodeMap = new HashMap<>();
MerchDisplayCodeType merchDisplayCode = merchDisplayCodeTypeList[i];
merchDisplayCodeMap.put("merchDisplayCodeName", merchDisplayCode.name());
merchDisplayCodeMap.put("merchDisplayCodeValue", merchDisplayCode.value());
@@ -819,10 +819,10 @@ public class EbayStore {
returnedStoreType.getSubscriptionLevel();
StoreSubscriptionLevelCodeType[] storeSubscriptionlevelList = StoreSubscriptionLevelCodeType.values();
if (storeSubscriptionlevelList != null) {
- List<Map<String,Object>> storeSubscriptionLevelCodeList = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> storeSubscriptionLevelCodeList = new LinkedList<>();
int i = 0;
while (i < storeSubscriptionlevelList.length) {
- Map<String,Object> storeSubscriptionLevelCodeMap = new HashMap<String, Object>();
+ Map<String,Object> storeSubscriptionLevelCodeMap = new HashMap<>();
StoreSubscriptionLevelCodeType storeSubscriptionLevelCode= storeSubscriptionlevelList[i];
storeSubscriptionLevelCodeMap.put("storeSubscriptionLevelCodeName", storeSubscriptionLevelCode.name());
storeSubscriptionLevelCodeMap.put("storeSubscriptionLevelCodeValue", storeSubscriptionLevelCode.value());
@@ -852,7 +852,7 @@ public class EbayStore {
public static void updateProductStore(DispatchContext dctx, Map<String,Object> context, StoreType returnStoreType, String productStoreId) {
LocalDispatcher dispatcher = dctx.getDispatcher();
try {
- Map<String,Object> inMap = new HashMap<String, Object>();
+ Map<String,Object> inMap = new HashMap<>();
if (returnStoreType != null) {
inMap.put("productStoreId", productStoreId);
inMap.put("storeName", returnStoreType.getName());
@@ -873,7 +873,7 @@ public class EbayStore {
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
Delegator delegator = dctx.getDelegator();
- Map<String,Object> result = new HashMap<String, Object>();
+ Map<String,Object> result = new HashMap<>();
GetStoreOptionsRequestType req = null;
GetStoreOptionsResponseType resp = null;
StoreThemeArrayType returnedBasicThemeArray = null;
@@ -903,7 +903,7 @@ public class EbayStore {
if (colorSchemeType != null) {
if (colorSchemeId.equals(colorSchemeType.getColorSchemeID().toString())) {
// get font,size and color
- storeColorSchemeMap = new HashMap<String, Object>();
+ storeColorSchemeMap = new HashMap<>();
StoreFontType storeFontType = colorSchemeType.getFont();
storeColorSchemeMap.put("storeFontTypeFontFaceValue", storeFontType.getNameFace().value());
storeColorSchemeMap.put("storeFontTypeSizeFaceValue", storeFontType.getNameSize().value());
@@ -936,7 +936,7 @@ public class EbayStore {
public static Map<String,Object> retrievePredesignedLogoOption(DispatchContext dctx, Map<String,Object> context) {
GenericValue userLogin = (GenericValue) context.get("userLogin");
- Map<String,Object> result = new HashMap<String, Object>();
+ Map<String,Object> result = new HashMap<>();
Locale locale = (Locale) context.get("locale");
Delegator delegator = dctx.getDelegator();
GetStoreOptionsRequestType req = null;
@@ -953,9 +953,9 @@ public class EbayStore {
returnedLogoArray = resp.getLogoArray();
int i = 0;
- List<Map<String,Object>> logoList = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> logoList = new LinkedList<>();
while (i < returnedLogoArray.getLogoLength()) {
- Map<String,Object> logo = new HashMap<String, Object>();
+ Map<String,Object> logo = new HashMap<>();
StoreLogoType storeLogoType = returnedLogoArray.getLogo(i);
logo.put("storeLogoId", storeLogoType.getLogoID());
logo.put("storeLogoName", storeLogoType.getName());
@@ -980,7 +980,7 @@ public class EbayStore {
}
public static Map<String,Object> retrieveBasicThemeArray(DispatchContext dctx, Map<String,Object> context) {
- Map<String,Object> result = new HashMap<String, Object>();
+ Map<String,Object> result = new HashMap<>();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
Delegator delegator = dctx.getDelegator();
@@ -998,9 +998,9 @@ public class EbayStore {
if (resp != null && "SUCCESS".equals(resp.getAck().toString())) {
returnedBasicThemeArray = resp.getBasicThemeArray();
int i = 0;
- List<Map<String,Object>> themeList = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> themeList = new LinkedList<>();
while (i < returnedBasicThemeArray.getThemeLength()) {
- Map<String,Object> basictheme = new HashMap<String, Object>();
+ Map<String,Object> basictheme = new HashMap<>();
StoreThemeType storeBasicThemeType = returnedBasicThemeArray.getTheme(i);
basictheme.put("storeThemeId", storeBasicThemeType.getThemeID());
basictheme.put("storeThemeName", storeBasicThemeType.getName());
@@ -1032,7 +1032,7 @@ public class EbayStore {
}
public static Map<String,Object> retrieveAdvancedThemeArray(DispatchContext dctx, Map<String,Object> context) {
- Map<String,Object> result = new HashMap<String, Object>();
+ Map<String,Object> result = new HashMap<>();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
Delegator delegator = dctx.getDelegator();
@@ -1052,9 +1052,9 @@ public class EbayStore {
returnedAdvancedThemeArray = resp.getAdvancedThemeArray();
int i = 0;
- List<Map<String,Object>> themeList = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> themeList = new LinkedList<>();
while (i < returnedAdvancedThemeArray.getThemeLength()) {
- Map<String,Object> advanceTheme = new HashMap<String, Object>();
+ Map<String,Object> advanceTheme = new HashMap<>();
StoreThemeType storeThemeType = returnedAdvancedThemeArray.getTheme(i);
advanceTheme.put("storeThemeId",storeThemeType.getThemeID());
advanceTheme.put("storeThemeName",storeThemeType.getName());
@@ -1064,9 +1064,9 @@ public class EbayStore {
result.put("storeThemeList", themeList);
int j = 0;
StoreColorSchemeType[] storeColorSchemeTypes = returnedAdvancedThemeArray.getGenericColorSchemeArray().getColorScheme();
- List<Map<String,Object>> themeColorList = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> themeColorList = new LinkedList<>();
while (j < storeColorSchemeTypes.length) {
- Map<String,Object> advanceColorTheme = new HashMap<String, Object>();
+ Map<String,Object> advanceColorTheme = new HashMap<>();
StoreColorSchemeType storeColorSchemeType = storeColorSchemeTypes[j];
advanceColorTheme.put("storeColorSchemeId", storeColorSchemeType.getColorSchemeID());
advanceColorTheme.put("storeColorName", storeColorSchemeType.getName());
@@ -1090,7 +1090,7 @@ public class EbayStore {
}
public static Map<String,Object> retrieveStoreFontTheme(DispatchContext dctx, Map<String,Object> context) {
- Map<String,Object> result = new HashMap<String, Object>();
+ Map<String,Object> result = new HashMap<>();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
Delegator delegator = dctx.getDelegator();
@@ -1104,7 +1104,7 @@ public class EbayStore {
resp = (GetStoreOptionsResponseType) call.execute(req);
- Map<String,Object> advanceFontTheme = new HashMap<String, Object>();
+ Map<String,Object> advanceFontTheme = new HashMap<>();
if (resp != null && "SUCCESS".equals(resp.getAck().toString())) {
returnedThemeArray = resp.getAdvancedThemeArray();
int i = 0;
@@ -1117,9 +1117,9 @@ public class EbayStore {
int j = 0;
storeFontType.getNameFace();
StoreFontFaceCodeType[] storeFontNameFaceCodeTypes = StoreFontFaceCodeType.values();
- List<Map<String,Object>> nameFaces = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> nameFaces = new LinkedList<>();
while (j < storeFontNameFaceCodeTypes.length) {
- Map<String,Object> storeFontNameFaceCodeTypeMap = new HashMap<String, Object>();
+ Map<String,Object> storeFontNameFaceCodeTypeMap = new HashMap<>();
StoreFontFaceCodeType storeFontNameFaceCodeType = storeFontNameFaceCodeTypes[j];
storeFontNameFaceCodeTypeMap.put("storeFontValue", storeFontNameFaceCodeType.value());
storeFontNameFaceCodeTypeMap.put("storeFontName", storeFontNameFaceCodeType.name());
@@ -1130,9 +1130,9 @@ public class EbayStore {
j = 0;
storeFontType.getNameSize();
StoreFontSizeCodeType[] storeFontSizeCodeTypes = StoreFontSizeCodeType.values();
- List<Map<String,Object>> sizeFaces = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> sizeFaces = new LinkedList<>();
while (j < storeFontSizeCodeTypes.length) {
- Map<String,Object> storeFontSizeCodeTypeMap = new HashMap<String, Object>();
+ Map<String,Object> storeFontSizeCodeTypeMap = new HashMap<>();
StoreFontSizeCodeType storeFontSizeCodeType = storeFontSizeCodeTypes[j];
storeFontSizeCodeTypeMap.put("storeFontSizeValue", storeFontSizeCodeType.value());
storeFontSizeCodeTypeMap.put("storeFontSizeName", storeFontSizeCodeType.name());
@@ -1145,9 +1145,9 @@ public class EbayStore {
j = 0;
storeFontType.getTitleFace();
StoreFontFaceCodeType[] storeFontTypeTitleFaces = StoreFontFaceCodeType.values();
- List<Map<String,Object>> titleFaces = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> titleFaces = new LinkedList<>();
while (j < storeFontTypeTitleFaces.length) {
- Map<String,Object> storeFontTypeTitleFaceMap = new HashMap<String, Object>();
+ Map<String,Object> storeFontTypeTitleFaceMap = new HashMap<>();
StoreFontFaceCodeType storeFontTypeTitleFace = storeFontTypeTitleFaces[j];
storeFontTypeTitleFaceMap.put("storeFontValue", storeFontTypeTitleFace.value());
storeFontTypeTitleFaceMap.put("storeFontName", storeFontTypeTitleFace.name());
@@ -1159,9 +1159,9 @@ public class EbayStore {
j = 0;
storeFontType.getTitleSize();
StoreFontSizeCodeType[] storeTitleSizeCodeTypes = StoreFontSizeCodeType.values();
- List<Map<String,Object>> titleSizes = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> titleSizes = new LinkedList<>();
while (j < storeTitleSizeCodeTypes.length) {
- Map<String,Object> storeFontSizeCodeTypeMap = new HashMap<String, Object>();
+ Map<String,Object> storeFontSizeCodeTypeMap = new HashMap<>();
StoreFontSizeCodeType storeFontSizeCodeType = storeTitleSizeCodeTypes[j];
storeFontSizeCodeTypeMap.put("storeFontSizeValue", storeFontSizeCodeType.value());
storeFontSizeCodeTypeMap.put("storeFontSizeName", storeFontSizeCodeType.name());
@@ -1175,9 +1175,9 @@ public class EbayStore {
j = 0;
storeFontType.getDescFace();
StoreFontFaceCodeType[] storeFontTypeDescFaces = StoreFontFaceCodeType.values();
- List<Map<String,Object>> descFaces = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> descFaces = new LinkedList<>();
while (j < storeFontTypeDescFaces.length) {
- Map<String,Object> storeFontTypeDescFaceMap = new HashMap<String, Object>();
+ Map<String,Object> storeFontTypeDescFaceMap = new HashMap<>();
StoreFontFaceCodeType storeFontTypeDescFace = storeFontTypeDescFaces[j];
storeFontTypeDescFaceMap.put("storeFontValue", storeFontTypeDescFace.value());
storeFontTypeDescFaceMap.put("storeFontName", storeFontTypeDescFace.name());
@@ -1189,9 +1189,9 @@ public class EbayStore {
j = 0;
storeFontType.getDescSize();
StoreFontSizeCodeType[] storeDescSizeCodeTypes = StoreFontSizeCodeType.values();
- List<Map<String,Object>> descSizes = new LinkedList<Map<String, Object>>();
+ List<Map<String,Object>> descSizes = new LinkedList<>();
while (j < storeDescSizeCodeTypes.length) {
- Map<String,Object> storeFontSizeCodeTypeMap = new HashMap<String, Object>();
+ Map<String,Object> storeFontSizeCodeTypeMap = new HashMap<>();
StoreFontSizeCodeType storeFontSizeCodeType = storeDescSizeCodeTypes[j];
storeFontSizeCodeTypeMap.put("storeFontSizeValue", storeFontSizeCodeType.value());
storeFontSizeCodeTypeMap.put("storeFontSizeName", storeFontSizeCodeType.name());
@@ -1218,7 +1218,7 @@ public class EbayStore {
}
public static Map<String,Object> setEbayStoreInput(DispatchContext dctx, Map<String,Object> context) {
- Map<String,Object> result = new HashMap<String, Object>();
+ Map<String,Object> result = new HashMap<>();
Locale locale = (Locale) context.get("locale");
Delegator delegator = dctx.getDelegator();
SetStoreRequestType req = null;
@@ -1332,11 +1332,11 @@ public class EbayStore {
}
public static Map<String, Object> getEbayActiveItems(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
String productStoreId = (String) context.get("productStoreId");
- List<Map<String, Object>> activeItems = new LinkedList<Map<String, Object>>();
+ List<Map<String, Object>> activeItems = new LinkedList<>();
try {
ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
GetMyeBaySellingCall getMyeBaySellingCall = new GetMyeBaySellingCall(apiContext);
@@ -1351,7 +1351,7 @@ public class EbayStore {
ItemArrayType itemArrayType = itemListCustomizationType.getItemArray();
int itemArrayTypeSize = itemArrayType.getItemLength();
for (int i = 0; i < itemArrayTypeSize; i++) {
- Map<String, Object> entry = new HashMap<String, Object>();
+ Map<String, Object> entry = new HashMap<>();
ItemType item = itemArrayType.getItem(i);
entry.put("itemId", item.getItemID());
entry.put("title", item.getTitle());
@@ -1398,14 +1398,14 @@ public class EbayStore {
}
public static Map<String, Object> getEbaySoldItems(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
String productStoreId = (String) context.get("productStoreId");
String filter = (String) context.get("filter");
String itemId = (String) context.get("itemId");
String buyerId = (String) context.get("buyerId");
- List<Map<String, Object>> soldItems = new LinkedList<Map<String, Object>>();
+ List<Map<String, Object>> soldItems = new LinkedList<>();
double reservPrice = 0;
try {
ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
@@ -1436,7 +1436,7 @@ public class EbayStore {
SellingManagerSoldTransactionType[] sellingManagerSoldTransactions = sellingManagerSoldOrder.getSellingManagerSoldTransaction();
int sellingManagerSoldTransactionLength = sellingManagerSoldTransactions.length;
for (SellingManagerSoldTransactionType managerSoldTransaction : sellingManagerSoldTransactions) {
- Map<String, Object> entry = new HashMap<String, Object>();
+ Map<String, Object> entry = new HashMap<>();
SellingManagerSoldTransactionType sellingManagerSoldTransaction = managerSoldTransaction;
entry.put("itemId", sellingManagerSoldTransaction.getItemID());
entry.put("title", sellingManagerSoldTransaction.getItemTitle());
@@ -1532,7 +1532,7 @@ public class EbayStore {
}
public static Map<String, Object> exportProductsFromEbayStore(DispatchContext dctx, Map<String, Object> context) {
- Map<String,Object> result = new HashMap<String, Object>();
+ Map<String,Object> result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
Map<String, Object> eBayConfigResult = EbayHelper.buildEbayConfig(context, delegator);
@@ -1626,7 +1626,7 @@ public class EbayStore {
if (UtilValidate.isNotEmpty(ProductsExportToEbay.getProductExportSuccessMessageList())) {
if ((facilityId != "") && (intAtp != 0)) {
int newAtp = intAtp - 1;
- Map<String,Object> inMap = new HashMap<String, Object>();
+ Map<String,Object> inMap = new HashMap<>();
inMap.put("productStoreId", context.get("productStoreId").toString());
inMap.put("facilityId", facilityId);
inMap.put("productId", context.get("productId"));
@@ -1696,7 +1696,7 @@ public class EbayStore {
}
public static Map<String, Object> addEbayDispute(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
String productStoreId = (String) context.get("productStoreId");
@@ -1727,7 +1727,7 @@ public class EbayStore {
}
public static Map<String, Object> verifyEbayAddSecondChanceItem(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
boolean checkVerify = false;
GenericValue userLogin = (GenericValue) context.get("userLogin");
Delegator delegator = dctx.getDelegator();
@@ -1746,7 +1746,7 @@ public class EbayStore {
verify.setDetailLevel(detailLevels);
verify.setDuration(SecondChanceOfferDurationCodeType.DAYS_1);
- Map<String, Object> serviceMap = new HashMap<String, Object>();
+ Map<String, Object> serviceMap = new HashMap<>();
serviceMap.put("itemId", itemID);
serviceMap.put("productStoreId", productStoreId);
serviceMap.put("locale", locale);
@@ -1767,8 +1767,8 @@ public class EbayStore {
}
public static Map<String, Object> getEbayAllBidders(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> result = new HashMap<String, Object>();
- List<Map<String, Object>> allBidders = new LinkedList<Map<String, Object>>();
+ Map<String, Object> result = new HashMap<>();
+ List<Map<String, Object>> allBidders = new LinkedList<>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
String productStoreId = (String) context.get("productStoreId");
@@ -1787,7 +1787,7 @@ public class EbayStore {
OfferType[] bidders = api.getAllBidders();
for (OfferType bidder : bidders) {
- Map<String, Object> entry = new HashMap<String, Object>();
+ Map<String, Object> entry = new HashMap<>();
OfferType offer = bidder;
entry.put("userId", offer.getUser().getUserID());
entry.put("bidder", offer.getUser());
@@ -1833,7 +1833,7 @@ public class EbayStore {
@SuppressWarnings("serial")
public Map<String, Object> getMyeBaySelling(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object>result = new HashMap<String, Object>();
+ Map<String, Object>result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
String productStoreId = (String) context.get("productStoreId");
@@ -1912,7 +1912,7 @@ public class EbayStore {
OrderTransactionType[] tempSoldItems = null;
if (UtilValidate.isNotEmpty(api.getReturnedSoldList())) tempSoldItems = (api.getReturnedSoldList().getOrderTransactionArray()).getOrderTransaction();
// add to list
- List<Map<String, Object>> soldList = new LinkedList<Map<String, Object>>();
+ List<Map<String, Object>> soldList = new LinkedList<>();
if (UtilValidate.isNotEmpty(tempSoldItems)) {
soldList = EbayStore.getOrderTransactions(tempSoldItems);
}
@@ -1952,14 +1952,14 @@ public class EbayStore {
}
// set output data list (MyeBaySelling)
public List<Map<Object, Object>> getDataModelToList(TableModel dataModel) {
- List<Map<Object, Object>> list = new LinkedList<Map<Object, Object>>();
+ List<Map<Object, Object>> list = new LinkedList<>();
for (int rowIndex = 0; rowIndex < dataModel.getRowCount(); rowIndex++) {
list.add(UtilGenerics.checkMap(dataModel.getValueAt(rowIndex, 0)));
}
return list;
}
static Map<String, Object> itemToColumns(ItemType item) {
- Map<String, Object> cols = new HashMap<String, Object>();
+ Map<String, Object> cols = new HashMap<>();
cols.put("itemId", item.getItemID() != null ? item.getItemID() : "");
cols.put("title", item.getTitle() != null ? item.getTitle() : "");
@@ -1993,7 +1993,7 @@ public class EbayStore {
}
static Map<String, Object> schItemToColumns(ItemType item) {
- Map<String, Object> cols = new HashMap<String, Object>();
+ Map<String, Object> cols = new HashMap<>();
double reservPrice = 0;
cols.put("itemId", item.getItemID() != null ? item.getItemID() : "");
cols.put("title", item.getTitle() != null ? item.getTitle() : "");
@@ -2018,7 +2018,7 @@ public class EbayStore {
}
static Map<String, Object> unsoldItemToColumns(ItemType item) {
- Map<String, Object> cols = new HashMap<String, Object>();
+ Map<String, Object> cols = new HashMap<>();
double reservPrice = 0;
cols.put("itemId", item.getItemID() != null ? item.getItemID() : "");
cols.put("title", item.getTitle() != null ? item.getTitle() : "");
@@ -2047,7 +2047,7 @@ public class EbayStore {
}
public static List<Map<String, Object>> getOrderTransactions(OrderTransactionType[] orderTrans) {
- List<Map<String, Object>> colsList = new LinkedList<Map<String, Object>>();
+ List<Map<String, Object>> colsList = new LinkedList<>();
OrderTransactionType orderTran = null;
OrderType order = null;
TransactionType transaction= null;
@@ -2071,7 +2071,7 @@ public class EbayStore {
}
public static Map<String, Object> getTransaction(TransactionType transaction){
- Map<String, Object> cols = new HashMap<String, Object>();
+ Map<String, Object> cols = new HashMap<>();
ItemType item = transaction.getItem();
String itemId = null;
String title = null;
@@ -2169,7 +2169,7 @@ public class EbayStore {
}
public Map<String, Object> getEbayStoreProductItem(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object>result = new HashMap<String, Object>();
+ Map<String, Object>result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
String productStoreId = (String) context.get("productStoreId");
@@ -2284,11 +2284,11 @@ public class EbayStore {
return ServiceUtil.returnSuccess(UtilProperties.getMessage(RESOURCE, "EbayStoreUpdateItemSuccessfully", locale));
}
public Map<String, Object> geteBayClosedItem(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map <String, Object> result = new HashMap<String, Object>();
+ Map <String, Object> result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
String productStoreId = (String) context.get("productStoreId");
- List <Map<String, Object>> closedItems = new LinkedList<Map<String, Object>>();
+ List <Map<String, Object>> closedItems = new LinkedList<>();
try {
ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
ItemListCustomizationType itemListType = new ItemListCustomizationType();
@@ -2351,7 +2351,7 @@ public class EbayStore {
}
public static Map<String ,Object> getClosedItem(ItemType tempItems) {
- Map <String, Object> result = new HashMap<String, Object>();
+ Map <String, Object> result = new HashMap<>();
if(UtilValidate.isNotEmpty(tempItems)) {
double hitCount = 0;
int quantity = 0;
@@ -2406,7 +2406,7 @@ public class EbayStore {
if(UtilValidate.isEmpty(shippingAddress)) {
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "EbayStoreRequiredShippingAddressParameter", locale));
}
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
String buyerName = null;
String street = null;
String street1 = null;
@@ -2472,7 +2472,7 @@ public class EbayStore {
return checkResult;
}
public static Map<String, Object> getTransactionHelper(TransactionType transaction, Locale locale) {
- Map<String, Object> orderMap = new HashMap<String, Object>();
+ Map<String, Object> orderMap = new HashMap<>();
if(UtilValidate.isNotEmpty(transaction)) {
String orderId = null;
String externalId = null;
@@ -2499,8 +2499,8 @@ public class EbayStore {
String paidTime = null;
double salesTaxAmount = 0.0;
float salesTaxPercent = 0;
- Map<String, Object> itemSold = new HashMap<String, Object>();
- Map<String, Object> address = new HashMap<String, Object>();
+ Map<String, Object> itemSold = new HashMap<>();
+ Map<String, Object> address = new HashMap<>();
if(UtilValidate.isNotEmpty(transaction.getItem())) {
ItemType item = transaction.getItem();
@@ -2625,11 +2625,11 @@ public class EbayStore {
return orderMap;
}
public Map<String, Object> getEbayStoreTransaction(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
- List<Map<String, Object>> transactionList = new LinkedList<Map<String, Object>>();
- List<String> orderIdList = new LinkedList<String>();
+ List<Map<String, Object>> transactionList = new LinkedList<>();
+ List<String> orderIdList = new LinkedList<>();
String productStoreId = (String) context.get("productStoreId");
try {
Calendar fromDate = Calendar.getInstance();
@@ -2684,10 +2684,10 @@ public class EbayStore {
}
public Map<String, Object> getEbayStoreOrder(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
- List<Map<String, Object>> orderList = new LinkedList<Map<String,Object>>();
+ List<Map<String, Object>> orderList = new LinkedList<>();
String productStoreId = (String) context.get("productStoreId");
ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
try {
@@ -2734,7 +2734,7 @@ public class EbayStore {
}
private static Map<String, Object> getOrderHelper(OrderType order, Locale locale) {
- LinkedHashMap<String, Object> orderCtx = new LinkedHashMap<String, Object>();
+ LinkedHashMap<String, Object> orderCtx = new LinkedHashMap<>();
String externalOrderId = "EBS_"+order.getOrderID();
double amountPaid = 0.0;
String emailBuyer = null;
@@ -2759,11 +2759,11 @@ public class EbayStore {
String externalTransactionTime = null;
double feeOrCreditAmount = 0.0;
double paymentOrRefundAmount = 0.0;
- Map<String, Object> shippingServiceSelectedCtx = new HashMap<String, Object>();
- Map<String, Object> shippingDetailsCtx = new HashMap<String, Object>();
- Map<String, Object> shippingAddressMap = new HashMap<String, Object>();
- Map<String, Object> checkoutStatusCtx = new HashMap<String, Object>();
- Map<String, Object> externalTransactionCtx = new HashMap<String, Object>();
+ Map<String, Object> shippingServiceSelectedCtx = new HashMap<>();
+ Map<String, Object> shippingDetailsCtx = new HashMap<>();
+ Map<String, Object> shippingAddressMap = new HashMap<>();
+ Map<String, Object> checkoutStatusCtx = new HashMap<>();
+ Map<String, Object> externalTransactionCtx = new HashMap<>();
if (UtilValidate.isNotEmpty(order.getTotal())) {
amountPaid = order.getTotal().getValue();
}
@@ -2872,11 +2872,11 @@ public class EbayStore {
externalTransactionCtx.put("feeOrCreditAmount", feeOrCreditAmount);
externalTransactionCtx.put("paymentOrRefundAmount", paymentOrRefundAmount);
- List<Map<String, Object>> orderItemList = new LinkedList<Map<String,Object>>();
+ List<Map<String, Object>> orderItemList = new LinkedList<>();
if (UtilValidate.isNotEmpty(order.getTransactionArray().getTransaction())) {
TransactionType[] transactions = order.getTransactionArray().getTransaction();
for (TransactionType transactionType : transactions) {
- Map<String, Object> orderItemCtx = new HashMap<String, Object>();
+ Map<String, Object> orderItemCtx = new HashMap<>();
TransactionType transaction = transactionType;
int quantityPurchased = 0;
double transactionPrice = 0.0;
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 4e5ea12..4472477 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java
@@ -84,7 +84,7 @@ public class EbayStoreAutoPrefEvents{
}
}
- Map<String, Object> bestOfferCondition = new HashMap<String, Object>();
+ Map<String, Object> bestOfferCondition = new HashMap<>();
bestOfferCondition.put("productStoreId", productStoreId);
bestOfferCondition.put("userLogin", userLogin);
bestOfferCondition.put("enabled", enabled);
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 ec307c4..21069b3 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPreferences.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPreferences.java
@@ -138,7 +138,7 @@ public class EbayStoreAutoPreferences {
String isAutoPositiveFeedback = "N";
String feedbackEventCode = null;
GenericValue ebayProductStorePref = null;
- List<String> list = new LinkedList<String>();
+ List<String> list = new LinkedList<>();
try {
ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
@@ -241,7 +241,7 @@ public class EbayStoreAutoPreferences {
ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
try {
- Map<String, Object> resultMap = new HashMap<String, Object>();
+ Map<String, Object> resultMap = new HashMap<>();
GenericValue ebayProductStorePref = null;
String comments = null;
String autoPrefJobId = null;
@@ -364,7 +364,7 @@ public class EbayStoreAutoPreferences {
// call service send email (get template follow productStoreId)
for (SellingManagerSoldOrderType item : items) {
// call send
- Map<String, Object> sendMap = new HashMap<String, Object>();
+ Map<String, Object> sendMap = new HashMap<>();
GenericValue productStoreEmail = EntityQuery.use(delegator).from("ProductStoreEmailSetting").where("productStoreId", productStoreId, "emailType", "EBAY_FEEBACK_REMIN").queryOne();
String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation");
sendMap.put("bodyScreenUri", bodyScreenLocation);
@@ -377,7 +377,7 @@ public class EbayStoreAutoPreferences {
sendMap.put("sendBcc", productStoreEmail.get("bccAddress"));
sendMap.put("sendTo", item.getBuyerEmail());
- Map<String, Object> bodyParameters = new HashMap<String, Object>();
+ Map<String, Object> bodyParameters = new HashMap<>();
bodyParameters.put("buyerUserId", item.getBuyerID());
sendMap.put("bodyParameters", bodyParameters);
@@ -405,7 +405,7 @@ public class EbayStoreAutoPreferences {
String jobId = (String) context.get("jobId");
try {
GenericValue userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", "system").queryOne();
- Map<String, Object> serviceMap = new HashMap<String, Object>();
+ Map<String, Object> serviceMap = new HashMap<>();
serviceMap.put("userLogin", userLogin);
//ProductStore
List<GenericValue> productStores = EntityQuery.use(delegator).from("EbayProductStorePref").where("autoPrefJobId", jobId).queryList();
@@ -438,7 +438,7 @@ public class EbayStoreAutoPreferences {
if (UtilValidate.isNotEmpty(soldItemMap.get("itemId"))) {
GenericValue productCheck = EntityQuery.use(delegator).from("Product").where("productId", soldItemMap.get("itemId")).queryOne();
if (productCheck == null) {
- Map<String, Object> inMap = new HashMap<String, Object>();
+ Map<String, Object> inMap = new HashMap<>();
inMap.put("productId", soldItemMap.get("itemId"));
inMap.put("productTypeId", "EBAY_ITEM");
inMap.put("internalName", "eBay Item " + soldItemMap.get("title"));
@@ -450,7 +450,7 @@ public class EbayStoreAutoPreferences {
// ProductRole (VENDOR)
List<GenericValue> productRole = EntityQuery.use(delegator).from("ProductRole").where("partyId", partyId, "productId", soldItemMap.get("itemId"), "roleTypeId", "VENDOR").queryList();
if (productRole.size() == 0) {
- Map<String, Object> addRole = new HashMap<String, Object>();
+ Map<String, Object> addRole = new HashMap<>();
addRole.put("productId", soldItemMap.get("itemId"));
addRole.put("roleTypeId", "VENDOR");
addRole.put("partyId", partyId);
@@ -466,7 +466,7 @@ public class EbayStoreAutoPreferences {
}
}
//check active items
- serviceMap = new HashMap<String, Object>();
+ serviceMap = new HashMap<>();
serviceMap.put("userLogin", userLogin);
serviceMap.put("productStoreId", productStoreId);
serviceResult = dispatcher.runSync("getEbayActiveItems", serviceMap);
@@ -474,7 +474,7 @@ public class EbayStoreAutoPreferences {
return ServiceUtil.returnError(ServiceUtil.getErrorMessage(resultService));
}
List<Map<String, Object>> activeItems = UtilGenerics.checkList(serviceResult.get("activeItems"));
- List<String> activeItemMaps = new LinkedList<String>();
+ List<String> activeItemMaps = new LinkedList<>();
if (activeItems.size() != 0) {
for (Map<String, Object> activeItem : activeItems) {
Map<String, Object> activeItemMap = UtilGenerics.checkMap(activeItem);
@@ -485,14 +485,14 @@ public class EbayStoreAutoPreferences {
}
//check product role
List<GenericValue> productRoles = EntityQuery.use(delegator).from("ProductRole").where("partyId", partyId, "roleTypeId", "VENDOR").queryList();
- List<String> productRoleIds = new LinkedList<String>();
+ List<String> productRoleIds = new LinkedList<>();
if (productRoles.size() != 0) {
for (GenericValue productRole : productRoles) {
String productId = productRole.getString("productId");
productRoleIds.add(productId);
}
}
- List<EntityCondition> andExpr = new LinkedList<EntityCondition>();
+ List<EntityCondition> andExpr = new LinkedList<>();
EntityCondition activeItemCond = EntityCondition.makeCondition("productId", EntityOperator.NOT_IN, activeItemMaps);
andExpr.add(activeItemCond);
EntityCondition productTypeCond = EntityCondition.makeCondition("productTypeId", EntityOperator.EQUALS, "EBAY_ITEM");
@@ -554,7 +554,7 @@ public class EbayStoreAutoPreferences {
disputeExplanation = DisputeExplanationCodeType.valueOf(condition3);
}
// get sold items
- Map<String, Object> serviceMap = new HashMap<String, Object>();
+ Map<String, Object> serviceMap = new HashMap<>();
serviceMap.put("productStoreId", productStoreId);
serviceMap.put("userLogin", userLogin);
Map<String, Object> serviceResult = dispatcher.runSync("getEbaySoldItems", serviceMap);
@@ -563,7 +563,7 @@ public class EbayStoreAutoPreferences {
}
List<Map<String, Object>> soldItems = UtilGenerics.checkList(serviceResult.get("soldItems"));
// check items to dispute
- List<Map<String, Object>> itemsToDispute = new LinkedList<Map<String,Object>>();
+ List<Map<String, Object>> itemsToDispute = new LinkedList<>();
for (Map<String, Object> soldItem : soldItems) {
Map<String, Object> item = UtilGenerics.checkMap(soldItem);
String checkoutStatus = (String) item.get("checkoutStatus");
@@ -627,7 +627,7 @@ public class EbayStoreAutoPreferences {
disputeExplanation = DisputeExplanationCodeType.valueOf(condition3);
}
// get sold items
- Map<String, Object> serviceMap = new HashMap<String, Object>();
+ Map<String, Object> serviceMap = new HashMap<>();
serviceMap.put("productStoreId", productStoreId);
serviceMap.put("userLogin", userLogin);
Map<String, Object> serviceResult = dispatcher.runSync("getEbaySoldItems", serviceMap);
@@ -636,7 +636,7 @@ public class EbayStoreAutoPreferences {
}
List<Map<String, Object>> soldItems = UtilGenerics.checkList(serviceResult.get("soldItems"));
// check items to dispute
- List<Map<String, Object>> itemsToDispute = new LinkedList<Map<String,Object>>();
+ List<Map<String, Object>> itemsToDispute = new LinkedList<>();
for (Map<String, Object> soldItem : soldItems) {
Map<String, Object> item = UtilGenerics.checkMap(soldItem);
String checkoutStatus = (String) item.get("checkoutStatus");
@@ -715,7 +715,7 @@ public class EbayStoreAutoPreferences {
// call service send email (get template follow productStoreId)
for (SellingManagerSoldOrderType item : items) {
// call send
- Map<String, Object> sendMap = new HashMap<String, Object>();
+ Map<String, Object> sendMap = new HashMap<>();
GenericValue productStoreEmail = EntityQuery.use(delegator).from("ProductStoreEmailSetting").where("productStoreId", productStoreId, "emailType", "EBAY_PAY_RECIEVED").queryOne();
String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation");
sendMap.put("bodyScreenUri", bodyScreenLocation);
@@ -728,7 +728,7 @@ public class EbayStoreAutoPreferences {
sendMap.put("sendBcc", productStoreEmail.get("bccAddress"));
sendMap.put("sendTo", item.getBuyerEmail());
- Map<String, Object> bodyParameters = new HashMap<String, Object>();
+ Map<String, Object> bodyParameters = new HashMap<>();
bodyParameters.put("buyerUserId", item.getBuyerID());
sendMap.put("bodyParameters", bodyParameters);
@@ -751,7 +751,7 @@ public class EbayStoreAutoPreferences {
public static Map<String, Object> runCombineOrders(DispatchContext dctx, Map<String, Object> context) {
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
LocalDispatcher dispatcher = dctx.getDispatcher();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
@@ -768,12 +768,12 @@ public class EbayStoreAutoPreferences {
Timestamp beginDate = UtilDateTime.toTimestamp("01/01/2001 00:00:00");
Long daysCount = Long.parseLong(ebayPref.get("condition1").toString());
- Hashtable<String, List<Map<String, Object>>> h = new Hashtable<String, List<Map<String, Object>>>();
+ Hashtable<String, List<Map<String, Object>>> h = new Hashtable<>();
for (SellingManagerSoldOrderType sellingManagerSoldOrder : sellingManagerSoldOrders) {
String buyerId = sellingManagerSoldOrder.getBuyerID().toString();
- List<Map<String, Object>> soldGroupList = new LinkedList<Map<String, Object>>();
- Map<String, Object> mymap = new HashMap<String, Object>();
+ List<Map<String, Object>> soldGroupList = new LinkedList<>();
+ Map<String, Object> mymap = new HashMap<>();
mymap.put("group", "");
mymap.put("soldorder", sellingManagerSoldOrder);
if (h.size() > 0) {
@@ -934,7 +934,7 @@ public class EbayStoreAutoPreferences {
}
public static Map<String, Object> autoSendWinningBuyerNotification(DispatchContext dctx, Map<String, Object> context) {
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
LocalDispatcher dispatcher = dctx.getDispatcher();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
@@ -953,7 +953,7 @@ public class EbayStoreAutoPreferences {
Timestamp creationTime = UtilDateTime.toTimestamp(creationDate);
if (creationTime.equals(lastestTime) && ("Chinese".equals(item.get("listingType").toString()))) {
- Map<String, Object> serviceMap = new HashMap<String, Object>();
+ Map<String, Object> serviceMap = new HashMap<>();
serviceMap.put("userLogin", userLogin);
serviceMap.put("locale", locale);
serviceMap.put("productStoreId", productStoreId);
@@ -970,7 +970,7 @@ public class EbayStoreAutoPreferences {
UserType user = (UserType) bidder.get("bidder");
String buyerUserId = bidder.get("userId").toString();
- Map<String, Object> sendMap = new HashMap<String, Object>();
+ Map<String, Object> sendMap = new HashMap<>();
GenericValue productStoreEmail = EntityQuery.use(delegator).from("ProductStoreEmailSetting").where("productStoreId", productStoreId, "emailType", "EBAY_WIN_BUYER_NOTI").queryOne();
String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation");
sendMap.put("bodyScreenUri", bodyScreenLocation);
@@ -983,7 +983,7 @@ public class EbayStoreAutoPreferences {
sendMap.put("sendBcc", productStoreEmail.get("bccAddress"));
sendMap.put("sendTo", user.getEmail());
- Map<String, Object> bodyParameters = new HashMap<String, Object>();
+ Map<String, Object> bodyParameters = new HashMap<>();
bodyParameters.put("buyerUserId", buyerUserId);
sendMap.put("bodyParameters", bodyParameters);
@@ -1008,7 +1008,7 @@ public class EbayStoreAutoPreferences {
}
public static Map<String, Object> autoSendItemDispatchedNotification(DispatchContext dctx, Map<String, Object> context) {
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
LocalDispatcher dispatcher = dctx.getDispatcher();
Delegator delegator = dctx.getDelegator();
String productStoreId = (String) context.get("productStoreId");
@@ -1032,7 +1032,7 @@ public class EbayStoreAutoPreferences {
String buyerUserId = item.get("buyerUserId").toString();
String buyerEmail = item.get("buyerEmail").toString();
- Map<String, Object> sendMap = new HashMap<String, Object>();
+ Map<String, Object> sendMap = new HashMap<>();
GenericValue productStoreEmail = EntityQuery.use(delegator).from("ProductStoreEmailSetting").where("productStoreId", productStoreId, "emailType", "EBAY_ITEM_DISPATCH").queryOne();
String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation");
sendMap.put("bodyScreenUri", bodyScreenLocation);
@@ -1045,7 +1045,7 @@ public class EbayStoreAutoPreferences {
sendMap.put("sendBcc", productStoreEmail.get("bccAddress"));
sendMap.put("sendTo", buyerEmail);
- Map<String, Object> bodyParameters = new HashMap<String, Object>();
+ Map<String, Object> bodyParameters = new HashMap<>();
bodyParameters.put("buyerUserId", buyerUserId);
sendMap.put("bodyParameters", bodyParameters);
@@ -1072,7 +1072,7 @@ public class EbayStoreAutoPreferences {
Locale locale = (Locale) context.get("locale");
GenericValue userLogin = (GenericValue) context.get("userLogin");
Delegator delegator = dctx.getDelegator();
- Map<String,Object> result = new HashMap<String, Object>();
+ Map<String,Object> result = new HashMap<>();
GetSellingManagerInventoryRequestType req = new GetSellingManagerInventoryRequestType();
GetSellingManagerInventoryResponseType resp = null;
@@ -1126,7 +1126,7 @@ public class EbayStoreAutoPreferences {
}
public static Map<String, Object> autoRelistingItems(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> itemObject = new HashMap<String, Object>();
+ Map<String, Object> itemObject = new HashMap<>();
LocalDispatcher dispatcher = dctx.getDispatcher();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
@@ -1135,14 +1135,14 @@ public class EbayStoreAutoPreferences {
EntityCondition expression1 = EntityCondition.makeCondition("autoRelisting", EntityOperator.EQUALS, "Y");
EntityCondition expression2 = EntityCondition.makeCondition("endDateTime", EntityOperator.LESS_THAN, UtilDateTime.nowTimestamp());
EntityCondition expression3 = EntityCondition.makeCondition("itemId", EntityOperator.NOT_EQUAL, null);
- List<EntityCondition> expressions = new LinkedList<EntityCondition>();
+ List<EntityCondition> expressions = new LinkedList<>();
expressions.add(expression1);
expressions.add(expression2);
expressions.add(expression3);
EntityCondition cond = EntityCondition.makeCondition(expressions, EntityOperator.AND);
List<GenericValue> ebayProductListings = EntityQuery.use(delegator).from("EbayProductListing").where(expressions).queryList();
for (GenericValue productListing : ebayProductListings) {
- Map<String, Object> inMap = new HashMap<String, Object>();
+ Map<String, Object> inMap = new HashMap<>();
AddItemCall addItemCall = new AddItemCall(EbayStoreHelper.getApiContext((String) context.get("productStoreId"), locale, delegator));
GenericValue ebayProductListing = productListing;
ItemType item = EbayStoreHelper.prepareAddItem(delegator, ebayProductListing);
@@ -1294,8 +1294,8 @@ public class EbayStoreAutoPreferences {
getBestOfferCall.setBestOfferStatus(BestOfferStatusCodeType.ALL);
getBestOfferCall.getBestOffers();
BestOfferType[] bestOffers = getBestOfferCall.getReturnedBestOffers();
- List<String> acceptBestOfferIndexId = new LinkedList<String>();
- SortedMap<String, Object> acceptBestOfferIDs = new TreeMap<String, Object>();
+ List<String> acceptBestOfferIndexId = new LinkedList<>();
+ SortedMap<String, Object> acceptBestOfferIDs = new TreeMap<>();
//Loop for get data best offer from buyer
RespondToBestOfferCall respondToBestOfferCall = new RespondToBestOfferCall(apiContext);
respondToBestOfferCall.setItemID(itemID);
diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCategoryFacade.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCategoryFacade.java
index 1e70199..6e758ad 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCategoryFacade.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCategoryFacade.java
@@ -129,7 +129,7 @@ public class EbayStoreCategoryFacade {
//get listing durations
ListingDurationDefinitionsType listDuration = featureDefinition.getListingDurations();
ListingDurationDefinitionType[] durationArray = listDuration.getListingDuration();
- listingDurationMap = new HashMap<Integer, String[]>();
+ listingDurationMap = new HashMap<>();
for (ListingDurationDefinitionType listingDurationDefinitionType : durationArray) {
listingDurationMap.put(listingDurationDefinitionType.getDurationSetID(), listingDurationDefinitionType.getDuration());
}
@@ -139,7 +139,7 @@ public class EbayStoreCategoryFacade {
if (listingDuration == null || listingDuration.length == 0) {
listingDuration = siteDefaults.getListingDuration();
}
- listingDurationReferenceMap = new HashMap<String, Integer>();
+ listingDurationReferenceMap = new HashMap<>();
for (ListingDurationReferenceType listingDurationReferenceType : listingDuration) {
listingDurationReferenceMap.put(listingDurationReferenceType.getType().value(), listingDurationReferenceType.getValue());
}
@@ -221,7 +221,7 @@ public class EbayStoreCategoryFacade {
public List<Map<String,Object>> syncAdItemTemplates() throws ApiException, SdkSoapException, SdkException {
GetDescriptionTemplatesRequestType req = null;
GetDescriptionTemplatesResponseType resp = null;
- List<Map<String,Object>> temGroupList = new LinkedList<Map<String,Object>>();
+ List<Map<String,Object>> temGroupList = new LinkedList<>();
GetDescriptionTemplatesCall call = new GetDescriptionTemplatesCall(this.apiContext);
req = new GetDescriptionTemplatesRequestType();
@@ -234,7 +234,7 @@ public class EbayStoreCategoryFacade {
List<Map<String,Object>> templateList = null;
Map<String,Object> templateGroup = null;
if ("THEME".equals(String.valueOf(descTemplateType.getType()))) {
- Map<String,Object> template = new HashMap<String, Object>();
+ Map<String,Object> template = new HashMap<>();
template.put("TemplateId", String.valueOf(descTemplateType.getID()));
template.put("TemplateImageURL", descTemplateType.getImageURL());
template.put("TemplateName", descTemplateType.getName());
@@ -248,8 +248,8 @@ public class EbayStoreCategoryFacade {
}
}
if (templateGroup == null) {
- templateGroup = new HashMap<String, Object>();
- templateList = new LinkedList<Map<String,Object>>();
+ templateGroup = new HashMap<>();
+ templateList = new LinkedList<>();
templateGroup.put("TemplateGroupId", descTemplateType.getGroupID().toString());
templateList.add(template);
templateGroup.put("Templates", templateList);
@@ -281,7 +281,7 @@ public class EbayStoreCategoryFacade {
}
public List<Map<String,Object>> getAdItemTemplates(String temGroupId) {
- List<Map<String,Object>> themes = new LinkedList<Map<String,Object>>();
+ List<Map<String,Object>> themes = new LinkedList<>();
for (Map<String,Object> temp : this.adItemTemplates) {
if (temp.get("TemplateGroupId").equals(temGroupId)) {
themes = UtilGenerics.checkList(temp.get("Templates"));
diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCustomerService.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCustomerService.java
index 439433f..5670a6d 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCustomerService.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCustomerService.java
@@ -52,7 +52,7 @@ public class EbayStoreCustomerService {
if (UtilValidate.isEmpty(context.get("userId")) || UtilValidate.isEmpty(context.get("itemId"))) {
return ServiceUtil.returnFailure(UtilProperties.getMessage(RESOURCE, "EbayStoreRequiredUserIdAndItemId", locale));
}
- Map <String, Object> result = new HashMap<String, Object>();
+ Map <String, Object> result = new HashMap<>();
try {
String itemId = (String) context.get("itemId");
String bestOfferId = (String) context.get("bestOfferId");
@@ -111,7 +111,7 @@ public class EbayStoreCustomerService {
String price = (String) context.get("price");
String email = (String) context.get("email");
String quantity = (String) context.get("quantity");
- Map <String, Object> result = new HashMap<String, Object>();
+ Map <String, Object> result = new HashMap<>();
try {
ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
String[] bestOfferIDs = {offerId};
@@ -154,7 +154,7 @@ public class EbayStoreCustomerService {
Delegator delegator = dctx.getDelegator();
String productStoreId = (String) context.get("productStoreId");
Locale locale = (Locale) context.get("locale");
- Map <String, Object> result = new HashMap<String, Object>();
+ Map <String, Object> result = new HashMap<>();
if (UtilValidate.isEmpty(context.get("itemId")) || UtilValidate.isEmpty(context.get("userId"))) {
return ServiceUtil.returnFailure(UtilProperties.getMessage(RESOURCE, "EbayStoreRequiredUserIdAndItemId", locale));
}
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 fa20add..859ad61 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java
@@ -95,7 +95,7 @@ public class EbayStoreHelper {
private static final String RESOURCE = "EbayStoreUiLabels";
public static ApiContext getApiContext(String productStoreId,Locale locale, Delegator delegator) {
- Map<String, Object> context = new HashMap<String, Object>();
+ Map<String, Object> context = new HashMap<>();
context.put("locale", locale);
context.put("productStoreId", productStoreId);
Map<String, Object> config = EbayHelper.buildEbayConfig(context, delegator);
@@ -129,7 +129,7 @@ public class EbayStoreHelper {
}
public static SiteCodeType getSiteCodeType(String productStoreId, Locale locale, Delegator delegator) {
- Map<String, Object> context = new HashMap<String, Object>();
+ Map<String, Object> context = new HashMap<>();
context.put("locale", locale);
context.put("productStoreId", productStoreId);
Map<String, Object> config = EbayHelper.buildEbayConfig(context, delegator);
@@ -262,7 +262,7 @@ public class EbayStoreHelper {
}
public static Map<String, Object> startEbayAutoPreference(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object>result = new HashMap<String, Object>();
+ Map<String, Object>result = new HashMap<>();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Delegator delegator = dctx.getDelegator();
@@ -276,7 +276,7 @@ public class EbayStoreHelper {
if (UtilValidate.isNotEmpty(jobId)) {
List<GenericValue> jobs = EntityQuery.use(delegator).from("JobSandbox").where("parentJobId", jobId, "statusId", "SERVICE_PENDING").queryList();
if (jobs.size() == 0) {
- Map<String, Object>inMap = new HashMap<String, Object>();
+ Map<String, Object>inMap = new HashMap<>();
inMap.put("jobId", jobId);
inMap.put("userLogin", userLogin);
result = dispatcher.runSync("resetScheduledJob", inMap);
@@ -326,7 +326,7 @@ public class EbayStoreHelper {
ebayProductPref.set("autoPrefJobId", jobSandbox.getString("jobId"));
ebayProductPref.store();
- Map<String, Object>infoData = new HashMap<String, Object>();
+ Map<String, Object>infoData = new HashMap<>();
infoData.put("jobId", jobSandbox.getString("jobId"));
infoData.put("productStoreId", ebayProductPref.getString("productStoreId"));
runtimeData.set("runtimeInfo", XmlSerializer.serialize(infoData));
@@ -340,7 +340,7 @@ public class EbayStoreHelper {
}
public static Map<String, Object> stopEbayAutoPreference(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object>result = new HashMap<String, Object>();
+ Map<String, Object>result = new HashMap<>();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Delegator delegator = dctx.getDelegator();
@@ -351,7 +351,7 @@ public class EbayStoreHelper {
String jobId = ebayProductPref.getString("autoPrefJobId");
List<GenericValue> jobs = EntityQuery.use(delegator).from("JobSandbox").where("parentJobId", jobId ,"statusId", "SERVICE_PENDING").queryList();
- Map<String, Object>inMap = new HashMap<String, Object>();
+ Map<String, Object>inMap = new HashMap<>();
inMap.put("userLogin", userLogin);
for (GenericValue job : jobs) {
inMap.put("jobId", job.getString("jobId"));
@@ -422,7 +422,7 @@ public class EbayStoreHelper {
}
public static Map<String, Object> exportProductEachItem(DispatchContext dctx, Map<String, Object> context) {
- Map<String,Object> result = new HashMap<String, Object>();
+ Map<String,Object> result = new HashMap<>();
LocalDispatcher dispatcher = dctx.getDispatcher();
Delegator delegator = dctx.getDelegator();
Map<String, Object> itemObject = UtilGenerics.checkMap(context.get("itemObject"));
@@ -438,7 +438,7 @@ public class EbayStoreHelper {
if (resp != null && "SUCCESS".equals(resp.getAck().toString()) || "WARNING".equals(resp.getAck().toString())) {
String itemId = resp.getItemID();
String listingXml = addItemCall.getRequestXml().toString();
- Map<String, Object> updateItemMap = new HashMap<String, Object>();
+ Map<String, Object> updateItemMap = new HashMap<>();
updateItemMap.put("productListingId", productListingId);
updateItemMap.put("itemId", itemId);
updateItemMap.put("listingXml", listingXml);
@@ -467,7 +467,7 @@ public class EbayStoreHelper {
Map<String, Object> attributeMapList = UtilGenerics.cast(context.get("attributeMapList"));
String productListingId = (String) context.get("productListingId");
GenericValue userLogin = (GenericValue) context.get("userLogin");
- Map<String, Object> ebayProductListingAttributeMap = new HashMap<String, Object>();
+ Map<String, Object> ebayProductListingAttributeMap = new HashMap<>();
try {
List<GenericValue> attributeToClears = EntityQuery.use(delegator).from("EbayProductListingAttribute").where("productListingId", productListingId).queryList();
for (GenericValue valueToClear : attributeToClears) {
@@ -701,7 +701,7 @@ public class EbayStoreHelper {
public static void createErrorLogMessage(GenericValue userLogin, LocalDispatcher dispatcher, String productStoreId, String ack, String fuction, String errorMessage) {
if (!"".equals(productStoreId) && (!"".equals(errorMessage))) {
try {
- Map<String, Object> newMap = new HashMap<String, Object>();
+ Map<String, Object> newMap = new HashMap<>();
newMap.put("productStoreId", productStoreId);
newMap.put("logAck", ack.toLowerCase());
newMap.put("functionName", fuction);
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 27183b4..93d12d3 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreInventoryServices.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreInventoryServices.java
@@ -69,7 +69,7 @@ public class EbayStoreInventoryServices {
}
/*update inventory on ebay site*/
public static Map<String,Object> updateEbayStoreInventory(DispatchContext dctx, Map<String,Object> context) {
- Map<String,Object> result = new HashMap<String, Object>();
+ Map<String,Object> result = new HashMap<>();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
Delegator delegator = dctx.getDelegator();
@@ -229,7 +229,7 @@ public class EbayStoreInventoryServices {
}
public static Map<String,Object> getFolderInEbayStoreInventory(DispatchContext dctx, Map<String,Object> context) {
- Map<String,Object> result = new HashMap<String, Object>();
+ Map<String,Object> result = new HashMap<>();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
Delegator delegator = dctx.getDelegator();
@@ -304,7 +304,7 @@ public class EbayStoreInventoryServices {
public static Map<String,Object> updateEbayInventoryStatusByProductId(DispatchContext dctx, Map<String,Object> context) {
Locale locale = (Locale) context.get("locale");
GenericValue userLogin = (GenericValue) context.get("userLogin");
- Map<String,Object> result = new HashMap<String, Object>();
+ Map<String,Object> result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
String productStoreId = (String)context.get("productStoreId");
String facilityId = (String)context.get("facilityId");
@@ -358,7 +358,7 @@ public class EbayStoreInventoryServices {
public static Map<String,Object> updateEbayInventoryStatus(DispatchContext dctx, Map<String,Object> context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- Map<String,Object> result = new HashMap<String, Object>();
+ Map<String,Object> result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
List<GenericValue> ebayProductStoreInventoryList = null;
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 4bc4c75..f12e940 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOptions.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOptions.java
@@ -84,7 +84,7 @@ public class EbayStoreOptions {
String colorSchemeId = themeId.substring(themeId.indexOf("-")+1);
themeId = themeId.substring(0,themeId.indexOf("-"));
- Map<String,Object> storeColorSchemeMap = new HashMap<String, Object>();
+ Map<String,Object> storeColorSchemeMap = new HashMap<>();
while (i < storeBasicTheme.length) {
StoreThemeType storeThemeType = storeBasicTheme[i];
@@ -171,9 +171,9 @@ public class EbayStoreOptions {
request.setAttribute("categoryId", ebayCategoryId);
results = EbayEvents.getChildCategories(request);
if (UtilValidate.isNotEmpty(results)) {
- List<Map<String,Object>> categories = new LinkedList<Map<String,Object>>();
+ List<Map<String,Object>> categories = new LinkedList<>();
for (CategoryType category : results) {
- Map<String,Object> context = new HashMap<String, Object>();
+ Map<String,Object> context = new HashMap<>();
context.put("CategoryCode", category.getCategoryID());
context.put("CategoryName", category.getCategoryName());
String isLeaf = String.valueOf(category.isLeafCategory()!= null ? category.isLeafCategory() : "false");
@@ -218,9 +218,9 @@ public class EbayStoreOptions {
request.setAttribute("categoryId", ebayStoreCategory);
results = EbayEvents.getStoreChildCategories(request);
if (UtilValidate.isNotEmpty(results)) {
- List<Map<String,Object>> categories = new LinkedList<Map<String,Object>>();
+ List<Map<String,Object>> categories = new LinkedList<>();
for (StoreCustomCategoryType category : results) {
- Map<String,Object> context = new HashMap<String, Object>();
+ Map<String,Object> context = new HashMap<>();
context.put("CategoryCode", category.getCategoryID());
context.put("CategoryName", category.getName());
String isLeaf = "false";
diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java
index 981680c..aa1c008 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java
@@ -57,7 +57,7 @@ public class EbayStoreOrder {
private static final String MODULE = EbayStoreOrder.class.getName();
public static Map<String, Object> EbayStoreImportTransaction(DispatchContext dctx, Map<String, Object> context) {
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
LocalDispatcher dispatcher = dctx.getDispatcher();
try {
if ("Complete".equals(context.get("checkoutStatus").toString()) && "NOT_IMPORT".equals(context.get("importStatus").toString())) {
@@ -78,7 +78,7 @@ public class EbayStoreOrder {
}
public static Map<String, Object> EbayStoreImportOrder(DispatchContext dctx, Map<String, Object> context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
if (UtilValidate.isEmpty(context.get("orderId"))) {
try {
result = dispatcher.runSync("EbayStoreCreateOrderShoppingCart", context);
@@ -99,7 +99,7 @@ public class EbayStoreOrder {
LocalDispatcher dispatcher = dctx.getDispatcher();
Locale locale = (Locale) context.get("locale");
GenericValue userLogin = (GenericValue) context.get("userLogin");
- Map<String, Object> result = new HashMap<String, Object>();
+ Map<String, Object> result = new HashMap<>();
String productStoreId = context.get("productStoreId").toString();
String defaultCurrencyUomId = "";
@@ -311,7 +311,7 @@ public class EbayStoreOrder {
LocalDispatcher dispatcher = dctx.getDispatcher();
Locale locale = (Locale) context.get("locale");
GenericValue userLogin = (GenericValue) context.get("userLogin");
- Map <String, Object> result = new HashMap<String, Object>();
+ Map <String, Object> result = new HashMap<>();
String productStoreId = context.get("productStoreId").toString();
String defaultCurrencyUomId = null;
@@ -559,7 +559,7 @@ public class EbayStoreOrder {
BigDecimal price = new BigDecimal(itemPrice);
price = price.setScale(ShoppingCart.scale, ShoppingCart.rounding);
- Map<String, Object> attrs = new HashMap<String, Object>();
+ Map<String, Object> attrs = new HashMap<>();
attrs.put("shipGroup", groupIdx);
int idx = cart.addItemToEnd(productId, null, qty, null, null, attrs, null, null, dispatcher, Boolean.FALSE, Boolean.TRUE, Boolean.TRUE, Boolean.TRUE);
diff --git a/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java b/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java
index b7547e0..6f4ec80 100644
--- a/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java
+++ b/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java
@@ -351,7 +351,7 @@ public class ProductDocument implements LuceneDocument {
}
private Timestamp getParentCategories(Document doc, GenericValue productCategory, Set<String> indexedCategoryIds) throws GenericEntityException {
- return this.getParentCategories(doc, productCategory, indexedCategoryIds, new TreeSet<String>());
+ return this.getParentCategories(doc, productCategory, indexedCategoryIds, new TreeSet<>());
}
private Timestamp getParentCategories(Document doc, GenericValue productCategory, Set<String> indexedCategoryIds, Set<String> indexedCatalogIds) throws GenericEntityException {