|
Author: jleroux
Date: Mon Sep 17 04:36:07 2012 New Revision: 1386469 URL: http://svn.apache.org/viewvc?rev=1386469&view=rev Log: No functional changes, this is the backporting of r1167132, r1139858, r1299985 and a line from r1059352 for "OfBiz 10.04 Does not compile with Oracle JDK 7" https://issues.apache.org/jira/browse/OFBIZ-4749 Thanks to Karl Laird for report and Paul Foxworthy's + Sergey Derevyanko's help R10.04 now compiles and run (faster) under JDK 7 (hence OPENJDK 7) jleroux: Since the r1059352 patch does not apply completely, I simply changed the needed line by hand in InvoiceServices.java[104]: invoicesCreated.add(UtilMisc.toMap("commissionInvoiceId",invoiceId, "salesRepresentative ",partyIdBillFrom)); + invoicesCreated.add(UtilMisc.<String, String>toMap("commissionInvoiceId",invoiceId, "salesRepresentative ",partyIdBillFrom)); Modified: ofbiz/branches/release10.04/ (props changed) ofbiz/branches/release10.04/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java ofbiz/branches/release10.04/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java ofbiz/branches/release10.04/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java ofbiz/branches/release10.04/framework/common/src/org/ofbiz/common/CommonServices.java ofbiz/branches/release10.04/framework/security/src/org/ofbiz/security/OFBizSecurity.java ofbiz/branches/release10.04/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java ofbiz/branches/release10.04/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java ofbiz/branches/release10.04/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java Propchange: ofbiz/branches/release10.04/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk:r1139858,1167132,1299985 Modified: ofbiz/branches/release10.04/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java?rev=1386469&r1=1386468&r2=1386469&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java (original) +++ ofbiz/branches/release10.04/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java Mon Sep 17 04:36:07 2012 @@ -1001,7 +1001,7 @@ public class InvoiceServices { Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); } - invoicesCreated.add(UtilMisc.toMap("commissionInvoiceId",invoiceId, "salesRepresentative ",partyIdBillFrom)); + invoicesCreated.add(UtilMisc.<String, String>toMap("commissionInvoiceId",invoiceId, "salesRepresentative ",partyIdBillFrom));; } Map<String, Object> result = ServiceUtil.returnSuccess("Created Commission invoices for each commission receiving parties " + invoicesCreated); Debug.logInfo("Created Commission invoices for each commission receiving parties " + invoicesCreated, module); Modified: ofbiz/branches/release10.04/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java?rev=1386469&r1=1386468&r2=1386469&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java (original) +++ ofbiz/branches/release10.04/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java Mon Sep 17 04:36:07 2012 @@ -399,7 +399,7 @@ public class WorldPayEvents { // attempt to release the offline hold on the order (workflow) OrderChangeHelper.releaseInitialOrderHold(dispatcher, orderId); // call the email confirm service - Map<String, String> emailContext = UtilMisc.toMap("orderId", orderId, "userLogin", userLogin); + Map<String, Object> emailContext = UtilMisc.toMap("orderId", orderId, "userLogin", userLogin); try { dispatcher.runSync("sendOrderConfirmation", emailContext); } catch (GenericServiceException e) { Modified: ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java?rev=1386469&r1=1386468&r2=1386469&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java (original) +++ ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java Mon Sep 17 04:36:07 2012 @@ -314,7 +314,7 @@ public class ProductSearchEvents { pfa.create(); numAdded++; } - Map<String, String> messageMap = UtilMisc.toMap("numAdded", Integer.valueOf(numAdded), "productFeatureId", productFeatureId); + Map<String, Object> messageMap = UtilMisc.toMap("numAdded", Integer.valueOf(numAdded), "productFeatureId", productFeatureId); String eventMsg = UtilProperties.getMessage(resource, "productSearchEvents.added_param_features", messageMap, locale) + "."; request.setAttribute("_EVENT_MESSAGE_", eventMsg); eli.close(); @@ -364,7 +364,7 @@ public class ProductSearchEvents { String productId = searchResultView.getString("mainProductId"); numRemoved += delegator.removeByAnd("ProductFeatureAppl", UtilMisc.toMap("productId", productId, "productFeatureId", productFeatureId)); } - Map<String, String> messageMap = UtilMisc.toMap("numRemoved", Integer.valueOf(numRemoved), "productFeatureId", productFeatureId); + Map<String, Object> messageMap = UtilMisc.toMap("numRemoved", Integer.valueOf(numRemoved), "productFeatureId", productFeatureId); String eventMsg = UtilProperties.getMessage(resource, "productSearchEvents.removed_param_features", messageMap, locale) + "."; request.setAttribute("_EVENT_MESSAGE_", eventMsg); eli.close(); Modified: ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java?rev=1386469&r1=1386468&r2=1386469&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java (original) +++ ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java Mon Sep 17 04:36:07 2012 @@ -1228,7 +1228,7 @@ public class ProductSearchSession { List<Map<String, String>> featureCountList = FastList.newInstance(); GenericValue searchResult = null; while ((searchResult = (GenericValue) eli.next()) != null) { - featureCountList.add(UtilMisc.toMap("productFeatureId", (String) searchResult.get("pfacProductFeatureId"), "productFeatureTypeId", (String) searchResult.get("pfcProductFeatureTypeId"), "description", (String) searchResult.get("pfcDescription"), "featureCount", Long.toString((Long) searchResult.get("featureCount")))); + featureCountList.add(UtilMisc.<String, String>toMap("productFeatureId", (String) searchResult.get("pfacProductFeatureId"), "productFeatureTypeId", (String) searchResult.get("pfcProductFeatureTypeId"), "description", (String) searchResult.get("pfcDescription"), "featureCount", Long.toString((Long) searchResult.get("featureCount")))); } if (eli != null) { Modified: ofbiz/branches/release10.04/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=1386469&r1=1386468&r2=1386469&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original) +++ ofbiz/branches/release10.04/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Mon Sep 17 04:36:07 2012 @@ -999,7 +999,7 @@ public class ShipmentServices { // TODO: This may not need to be done asynchronously. The reason it's done that way right now is that calling it synchronously means that // if we can't confirm a single shipment, then all shipment route segments in a multi-form are rolled back. try { - Map<String, String> input = UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId, "userLogin", userLogin); + Map<String, Object> input = UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId, "userLogin", userLogin); // for DHL, we just need to confirm the shipment to get the label. Other carriers may have more elaborate requirements. if (carrierPartyId.equals("DHL")) { dispatcher.runAsync("dhlShipmentConfirm", input); Modified: ofbiz/branches/release10.04/framework/common/src/org/ofbiz/common/CommonServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/framework/common/src/org/ofbiz/common/CommonServices.java?rev=1386469&r1=1386468&r2=1386469&view=diff ============================================================================== --- ofbiz/branches/release10.04/framework/common/src/org/ofbiz/common/CommonServices.java (original) +++ ofbiz/branches/release10.04/framework/common/src/org/ofbiz/common/CommonServices.java Mon Sep 17 04:36:07 2012 @@ -181,7 +181,7 @@ public class CommonServices { partyId = userLogin.getString("partyId"); } - Map<String, String> fields = UtilMisc.toMap("noteId", noteId, "noteName", noteName, "noteInfo", note, + Map<String, Object> fields = UtilMisc.toMap("noteId", noteId, "noteName", noteName, "noteInfo", note, "noteParty", partyId, "noteDateTime", noteDate); try { Modified: ofbiz/branches/release10.04/framework/security/src/org/ofbiz/security/OFBizSecurity.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/framework/security/src/org/ofbiz/security/OFBizSecurity.java?rev=1386469&r1=1386468&r2=1386469&view=diff ============================================================================== --- ofbiz/branches/release10.04/framework/security/src/org/ofbiz/security/OFBizSecurity.java (original) +++ ofbiz/branches/release10.04/framework/security/src/org/ofbiz/security/OFBizSecurity.java Mon Sep 17 04:36:07 2012 @@ -50,9 +50,9 @@ public class OFBizSecurity implements Se protected Delegator delegator = null; protected static final Map<String, Map<String, String>> simpleRoleEntity = UtilMisc.toMap( - "ORDERMGR", UtilMisc.toMap("name", "OrderRole", "pkey", "orderId"), - "FACILITY", UtilMisc.toMap("name", "FacilityParty", "pkey", "facilityId"), - "MARKETING", UtilMisc.toMap("name", "MarketingCampaignRole", "pkey", "marketingCampaignId")); + "ORDERMGR", UtilMisc.<String, String>toMap("name", "OrderRole", "pkey", "orderId"), + "FACILITY", UtilMisc.<String, String>toMap("name", "FacilityParty", "pkey", "facilityId"), + "MARKETING", UtilMisc.<String, String>toMap("name", "MarketingCampaignRole", "pkey", "marketingCampaignId")); protected OFBizSecurity() {} Modified: ofbiz/branches/release10.04/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java?rev=1386469&r1=1386468&r2=1386469&view=diff ============================================================================== --- ofbiz/branches/release10.04/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java (original) +++ ofbiz/branches/release10.04/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java Mon Sep 17 04:36:07 2012 @@ -157,7 +157,7 @@ public class OagisInventoryServices { GenericValue product = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", productId)); if (product == null) { String errMsg = "Product with ID [" + productId + "] not found (invalid Product ID)."; - errorMapList.add(UtilMisc.toMap("reasonCode", "ProductIdNotValid", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "ProductIdNotValid", "description", errMsg)); Debug.logError(errMsg, module); continue; } @@ -210,7 +210,7 @@ public class OagisInventoryServices { } } catch (Throwable t) { String errMsg = "Error processing Sync Inventory message: " + t.toString(); - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "Exception")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "Exception")); Debug.logInfo(t, errMsg, module); } } @@ -230,7 +230,7 @@ public class OagisInventoryServices { facilityContactMechs = delegator.findByAnd("FacilityContactMech", UtilMisc.toMap("facilityId", facilityId)); } catch (GenericEntityException e) { String errMsg = "Error Getting FacilityContactMech: " + e.toString(); - errorMapList.add(UtilMisc.toMap("reasonCode", "GenericEntityException", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "GenericEntityException", "description", errMsg)); Debug.logError(e, errMsg, module); } @@ -242,7 +242,7 @@ public class OagisInventoryServices { contactMech = delegator.findByPrimaryKey("ContactMech", UtilMisc.toMap("contactMechId", contactMechId)); } catch (GenericEntityException e) { String errMsg = "Error Getting ContactMech: " + e.toString(); - errorMapList.add(UtilMisc.toMap("reasonCode", "GenericEntityException", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "GenericEntityException", "description", errMsg)); Debug.logError(e, errMsg, module); } String contactMechTypeId = contactMech.getString("contactMechTypeId"); @@ -345,7 +345,7 @@ public class OagisInventoryServices { dispatcher.runSync("updateOagisMessageInfo", comiCtx, 60, true); } catch (GenericServiceException e) { String errMsg = "Error updating OagisMessageInfo for the Incoming Message: " + e.toString(); - // don't pass this back, nothing they can do about it: errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); + // don't pass this back, nothing they can do about it: errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } } @@ -474,7 +474,7 @@ public class OagisInventoryServices { GenericValue product = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", productId)); if (product == null) { String errMsg = "Product with ID [" + productId + "] not found (invalid Product ID)."; - errorMapList.add(UtilMisc.toMap("reasonCode", "ProductIdNotValid", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "ProductIdNotValid", "description", errMsg)); Debug.logError(errMsg, module); continue; } @@ -547,12 +547,12 @@ public class OagisInventoryServices { Map<String, Object> ripResult = dispatcher.runSync("receiveInventoryProduct", ripCtx); if (ServiceUtil.isError(ripResult)) { String errMsg = ServiceUtil.getErrorMessage(ripResult); - errorMapList.add(UtilMisc.toMap("reasonCode", "ReceiveInventoryServiceError", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "ReceiveInventoryServiceError", "description", errMsg)); } } } catch (Throwable t) { String errMsg = "System Error processing Acknowledge Delivery PO message for message [" + omiPkMap + "]: " + t.toString(); - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SystemError")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SystemError")); try { comiCtx.put("processingStatusId", "OAGMP_SYS_ERROR"); @@ -637,7 +637,7 @@ public class OagisInventoryServices { dispatcher.runSync("updateOagisMessageInfo", comiCtx, 60, true); } catch (GenericServiceException e) { String errMsg = "Error updating OagisMessageInfo for the Incoming Message: " + e.toString(); - // don't pass this back, nothing they can do about it: errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); + // don't pass this back, nothing they can do about it: errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } } @@ -775,14 +775,14 @@ public class OagisInventoryServices { String productId = UtilXml.childElementValue(receiptLnElement, "of:ITEM"); if (UtilValidate.isEmpty(productId)) { String errMsg = "Product ID Missing"; - errorMapList.add(UtilMisc.toMap("reasonCode", "ProductIdMissing", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "ProductIdMissing", "description", errMsg)); Debug.logError(errMsg, module); } // make sure productId is valid GenericValue product = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", productId)); if (product == null) { String errMsg = "Product with ID [" + productId + "] not found (invalid Product ID)."; - errorMapList.add(UtilMisc.toMap("reasonCode", "ProductIdNotValid", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "ProductIdNotValid", "description", errMsg)); Debug.logError(errMsg, module); continue; } @@ -803,13 +803,13 @@ public class OagisInventoryServices { GenericValue returnItem = delegator.findByPrimaryKeyCache("ReturnItem", UtilMisc.toMap("returnId", returnId, "returnItemSeqId", returnItemSeqId)); if (returnItem == null) { String errMsg = "Return Item with ID [" + returnId + ":" + returnItemSeqId + "] not found (invalid Return/Item ID Combination)."; - errorMapList.add(UtilMisc.toMap("reasonCode", "ReturnAndItemIdNotValid", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "ReturnAndItemIdNotValid", "description", errMsg)); Debug.logError(errMsg, module); continue; } } else { String errMsg = "No Return Item ID (LINENUM) found in DOCUMNTREF for Return [" + returnId + "]; this is a required field."; - errorMapList.add(UtilMisc.toMap("reasonCode", "ReturnItemIdLinenumMissing", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "ReturnItemIdLinenumMissing", "description", errMsg)); Debug.logError(errMsg, module); continue; } @@ -824,7 +824,7 @@ public class OagisInventoryServices { } else if ("NotAvailableTOAvailable".equals(disposition) || "AvailableTONotAvailable".equals(disposition)) { // for RMA we should only get the ReceivedTO* DISPOSITN values; if we get something else we should return an error String errMsg = "Got DISPOSITN value [" + disposition + "] that is not valid for RMA, only for status change."; - errorMapList.add(UtilMisc.toMap("reasonCode", "DispositnNotValidForRMA", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "DispositnNotValidForRMA", "description", errMsg)); continue; } ripCtx.put("statusId", invItemStatusId); @@ -876,7 +876,7 @@ public class OagisInventoryServices { if (UtilValidate.isNotEmpty(serialNumsList)) { if (messageQuantity.intValue() != serialNumsList.size()) { String errMsg = "Not enough serial numbers [" + serialNumsList.size() + "] for the quantity [" + messageQuantity.intValue() + "]."; - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SerialNumbersMissing")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SerialNumbersMissing")); Debug.logInfo(errMsg, module); continue; } @@ -913,13 +913,13 @@ public class OagisInventoryServices { if (OagisServices.requireSerialNumberExist.booleanValue()) { if (inventoryItemsBySerialNumber.size() == 0) { String errMsg = "Referenced serial numbers must already exist, but serial number [" + serialNum + "] was not found."; - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SerialNumberRequiredButNotFound")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SerialNumberRequiredButNotFound")); continue; } } else { if (inventoryItemsBySerialNumber.size() > 0) { String errMsg = "Referenced serial numbers must NOT already exist, but serial number [" + serialNum + "] already exists."; - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SerialNumberRequiredNotExistButFound")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SerialNumberRequiredNotExistButFound")); continue; } } @@ -945,7 +945,7 @@ public class OagisInventoryServices { Map<String, Object> ripResult = dispatcher.runSync("receiveInventoryProduct", localRipCtx); if (ServiceUtil.isError(ripResult)) { String errMsg = ServiceUtil.getErrorMessage(ripResult); - errorMapList.add(UtilMisc.toMap("reasonCode", "ReceiveInventoryServiceError", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "ReceiveInventoryServiceError", "description", errMsg)); } else { invItemIds.add((String) ripResult.get("inventoryItemId")); } @@ -968,7 +968,7 @@ public class OagisInventoryServices { Map<String, Object> ripResult = dispatcher.runSync("receiveInventoryProduct", localRipCtx); if (ServiceUtil.isError(ripResult)) { String errMsg = ServiceUtil.getErrorMessage(ripResult); - errorMapList.add(UtilMisc.toMap("reasonCode", "ReceiveInventoryServiceError", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "ReceiveInventoryServiceError", "description", errMsg)); } inventoryItemId = (String) ripResult.get("inventoryItemId"); @@ -987,7 +987,7 @@ public class OagisInventoryServices { Map<String, Object> cpivResult = dispatcher.runSync("createPhysicalInventoryAndVariance", createPhysicalInvAndVarCtx); if (ServiceUtil.isError(cpivResult)) { String errMsg = ServiceUtil.getErrorMessage(cpivResult); - errorMapList.add(UtilMisc.toMap("reasonCode", "CreatePhysicalInventoryAndVarianceServiceError", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "CreatePhysicalInventoryAndVarianceServiceError", "description", errMsg)); } } } @@ -998,7 +998,7 @@ public class OagisInventoryServices { } else { String errMsg = "Return ID [" + returnId + "] Not Found"; Debug.logError(errMsg, module); - errorMapList.add(UtilMisc.toMap("reasonCode", "ReturnIdNotFound", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "ReturnIdNotFound", "description", errMsg)); } } @@ -1068,7 +1068,7 @@ public class OagisInventoryServices { } } catch (Throwable t) { String errMsg = "System Error processing Acknowledge Delivery RMA message for message [" + omiPkMap + "]: " + t.toString(); - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SystemError")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SystemError")); try { comiCtx.put("processingStatusId", "OAGMP_SYS_ERROR"); @@ -1153,7 +1153,7 @@ public class OagisInventoryServices { dispatcher.runSync("updateOagisMessageInfo", comiCtx, 60, true); } catch (GenericServiceException e) { String errMsg = "Error updating OagisMessageInfo for the Incoming Message: " + e.toString(); - // don't pass this back, nothing they can do about it: errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); + // don't pass this back, nothing they can do about it: errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } } @@ -1282,14 +1282,14 @@ public class OagisInventoryServices { String productId = UtilXml.childElementValue(receiptLnElement, "of:ITEM"); if (UtilValidate.isEmpty(productId)) { String errMsg = "Product ID Missing"; - errorMapList.add(UtilMisc.toMap("reasonCode", "ProductIdMissing", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "ProductIdMissing", "description", errMsg)); Debug.logError(errMsg, module); } // make sure productId is valid GenericValue product = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", productId)); if (product == null) { String errMsg = "Product with ID [" + productId + "] not found (invalid Product ID)."; - errorMapList.add(UtilMisc.toMap("reasonCode", "ProductIdNotValid", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "ProductIdNotValid", "description", errMsg)); Debug.logError(errMsg, module); continue; } @@ -1311,7 +1311,7 @@ public class OagisInventoryServices { reqFromItemStatusId = "INV_AVAILABLE"; } else if ("ReceivedTOAvailable".equals(disposition) || "ReceivedTONotAvailable".equals(disposition)) { String errMsg = "Got DISPOSITN value [" + disposition + "] that is not valid for Status Change, only for RMA/return."; - errorMapList.add(UtilMisc.toMap("reasonCode", "DispositnNotValidForStatusChange", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "DispositnNotValidForStatusChange", "description", errMsg)); continue; } @@ -1334,7 +1334,7 @@ public class OagisInventoryServices { if (UtilValidate.isNotEmpty(serialNumsList)) { if (messageQuantity.intValue() != serialNumsList.size()) { String errMsg = "Not enough serial numbers [" + serialNumsList.size() + "] for the quantity [" + messageQuantity.intValue() + "]."; - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SerialNumbersMissing")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SerialNumbersMissing")); Debug.logInfo(errMsg, module); continue; } @@ -1347,7 +1347,7 @@ public class OagisInventoryServices { // sign handling for items if (!"+".equals(sign)) { String errMsg = "Got a sign [" + sign + "] that was not plus (+), this is not valid for a Status Change operation."; - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SignNotPlusForStatusChange")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SignNotPlusForStatusChange")); continue; } @@ -1368,14 +1368,14 @@ public class OagisInventoryServices { // this is a status update, so referenced serial number MUST already exist if (inventoryItemsBySerialNumber.size() == 0) { String errMsg = "Referenced serial numbers must already exist, but serial number [" + serialNum + "] was not found."; - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SerialNumberRequiredButNotFound")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SerialNumberRequiredButNotFound")); continue; } GenericValue inventoryItem = EntityUtil.getFirst(inventoryItemsBySerialNumber); if (UtilValidate.isNotEmpty(reqFromItemStatusId) && !reqFromItemStatusId.equals(inventoryItem.getString("statusId"))) { String errMsg = "Referenced serial number [" + serialNum + "] has status [" + inventoryItem.getString("statusId") + "] but we were expecting [" + reqFromItemStatusId + "]; this may mean the Acknowledge Delivery RMA message has not yet come in for this item."; - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SerialNumberRequiredButNotFound")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SerialNumberRequiredButNotFound")); continue; } @@ -1399,12 +1399,12 @@ public class OagisInventoryServices { // for now just return an error message String errMsg = "No serial numbers were included in the message and right now this is not supported"; - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "NoSerialNumbersInMessage")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "NoSerialNumbersInMessage")); } } } catch (Throwable t) { String errMsg = "System Error processing Acknowledge Delivery Status message for message [" + omiPkMap + "]: " + t.toString(); - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SystemError")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SystemError")); try { comiCtx.put("processingStatusId", "OAGMP_SYS_ERROR"); @@ -1481,7 +1481,7 @@ public class OagisInventoryServices { dispatcher.runSync("updateOagisMessageInfo", comiCtx, 60, true); } catch (GenericServiceException e) { String errMsg = "Error updating OagisMessageInfo for the Incoming Message: " + e.toString(); - // don't pass this back, nothing they can do about it: errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); + // don't pass this back, nothing they can do about it: errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } } Modified: ofbiz/branches/release10.04/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java?rev=1386469&r1=1386468&r2=1386469&view=diff ============================================================================== --- ofbiz/branches/release10.04/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java (original) +++ ofbiz/branches/release10.04/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java Mon Sep 17 04:36:07 2012 @@ -314,7 +314,7 @@ public class OagisServices { /* running async for better error handling if (ServiceUtil.isError(oagisMsgInfoResult)) { String errMsg = "Error creating OagisMessageInfo for the Incoming Message: "+ServiceUtil.getErrorMessage(oagisMsgInfoResult); - errorMapList.add(UtilMisc.toMap("description", (Object) errMsg, "reasonCode", "CreateOagisMessageInfoServiceError")); + errorMapList.add(UtilMisc.<String, String>toMap("description", (Object) errMsg, "reasonCode", "CreateOagisMessageInfoServiceError")); Debug.logError(errMsg, module); } */ @@ -323,7 +323,7 @@ public class OagisServices { if (UtilValidate.isEmpty(dataAreaConfirmMsgList)) { String errMsg = "No CONFIRMMSG elements found in Confirm BOD message: " + omiPkMap; Debug.logWarning(errMsg, module); - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "NoCONFIRMMSGElements")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "NoCONFIRMMSGElements")); } else { Map<String, Object> originalOmiPkMap = UtilMisc.toMap("logicalId", (Object) dataAreaLogicalId, "component", dataAreaComponent, "task", dataAreaTask, "referenceId", dataAreaReferenceId); @@ -343,14 +343,14 @@ public class OagisServices { Map<String, Object> oagisMsgErrorInfoResult = dispatcher.runSync("createOagisMessageErrorInfo", createOagisMessageErrorInfoForOriginal); if (ServiceUtil.isError(oagisMsgErrorInfoResult)) { String errMsg = "Error creating OagisMessageErrorInfo: " + ServiceUtil.getErrorMessage(oagisMsgErrorInfoResult); - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "CreateOagisMessageErrorInfoServiceError")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "CreateOagisMessageErrorInfoServiceError")); Debug.logError(errMsg, module); } } } else { String errMsg = "No such message with an error was found; Not creating OagisMessageErrorInfo record(s) for original message, but saving info for this message anyway; ID info: " + omiPkMap; Debug.logWarning(errMsg, module); - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "OriginalOagisMessageInfoNotFoundError")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "OriginalOagisMessageInfoNotFoundError")); } // now attach all of the messages to the CBOD OagisMessageInfo record @@ -424,7 +424,7 @@ public class OagisServices { dispatcher.runSync("updateOagisMessageInfo", oagisMsgInfoCtx, 60, true); } catch (GenericServiceException e) { String errMsg = "Error updating OagisMessageInfo for the Incoming Message: " + e.toString(); - // don't pass this back, nothing they can do about it: errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); + // don't pass this back, nothing they can do about it: errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } } @@ -515,15 +515,15 @@ public class OagisServices { doc = UtilXml.readXmlDocument(bis, true, "OagisMessage"); } catch (SAXException e) { String errMsg = "XML Error parsing the Received Message [" + e.toString() + "]; The text received we could not parse is: [" + xmlText + "]"; - errorList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SAXException")); + errorList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SAXException")); Debug.logError(e, errMsg, module); } catch (ParserConfigurationException e) { String errMsg = "Parser Configuration Error parsing the Received Message: " + e.toString(); - errorList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "ParserConfigurationException")); + errorList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "ParserConfigurationException")); Debug.logError(e, errMsg, module); } catch (IOException e) { String errMsg = "IO Error parsing the Received Message: " + e.toString(); - errorList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "IOException")); + errorList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "IOException")); Debug.logError(e, errMsg, module); } @@ -568,7 +568,7 @@ public class OagisServices { String responseMsg = "Message already received with ID: " + oagisMessageInfoKey; Debug.logError(responseMsg, module); - List<Map<String, String>> errorMapList = UtilMisc.toList(UtilMisc.toMap("reasonCode", "MessageAlreadyReceived", "description", responseMsg)); + List<Map<String, String>> errorMapList = UtilMisc.toList(UtilMisc.<String, String>toMap("reasonCode", "MessageAlreadyReceived", "description", responseMsg)); Map<String, Object> sendConfirmBodCtx = FastMap.newInstance(); sendConfirmBodCtx.put("logicalId", logicalId); @@ -599,7 +599,7 @@ public class OagisServices { dispatcher.runAsync("oagisReceiveConfirmBod", messageProcessContext, true); } catch (GenericServiceException e) { String errMsg = "Error running service oagisReceiveConfirmBod: " + e.toString(); - errorList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); + errorList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } } else if (bsrVerb.equalsIgnoreCase("SHOW") && bsrNoun.equalsIgnoreCase("SHIPMENT")) { @@ -609,7 +609,7 @@ public class OagisServices { dispatcher.runAsync("oagisReceiveShowShipment", messageProcessContext, true); } catch (GenericServiceException e) { String errMsg = "Error running service oagisReceiveShowShipment: " + e.toString(); - errorList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); + errorList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } } else if (bsrVerb.equalsIgnoreCase("SYNC") && bsrNoun.equalsIgnoreCase("INVENTORY")) { @@ -619,7 +619,7 @@ public class OagisServices { dispatcher.runAsync("oagisReceiveSyncInventory", messageProcessContext, true); } catch (GenericServiceException e) { String errMsg = "Error running service oagisReceiveSyncInventory: " + e.toString(); - errorList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); + errorList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } } else if (bsrVerb.equalsIgnoreCase("ACKNOWLEDGE") && bsrNoun.equalsIgnoreCase("DELIVERY")) { @@ -636,7 +636,7 @@ public class OagisServices { dispatcher.runAsync("oagisReceiveAcknowledgeDeliveryPo", messageProcessContext, true); } catch (GenericServiceException e) { String errMsg = "Error running service oagisReceiveAcknowledgeDeliveryPo: " + e.toString(); - errorList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); + errorList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } } else if ("RMA".equals(docType)) { @@ -645,7 +645,7 @@ public class OagisServices { dispatcher.runAsync("oagisReceiveAcknowledgeDeliveryRma", messageProcessContext, true); } catch (GenericServiceException e) { String errMsg = "Error running service oagisReceiveAcknowledgeDeliveryRma: " + e.toString(); - errorList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); + errorList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } } else if (UtilValidate.isEmpty(docType) && ("NotAvailableTOAvailable".equals(disposition) || "AvailableTONotAvailable".equals(disposition))) { @@ -653,7 +653,7 @@ public class OagisServices { dispatcher.runAsync("oagisReceiveAcknowledgeDeliveryStatus", messageProcessContext, true); } catch (GenericServiceException e) { String errMsg = "Error running service oagisReceiveAcknowledgeDeliveryStatus: " + e.toString(); - errorList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); + errorList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } } else { @@ -675,7 +675,7 @@ public class OagisServices { Iterator errListItr = errorList.iterator(); while (errListItr.hasNext()) { Map errorMap = (Map) errListItr.next(); - errorMapList.add(UtilMisc.toMap("description", errorMap.get("description"), "reasonCode", errorMap.get("reasonCode"))); + errorMapList.add(UtilMisc.<String, String>toMap("description", errorMap.get("description"), "reasonCode", errorMap.get("reasonCode"))); } result.put("errorMapList", errorMapList); } @@ -754,7 +754,7 @@ public class OagisServices { dateTimeInvReceived = isoDateFormatNoTzValue.parse(dateString); } catch (ParseException e1) { String errMsg = "Error parsing Date: " + e1.toString(); - if (errorMapList != null) errorMapList.add(UtilMisc.toMap("reasonCode", "ParseException", "description", errMsg)); + if (errorMapList != null) errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "ParseException", "description", errMsg)); Debug.logError(e, errMsg, module); } } Modified: ofbiz/branches/release10.04/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java?rev=1386469&r1=1386468&r2=1386469&view=diff ============================================================================== --- ofbiz/branches/release10.04/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java (original) +++ ofbiz/branches/release10.04/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java Mon Sep 17 04:36:07 2012 @@ -183,13 +183,13 @@ public class OagisShipmentServices { /* running async for better error handling if (ServiceUtil.isError(oagisMsgInfoResult)) { String errMsg = ServiceUtil.getErrorMessage(oagisMsgInfoResult); - // errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "CreateOagisMessageInfoServiceError")); + // errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "CreateOagisMessageInfoServiceError")); Debug.logError(errMsg, module); } */ } catch (GenericServiceException e) { String errMsg = "Error creating OagisMessageInfo for the Incoming Message: " + e.toString(); - // don't pass this back, nothing they can do about it: errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); + // don't pass this back, nothing they can do about it: errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } @@ -199,16 +199,16 @@ public class OagisShipmentServices { } catch (GenericEntityException e) { String errMsg = "Error getting Shipment from database for ID [" + shipmentId + "]: " + e.toString(); Debug.logInfo(e, errMsg, module); - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericEntityException")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "GenericEntityException")); } if (shipment == null) { String errMsg = "Could not find Shipment ID [" + shipmentId + "]"; - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "ShipmentIdNotValid")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "ShipmentIdNotValid")); } else { if (invalidShipmentStatusSet.contains(shipment.get("statusId"))) { String errMsg = "Shipment with ID [" + shipmentId + "] is in a status [" + shipment.get("statusId") + "] that means it has been or is being shipped, so this Show Shipment message may be a duplicate."; - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "ShipmentInBadStatus")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "ShipmentInBadStatus")); } } @@ -232,7 +232,7 @@ public class OagisShipmentServices { "shipmentRouteSegmentId", "00001", "carrierPartyId", carrierPartyId, "trackingIdNumber", trackingNum, "userLogin", userLogin)); if (ServiceUtil.isError(resultMap)) { String errMsg = ServiceUtil.getErrorMessage(resultMap); - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "updateShipmentRouteSegmentError")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "updateShipmentRouteSegmentError")); Debug.logError(errMsg, module); } } @@ -256,7 +256,7 @@ public class OagisShipmentServices { GenericValue product = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", productId)); if (product == null) { String errMsg = "Product with ID [" + productId + "] not found (invalid Product ID)."; - errorMapList.add(UtilMisc.toMap("reasonCode", "ProductIdNotValid", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "ProductIdNotValid", "description", errMsg)); Debug.logError(errMsg, module); foundBadProductId = true; continue; @@ -313,7 +313,7 @@ public class OagisShipmentServices { shipmentItemList = delegator.findByAnd("ShipmentItem", UtilMisc.toMap("shipmentId", shipmentId, "productId",productId)); if (UtilValidate.isEmpty(shipmentItemList)) { String errMsg = "Could not find Shipment Item for Shipment with ID [" + shipmentId + "] and Product with ID [" + productId + "]."; - errorMapList.add(UtilMisc.toMap("reasonCode", "ShipmentItemForProductNotFound", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "ShipmentItemForProductNotFound", "description", errMsg)); Debug.logError(errMsg, module); continue; } @@ -339,7 +339,7 @@ public class OagisShipmentServices { // for now just get the first item, the other scenario is not yet supported if (shipmentItemList.size() > 1) { String errMsg = "Could not find single Shipment Item for Shipment with ID [" + shipmentId + "] and Product with ID [" + productId + "], found [" + shipmentItemList.size() + "] and could not narrow down to one."; - errorMapList.add(UtilMisc.toMap("reasonCode", "SingleShipmentItemForProductNotFound", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "SingleShipmentItemForProductNotFound", "description", errMsg)); Debug.logError(errMsg, module); continue; } @@ -349,7 +349,7 @@ public class OagisShipmentServices { GenericValue orderShipment = EntityUtil.getFirst(delegator.findByAnd("OrderShipment", UtilMisc.toMap("shipmentId", shipmentId, "shipmentItemSeqId", shipmentItemSeqId))); if (orderShipment == null) { String errMsg = "Could not find Order-Shipment record for ShipmentItem with ID [" + shipmentId + "] and Item Seq-ID [" + shipmentItemSeqId + "]."; - errorMapList.add(UtilMisc.toMap("reasonCode", "OrderShipmentNotFound", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "OrderShipmentNotFound", "description", errMsg)); Debug.logError(errMsg, module); continue; } @@ -387,7 +387,7 @@ public class OagisShipmentServices { if (UtilValidate.isNotEmpty(serialNumberList)) { if (messageQuantity.intValue() != serialNumberList.size()) { String errMsg = "Error: the quantity in the message [" + messageQuantity.intValue() + "] did not match the number of serial numbers passed [" + serialNumberList.size() + "] for ShipmentItem with ID [" + shipmentId + "] and Item Seq-ID [" + shipmentItemSeqId + "]."; - errorMapList.add(UtilMisc.toMap("reasonCode", "QuantitySerialMismatch", "description", errMsg)); + errorMapList.add(UtilMisc.<String, String>toMap("reasonCode", "QuantitySerialMismatch", "description", errMsg)); Debug.logInfo(errMsg, module); continue; } @@ -397,7 +397,7 @@ public class OagisShipmentServices { //OrderItem than there is quantity on the current ShipmentItem if ((int) totalReserved < messageQuantity.intValue()) { String errMsg = "Inventory reservation quantity [" + totalReserved + "] was less than the message quantity [" + messageQuantity.intValue() + "] so cannot receive against reservations for ShipmentItem with ID [" + shipmentId + ":" + shipmentItemSeqId + "], and OrderItem [" + orderShipment.getString("orderId") + ":" + orderShipment.getString("orderItemSeqId") + "]"; - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SerialNumbersMissing")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SerialNumbersMissing")); Debug.logInfo(errMsg, module); continue; } @@ -457,13 +457,13 @@ public class OagisShipmentServices { if (OagisServices.requireSerialNumberExist.booleanValue()) { if (inventoryItemsBySerialNumber.size() == 0) { String errMsg = "Referenced serial numbers must already exist, but serial number [" + serialNumber + "] was not found. Product ID(s) considered are: " + productIdSet; - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SerialNumberRequiredButNotFound")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SerialNumberRequiredButNotFound")); continue; } } else { if (inventoryItemsBySerialNumber.size() > 0) { String errMsg = "Referenced serial numbers must NOT already exist, but serial number [" + serialNumber + "] already exists. Product ID(s) considered are: " + productIdSet; - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SerialNumberRequiredNotExistButFound")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SerialNumberRequiredNotExistButFound")); continue; } } @@ -476,7 +476,7 @@ public class OagisShipmentServices { Map<String, Object> resultMap = dispatcher.runSync("issueSerializedInvToShipmentPackageAndSetTracking", isitspastCtx); if (ServiceUtil.isError(resultMap)) { String errMsg = ServiceUtil.getErrorMessage(resultMap); - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "IssueSerializedInvServiceError")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "IssueSerializedInvServiceError")); Debug.logError(errMsg, module); } } @@ -486,7 +486,7 @@ public class OagisShipmentServices { Map<String, Object> resultMap = dispatcher.runSync("issueSerializedInvToShipmentPackageAndSetTracking", isitspastCtx); if (ServiceUtil.isError(resultMap)) { String errMsg = ServiceUtil.getErrorMessage(resultMap); - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "IssueSerializedInvServiceError")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "IssueSerializedInvServiceError")); Debug.logError(errMsg, module); } } @@ -516,7 +516,7 @@ public class OagisShipmentServices { if (shipmentItemQuantity > totalItemIssuanceQuantity) { String errMsg = "ShipmentItem [" + shipmentId + ":" + shipmentItem.get("shipmentItemSeqId") + "] was not completely fulfilled; shipment item quantity was [" + shipmentItemQuantity + "], but total fulfilled is only [" + totalItemIssuanceQuantity + "]"; - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "ShipmentItemNotCompletelyFulfilled")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "ShipmentItemNotCompletelyFulfilled")); Debug.logError(errMsg, module); } } @@ -527,13 +527,13 @@ public class OagisShipmentServices { UtilMisc.toMap("shipmentId", shipmentId, "userLogin", userLogin)); if (ServiceUtil.isError(resultMap)) { String errMsg = ServiceUtil.getErrorMessage(resultMap); - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SetShipmentStatusPackedAndShippedError")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SetShipmentStatusPackedAndShippedError")); Debug.logError(errMsg, module); } } } catch (Throwable t) { String errMsg = "System Error processing Show Shipment message for shipmentId [" + shipmentId + "] message [" + omiPkMap + "]: " + t.toString(); - errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SystemError")); + errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SystemError")); try { oagisMsgInfoCtx.put("processingStatusId", "OAGMP_SYS_ERROR"); @@ -965,7 +965,7 @@ public class OagisShipmentServices { uomiCtx.put("userLogin", userLogin); dispatcher.runSync("updateOagisMessageInfo", uomiCtx, 60, true); - List<Map<String, String>> errorMapList = UtilMisc.toList(UtilMisc.toMap("description", errMsg, "reasonCode", "SystemError")); + List<Map<String, String>> errorMapList = UtilMisc.toList(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SystemError")); Map<String, Object> saveErrorMapListCtx = FastMap.newInstance(); saveErrorMapListCtx.putAll(omiPkMap); saveErrorMapListCtx.put("errorMapList", errorMapList); @@ -1210,7 +1210,7 @@ public class OagisShipmentServices { uomiCtx.put("userLogin", userLogin); dispatcher.runSync("updateOagisMessageInfo", uomiCtx, 60, true); - List<Map<String, String>> errorMapList = UtilMisc.toList(UtilMisc.toMap("description", errMsg, "reasonCode", "SystemError")); + List<Map<String, String>> errorMapList = UtilMisc.toList(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SystemError")); Map<String, Object> saveErrorMapListCtx = FastMap.newInstance(); saveErrorMapListCtx.putAll(omiPkMap); saveErrorMapListCtx.put("errorMapList", errorMapList); |
| Free forum by Nabble | Edit this page |
