From 7d94967a685c8aa02291bdfcfb686f2eb250a883 Mon Sep 17 00:00:00 2001 From: Nicolas Malin Date: Fri, 10 Apr 2015 20:22:54 +0000 Subject: [PATCH] Convert javolution FastMap, FastSet and FastList by standard java.util.* Related to OFBIZ-5781 Convert Javolution collections into Java collections Thanks to Deepak Dixit and Adrian Crum for their help. By defautl converted : * FastMap by HashMap * FastList by LinkedList * FastSet by HashSet git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1672752 13f79535-47bb-0310-9956-ffa450edef68 --- .../agreement/AgreementServices.java | 5 +- .../finaccount/FinAccountPaymentServices.java | 11 +- .../finaccount/FinAccountProductServices.java | 25 ++- .../finaccount/FinAccountServices.java | 11 +- .../accounting/invoice/InvoiceServices.java | 93 ++++---- .../accounting/invoice/InvoiceWorker.java | 17 +- .../payment/BillingAccountWorker.java | 5 +- .../payment/GiftCertificateServices.java | 29 ++- .../payment/PaymentGatewayServices.java | 60 +++-- .../payment/PaymentMethodServices.java | 37 ++-- .../accounting/payment/PaymentWorker.java | 11 +- .../accounting/tax/TaxAuthorityServices.java | 27 ++- .../authorizedotnet/AIMPaymentServices.java | 23 +- .../authorizedotnet/AIMRespPositions.java | 7 +- .../authorizedotnet/CPRespPositions.java | 11 +- .../cybersource/IcsPaymentServices.java | 13 +- .../thirdparty/gosoftware/RitaApi.java | 9 +- .../thirdparty/ideal/IdealEvents.java | 7 +- .../orbital/OrbitalPaymentServices.java | 11 +- .../thirdparty/paypal/PayPalServices.java | 17 +- .../sagepay/SagePayPaymentServices.java | 5 +- .../thirdparty/sagepay/SagePayUtil.java | 12 +- .../thirdparty/valuelink/ValueLinkApi.java | 13 +- .../valuelink/ValueLinkServices.java | 27 ++- .../thirdparty/verisign/PayflowPro.java | 17 +- .../thirdparty/worldpay/WorldPayEvents.java | 5 +- .../ofbiz/accounting/util/UtilAccounting.java | 5 +- .../TaxAuthorityGlAccounts.groovy | 1 - .../actions/invoice/EditInvoice.groovy | 7 +- .../GetAccountOrganizationAndClass.groovy | 2 - .../actions/invoice/InvoiceReport.groovy | 2 - .../actions/order/BillingAccountOrders.groovy | 3 +- .../actions/reports/BalanceSheet.groovy | 32 ++- .../actions/reports/CashFlowStatement.groovy | 19 +- .../actions/reports/CostCenters.groovy | 5 +- .../actions/reports/IncomeStatement.groovy | 18 +- ...alesInvoiceByProductCategorySummary.groovy | 39 ++-- .../actions/reports/TransactionTotals.groovy | 28 ++- .../WEB-INF/actions/GetProdCatalog.groovy | 5 +- .../actions/GetProductStoreAndWebSite.groovy | 2 - .../ofbiz/content/content/ContentServices.xml | 2 +- applications/content/src/ControlApplet.java | 7 +- .../content/ContentManagementEvents.java | 13 +- .../content/ContentManagementServices.java | 111 +++++----- .../content/ContentManagementWorker.java | 45 ++-- .../src/org/ofbiz/content/ConvertTree.java | 15 +- .../ofbiz/content/blog/BlogRssServices.java | 9 +- .../ofbiz/content/compdoc/CompDocEvents.java | 9 +- .../content/compdoc/CompDocServices.java | 11 +- .../content/content/ContentKeywordIndex.java | 7 +- .../content/content/ContentMapFacade.java | 17 +- .../content/ContentPermissionServices.java | 21 +- .../ofbiz/content/content/ContentSearch.java | 29 ++- .../content/content/ContentSearchEvents.java | 5 +- .../content/content/ContentSearchSession.java | 9 +- .../content/content/ContentServices.java | 79 ++++--- .../content/ContentServicesComplex.java | 25 +-- .../ofbiz/content/content/ContentWorker.java | 94 ++++---- .../content/content/PermissionRecorder.java | 15 +- .../content/UploadContentAndImage.java | 39 ++-- .../content/data/DataResourceWorker.java | 27 ++- .../org/ofbiz/content/data/DataServices.java | 27 ++- .../ofbiz/content/layout/LayoutEvents.java | 31 ++- .../ofbiz/content/layout/LayoutWorker.java | 7 +- .../ofbiz/content/output/OutputServices.java | 7 +- .../content/survey/PdfSurveyServices.java | 11 +- .../ofbiz/content/survey/SurveyWrapper.java | 33 ++- .../webapp/ftl/CheckPermissionTransform.java | 11 +- .../EditRenderSubContentCacheTransform.java | 5 +- .../ftl/LimitedSubContentCacheTransform.java | 15 +- .../ftl/RenderContentAndSubContent.java | 4 +- .../webapp/ftl/RenderContentAsText.java | 9 +- .../webapp/ftl/RenderSubContentAsText.java | 9 +- .../ftl/RenderSubContentCacheTransform.java | 9 +- .../webapp/ftl/RenderSubContentTransform.java | 5 +- .../ftl/TraverseSubContentCacheTransform.java | 17 +- .../ftl/TraverseSubContentTransform.java | 15 +- .../ftl/WrapSubContentCacheTransform.java | 7 +- .../org/ofbiz/humanres/HumanResEvents.java | 27 ++- .../actions/category/CategoryTree.groovy | 15 +- .../org/ofbiz/manufacturing/bom/BOMNode.java | 25 +-- .../ofbiz/manufacturing/bom/BOMServices.java | 61 +++--- .../org/ofbiz/manufacturing/bom/BOMTree.java | 11 +- .../jobshopmgt/ProductionRun.java | 5 +- .../jobshopmgt/ProductionRunEvents.java | 5 +- .../jobshopmgt/ProductionRunHelper.java | 5 +- .../jobshopmgt/ProductionRunServices.java | 125 ++++++----- .../ofbiz/manufacturing/mrp/MrpServices.java | 13 +- .../manufacturing/mrp/ProposedOrder.java | 11 +- .../routing/RoutingServices.java | 5 +- .../techdata/TechDataServices.java | 29 ++- .../ProductionRunDeclaration.groovy | 8 +- .../productionRunAllFixedAssets.groovy | 4 +- .../ofbiz/marketing/report/ReportHelper.java | 12 +- .../tracking/TrackingCodeEvents.java | 7 +- .../src/org/ofbiz/sfa/vcard/VCard.java | 4 +- .../org/ofbiz/order/OrderManagerEvents.java | 7 +- .../order/order/OrderContentWrapper.java | 5 +- .../org/ofbiz/order/order/OrderEvents.java | 8 +- .../org/ofbiz/order/order/OrderListState.java | 25 +-- .../order/order/OrderLookupServices.java | 39 ++-- .../ofbiz/order/order/OrderReadHelper.java | 80 ++++--- .../order/order/OrderReturnServices.java | 75 ++++--- .../org/ofbiz/order/order/OrderServices.java | 89 ++++---- .../org/ofbiz/order/quote/QuoteServices.java | 7 +- .../requirement/RequirementServices.java | 18 +- .../order/shoppingcart/CheckOutEvents.java | 4 +- .../order/shoppingcart/ShoppingCart.java | 83 ++++--- .../shoppingcart/ShoppingCartEvents.java | 9 +- .../shoppingcart/ShoppingCartHelper.java | 6 +- .../order/shoppingcart/ShoppingCartItem.java | 25 +-- .../shoppingcart/ShoppingCartServices.java | 16 +- .../product/ProductDisplayWorker.java | 20 +- .../product/ProductPromoWorker.java | 46 ++-- .../shipping/ShippingEstimateWrapper.java | 5 +- .../shoppingcart/shipping/ShippingEvents.java | 9 +- .../shoppinglist/ShoppingListEvents.java | 15 +- .../shoppinglist/ShoppingListServices.java | 7 +- .../ofbiz/order/test/OrderTestServices.java | 7 +- .../ofbiz/order/test/PurchaseOrderTest.java | 19 +- .../org/ofbiz/order/test/SalesOrderTest.java | 18 +- .../paypal/ExpressCheckoutEvents.java | 7 +- .../thirdparty/zipsales/ZipSalesServices.java | 9 +- .../actions/entry/AddGiftCertificates.groovy | 3 +- .../entry/CheckoutShippingAddress.groovy | 1 - .../WEB-INF/actions/entry/ShipSettings.groovy | 7 +- .../entry/catalog/SideDeepCategory.groovy | 3 +- .../lookup/LookupAssociatedProducts.groovy | 3 +- .../WEB-INF/actions/order/OrderView.groovy | 8 +- .../WEB-INF/actions/order/ShipGroups.groovy | 17 +- .../party/contact/ContactMechServices.java | 39 ++-- .../party/contact/ContactMechWorker.java | 41 ++-- .../party/content/PartyContentWrapper.java | 10 +- .../party/party/PartyRelationshipHelper.java | 5 +- .../party/PartyRelationshipServices.java | 7 +- .../org/ofbiz/party/party/PartyServices.java | 91 ++++---- .../org/ofbiz/party/party/PartyWorker.java | 17 +- .../communication/ListCommunications.groovy | 6 +- .../getPartyEmailFromCommEventInfo.groovy | 3 +- .../party/PartyFinancialHistory.groovy | 1 - .../party/UnAppliedInvoicesForParty.groovy | 1 - .../party/UnAppliedPaymentsForParty.groovy | 1 - .../ofbiz/product/catalog/CatalogServices.xml | 2 +- .../ofbiz/product/catalog/CatalogWorker.java | 13 +- .../product/category/CatalogUrlFilter.java | 21 +- .../product/category/CatalogUrlServlet.java | 5 +- .../category/CategoryContentWrapper.java | 5 +- .../product/category/CategoryServices.java | 61 +++--- .../product/category/CategoryWorker.java | 19 +- .../category/SeoCatalogUrlServlet.java | 5 +- .../ofbiz/product/category/SeoConfigUtil.java | 14 +- .../product/category/SeoContentUrlFilter.java | 5 +- .../product/category/SeoContextFilter.java | 11 +- .../category/ftl/CatalogUrlSeoTransform.java | 11 +- .../ProductConfigItemContentWrapper.java | 6 +- .../product/config/ProductConfigWorker.java | 15 +- .../product/config/ProductConfigWrapper.java | 27 +-- .../product/feature/ParametricSearch.java | 27 ++- .../feature/ProductFeatureServices.java | 42 ++-- .../org/ofbiz/product/image/ScaleImage.java | 31 ++- .../product/imagemanagement/CropImage.java | 17 +- .../product/imagemanagement/FrameImage.java | 24 +- .../ImageManagementServices.java | 73 +++---- .../imagemanagement/ImageUrlServlet.java | 5 +- .../product/imagemanagement/ReplaceImage.java | 5 +- .../product/imagemanagement/RotateImage.java | 17 +- .../imagemanagement/WatermarkImage.java | 25 +-- .../product/inventory/InventoryServices.java | 33 ++- .../product/inventory/InventoryWorker.java | 5 +- .../ofbiz/product/price/PriceServices.java | 35 ++- .../ofbiz/product/product/KeywordIndex.java | 7 +- .../product/ProductContentWrapper.java | 5 +- .../ofbiz/product/product/ProductEvents.java | 29 ++- .../product/ProductPromoContentWrapper.java | 5 +- .../ofbiz/product/product/ProductSearch.java | 97 +++++---- .../product/product/ProductSearchEvents.java | 9 +- .../product/product/ProductSearchSession.java | 35 ++- .../product/product/ProductServices.java | 84 ++++--- .../product/product/ProductUtilServices.java | 13 +- .../ofbiz/product/product/ProductWorker.java | 37 ++-- .../ofbiz/product/promo/PromoServices.java | 13 +- .../ImportProductHelper.java | 7 +- .../ImportProductServices.java | 9 +- .../product/store/ProductStoreEvents.java | 15 +- .../product/store/ProductStoreWorker.java | 11 +- .../subscription/SubscriptionServices.java | 4 +- .../supplier/SupplierProductServices.java | 7 +- .../test/InventoryItemTransferTest.java | 7 +- .../ofbiz/product/test/StockMovesTest.java | 11 +- .../shipment/packing/PackingSession.java | 55 +++-- .../shipment/packing/PackingSessionLine.java | 9 +- .../shipment/picklist/PickListServices.java | 7 +- .../shipment/shipment/ShipmentServices.java | 29 ++- .../shipment/shipment/ShipmentWorker.java | 15 +- .../org/ofbiz/shipment/test/IssuanceTest.java | 19 +- .../shipment/thirdparty/dhl/DhlServices.java | 21 +- .../thirdparty/fedex/FedexServices.java | 23 +- .../shipment/thirdparty/ups/UpsServices.java | 37 ++-- .../thirdparty/usps/UspsServices.java | 11 +- .../thirdparty/usps/UspsServicesTests.java | 5 +- .../shipment/verify/VerifyPickServices.java | 4 +- .../shipment/verify/VerifyPickSession.java | 26 +-- .../shipment/verify/VerifyPickSessionRow.java | 7 +- .../weightPackage/WeightPackageServices.java | 7 +- .../weightPackage/WeightPackageSession.java | 23 +- .../WeightPackageSessionLine.java | 5 +- .../actions/category/CategoryTree.groovy | 2 - .../store/EditProductStorePaySetup.groovy | 4 +- .../inventory/InventoryAverageCosts.groovy | 3 +- .../ofbiz/securityext/login/LoginEvents.java | 8 +- .../content/WorkEffortContentWrapper.java | 9 +- .../workeffort/workeffort/ICalConverter.java | 18 +- .../workeffort/ICalHandlerFactory.java | 5 +- .../workeffort/ICalRecurConverter.java | 27 ++- .../workeffort/workeffort/ICalWorker.java | 11 +- .../workeffort/WorkEffortKeywordIndex.java | 7 +- .../workeffort/WorkEffortSearch.java | 29 ++- .../workeffort/WorkEffortSearchEvents.java | 5 +- .../workeffort/WorkEffortSearchSession.java | 11 +- .../workeffort/WorkEffortServices.java | 89 ++++---- .../workeffort/WorkEffortWorker.java | 13 +- .../template/JsLanguageFilesMapping.ftl | 11 +- .../permission/EntityPermissionChecker.java | 2 +- .../org/ofbiz/webtools/WebToolsServices.java | 69 +++--- .../artifactinfo/ArtifactInfoFactory.java | 5 +- .../artifactinfo/EntityArtifactInfo.java | 7 +- .../ScreenWidgetArtifactInfo.java | 5 +- .../artifactinfo/ServiceArtifactInfo.java | 53 +++-- .../artifactinfo/ServiceEcaArtifactInfo.java | 25 +-- .../webtools/labelmanager/LabelInfo.java | 5 +- .../labelmanager/LabelManagerFactory.java | 5 +- .../labelmanager/LabelReferences.java | 13 +- .../actions/artifactinfo/ArtifactInfo.groovy | 3 +- .../actions/artifactinfo/ComponentList.groovy | 8 +- .../actions/artifactinfo/TestSuiteInfo.groovy | 7 +- .../WEB-INF/actions/entity/EntityMaint.groovy | 2 - .../WEB-INF/actions/entity/FindGeneric.groovy | 24 +- .../WEB-INF/actions/entity/ViewGeneric.groovy | 22 +- .../actions/service/ServiceResult.groovy | 5 +- .../actions/stats/StatsSinceStart.groovy | 14 +- .../assetmaint/FixedAssetMaintServices.java | 5 +- .../reportbuilder/GetStarSchemaFields.groovy | 7 +- .../reportbuilder/GetStarSchemas.groovy | 7 +- .../reportbuilder/RunStarSchemaQuery.groovy | 8 +- .../ofbiz/birt/email/BirtEmailServices.java | 8 +- .../birt/webapp/view/BirtViewHandler.java | 5 +- ...esSearchResultsInvoiceAndPayment.rptdesign | 11 +- .../accounting/reports/BalanceSheet.rptdesign | 6 +- .../reports/IncomeStatement.rptdesign | 6 +- .../reports/InvoiceAcctgTransEntry.rptdesign | 16 +- .../reports/PaymentAcctgTransEntry.rptdesign | 6 +- .../reports/PaymentReport.rptdesign | 6 +- .../accounting/reports/TrialBalance.rptdesign | 16 +- .../report/InventoryReport.rptdesign | 10 +- .../reports/CouponSalesReport.rptdesign | 6 +- .../reports/Last3MonthsSalesReport.rptdesign | 10 +- .../reports/OrderByReferrer.rptdesign | 2 +- .../reports/OrderDiscountCodeReport.rptdesign | 6 +- .../reports/OrdersByChannel.rptdesign | 2 +- .../ebay/src/org/ofbiz/ebay/EbayHelper.java | 23 +- .../src/org/ofbiz/ebay/EbayOrderServices.java | 58 +++-- .../org/ofbiz/ebay/ImportOrdersFromEbay.java | 19 +- .../org/ofbiz/ebay/ProductsExportToEbay.java | 17 +- .../src/org/ofbiz/ebaystore/EbayAccount.java | 7 +- .../ebaystore/EbayBestOfferAutoPref.java | 5 +- .../src/org/ofbiz/ebaystore/EbayEvents.java | 44 ++-- .../src/org/ofbiz/ebaystore/EbayFeedback.java | 15 +- .../src/org/ofbiz/ebaystore/EbayStore.java | 206 +++++++++--------- .../ebaystore/EbayStoreAutoPrefEvents.java | 5 +- .../ebaystore/EbayStoreAutoPreferences.java | 75 ++++--- .../ebaystore/EbayStoreCategoryFacade.java | 19 +- .../ebaystore/EbayStoreCustomerService.java | 10 +- .../org/ofbiz/ebaystore/EbayStoreHelper.java | 22 +- .../ebaystore/EbayStoreInventoryServices.java | 12 +- .../org/ofbiz/ebaystore/EbayStoreOptions.java | 15 +- .../org/ofbiz/ebaystore/EbayStoreOrder.java | 10 +- .../ofbiz/ebaystore/EbayStoreSiteFacade.java | 7 +- .../GetDisputeInfo.groovy | 32 ++- .../actions/feedback/FeedbackList.groovy | 4 +- .../actions/store/OrderListPrepare.groovy | 6 +- .../WEB-INF/actions/store/SoldAction.groovy | 8 +- .../WEB-INF/actions/store/StoreAccount.groovy | 6 +- .../ecommerce/janrain/JanrainHelper.java | 4 +- .../catalog/BestSellingCategory.groovy | 3 +- .../actions/catalog/ProductCategories.groovy | 13 +- .../actions/catalog/ajaxbreadcrumbs.groovy | 6 +- .../ofbiz/example/ExamplePrintServices.java | 5 +- .../googlebase/GoogleBaseSearchEvents.java | 7 +- .../googlebase/ProductsExportToGoogle.java | 21 +- .../WEB-INF/actions/FilterProducts.groovy | 4 +- .../WEB-INF/actions/autoUpdateConfig.groovy | 1 - .../googlecheckout/GoogleCheckoutHelper.java | 15 +- .../googlecheckout/GoogleRequestServices.java | 11 +- .../WEB-INF/actions/ProductStockTake.groovy | 7 +- .../ofbiz/oagis/OagisInventoryServices.java | 83 ++++--- .../src/org/ofbiz/oagis/OagisServices.java | 31 ++- .../ofbiz/oagis/OagisShipmentServices.java | 57 +++-- .../src/org/ofbiz/guiapp/xui/XuiSession.java | 5 +- .../pos/src/org/ofbiz/pos/PosTransaction.java | 44 ++-- .../org/ofbiz/pos/device/impl/Receipt.java | 6 +- .../org/ofbiz/pos/event/ManagerEvents.java | 4 +- .../ofbiz/pos/jpos/service/BaseService.java | 9 +- .../org/ofbiz/pos/screen/ClientProfile.java | 4 +- .../org/ofbiz/pos/screen/ConfigureItem.java | 4 +- .../src/org/ofbiz/pos/screen/LoadSale.java | 4 +- .../src/org/ofbiz/pos/screen/PaidInOut.java | 4 +- .../actions/ListResourceBillingHours.groovy | 3 - .../WEB-INF/actions/getProjectId.groovy | 1 - .../script/org/ofbiz/scrum/ScrumServices.xml | 3 +- .../src/org/ofbiz/scrum/ScrumEvents.java | 9 +- .../src/org/ofbiz/scrum/ScrumServices.java | 21 +- .../WEB-INF/actions/FindBacklogItem.groovy | 5 +- .../scrum/WEB-INF/actions/FindTaskList.groovy | 5 +- .../ListScrumPreferenceSecurityGroup.groovy | 13 +- .../WEB-INF/actions/ListScrumResource.groovy | 2 - .../WEB-INF/actions/ListUnplanBacklog.groovy | 7 +- .../actions/SprintBacklogListItems.groovy | 7 +- .../scrum/WEB-INF/actions/TaskList.groovy | 5 +- .../reports/BacklogByStatusChart.rptdesign | 8 +- .../reports/BacklogByTypeChart.rptdesign | 2 +- .../scrum/reports/BacklogChart.rptdesign | 8 +- .../webapp/scrum/reports/Burndown.rptdesign | 16 +- .../reports/ProjectAndSprintChart.rptdesign | 12 +- .../reports/ProjectByStatusChart.rptdesign | 2 +- .../scrum/reports/TaskByStatusChart.rptdesign | 34 +-- .../scrum/reports/TaskByTypeChart.rptdesign | 18 +- .../src/org/ofbiz/webpos/WebPosEvents.java | 11 +- .../org/ofbiz/webpos/search/WebPosSearch.java | 11 +- .../ofbiz/webpos/session/WebPosSession.java | 5 +- .../webpos/transaction/WebPosTransaction.java | 5 +- .../actions/catalog/SideDeepCategory.groovy | 3 +- 331 files changed, 2762 insertions(+), 3148 deletions(-) diff --git a/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java b/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java index 6a76ba3831..13eb43dacf 100644 --- a/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java @@ -20,12 +20,11 @@ package org.ofbiz.accounting.agreement; import java.math.BigDecimal; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilNumber; @@ -79,7 +78,7 @@ public class AgreementServices { Delegator delegator = ctx.getDelegator(); Locale locale = (Locale) context.get("locale"); String errMsg = null; - List> commissions = FastList.newInstance(); + List> commissions = new LinkedList>(); try { BigDecimal amount = ((BigDecimal)context.get("amount")); diff --git a/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java b/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java index d3ec759863..0b23357a8f 100644 --- a/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java @@ -21,11 +21,10 @@ package org.ofbiz.accounting.finaccount; import java.math.BigDecimal; import java.sql.Timestamp; +import java.util.HashMap; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.accounting.payment.PaymentGatewayServices; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; @@ -404,7 +403,7 @@ public class FinAccountPaymentServices { } // build the withdraw context - Map withdrawCtx = FastMap.newInstance(); + Map withdrawCtx = new HashMap(); withdrawCtx.put("finAccountId", finAccountId); withdrawCtx.put("productStoreId", productStoreId); withdrawCtx.put("currency", currency); @@ -478,7 +477,7 @@ public class FinAccountPaymentServices { } // call the deposit service - Map depositCtx = FastMap.newInstance(); + Map depositCtx = new HashMap(); depositCtx.put("finAccountId", finAccountId); depositCtx.put("productStoreId", productStoreId); depositCtx.put("isRefund", Boolean.TRUE); @@ -843,7 +842,7 @@ public class FinAccountPaymentServices { // hit the payment method for the amount to replenish Map orderItemMap = UtilMisc.toMap("Auto-Replenishment FA #" + finAccountId, depositAmount); - Map replOrderCtx = FastMap.newInstance(); + Map replOrderCtx = new HashMap(); replOrderCtx.put("productStoreId", productStoreId); replOrderCtx.put("paymentMethodId", paymentMethod.getString("paymentMethodId")); replOrderCtx.put("currency", currency); @@ -863,7 +862,7 @@ public class FinAccountPaymentServices { String orderId = (String) replResp.get("orderId"); // create the deposit - Map depositCtx = FastMap.newInstance(); + Map depositCtx = new HashMap(); depositCtx.put("productStoreId", productStoreId); depositCtx.put("finAccountId", finAccountId); depositCtx.put("currency", currency); diff --git a/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java b/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java index d1568c9c16..259da0000f 100644 --- a/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java @@ -19,6 +19,12 @@ package org.ofbiz.accounting.finaccount; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + import org.ofbiz.service.DispatchContext; import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ServiceUtil; @@ -29,16 +35,15 @@ import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.entity.util.EntityUtilProperties; -import org.ofbiz.base.util.*; +import org.ofbiz.base.util.Debug; +import org.ofbiz.base.util.UtilDateTime; +import org.ofbiz.base.util.UtilMisc; +import org.ofbiz.base.util.UtilProperties; +import org.ofbiz.base.util.UtilValidate; import org.ofbiz.base.util.string.FlexibleStringExpander; import org.ofbiz.order.order.OrderReadHelper; import org.ofbiz.order.finaccount.FinAccountHelper; -import java.util.*; -import java.math.BigDecimal; - -import javolution.util.FastMap; - /** * FinAccountProductServices - Financial Accounts created from product purchases (i.e. gift certificates) */ @@ -169,7 +174,7 @@ public class FinAccountProductServices { } // create the context for FSE - Map expContext = FastMap.newInstance(); + Map expContext = new HashMap(); expContext.put("orderHeader", orderHeader); expContext.put("orderItem", orderItem); expContext.put("party", party); @@ -186,7 +191,7 @@ public class FinAccountProductServices { BigDecimal deposit = price.multiply(quantity).setScale(FinAccountHelper.decimals, FinAccountHelper.rounding); // create the financial account - Map createCtx = FastMap.newInstance(); + Map createCtx = new HashMap(); String finAccountId; createCtx.put("finAccountTypeId", finAccountTypeId); @@ -218,7 +223,7 @@ public class FinAccountProductServices { finAccountId = (String) createResp.get("finAccountId"); // create the owner role - Map roleCtx = FastMap.newInstance(); + Map roleCtx = new HashMap(); roleCtx.put("partyId", partyId); roleCtx.put("roleTypeId", "OWNER"); roleCtx.put("finAccountId", finAccountId); @@ -237,7 +242,7 @@ public class FinAccountProductServices { } // create the initial deposit - Map depositCtx = FastMap.newInstance(); + Map depositCtx = new HashMap(); depositCtx.put("finAccountId", finAccountId); depositCtx.put("productStoreId", productStoreId); depositCtx.put("currency", currency); diff --git a/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java b/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java index 675e7622ba..f5ad60c3ba 100644 --- a/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java @@ -21,12 +21,11 @@ package org.ofbiz.accounting.finaccount; import java.math.BigDecimal; import java.sql.Timestamp; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -128,7 +127,7 @@ public class FinAccountServices { creditAccount = EntityQuery.use(delegator).from("FinAccount").where("finAccountId", creditAccountId).queryOne(); // create the owner role - Map roleCtx = FastMap.newInstance(); + Map roleCtx = new HashMap(); roleCtx.put("partyId", partyId); roleCtx.put("roleTypeId", "OWNER"); roleCtx.put("finAccountId", creditAccountId); @@ -153,7 +152,7 @@ public class FinAccountServices { } // create the credit transaction - Map transactionMap = FastMap.newInstance(); + Map transactionMap = new HashMap(); transactionMap.put("finAccountTransTypeId", "ADJUSTMENT"); transactionMap.put("finAccountId", creditAccount.getString("finAccountId")); transactionMap.put("partyId", partyId); @@ -413,7 +412,7 @@ public class FinAccountServices { String returnId = (String) rhResp.get("returnId"); // create the return item - Map returnItemCtx = FastMap.newInstance(); + Map returnItemCtx = new HashMap(); returnItemCtx.put("returnId", returnId); returnItemCtx.put("orderId", orderId); returnItemCtx.put("description", orderItem.getString("itemDescription")); @@ -455,7 +454,7 @@ public class FinAccountServices { String paymentId = response.getString("paymentId"); // create the adjustment transaction - Map txCtx = FastMap.newInstance(); + Map txCtx = new HashMap(); txCtx.put("finAccountTransTypeId", "ADJUSTMENT"); txCtx.put("finAccountId", finAccountId); txCtx.put("orderId", orderId); diff --git a/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java b/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java index c0fcf161b4..8fc78d0c43 100644 --- a/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java @@ -26,15 +26,14 @@ import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.sql.Timestamp; import java.util.ArrayList; +import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.apache.commons.collections.CollectionUtils; import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVRecord; @@ -236,7 +235,7 @@ public class InvoiceServices { // create the invoice record if (UtilValidate.isEmpty(invoiceId)) { - Map createInvoiceContext = FastMap.newInstance(); + Map createInvoiceContext = new HashMap(); createInvoiceContext.put("partyId", billToCustomerPartyId); createInvoiceContext.put("partyIdFrom", billFromVendorPartyId); createInvoiceContext.put("billingAccountId", billingAccountId); @@ -261,7 +260,7 @@ public class InvoiceServices { // order roles to invoice roles List orderRoles = orderHeader.getRelated("OrderRole", null, null, false); - Map createInvoiceRoleContext = FastMap.newInstance(); + Map createInvoiceRoleContext = new HashMap(); createInvoiceRoleContext.put("invoiceId", invoiceId); createInvoiceRoleContext.put("userLogin", userLogin); for (GenericValue orderRole : orderRoles) { @@ -423,7 +422,7 @@ public class InvoiceServices { BigDecimal billingAmount = orderItem.getBigDecimal("unitPrice").setScale(invoiceTypeDecimals, ROUNDING); - Map createInvoiceItemContext = FastMap.newInstance(); + Map createInvoiceItemContext = new HashMap(); createInvoiceItemContext.put("invoiceId", invoiceId); createInvoiceItemContext.put("invoiceItemSeqId", invoiceItemSeqId); createInvoiceItemContext.put("invoiceItemTypeId", getInvoiceItemType(delegator, (orderItem.getString("orderItemTypeId")), (product == null ? null : product.getString("productTypeId")), invoiceType, "INV_FPROD_ITEM")); @@ -467,7 +466,7 @@ public class InvoiceServices { invoiceQuantity = invoiceQuantity.add(billingQuantity).setScale(invoiceTypeDecimals, ROUNDING); // create the OrderItemBilling record - Map createOrderItemBillingContext = FastMap.newInstance(); + Map createOrderItemBillingContext = new HashMap(); createOrderItemBillingContext.put("invoiceId", invoiceId); createOrderItemBillingContext.put("invoiceItemSeqId", invoiceItemSeqId); createOrderItemBillingContext.put("orderId", orderItem.get("orderId")); @@ -558,7 +557,7 @@ public class InvoiceServices { } } if (amount.signum() != 0) { - Map createInvoiceItemAdjContext = FastMap.newInstance(); + Map createInvoiceItemAdjContext = new HashMap(); createInvoiceItemAdjContext.put("invoiceId", invoiceId); createInvoiceItemAdjContext.put("invoiceItemSeqId", invoiceItemSeqId); createInvoiceItemAdjContext.put("invoiceItemTypeId", getInvoiceItemType(delegator, adj.getString("orderAdjustmentTypeId"), null, invoiceType, "INVOICE_ITM_ADJ")); @@ -607,7 +606,7 @@ public class InvoiceServices { } // Create the OrderAdjustmentBilling record - Map createOrderAdjustmentBillingContext = FastMap.newInstance(); + Map createOrderAdjustmentBillingContext = new HashMap(); createOrderAdjustmentBillingContext.put("orderAdjustmentId", adj.getString("orderAdjustmentId")); createOrderAdjustmentBillingContext.put("invoiceId", invoiceId); createOrderAdjustmentBillingContext.put("invoiceItemSeqId", invoiceItemSeqId); @@ -643,8 +642,8 @@ public class InvoiceServices { } // create header adjustments as line items -- always to tax/shipping last - Map shipAdjustments = FastMap.newInstance(); - Map taxAdjustments = FastMap.newInstance(); + Map shipAdjustments = new HashMap(); + Map taxAdjustments = new HashMap(); List headerAdjustments = orh.getOrderHeaderAdjustments(); for (GenericValue adj : headerAdjustments) { @@ -765,7 +764,7 @@ public class InvoiceServices { .where(EntityCondition.makeCondition("orderId", EntityOperator.EQUALS, orderId), EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED") ).queryList(); - List currentPayments = FastList.newInstance(); + List currentPayments = new LinkedList(); for (GenericValue paymentPref : orderPaymentPrefs) { List payments = paymentPref.getRelated("Payment", null, null, false); currentPayments.addAll(payments); @@ -777,7 +776,7 @@ public class InvoiceServices { } BigDecimal notApplied = PaymentWorker.getPaymentNotApplied(payment); if (notApplied.signum() > 0) { - Map appl = FastMap.newInstance(); + Map appl = new HashMap(); appl.put("paymentId", payment.get("paymentId")); appl.put("invoiceId", invoiceId); appl.put("billingAccountId", billingAccountId); @@ -826,8 +825,8 @@ public class InvoiceServices { GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); List salesInvoiceIds = UtilGenerics.checkList(context.get("invoiceIds")); - List> invoicesCreated = FastList.newInstance(); - Map>> commissionParties = FastMap.newInstance(); + List> invoicesCreated = new LinkedList>(); + Map>> commissionParties = new HashMap>>(); for (String salesInvoiceId : salesInvoiceIds) { List salesRepPartyIds = UtilGenerics.checkList(context.get("partyIds")); BigDecimal amountTotal = InvoiceWorker.getInvoiceTotal(delegator, salesInvoiceId); @@ -927,7 +926,7 @@ public class InvoiceServices { Timestamp now = UtilDateTime.nowTimestamp(); // Create invoice for each commission receiving party for (Map.Entry>> commissionParty : commissionParties.entrySet()) { - List toStore = FastList.newInstance(); + List toStore = new LinkedList(); List> commList = commissionParty.getValue(); // get the billing parties if (UtilValidate.isEmpty(commList)) { @@ -941,7 +940,7 @@ public class InvoiceServices { Long days = (Long) (commList.get(0)).get("days"); // create the invoice record // To and From are in commission's sense, opposite for invoice - Map createInvoiceMap = FastMap.newInstance(); + Map createInvoiceMap = new HashMap(); createInvoiceMap.put("partyId", partyIdBillTo); createInvoiceMap.put("partyIdFrom", partyIdBillFrom); createInvoiceMap.put("invoiceDate", now); @@ -1075,7 +1074,7 @@ public class InvoiceServices { LocalDispatcher dispatcher = dctx.getDispatcher(); String shipmentId = (String) context.get("shipmentId"); Locale locale = (Locale) context.get("locale"); - List invoicesCreated = FastList.newInstance(); + List invoicesCreated = new LinkedList(); Map response = ServiceUtil.returnSuccess(); GenericValue orderShipment = null; String invoicePerShipment = null; @@ -1138,7 +1137,7 @@ public class InvoiceServices { "AccountingTroubleGettingShipmentEntity", UtilMisc.toMap("shipmentId", shipmentId), locale)); } - List itemIssuances = FastList.newInstance(); + List itemIssuances = new LinkedList(); try { itemIssuances = EntityQuery.use(delegator).select("orderId", "shipmentId") .from("ItemIssuance").orderBy("orderId").distinct().queryList(); @@ -1154,11 +1153,11 @@ public class InvoiceServices { // The orders can now be placed in separate groups, each for // 1. The group of orders for which payment is already captured. No grouping and action required. // 2. The group of orders for which invoice is IN-Process status. - Map ordersWithInProcessInvoice = FastMap.newInstance(); + Map ordersWithInProcessInvoice = new HashMap(); for (GenericValue itemIssuance : itemIssuances) { String orderId = itemIssuance.getString("orderId"); - Map billFields = FastMap.newInstance(); + Map billFields = new HashMap(); billFields.put("orderId", orderId); GenericValue orderItemBilling = null; @@ -1191,7 +1190,7 @@ public class InvoiceServices { // For In-Process invoice, move the status to ready and capture the payment for (GenericValue invoice : ordersWithInProcessInvoice.values()) { String invoiceId = invoice.getString("invoiceId"); - Map setInvoiceStatusResult = FastMap.newInstance(); + Map setInvoiceStatusResult = new HashMap(); try { setInvoiceStatusResult = dispatcher.runSync("setInvoiceStatus", UtilMisc.toMap("invoiceId", invoiceId, "statusId", "INVOICE_READY", "userLogin", userLogin)); } catch (GenericServiceException e) { @@ -1238,7 +1237,7 @@ public class InvoiceServices { boolean purchaseShipmentFound = false; boolean dropShipmentFound = false; - List invoicesCreated = FastList.newInstance(); + List invoicesCreated = new LinkedList(); //DEJ20060520: not used? planned to be used? List shipmentIdList = new LinkedList(); for (String tmpShipmentId : shipmentIds) { @@ -1321,17 +1320,17 @@ public class InvoiceServices { } // group items by order - Map> shippedOrderItems = FastMap.newInstance(); + Map> shippedOrderItems = new HashMap>(); for (GenericValue item : items) { String orderId = item.getString("orderId"); String orderItemSeqId = item.getString("orderItemSeqId"); List itemsByOrder = shippedOrderItems.get(orderId); if (itemsByOrder == null) { - itemsByOrder = FastList.newInstance(); + itemsByOrder = new LinkedList(); } // check and make sure we haven't already billed for this issuance or shipment receipt - List billFields = FastList.newInstance(); + List billFields = new LinkedList(); billFields.add(EntityCondition.makeCondition("orderId", orderId)); billFields.add(EntityCondition.makeCondition("orderItemSeqId", orderItemSeqId)); billFields.add(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "INVOICE_CANCELLED")); @@ -1374,10 +1373,10 @@ public class InvoiceServices { List billItems = shippedOrderItems.get(orderId); // a new list to be used to pass to the create invoice service - List toBillItems = FastList.newInstance(); + List toBillItems = new LinkedList(); // map of available quantities so we only have to calc once - Map itemQtyAvail = FastMap.newInstance(); + Map itemQtyAvail = new HashMap(); // now we will check each issuance and make sure it hasn't already been billed for (GenericValue issue : billItems) { @@ -1391,7 +1390,7 @@ public class InvoiceServices { BigDecimal billAvail = itemQtyAvail.get(issue.getString("orderItemSeqId")); if (billAvail == null) { - List lookup = FastList.newInstance(); + List lookup = new LinkedList(); lookup.add(EntityCondition.makeCondition("orderId", orderId)); lookup.add(EntityCondition.makeCondition("orderItemSeqId", issue.get("orderItemSeqId"))); lookup.add(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "INVOICE_CANCELLED")); @@ -1514,7 +1513,7 @@ public class InvoiceServices { } // Total the additional shipping charges for the shipments - Map additionalShippingCharges = FastMap.newInstance(); + Map additionalShippingCharges = new HashMap(); BigDecimal totalAdditionalShippingCharges = ZERO; if (UtilValidate.isNotEmpty(invoiceableShipments)) { for (GenericValue shipment : invoiceableShipments) { @@ -1533,7 +1532,7 @@ public class InvoiceServices { GenericValue shipment = entry.getKey(); BigDecimal additionalShippingCharge = entry.getValue(); String shipmentId = shipment.getString("shipmentId"); - Map createOrderAdjustmentContext = FastMap.newInstance(); + Map createOrderAdjustmentContext = new HashMap(); createOrderAdjustmentContext.put("orderId", orderId); createOrderAdjustmentContext.put("orderAdjustmentTypeId", "SHIPPING_CHARGES"); String addtlChargeDescription = shipment.getString("addtlShippingChargeDesc"); @@ -1566,8 +1565,8 @@ public class InvoiceServices { "AccountingTroubleCallingCreateInvoicesFromShipmentService", locale)); } - List emptyList = FastList.newInstance(); - Map calcTaxContext = FastMap.newInstance(); + List emptyList = new LinkedList(); + Map calcTaxContext = new HashMap(); calcTaxContext.put("productStoreId", orh.getProductStoreId()); calcTaxContext.put("payToPartyId", payToParty.getString("partyId")); calcTaxContext.put("billToPartyId", billToParty.getString("partyId")); @@ -1761,7 +1760,7 @@ public class InvoiceServices { boolean salesReturnFound = false; boolean purchaseReturnFound = false; - List invoicesCreated = FastList.newInstance(); + List invoicesCreated = new LinkedList(); try { // get the shipment and validate that it is a sales return @@ -1792,7 +1791,7 @@ public class InvoiceServices { } // group the shipments by returnId (because we want a seperate itemized invoice for each return) - Map> itemsShippedGroupedByReturn = FastMap.newInstance(); + Map> itemsShippedGroupedByReturn = new HashMap>(); for (GenericValue item : shippedItems) { String returnId = null; @@ -1824,7 +1823,7 @@ public class InvoiceServices { // get the List of items shipped to/from this returnId List billItems = itemsShippedGroupedByReturn.get(returnId); if (billItems == null) { - billItems = FastList.newInstance(); + billItems = new LinkedList(); } // add our item to the group and put it back in the map @@ -2180,7 +2179,7 @@ public class InvoiceServices { UtilMisc.toMap("invoiceId", invoiceId), locale)); } - Map payments = FastMap.newInstance(); + Map payments = new HashMap(); Timestamp paidDate = null; for (GenericValue payAppl : paymentAppl) { payments.put(payAppl.getString("paymentId"), payAppl.getBigDecimal("amountApplied")); @@ -2239,7 +2238,7 @@ public class InvoiceServices { amount = baseAmount.multiply(multiplier).divide(divisor, decimals, rounding); } if (amount.signum() != 0) { - Map createInvoiceItemContext = FastMap.newInstance(); + Map createInvoiceItemContext = new HashMap(); createInvoiceItemContext.put("invoiceId", invoiceId); createInvoiceItemContext.put("invoiceItemSeqId", invoiceItemSeqId); createInvoiceItemContext.put("invoiceItemTypeId", getInvoiceItemType(delegator, adj.getString("orderAdjustmentTypeId"), null, invoiceTypeId, "INVOICE_ADJ")); @@ -2268,7 +2267,7 @@ public class InvoiceServices { } // Create the OrderAdjustmentBilling record - Map createOrderAdjustmentBillingContext = FastMap.newInstance(); + Map createOrderAdjustmentBillingContext = new HashMap(); createOrderAdjustmentBillingContext.put("orderAdjustmentId", adj.getString("orderAdjustmentId")); createOrderAdjustmentBillingContext.put("invoiceId", invoiceId); createOrderAdjustmentBillingContext.put("invoiceItemSeqId", invoiceItemSeqId); @@ -2295,7 +2294,7 @@ public class InvoiceServices { amount = percent.multiply(divisor); } if (amount.signum() != 0) { - Map createInvoiceItemContext = FastMap.newInstance(); + Map createInvoiceItemContext = new HashMap(); createInvoiceItemContext.put("invoiceId", invoiceId); createInvoiceItemContext.put("invoiceItemSeqId", invoiceItemSeqId); createInvoiceItemContext.put("invoiceItemTypeId", getInvoiceItemType(delegator, adj.getString("orderAdjustmentTypeId"), null, invoiceTypeId, "INVOICE_ADJ")); @@ -2324,7 +2323,7 @@ public class InvoiceServices { } // Create the OrderAdjustmentBilling record - Map createOrderAdjustmentBillingContext = FastMap.newInstance(); + Map createOrderAdjustmentBillingContext = new HashMap(); createOrderAdjustmentBillingContext.put("orderAdjustmentId", adj.getString("orderAdjustmentId")); createOrderAdjustmentBillingContext.put("invoiceId", invoiceId); createOrderAdjustmentBillingContext.put("invoiceItemSeqId", invoiceItemSeqId); @@ -2353,7 +2352,7 @@ public class InvoiceServices { if (terms != null) { for (GenericValue term : terms) { - Map createInvoiceTermContext = FastMap.newInstance(); + Map createInvoiceTermContext = new HashMap(); createInvoiceTermContext.put("invoiceId", invoiceId); createInvoiceTermContext.put("invoiceItemSeqId", "_NA_"); createInvoiceTermContext.put("termTypeId", term.get("termTypeId")); @@ -2443,7 +2442,7 @@ public class InvoiceServices { String taxAuthGeoId = (String) context.get("taxAuthGeoId"); String useHighestAmount = (String) context.get("useHighestAmount"); - List errorMessageList = FastList.newInstance(); + List errorMessageList = new LinkedList(); if (debug) Debug.logInfo("updatePaymentApplicationDefBd input parameters..." + " defaultInvoiceProcessing: " + defaultInvoiceProcessing + @@ -3357,8 +3356,8 @@ public class InvoiceServices { String csvString = Charset.forName(encoding).decode(fileBytes).toString(); final BufferedReader csvReader = new BufferedReader(new StringReader(csvString)); CSVFormat fmt = CSVFormat.DEFAULT.withHeader(); - List errMsgs = FastList.newInstance(); - List newErrMsgs = FastList.newInstance(); + List errMsgs = new LinkedList(); + List newErrMsgs = new LinkedList(); String lastInvoiceId = null; String currentInvoiceId = null; String newInvoiceId = null; @@ -3395,7 +3394,7 @@ public class InvoiceServices { // invoice validation try { - newErrMsgs = FastList.newInstance(); + newErrMsgs = new LinkedList(); if (UtilValidate.isEmpty(invoice.get("partyIdFrom"))) { newErrMsgs.add("Line number " + rec.getRecordNumber() + ": Mandatory Party Id From and Party Id From Trans missing for invoice: " + currentInvoiceId); } else if (EntityQuery.use(delegator).from("Party").where("partyId", invoice.get("partyIdFrom")).queryOne() == null) { @@ -3459,7 +3458,7 @@ public class InvoiceServices { } // invoice item validation try { - newErrMsgs = FastList.newInstance(); + newErrMsgs = new LinkedList(); if (UtilValidate.isEmpty(invoiceItem.get("invoiceItemSeqId"))) { newErrMsgs.add("Line number " + rec.getRecordNumber() + ": Mandatory item sequence Id missing for invoice: " + currentInvoiceId); } diff --git a/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java b/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java index 3e65de9cf7..a51c8691e2 100644 --- a/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java +++ b/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java @@ -21,14 +21,13 @@ package org.ofbiz.accounting.invoice; import java.math.BigDecimal; import java.math.MathContext; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilMisc; @@ -114,7 +113,7 @@ public class InvoiceWorker { /** Method to get the taxable invoice item types as a List of invoiceItemTypeIds. These are identified in Enumeration with enumTypeId TAXABLE_INV_ITM_TY. */ public static List getTaxableInvoiceItemTypeIds(Delegator delegator) throws GenericEntityException { - List typeIds = FastList.newInstance(); + List typeIds = new LinkedList(); List invoiceItemTaxTypes = EntityQuery.use(delegator).from("Enumeration").where("enumTypeId", "TAXABLE_INV_ITM_TY") .cache().queryList(); for (GenericValue invoiceItemTaxType : invoiceItemTaxTypes) { @@ -586,7 +585,7 @@ public class InvoiceWorker { @Deprecated public static Map getInvoiceTaxByTaxAuthGeoAndParty(GenericValue invoice) { BigDecimal taxGrandTotal = ZERO; - List> taxByTaxAuthGeoAndPartyList = FastList.newInstance(); + List> taxByTaxAuthGeoAndPartyList = new LinkedList>(); List invoiceItems = null; if (UtilValidate.isNotEmpty(invoice)) { try { @@ -634,7 +633,7 @@ public class InvoiceWorker { } } } - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put("taxByTaxAuthGeoAndPartyList", taxByTaxAuthGeoAndPartyList); result.put("taxGrandTotal", taxGrandTotal); return result; @@ -647,7 +646,7 @@ public class InvoiceWorker { * will not account for tax lines that do not contain a taxAuthPartyId */ public static Map> getInvoiceTaxAuthPartyAndGeos (GenericValue invoice) { - Map> result = FastMap.newInstance(); + Map> result = new HashMap>(); if (invoice == null) throw new IllegalArgumentException("Invoice cannot be null."); @@ -668,7 +667,7 @@ public class InvoiceWorker { String taxAuthGeoId = invoiceItem.getString("taxAuthGeoId"); if (UtilValidate.isNotEmpty(taxAuthPartyId)) { if (!result.containsKey(taxAuthPartyId)) { - Set taxAuthGeos = FastSet.newInstance(); + Set taxAuthGeos = new HashSet(); taxAuthGeos.add(taxAuthGeoId); result.put(taxAuthPartyId, taxAuthGeos); } else { diff --git a/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java b/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java index dac3d87d49..55a3aad7b4 100644 --- a/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java +++ b/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java @@ -23,12 +23,11 @@ import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -66,7 +65,7 @@ public class BillingAccountWorker { } public static List> makePartyBillingAccountList(GenericValue userLogin, String currencyUomId, String partyId, Delegator delegator, LocalDispatcher dispatcher) throws GeneralException { - List> billingAccountList = FastList.newInstance(); + List> billingAccountList = new LinkedList>(); Map agentResult = dispatcher.runSync("getRelatedParties", UtilMisc.toMap("userLogin", userLogin, "partyIdFrom", partyId, "roleTypeIdFrom", "AGENT", "roleTypeIdTo", "CUSTOMER", "partyRelationshipTypeId", "AGENT", "includeFromToSwitched", "Y")); diff --git a/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java b/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java index 57512b5f23..5ab63cc9cb 100644 --- a/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java @@ -20,13 +20,12 @@ package org.ofbiz.accounting.payment; import java.math.BigDecimal; import java.sql.Timestamp; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Random; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -412,7 +411,7 @@ public class GiftCertificateServices { // obtain the order information OrderReadHelper orh = new OrderReadHelper(delegator, orderPaymentPreference.getString("orderId")); - Map redeemCtx = FastMap.newInstance(); + Map redeemCtx = new HashMap(); redeemCtx.put("userLogin", userLogin); redeemCtx.put("productStoreId", orh.getProductStoreId()); redeemCtx.put("cardNumber", giftCard.get("finAccountId")); @@ -657,7 +656,7 @@ public class GiftCertificateServices { currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator); } - Map refundCtx = FastMap.newInstance(); + Map refundCtx = new HashMap(); refundCtx.put("productStoreId", productStoreId); refundCtx.put("currency", currency); refundCtx.put("partyId", partyId); @@ -803,7 +802,7 @@ public class GiftCertificateServices { } // make a map of answer info - Map answerMap = FastMap.newInstance(); + Map answerMap = new HashMap(); if (responseAnswers != null) { for (GenericValue answer : responseAnswers) { GenericValue question = null; @@ -836,7 +835,7 @@ public class GiftCertificateServices { int qtyLoop = quantity.intValue(); for (int i = 0; i < qtyLoop; i++) { // create a gift certificate - Map createGcCtx = FastMap.newInstance(); + Map createGcCtx = new HashMap(); //createGcCtx.put("paymentConfig", paymentConfig); createGcCtx.put("productStoreId", productStoreId); createGcCtx.put("currency", currency); @@ -860,7 +859,7 @@ public class GiftCertificateServices { } // create the fulfillment record - Map gcFulFill = FastMap.newInstance(); + Map gcFulFill = new HashMap(); gcFulFill.put("typeEnumId", "GC_ACTIVATE"); gcFulFill.put("partyId", partyId); gcFulFill.put("orderId", orderId); @@ -908,7 +907,7 @@ public class GiftCertificateServices { bcc = orderEmails; } } - Map emailCtx = FastMap.newInstance(); + Map emailCtx = new HashMap(); String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation"); if (UtilValidate.isEmpty(bodyScreenLocation)) { bodyScreenLocation = ProductStoreWorker.getDefaultProductStoreEmailScreenLocation(emailType); @@ -1031,7 +1030,7 @@ public class GiftCertificateServices { } // make a map of answer info - Map answerMap = FastMap.newInstance(); + Map answerMap = new HashMap(); if (responseAnswers != null) { for (GenericValue answer : responseAnswers) { GenericValue question = null; @@ -1056,7 +1055,7 @@ public class GiftCertificateServices { String pinNumber = (String) answerMap.get(pinNumberKey); // reload the gift card - Map reloadCtx = FastMap.newInstance(); + Map reloadCtx = new HashMap(); reloadCtx.put("productStoreId", productStoreId); reloadCtx.put("currency", currency); reloadCtx.put("partyId", partyId); @@ -1079,7 +1078,7 @@ public class GiftCertificateServices { } // create the fulfillment record - Map gcFulFill = FastMap.newInstance(); + Map gcFulFill = new HashMap(); gcFulFill.put("typeEnumId", "GC_RELOAD"); gcFulFill.put("userLogin", userLogin); gcFulFill.put("partyId", partyId); @@ -1137,7 +1136,7 @@ public class GiftCertificateServices { } else { answerMap.put("locale", locale); - Map emailCtx = FastMap.newInstance(); + Map emailCtx = new HashMap(); String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation"); if (UtilValidate.isEmpty(bodyScreenLocation)) { bodyScreenLocation = ProductStoreWorker.getDefaultProductStoreEmailScreenLocation(emailType); @@ -1231,7 +1230,7 @@ public class GiftCertificateServices { Debug.logInfo("Returnable INFO : " + returnableQuantity + " @ " + returnablePrice + " :: " + orderItem, module); // create the return header - Map returnHeaderInfo = FastMap.newInstance(); + Map returnHeaderInfo = new HashMap(); returnHeaderInfo.put("fromPartyId", partyId); returnHeaderInfo.put("userLogin", userLogin); Map returnHeaderResp = null; @@ -1261,7 +1260,7 @@ public class GiftCertificateServices { } // create the return item - Map returnItemInfo = FastMap.newInstance(); + Map returnItemInfo = new HashMap(); returnItemInfo.put("returnId", returnId); returnItemInfo.put("returnReasonId", "RTN_DIG_FILL_FAIL"); returnItemInfo.put("returnTypeId", "RTN_REFUND"); @@ -1311,7 +1310,7 @@ public class GiftCertificateServices { } // update the status to received so it can process - Map updateReturnInfo = FastMap.newInstance(); + Map updateReturnInfo = new HashMap(); updateReturnInfo.put("returnId", returnId); updateReturnInfo.put("statusId", "RETURN_RECEIVED"); updateReturnInfo.put("currentStatusId", "RETURN_REQUESTED"); diff --git a/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java b/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java index 4594c9746f..21f9337f45 100644 --- a/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java @@ -22,16 +22,15 @@ import java.math.BigDecimal; import java.sql.Timestamp; import java.util.Collection; import java.util.Date; +import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Random; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.accounting.invoice.InvoiceWorker; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; @@ -320,7 +319,7 @@ public class PaymentGatewayServices { LocalDispatcher dispatcher = dctx.getDispatcher(); String orderId = (String) context.get("orderId"); Locale locale = (Locale) context.get("locale"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); boolean reAuth = false; if (context.get("reAuth") != null) { reAuth = ((Boolean)context.get("reAuth")).booleanValue(); @@ -362,7 +361,7 @@ public class PaymentGatewayServices { // loop through and auth each order payment preference int finished = 0; int hadError = 0; - List messages = FastList.newInstance(); + List messages = new LinkedList(); for (GenericValue paymentPref : paymentPrefs) { if (reAuth && "PAYMENT_AUTHORIZED".equals(paymentPref.getString("statusId"))) { String paymentConfig = null; @@ -380,7 +379,7 @@ public class PaymentGatewayServices { continue; } } - Map authContext = FastMap.newInstance(); + Map authContext = new HashMap(); authContext.put("orderPaymentPreferenceId", paymentPref.getString("orderPaymentPreferenceId")); authContext.put("userLogin", context.get("userLogin")); @@ -473,7 +472,7 @@ public class PaymentGatewayServices { } // make the process context - Map processContext = FastMap.newInstance(); + Map processContext = new HashMap(); // get the visit record to obtain the client's IP address GenericValue orderHeader = orh.getOrderHeader(); @@ -757,7 +756,7 @@ public class PaymentGatewayServices { } // iterate over the prefs and release each one - List finished = FastList.newInstance(); + List finished = new LinkedList(); for (GenericValue pPref : paymentPrefs) { Map releaseContext = UtilMisc.toMap("userLogin", userLogin, "orderPaymentPreferenceId", pPref.getString("orderPaymentPreferenceId")); Map releaseResult = null; @@ -814,7 +813,7 @@ public class PaymentGatewayServices { pgCredit.set("transactionDate", UtilDateTime.nowTimestamp()); pgCredit.set("currencyUomId", currencyUomId); // create the internal messages - List messageEntities = FastList.newInstance(); + List messageEntities = new LinkedList(); List messages = UtilGenerics.cast(context.get("internalRespMsgs")); if (UtilValidate.isNotEmpty(messages)) { for (String message : messages) { @@ -943,13 +942,13 @@ public class PaymentGatewayServices { Debug.logWarning("No payment release settings found for - " + paymentPref.getString("paymentMethodTypeId"), module); return ServiceUtil.returnError(UtilProperties.getMessage(resourceOrder, "AccountingTroubleCallingReleaseOrderPaymentPreferenceService", locale) + " " + - paymentPref.getString("paymentMethodTypeId")); + paymentPref.getString("paymentMethodTypeId")); } if (UtilValidate.isEmpty(paymentConfig)) { paymentConfig = "payment.properties"; } GenericValue authTransaction = PaymentGatewayServices.getAuthTransaction(paymentPref); - Map releaseContext = FastMap.newInstance(); + Map releaseContext = new HashMap(); releaseContext.put("orderPaymentPreference", paymentPref); releaseContext.put("releaseAmount", authTransaction.getBigDecimal("amount")); releaseContext.put("currency", currency); @@ -963,8 +962,7 @@ public class PaymentGatewayServices { } catch (GenericServiceException e) { Debug.logError(e,"Problem releasing payment", module); return ServiceUtil.returnError(UtilProperties.getMessage(resourceOrder, - "AccountingTroubleCallingReleaseOrderPaymentPreferenceService", locale)); - + "AccountingTroubleCallingReleaseOrderPaymentPreferenceService", locale)); } // get the release result code if (releaseResult != null && !ServiceUtil.isError(releaseResult)) { @@ -1712,7 +1710,7 @@ public class PaymentGatewayServices { } // prepare the context for the capture service (must follow the ccCaptureInterface - Map captureContext = FastMap.newInstance(); + Map captureContext = new HashMap(); captureContext.put("userLogin", userLogin); captureContext.put("orderPaymentPreference", paymentPref); captureContext.put("paymentConfig", paymentConfig); @@ -1786,7 +1784,7 @@ public class PaymentGatewayServices { } private static void saveError(LocalDispatcher dispatcher, GenericValue userLogin, GenericValue paymentPref, Map result, String serviceType, String transactionCode) { - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.put("paymentServiceTypeEnumId", serviceType); serviceContext.put("orderPaymentPreference", paymentPref); serviceContext.put("transCodeEnumId", transactionCode); @@ -1941,7 +1939,7 @@ public class PaymentGatewayServices { if (Boolean.TRUE.equals(context.get("resultBadCardNumber"))) response.set("resultBadCardNumber", "Y"); // create the internal messages - List messageEntities = FastList.newInstance(); + List messageEntities = new LinkedList(); List messages = UtilGenerics.cast(context.get("internalRespMsgs")); if (UtilValidate.isNotEmpty(messages)) { Iterator i = messages.iterator(); @@ -2385,7 +2383,7 @@ public class PaymentGatewayServices { // call the service refundPayment Map refundResponse = null; try { - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.put("orderPaymentPreference", orderPaymentPreference); serviceContext.put("refundAmount", amount); serviceContext.put("userLogin", userLogin); @@ -2438,7 +2436,7 @@ public class PaymentGatewayServices { paymentGatewayConfigId = paymentSettings.getString("paymentGatewayConfigId"); if (serviceName != null) { - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.put("orderPaymentPreference", paymentPref); serviceContext.put("paymentConfig", paymentConfig); serviceContext.put("paymentGatewayConfigId", paymentGatewayConfigId); @@ -2447,7 +2445,7 @@ public class PaymentGatewayServices { // get the creditCard/address/email String payToPartyId = null; try { - payToPartyId = getBillingInformation(orh, paymentPref, FastMap.newInstance()); + payToPartyId = getBillingInformation(orh, paymentPref, new HashMap()); } catch (GenericEntityException e) { Debug.logError(e, "Problems getting billing information", module); return ServiceUtil.returnError(UtilProperties.getMessage(resource, @@ -2701,7 +2699,7 @@ public class PaymentGatewayServices { .where(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PAYMENT_NOT_AUTH"), EntityCondition.makeCondition("processAttempt", EntityOperator.GREATER_THAN, Long.valueOf(0))) .orderBy("orderId").queryIterator(); - List processList = FastList.newInstance(); + List processList = new LinkedList(); if (eli != null) { Debug.logInfo("Processing failed order re-auth(s)", module); GenericValue value = null; @@ -2751,7 +2749,7 @@ public class PaymentGatewayServices { EntityCondition.makeCondition(ModelEntity.STAMP_FIELD, EntityOperator.LESS_THAN_EQUAL_TO, oneWeekAgo)) .orderBy("orderId").queryIterator(); - List processList = FastList.newInstance(); + List processList = new LinkedList(); if (eli != null) { Debug.logInfo("Processing failed order re-auth(s)", module); GenericValue value = null; @@ -3063,7 +3061,7 @@ public class PaymentGatewayServices { } // prepare the order payment preference (facade) - GenericValue orderPaymentPref = delegator.makeValue("OrderPaymentPreference", FastMap.newInstance()); + GenericValue orderPaymentPref = delegator.makeValue("OrderPaymentPreference", new HashMap()); orderPaymentPref.set("orderPaymentPreferenceId", "_NA_"); orderPaymentPref.set("orderId", "_NA_"); orderPaymentPref.set("presentFlag", "N"); @@ -3079,9 +3077,9 @@ public class PaymentGatewayServices { String currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator); // prepare the auth context - Map authContext = FastMap.newInstance(); + Map authContext = new HashMap(); authContext.put("orderId", "_NA_"); - authContext.put("orderItems", FastList.newInstance()); + authContext.put("orderItems", new LinkedList()); authContext.put("orderPaymentPreference", orderPaymentPref); authContext.put("creditCard", creditCard); authContext.put("billToParty", billToParty); @@ -3180,7 +3178,7 @@ public class PaymentGatewayServices { "AccountingPaymentTransactionNotYetSupported", locale)); } // transaction request context - Map requestContext = FastMap.newInstance(); + Map requestContext = new HashMap(); String paymentService = null; String paymentConfig = null; String paymentGatewayConfigId = null; @@ -3326,7 +3324,7 @@ public class PaymentGatewayServices { if (UtilValidate.isNotEmpty(amount)) { BigDecimal authAmount = new BigDecimal(amount); if (authAmount.compareTo(BigDecimal.ZERO) > 0) { - Map ccAuthContext = FastMap.newInstance(); + Map ccAuthContext = new HashMap(); ccAuthContext.put("paymentMethodId", paymentMethodId); ccAuthContext.put("productStoreId", productStoreId); ccAuthContext.put("amount", authAmount); @@ -3359,7 +3357,7 @@ public class PaymentGatewayServices { */ public static Map testProcessor(DispatchContext dctx, Map context) { Locale locale = (Locale) context.get("locale"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); BigDecimal processAmount = (BigDecimal) context.get("processAmount"); if (processAmount != null && processAmount.compareTo(new BigDecimal("100.00")) >= 0) @@ -3389,7 +3387,7 @@ public class PaymentGatewayServices { */ public static Map testProcessorWithCapture(DispatchContext dctx, Map context) { Locale locale = (Locale) context.get("locale"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); BigDecimal processAmount = (BigDecimal) context.get("processAmount"); if (processAmount != null && processAmount.compareTo(new BigDecimal("100.00")) >= 0) @@ -3452,7 +3450,7 @@ public class PaymentGatewayServices { */ public static Map alwaysApproveProcessor(DispatchContext dctx, Map context) { Locale locale = (Locale) context.get("locale"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Debug.logInfo("Test Processor Approving Credit Card", module); String refNum = UtilDateTime.nowAsString(); @@ -3470,7 +3468,7 @@ public class PaymentGatewayServices { public static Map alwaysApproveWithCapture(DispatchContext dctx, Map context) { Locale locale = (Locale) context.get("locale"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); String refNum = UtilDateTime.nowAsString(); Debug.logInfo("Test Processor Approving Credit Card with Capture", module); @@ -3741,7 +3739,7 @@ public class PaymentGatewayServices { public static boolean isReplacementOrder(GenericValue orderHeader) { boolean replacementOrderFlag = false; - List returnItemResponses = FastList.newInstance(); + List returnItemResponses = new LinkedList(); try { returnItemResponses = orderHeader.getRelated("ReplacementReturnItemResponse", null, null, false); } catch (GenericEntityException e) { diff --git a/applications/accounting/src/org/ofbiz/accounting/payment/PaymentMethodServices.java b/applications/accounting/src/org/ofbiz/accounting/payment/PaymentMethodServices.java index 453e0e4846..30bcdbb93f 100644 --- a/applications/accounting/src/org/ofbiz/accounting/payment/PaymentMethodServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/payment/PaymentMethodServices.java @@ -19,13 +19,12 @@ package org.ofbiz.accounting.payment; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilDateTime; @@ -61,7 +60,7 @@ public class PaymentMethodServices { * @return Map with the result of the service, the output parameters */ public static Map deletePaymentMethod(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -111,7 +110,7 @@ public class PaymentMethodServices { } public static Map makeExpireDate(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); String expMonth = (String) context.get("expMonth"); String expYear = (String) context.get("expYear"); @@ -132,7 +131,7 @@ public class PaymentMethodServices { * @return Map with the result of the service, the output parameters */ public static Map createCreditCard(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -145,7 +144,7 @@ public class PaymentMethodServices { if (result.size() > 0) return result; // do some more complicated/critical validation... - List messages = FastList.newInstance(); + List messages = new LinkedList(); // first remove all spaces from the credit card number context.put("cardNumber", StringUtil.removeSpaces((String) context.get("cardNumber"))); @@ -166,7 +165,7 @@ public class PaymentMethodServices { return ServiceUtil.returnError(messages); } - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); GenericValue newPm = delegator.makeValue("PaymentMethod"); toBeStored.add(newPm); @@ -254,7 +253,7 @@ public class PaymentMethodServices { * @return Map with the result of the service, the output parameters */ public static Map updateCreditCard(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -266,7 +265,7 @@ public class PaymentMethodServices { if (result.size() > 0) return result; - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); boolean isModified = false; GenericValue paymentMethod = null; @@ -295,7 +294,7 @@ public class PaymentMethodServices { } // do some more complicated/critical validation... - List messages = FastList.newInstance(); + List messages = new LinkedList(); // first remove all spaces from the credit card number String updatedCardNumber = StringUtil.removeSpaces((String) context.get("cardNumber")); @@ -484,7 +483,7 @@ public class PaymentMethodServices { } public static Map createGiftCard(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -497,7 +496,7 @@ public class PaymentMethodServices { if (result.size() > 0) return result; - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); GenericValue newPm = delegator.makeValue("PaymentMethod"); toBeStored.add(newPm); GenericValue newGc = delegator.makeValue("GiftCard"); @@ -541,7 +540,7 @@ public class PaymentMethodServices { } public static Map updateGiftCard(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -554,7 +553,7 @@ public class PaymentMethodServices { if (result.size() > 0) return result; - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); boolean isModified = false; GenericValue paymentMethod = null; @@ -675,7 +674,7 @@ public class PaymentMethodServices { * @return Map with the result of the service, the output parameters */ public static Map createEftAccount(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -687,7 +686,7 @@ public class PaymentMethodServices { if (result.size() > 0) return result; - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); GenericValue newPm = delegator.makeValue("PaymentMethod"); toBeStored.add(newPm); @@ -774,7 +773,7 @@ public class PaymentMethodServices { * @return Map with the result of the service, the output parameters */ public static Map updateEftAccount(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -786,7 +785,7 @@ public class PaymentMethodServices { if (result.size() > 0) return result; - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); boolean isModified = false; GenericValue paymentMethod = null; diff --git a/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java b/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java index 22b416544c..ee99a2637d 100644 --- a/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java +++ b/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java @@ -20,14 +20,13 @@ package org.ofbiz.accounting.payment; import java.math.BigDecimal; import java.math.MathContext; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; import javax.servlet.ServletRequest; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilFormatOut; import org.ofbiz.base.util.UtilMisc; @@ -58,14 +57,14 @@ public class PaymentWorker { } public static List> getPartyPaymentMethodValueMaps(Delegator delegator, String partyId, Boolean showOld) { - List> paymentMethodValueMaps = FastList.newInstance(); + List> paymentMethodValueMaps = new LinkedList>(); try { List paymentMethods = EntityQuery.use(delegator).from("PaymentMethod").where("partyId", partyId).queryList(); if (!showOld) paymentMethods = EntityUtil.filterByDate(paymentMethods, true); for (GenericValue paymentMethod : paymentMethods) { - Map valueMap = FastMap.newInstance(); + Map valueMap = new HashMap(); paymentMethodValueMaps.add(valueMap); valueMap.put("paymentMethod", paymentMethod); @@ -88,7 +87,7 @@ public class PaymentWorker { public static Map getPaymentMethodAndRelated(ServletRequest request, String partyId) { Delegator delegator = (Delegator) request.getAttribute("delegator"); - Map results = FastMap.newInstance(); + Map results = new HashMap(); Boolean tryEntity = true; if (request.getAttribute("_ERROR_MESSAGE_") != null) tryEntity = false; diff --git a/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java b/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java index 26daf1bc04..c6f2a189c3 100644 --- a/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java @@ -20,15 +20,14 @@ package org.ofbiz.accounting.tax; import java.math.BigDecimal; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilGenerics; @@ -89,7 +88,7 @@ public class TaxAuthorityServices { } if ("Y".equals(productStore.getString("showPricesWithVatTax"))) { - Set taxAuthoritySet = FastSet.newInstance(); + Set taxAuthoritySet = new HashSet(); if (productStore.get("vatTaxAuthPartyId") == null) { List taxAuthorityRawList = EntityQuery.use(delegator).from("TaxAuthority") .where("taxAuthGeoId", productStore.get("vatTaxAuthGeoId")).cache().queryList(); @@ -191,7 +190,7 @@ public class TaxAuthorityServices { } // without knowing the TaxAuthority parties, just find all TaxAuthories for the set of IDs... - Set taxAuthoritySet = FastSet.newInstance(); + Set taxAuthoritySet = new HashSet(); try { getTaxAuthorities(delegator, shippingAddress, taxAuthoritySet); } catch (GenericEntityException e) { @@ -200,8 +199,8 @@ public class TaxAuthorityServices { } // Setup the return lists. - List orderAdjustments = FastList.newInstance(); - List> itemAdjustments = FastList.newInstance(); + List orderAdjustments = new LinkedList(); + List> itemAdjustments = new LinkedList>(); // Loop through the products; get the taxCategory; and lookup each in the cache. for (int i = 0; i < itemProductList.size(); i++) { @@ -234,7 +233,7 @@ public class TaxAuthorityServices { } private static void getTaxAuthorities(Delegator delegator, GenericValue shippingAddress, Set taxAuthoritySet) throws GenericEntityException { - Map geoIdByTypeMap = FastMap.newInstance(); + Map geoIdByTypeMap = new HashMap(); if (shippingAddress != null) { if (UtilValidate.isNotEmpty(shippingAddress.getString("countryGeoId"))) { geoIdByTypeMap.put("COUNTRY", shippingAddress.getString("countryGeoId")); @@ -269,7 +268,7 @@ public class TaxAuthorityServices { BigDecimal itemPrice, BigDecimal itemQuantity, BigDecimal itemAmount, BigDecimal shippingAmount, BigDecimal orderPromotionsAmount) { Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); - List adjustments = FastList.newInstance(); + List adjustments = new LinkedList(); if (payToPartyId == null) { if (productStore != null) { @@ -289,7 +288,7 @@ public class TaxAuthorityServices { } // build the TaxAuthority expressions (taxAuthGeoId, taxAuthPartyId) - List taxAuthCondOrList = FastList.newInstance(); + List taxAuthCondOrList = new LinkedList(); // start with the _NA_ TaxAuthority... taxAuthCondOrList.add(EntityCondition.makeCondition( EntityCondition.makeCondition("taxAuthPartyId", EntityOperator.EQUALS, "_NA_"), @@ -315,7 +314,7 @@ public class TaxAuthorityServices { if ("Y".equals(product.getString("isVariant"))) { virtualProductId = ProductWorker.getVariantVirtualId(product); } - Set productCategoryIdSet = FastSet.newInstance(); + Set productCategoryIdSet = new HashSet(); EntityCondition productIdCond = null; if (virtualProductId != null) { productIdCond = EntityCondition.makeCondition( @@ -464,7 +463,7 @@ public class TaxAuthorityServices { if (UtilValidate.isNotEmpty(billToPartyId) && UtilValidate.isNotEmpty(taxAuthGeoId)) { // see if partyId is a member of any groups, if so honor their tax exemptions // look for PartyRelationship with partyRelationshipTypeId=GROUP_ROLLUP, the partyIdTo is the group member, so the partyIdFrom is the groupPartyId - Set billToPartyIdSet = FastSet.newInstance(); + Set billToPartyIdSet = new HashSet(); billToPartyIdSet.add(billToPartyId); List partyRelationshipList = EntityQuery.use(delegator).from("PartyRelationship") .where("partyIdTo", billToPartyId, "partyRelationshipTypeId", "GROUP_ROLLUP") @@ -528,7 +527,7 @@ public class TaxAuthorityServices { } } catch (GenericEntityException e) { Debug.logError(e, "Problems looking up tax rates", module); - return FastList.newInstance(); + return new LinkedList(); } return adjustments; diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java index cec18bc3d4..2ddb4c8f24 100644 --- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java @@ -21,13 +21,12 @@ package org.ofbiz.accounting.thirdparty.authorizedotnet; import java.math.BigDecimal; import java.sql.Timestamp; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Properties; -import javolution.util.FastMap; - import org.ofbiz.accounting.payment.PaymentGatewayServices; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.HttpClient; @@ -82,7 +81,7 @@ public class AIMPaymentServices { Delegator delegator = ctx.getDelegator(); Locale locale = (Locale) context.get("locale"); Map results = ServiceUtil.returnSuccess(); - Map request = FastMap.newInstance(); + Map request = new HashMap(); Properties props = buildAIMProperties(context, delegator); buildMerchantInfo(context, props, request); buildGatewayResponeConfig(context, props, request); @@ -123,7 +122,7 @@ public class AIMPaymentServices { context.put("creditCard", creditCard); context.put("authTransaction", authTransaction); Map results = ServiceUtil.returnSuccess(); - Map request = FastMap.newInstance(); + Map request = new HashMap(); Properties props = buildAIMProperties(context, delegator); buildMerchantInfo(context, props, request); buildGatewayResponeConfig(context, props, request); @@ -171,7 +170,7 @@ public class AIMPaymentServices { context.put("creditCard",creditCard); context.put("authTransaction",authTransaction); Map results = ServiceUtil.returnSuccess(); - Map request = FastMap.newInstance(); + Map request = new HashMap(); Properties props = buildAIMProperties(context, delegator); buildMerchantInfo(context, props, request); buildGatewayResponeConfig(context, props, request); @@ -262,7 +261,7 @@ public class AIMPaymentServices { Locale locale = (Locale) context.get("locale"); context.put("authTransaction", authTransaction); Map results = ServiceUtil.returnSuccess(); - Map request = FastMap.newInstance(); + Map request = new HashMap(); Properties props = buildAIMProperties(context, delegator); buildMerchantInfo(context, props, request); buildGatewayResponeConfig(context, props, request); @@ -279,7 +278,7 @@ public class AIMPaymentServices { } public static Map ccCredit(DispatchContext ctx, Map context) { - Map results = FastMap.newInstance(); + Map results = new HashMap(); results.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_ERROR); results.put(ModelService.ERROR_MESSAGE, "Authorize.net ccCredit unsupported with version 3.1"); return results; @@ -289,7 +288,7 @@ public class AIMPaymentServices { Delegator delegator = ctx.getDelegator(); Locale locale = (Locale) context.get("locale"); Map results = ServiceUtil.returnSuccess(); - Map request = FastMap.newInstance(); + Map request = new HashMap(); Properties props = buildAIMProperties(context, delegator); buildMerchantInfo(context, props, request); buildGatewayResponeConfig(context, props, request); @@ -315,7 +314,7 @@ public class AIMPaymentServices { } private static Map processCard(Map request, Properties props, Locale locale) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); String url = props.getProperty("url"); if (UtilValidate.isEmpty(url)) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, @@ -637,7 +636,7 @@ public class AIMPaymentServices { } private static Map validateRequest(Map params, Properties props, Map AIMRequest) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS); return result; } @@ -699,7 +698,7 @@ public class AIMPaymentServices { } private static Map processRefundTransResult(Map request, Map reply) { - Map results = FastMap.newInstance(); + Map results = new HashMap(); AuthorizeResponse ar = (AuthorizeResponse) reply.get("authorizeResponse"); try { Boolean captureResult = (Boolean) reply.get("authResult"); @@ -726,7 +725,7 @@ public class AIMPaymentServices { } private static Map processReleaseTransResult(Map request, Map reply) { - Map results = FastMap.newInstance(); + Map results = new HashMap(); AuthorizeResponse ar = (AuthorizeResponse) reply.get("authorizeResponse"); try { Boolean captureResult = (Boolean) reply.get("authResult"); diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMRespPositions.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMRespPositions.java index 4d9fc28da3..75c6f28ea6 100644 --- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMRespPositions.java +++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMRespPositions.java @@ -19,14 +19,13 @@ package org.ofbiz.accounting.thirdparty.authorizedotnet; +import java.util.LinkedHashMap; import java.util.Map; -import javolution.util.FastMap; - public class AIMRespPositions extends AuthorizeResponse.RespPositions { // AIM v3.1 response positions - private static Map positions = FastMap.newInstance(); + private static Map positions = new LinkedHashMap(); static { positions.put(AuthorizeResponse.RESPONSE_CODE, 1); positions.put(AuthorizeResponse.REASON_CODE, 3); @@ -35,7 +34,7 @@ public class AIMRespPositions extends AuthorizeResponse.RespPositions { positions.put(AuthorizeResponse.AVS_RESULT_CODE, 6); positions.put(AuthorizeResponse.CVV_RESULT_CODE, 39); positions.put(AuthorizeResponse.TRANSACTION_ID, 7); - positions.put(AuthorizeResponse.AMOUNT, 10); + positions.put(AuthorizeResponse.AMOUNT, 10); } @Override diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/CPRespPositions.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/CPRespPositions.java index b1cde01da1..3f143ce2c4 100644 --- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/CPRespPositions.java +++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/CPRespPositions.java @@ -19,14 +19,13 @@ package org.ofbiz.accounting.thirdparty.authorizedotnet; +import java.util.LinkedHashMap; import java.util.Map; -import javolution.util.FastMap; - public class CPRespPositions extends AuthorizeResponse.RespPositions { - + // Card-Present v1.0 response positions - private static Map positions = FastMap.newInstance(); + private static Map positions = new LinkedHashMap(); static { positions.put(AuthorizeResponse.RESPONSE_CODE, 2); positions.put(AuthorizeResponse.REASON_CODE, 3); @@ -35,9 +34,9 @@ public class CPRespPositions extends AuthorizeResponse.RespPositions { positions.put(AuthorizeResponse.AVS_RESULT_CODE, 6); positions.put(AuthorizeResponse.CVV_RESULT_CODE, 7); positions.put(AuthorizeResponse.TRANSACTION_ID, 8); - positions.put(AuthorizeResponse.AMOUNT, 25); + positions.put(AuthorizeResponse.AMOUNT, 25); } - + @Override public int getPosition(String name) { if (positions.containsKey(name)) { diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java index 3daf13fd9c..e20bb4dfb8 100644 --- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java @@ -19,13 +19,12 @@ package org.ofbiz.accounting.thirdparty.cybersource; import java.math.BigDecimal; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Properties; -import javolution.util.FastMap; - import org.ofbiz.accounting.payment.PaymentGatewayServices; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.SSLUtil; @@ -304,7 +303,7 @@ public class IcsPaymentServices { // make the request map String capture = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "autoBill", configString, "payment.cybersource.autoBill", "false"); String orderId = (String) context.get("orderId"); - Map request = FastMap.newInstance(); + Map request = new HashMap(); request.put("ccAuthService_run", "true"); // run auth service request.put("ccCaptureService_run", capture); // run capture service (i.e. sale) request.put("merchantReferenceCode", orderId); // set the order ref number @@ -325,7 +324,7 @@ public class IcsPaymentServices { } String merchantDesc = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "merchantDescr", configString, "payment.cybersource.merchantDescr", null); String merchantCont = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "merchantContact", configString, "payment.cybersource.merchantContact", null); - Map request = FastMap.newInstance(); + Map request = new HashMap(); request.put("ccCaptureService_run", "true"); request.put("ccCaptureService_authRequestID", authTransaction.getString("referenceNum")); request.put("item_0_unitPrice", getAmountString(context, "captureAmount")); @@ -345,7 +344,7 @@ public class IcsPaymentServices { } private static Map buildReleaseRequest(Map context, GenericValue authTransaction) { - Map request = FastMap.newInstance(); + Map request = new HashMap(); GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference"); String currency = (String) context.get("currency"); request.put("ccAuthReversalService_run", "true"); @@ -366,7 +365,7 @@ public class IcsPaymentServices { String currency = (String) context.get("currency"); String merchantDesc = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "merchantDescr", configString, "payment.cybersource.merchantDescr", null); String merchantCont = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "merchantContact", configString, "payment.cybersource.merchantContact", null); - Map request = FastMap.newInstance(); + Map request = new HashMap(); request.put("ccCreditService_run", "true"); request.put("ccCreditService_captureRequestID", authTransaction.getString("referenceNum")); request.put("item_0_unitPrice", getAmountString(context, "refundAmount")); @@ -383,7 +382,7 @@ public class IcsPaymentServices { private static Map buildCreditRequest(Map context) { String refCode = (String) context.get("referenceCode"); - Map request = FastMap.newInstance(); + Map request = new HashMap(); request.put("ccCreditService_run", "true"); // run credit service request.put("merchantReferenceCode", refCode); // set the ref number could be order id appendFullBillingInfo(request, context); // add in all address info diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java index 66f5c0219c..7f5d3aa55e 100644 --- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java +++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java @@ -19,10 +19,9 @@ package org.ofbiz.accounting.thirdparty.gosoftware; import java.io.IOException; +import java.util.HashMap; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.HttpClient; @@ -99,13 +98,13 @@ public class RitaApi { protected int mode = 0; public RitaApi(Map document) { - this.document = FastMap.newInstance(); + this.document = new HashMap(); this.document.putAll(document); this.mode = MODE_OUT; } public RitaApi() { - this.document = FastMap.newInstance(); + this.document = new HashMap(); this.mode = MODE_IN; } @@ -226,7 +225,7 @@ public class RitaApi { br.close(); */ - Map docMap = FastMap.newInstance(); + Map docMap = new HashMap(); String resp = null; try { resp = http.post(stream); diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/ideal/IdealEvents.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/ideal/IdealEvents.java index 5d51cf91b1..65d78707fe 100644 --- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/ideal/IdealEvents.java +++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/ideal/IdealEvents.java @@ -32,9 +32,6 @@ import java.util.Set; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilDateTime; @@ -140,7 +137,7 @@ public class IdealEvents { return "error"; } - List descriptionList = FastList.newInstance(); + List descriptionList = new LinkedList(); for (GenericValue orderItem : orderItemList) { if (UtilValidate.isNotEmpty(orderItem.get("itemDescription"))){ descriptionList.add((String) orderItem.get("itemDescription")); @@ -427,7 +424,7 @@ public class IdealEvents { } public static List getIssuerList() { - List issuerList = FastList.newInstance(); + List issuerList = new LinkedList(); try { IdealConnector connector = new IdealConnector("payment"); Issuers issuers = connector.getIssuerList(); diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java index 1b9d63b7e7..30fadfb0e1 100644 --- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java @@ -19,11 +19,10 @@ package org.ofbiz.accounting.thirdparty.orbital; import java.math.BigDecimal; +import java.util.HashMap; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.accounting.payment.PaymentGatewayServices; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilFormatOut; @@ -260,7 +259,7 @@ public class OrbitalPaymentServices { //TODO: Will move this to property file and then will read it from there. String configFile = "/applications/accounting/config/linehandler.properties"; String paymentGatewayConfigId = (String) context.get("paymentGatewayConfigId"); - Map buildConfiguratorContext = FastMap.newInstance(); + Map buildConfiguratorContext = new HashMap(); try { buildConfiguratorContext.put("OrbitalConnectionUsername", getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "username")); buildConfiguratorContext.put("OrbitalConnectionPassword", getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "connectionPassword")); @@ -496,7 +495,7 @@ public class OrbitalPaymentServices { } private static Map processCard(RequestIF request) { - Map processCardResult = FastMap.newInstance(); + Map processCardResult = new HashMap(); try { response = tp.process(request); if (response.isApproved()) { @@ -606,7 +605,7 @@ public class OrbitalPaymentServices { } private static void printTransResult(ResponseIF response) { - Map generatedResponse = FastMap.newInstance(); + Map generatedResponse = new HashMap(); generatedResponse.put("isGood", response.isGood()); generatedResponse.put("isError", response.isError()); generatedResponse.put("isQuickResponse", response.isQuickResponse()); @@ -650,7 +649,7 @@ public class OrbitalPaymentServices { } private static Map validateRequest(Map params, Map props, RequestIF request) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS); return result; } diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java index abbae243a8..71bd914866 100644 --- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java @@ -24,6 +24,8 @@ import java.io.UnsupportedEncodingException; import java.io.Writer; import java.lang.ref.WeakReference; import java.math.BigDecimal; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -33,9 +35,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.transaction.Transaction; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.apache.commons.lang.StringUtils; import org.ofbiz.accounting.payment.PaymentGatewayServices; import org.ofbiz.base.util.Debug; @@ -192,7 +191,7 @@ public class PayPalServices { // Since most if not all of the shipping estimate codes requires a persisted contactMechId we'll create one and // then delete once we're done, now is not the time to worry about updating everything String contactMechId = null; - Map inMap = FastMap.newInstance(); + Map inMap = new HashMap(); inMap.put("address1", paramMap.get("SHIPTOSTREET")); inMap.put("address2", paramMap.get("SHIPTOSTREET2")); inMap.put("city", paramMap.get("SHIPTOCITY")); @@ -302,7 +301,7 @@ public class PayPalServices { String ack = decoder.get("ACK"); Map result = null; if (!"Success".equals(ack)) { - result = FastMap.newInstance(); + result = new HashMap(); int i = 0; while (UtilValidate.isNotEmpty(decoder.get("L_ERRORCODE" + i))) { String errorCode = decoder.get("L_ERRORCODE" + i); @@ -416,7 +415,7 @@ public class PayPalServices { } } - Map inMap = FastMap.newInstance(); + Map inMap = new HashMap(); Map outMap = null; // Create the person if necessary boolean newParty = false; @@ -523,7 +522,7 @@ public class PayPalServices { boolean needsShippingPurpose = true; // if the cart for some reason already has a billing address, we'll leave it be boolean needsBillingPurpose = (cart.getContactMech("BILLING_LOCATION") == null); - Map postalMap = FastMap.newInstance(); + Map postalMap = new HashMap(); postalMap.put("toName", decoder.get("SHIPTONAME")); postalMap.put("address1", decoder.get("SHIPTOSTREET")); postalMap.put("address2", decoder.get("SHIPTOSTREET2")); @@ -731,7 +730,7 @@ public class PayPalServices { return ServiceUtil.returnError(UtilMisc.toList(errorMessages.values())); } - Map inMap = FastMap.newInstance(); + Map inMap = new HashMap(); inMap.put("userLogin", userLogin); inMap.put("paymentMethodId", payPalPaymentMethod.get("paymentMethodId")); inMap.put("transactionId", decoder.get("TRANSACTIONID")); @@ -1035,7 +1034,7 @@ public class PayPalServices { private static String parseStateProvinceGeoId(String payPalShipToState, String countryGeoId, Delegator delegator) { String lookupField = "geoName"; - List conditionList = FastList.newInstance(); + List conditionList = new LinkedList(); conditionList.add(EntityCondition.makeCondition("geoAssocTypeId", "REGIONS")); if ("USA".equals(countryGeoId) || "CAN".equals(countryGeoId)) { // PayPal returns two letter code for US and Canadian States/Provinces diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java index fc0c442cb8..1d1a32ea52 100644 --- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java @@ -22,12 +22,11 @@ package org.ofbiz.accounting.thirdparty.sagepay; import java.math.BigDecimal; import java.sql.Timestamp; import java.util.Calendar; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.accounting.payment.PaymentGatewayServices; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; @@ -53,7 +52,7 @@ public class SagePayPaymentServices { Debug.logInfo("SagePay - Entered buildCustomerBillingInfo", module); Debug.logInfo("SagePay buildCustomerBillingInfo context : " + context, module); - Map billingInfo = FastMap.newInstance(); + Map billingInfo = new HashMap(); String orderId = null; BigDecimal processAmount = null; diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayUtil.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayUtil.java index 8b8b930a83..d8a6928780 100644 --- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayUtil.java +++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayUtil.java @@ -31,8 +31,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javolution.util.FastMap; - import org.apache.http.HttpEntity; import org.apache.http.HttpHost; import org.apache.http.HttpResponse; @@ -54,7 +52,7 @@ public class SagePayUtil public static Map buildCardAuthorisationPaymentResponse (Boolean authResult, String authCode, String authFlag, BigDecimal processAmount, String authRefNum, String authAltRefNum, String authMessage) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); if(authResult != null) { result.put("authResult", authResult); } if(authCode != null) { result.put("authCode", authCode); } if(authFlag != null) { result.put("authFlag", authFlag); } @@ -68,7 +66,7 @@ public class SagePayUtil public static Map buildCardCapturePaymentResponse (Boolean captureResult, String captureCode, String captureFlag, BigDecimal captureAmount, String captureRefNum, String captureAltRefNum, String captureMessage) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); if(captureResult != null) { result.put("captureResult", captureResult); } if(captureCode != null) { result.put("captureCode", captureCode); } if(captureFlag != null) { result.put("captureFlag", captureFlag); } @@ -82,7 +80,7 @@ public class SagePayUtil public static Map buildCardReleasePaymentResponse (Boolean releaseResult, String releaseCode, BigDecimal releaseAmount, String releaseRefNum, String releaseAltRefNum, String releaseMessage) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); if(releaseResult != null) { result.put("releaseResult", releaseResult); } if(releaseCode != null) { result.put("releaseCode", releaseCode); } if(releaseAmount != null) { result.put("releaseAmount", releaseAmount); } @@ -95,7 +93,7 @@ public class SagePayUtil public static Map buildCardVoidPaymentResponse (Boolean refundResult, BigDecimal refundAmount, String refundRefNum, String refundAltRefNum, String refundMessage) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); if(refundResult != null) { result.put("refundResult", refundResult); } if(refundAmount != null) { result.put("refundAmount", refundAmount); } if(refundRefNum != null) { result.put("refundRefNum", refundRefNum); } @@ -107,7 +105,7 @@ public class SagePayUtil public static Map buildCardRefundPaymentResponse (Boolean refundResult, String refundCode, BigDecimal refundAmount, String refundRefNum, String refundAltRefNum, String refundMessage) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); if(refundResult != null) { result.put("refundResult", refundResult); } if(refundCode != null) { result.put("refundCode", refundCode); } if(refundAmount != null) { result.put("refundAmount", refundAmount); } diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkApi.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkApi.java index c7d5464b4b..b2472c5113 100644 --- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkApi.java +++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkApi.java @@ -32,6 +32,8 @@ import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Properties; @@ -54,9 +56,6 @@ import javax.crypto.spec.DHPrivateKeySpec; import javax.crypto.spec.DHPublicKeySpec; import javax.crypto.spec.IvParameterSpec; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.HttpClient; import org.ofbiz.base.util.HttpClientException; @@ -75,7 +74,7 @@ public class ValueLinkApi { public static final String module = ValueLinkApi.class.getName(); // static object cache - private static Map objectCache = FastMap.newInstance(); + private static Map objectCache = new HashMap(); // instance variables protected Delegator delegator = null; @@ -696,7 +695,7 @@ public class ValueLinkApi { * @return Map containing the inital request values */ public Map getInitialRequestMap(Map context) { - Map request = FastMap.newInstance(); + Map request = new HashMap(); // merchant information request.put("MerchID", merchantId + terminalId); @@ -941,7 +940,7 @@ public class ValueLinkApi { subResponse = StringUtil.replaceString(subResponse, "", ""); // make the map - Map responseMap = FastMap.newInstance(); + Map responseMap = new HashMap(); responseMap.putAll(StringUtil.strToMap(subResponse, true)); // add the raw html back in just in case we need it later @@ -997,7 +996,7 @@ public class ValueLinkApi { List valueList = StringUtil.split(values, "&"); // create a List of Maps for each set of values - List> valueMap = FastList.newInstance(); + List> valueMap = new LinkedList>(); for (int i = 0; i < valueList.size(); i++) { valueMap.add(StringUtil.createMap(StringUtil.split(keys, "|"), StringUtil.split(valueList.get(i), "|"))); } diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java index cdc538913b..64304dda6a 100644 --- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java @@ -19,13 +19,12 @@ package org.ofbiz.accounting.thirdparty.valuelink; import java.math.BigDecimal; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Properties; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.HttpClientException; import org.ofbiz.base.util.StringUtil; @@ -770,7 +769,7 @@ public class ValueLinkServices { private static void setTimeoutReversal(DispatchContext dctx, Map ctx, Map request) { String vlInterface = (String) request.get("Interface"); // clone the context - Map context = FastMap.newInstance(); + Map context = new HashMap(); context.putAll(ctx); // append the rollback interface @@ -826,7 +825,7 @@ public class ValueLinkServices { currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator); } - Map redeemCtx = FastMap.newInstance(); + Map redeemCtx = new HashMap(); redeemCtx.put("userLogin", userLogin); redeemCtx.put("paymentConfig", paymentConfig); redeemCtx.put("cardNumber", giftCard.get("cardNumber")); @@ -919,7 +918,7 @@ public class ValueLinkServices { currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator); } - Map redeemCtx = FastMap.newInstance(); + Map redeemCtx = new HashMap(); redeemCtx.put("userLogin", userLogin); redeemCtx.put("paymentConfig", paymentConfig); redeemCtx.put("cardNumber", giftCard.get("cardNumber")); @@ -984,7 +983,7 @@ public class ValueLinkServices { currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator); } - Map refundCtx = FastMap.newInstance(); + Map refundCtx = new HashMap(); refundCtx.put("userLogin", userLogin); refundCtx.put("paymentConfig", paymentConfig); refundCtx.put("cardNumber", giftCard.get("cardNumber")); @@ -1149,7 +1148,7 @@ public class ValueLinkServices { } // make a map of answer info - Map answerMap = FastMap.newInstance(); + Map answerMap = new HashMap(); if (responseAnswers != null) { for (GenericValue answer : responseAnswers) { GenericValue question = null; @@ -1181,7 +1180,7 @@ public class ValueLinkServices { int qtyLoop = quantity.intValue(); for (int i = 0; i < qtyLoop; i++) { // activate a gift card - Map activateCtx = FastMap.newInstance(); + Map activateCtx = new HashMap(); activateCtx.put("paymentConfig", paymentConfig); activateCtx.put("vlPromoCode", promoCode); activateCtx.put("currency", currency); @@ -1215,7 +1214,7 @@ public class ValueLinkServices { } // create the fulfillment record - Map vlFulFill = FastMap.newInstance(); + Map vlFulFill = new HashMap(); vlFulFill.put("typeEnumId", "GC_ACTIVATE"); vlFulFill.put("merchantId", EntityUtilProperties.getPropertyValue(paymentConfig, "payment.valuelink.merchantId", delegator)); vlFulFill.put("partyId", partyId); @@ -1271,7 +1270,7 @@ public class ValueLinkServices { } } - Map emailCtx = FastMap.newInstance(); + Map emailCtx = new HashMap(); String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation"); if (UtilValidate.isEmpty(bodyScreenLocation)) { bodyScreenLocation = ProductStoreWorker.getDefaultProductStoreEmailScreenLocation(emailType); @@ -1394,7 +1393,7 @@ public class ValueLinkServices { } // make a map of answer info - Map answerMap = FastMap.newInstance(); + Map answerMap = new HashMap(); if (responseAnswers != null) { for (GenericValue answer : responseAnswers) { GenericValue question = null; @@ -1419,7 +1418,7 @@ public class ValueLinkServices { String pinNumber = (String) answerMap.get(pinNumberKey); // reload the gift card - Map reloadCtx = FastMap.newInstance(); + Map reloadCtx = new HashMap(); reloadCtx.put("paymentConfig", paymentConfig); reloadCtx.put("currency", currency); reloadCtx.put("partyId", partyId); @@ -1439,7 +1438,7 @@ public class ValueLinkServices { } // create the fulfillment record - Map vlFulFill = FastMap.newInstance(); + Map vlFulFill = new HashMap(); vlFulFill.put("typeEnumId", "GC_RELOAD"); vlFulFill.put("merchantId", EntityUtilProperties.getPropertyValue(paymentConfig, "payment.valuelink.merchantId", delegator)); vlFulFill.put("partyId", partyId); @@ -1506,7 +1505,7 @@ public class ValueLinkServices { if (productStoreEmail == null) { Debug.logError("No gift card purchase email setting found for this store; cannot send gift card information", module); } else { - Map emailCtx = FastMap.newInstance(); + Map emailCtx = new HashMap(); answerMap.put("locale", locale); String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation"); diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java index 0e40588301..af570d692c 100644 --- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java +++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java @@ -21,13 +21,12 @@ package org.ofbiz.accounting.thirdparty.verisign; import java.math.BigDecimal; import java.util.Date; import java.util.Iterator; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastMap; - import org.apache.commons.lang.StringUtils; import org.ofbiz.accounting.payment.PaymentGatewayServices; import org.ofbiz.base.util.Debug; @@ -90,7 +89,7 @@ public class PayflowPro { isPayPal = true; } - Map data = FastMap.newInstance(); + Map data = new HashMap(); boolean isReAuth = false; if (isPayPal) { @@ -433,7 +432,7 @@ public class PayflowPro { "AccountingPayPalShoppingCartIsEmpty", locale)); } - Map data = FastMap.newInstance(); + Map data = new HashMap(); data.put("TRXTYPE", "O"); data.put("TENDER", "P"); @@ -543,7 +542,7 @@ public class PayflowPro { String paymentGatewayConfigId = payPalPaymentSetting.getString("paymentGatewayConfigId"); String configString = "payment.properties"; - Map data = FastMap.newInstance(); + Map data = new HashMap(); data.put("TRXTYPE", "O"); data.put("TENDER", "P"); data.put("ACTION", "G"); @@ -576,7 +575,7 @@ public class PayflowPro { "AccountingPayPalCommunicationError", locale)); } - Map inMap = FastMap.newInstance(); + Map inMap = new HashMap(); inMap.put("userLogin", cart.getUserLogin()); inMap.put("partyId", cart.getOrderPartyId()); inMap.put("contactMechId", cart.getShippingContactMechId()); @@ -622,7 +621,7 @@ public class PayflowPro { } BigDecimal processAmount = paymentPref.getBigDecimal("maxAmount"); - Map data = FastMap.newInstance(); + Map data = new HashMap(); data.put("TRXTYPE", "O"); data.put("TENDER", "P"); data.put("PAYERID", payPalPaymentMethod.getString("payerId")); @@ -650,7 +649,7 @@ public class PayflowPro { Map responseMap = parseResponse(resp); - Map inMap = FastMap.newInstance(); + Map inMap = new HashMap(); inMap.put("userLogin", userLogin); inMap.put("paymentMethodId", payPalPaymentMethod.get("paymentMethodId")); inMap.put("transactionId", responseMap.get("PNREF")); @@ -670,7 +669,7 @@ public class PayflowPro { private static Map parseResponse(String resp) { Debug.logInfo("Verisign response string: " + resp, module); - Map parameters = FastMap.newInstance(); + Map parameters = new HashMap(); List params = StringUtil.split(resp, "&"); for (String str : params) { if (str.length() > 0) { diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java index 9d9b92a1f5..83426a79a7 100644 --- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java +++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java @@ -20,6 +20,7 @@ package org.ofbiz.accounting.thirdparty.worldpay; import java.io.IOException; import java.math.BigDecimal; +import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Locale; @@ -28,8 +29,6 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilFormatOut; @@ -250,7 +249,7 @@ public class WorldPayEvents { } } // create the redirect string - Map parameters = FastMap.newInstance(); + Map parameters = new HashMap(); parameters.put("instId", instId); parameters.put("cartId", orderId); parameters.put("currency", defCur); diff --git a/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java b/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java index d14577143d..d6665edd12 100644 --- a/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java +++ b/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java @@ -20,10 +20,9 @@ package org.ofbiz.accounting.util; import java.math.BigDecimal; +import java.util.LinkedList; import java.util.List; -import javolution.util.FastList; - import org.ofbiz.accounting.AccountingException; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilNumber; @@ -96,7 +95,7 @@ public class UtilAccounting { } public static List getDescendantGlAccountClassIds(GenericValue glAccountClass) throws GenericEntityException { - List glAccountClassIds = FastList.newInstance(); + List glAccountClassIds = new LinkedList(); getGlAccountClassChildren(glAccountClass, glAccountClassIds); return glAccountClassIds; } diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.groovy index 9be8879051..7fdc8da480 100644 --- a/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.groovy +++ b/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/TaxAuthorityGlAccounts.groovy @@ -18,7 +18,6 @@ */ import org.ofbiz.base.util.UtilMisc; -import javolution.util.FastList; taxAuthorities = from('TaxAuthority').orderBy("taxAuthGeoId", "taxAuthPartyId").queryList(); diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy index c3f95f5bdc..3f446c363b 100644 --- a/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy +++ b/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy @@ -28,9 +28,6 @@ import java.text.SimpleDateFormat; import java.math.BigDecimal; import java.math.MathContext; import org.ofbiz.base.util.UtilNumber; -import javolution.util.FastList; -import javolution.util.FastMap; - invoiceId = parameters.get("invoiceId"); @@ -68,8 +65,8 @@ if (invoice) { } invoiceItems = invoice.getRelated("InvoiceItem", null, ["invoiceItemSeqId"], false); - invoiceItemsConv = FastList.newInstance(); - vatTaxesByType = FastMap.newInstance(); + invoiceItemsConv = []; + vatTaxesByType = [:]; invoiceItems.each { invoiceItem -> invoiceItem.amount = invoiceItem.getBigDecimal("amount").multiply(conversionRate).setScale(decimals, rounding); invoiceItemsConv.add(invoiceItem); diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/GetAccountOrganizationAndClass.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/GetAccountOrganizationAndClass.groovy index 712fd945d8..f60868088b 100644 --- a/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/GetAccountOrganizationAndClass.groovy +++ b/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/GetAccountOrganizationAndClass.groovy @@ -25,8 +25,6 @@ import org.ofbiz.entity.condition.EntityConditionList; import org.ofbiz.entity.condition.EntityExpr; import org.ofbiz.entity.condition.EntityOperator; -import javolution.util.FastList; - exprBldr = new EntityConditionBuilder(); invoice = context.invoice; if (!invoice) return; diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy index d5f05984d6..e3851a9075 100644 --- a/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy +++ b/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy @@ -26,8 +26,6 @@ import org.ofbiz.entity.condition.EntityOperator; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.entity.util.EntityFindOptions; -import javolution.util.FastList; - exprBldr = new org.ofbiz.entity.condition.EntityConditionBuilder(); if (invoiceTypeId) { diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/order/BillingAccountOrders.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/order/BillingAccountOrders.groovy index 48aabb8804..6e6139af42 100644 --- a/applications/accounting/webapp/accounting/WEB-INF/actions/order/BillingAccountOrders.groovy +++ b/applications/accounting/webapp/accounting/WEB-INF/actions/order/BillingAccountOrders.groovy @@ -19,7 +19,6 @@ import org.ofbiz.base.util.UtilMisc; import org.ofbiz.entity.util.EntityUtil; -import javolution.util.FastMap; if (billingAccountId) { orderPaymentPreferencesList = []; @@ -28,7 +27,7 @@ if (billingAccountId) { orderList.each { orderHeader -> orderId = orderHeader.orderId; orderBillingAcc = from("OrderHeaderAndPaymentPref").where("orderId", orderId).queryFirst(); - orderBillingAccMap = FastMap.newInstance(); + orderBillingAccMap = [:]; if (orderBillingAcc.paymentMethodTypeId.equals("EXT_BILLACT") && orderBillingAcc.paymentStatusId.equals("PAYMENT_NOT_RECEIVED")) { orderBillingAccMap.putAll(orderBillingAcc); orderId = orderBillingAcc.orderId; diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy index 18d3dec75d..9b8231a98d 100644 --- a/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy +++ b/applications/accounting/webapp/accounting/WEB-INF/actions/reports/BalanceSheet.groovy @@ -29,8 +29,6 @@ import org.ofbiz.party.party.PartyWorker; import java.sql.Date; import java.sql.Timestamp; -import javolution.util.FastList; - uiLabelMap = UtilProperties.getResourceBundleMap("AccountingUiLabels", locale); if (!thruDate) { @@ -80,7 +78,7 @@ Map liabilityOpeningBalances = [:]; Map currentLiabilityOpeningBalances = [:]; Map equityOpeningBalances = [:]; if (lastClosedTimePeriod) { - List timePeriodAndExprs = FastList.newInstance(); + List timePeriodAndExprs = []; timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, assetAccountClassIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO)); @@ -90,7 +88,7 @@ if (lastClosedTimePeriod) { Map accountMap = UtilMisc.toMap("glAccountId", lastTimePeriodHistory.glAccountId, "accountCode", lastTimePeriodHistory.accountCode, "accountName", lastTimePeriodHistory.accountName, "balance", lastTimePeriodHistory.getBigDecimal("endingBalance"), "D", lastTimePeriodHistory.getBigDecimal("postedDebits"), "C", lastTimePeriodHistory.getBigDecimal("postedCredits")); assetOpeningBalances.put(lastTimePeriodHistory.glAccountId, accountMap); } - timePeriodAndExprs = FastList.newInstance(); + timePeriodAndExprs = []; timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, contraAssetAccountClassIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO)); @@ -100,7 +98,7 @@ if (lastClosedTimePeriod) { Map accountMap = UtilMisc.toMap("glAccountId", lastTimePeriodHistory.glAccountId, "accountCode", lastTimePeriodHistory.accountCode, "accountName", lastTimePeriodHistory.accountName, "balance", lastTimePeriodHistory.getBigDecimal("endingBalance"), "D", lastTimePeriodHistory.getBigDecimal("postedDebits"), "C", lastTimePeriodHistory.getBigDecimal("postedCredits")); contraAssetOpeningBalances.put(lastTimePeriodHistory.glAccountId, accountMap); } - timePeriodAndExprs = FastList.newInstance(); + timePeriodAndExprs = []; timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, liabilityAccountClassIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO)); @@ -110,7 +108,7 @@ if (lastClosedTimePeriod) { Map accountMap = UtilMisc.toMap("glAccountId", lastTimePeriodHistory.glAccountId, "accountCode", lastTimePeriodHistory.accountCode, "accountName", lastTimePeriodHistory.accountName, "balance", lastTimePeriodHistory.getBigDecimal("endingBalance"), "D", lastTimePeriodHistory.getBigDecimal("postedDebits"), "C", lastTimePeriodHistory.getBigDecimal("postedCredits")); liabilityOpeningBalances.put(lastTimePeriodHistory.glAccountId, accountMap); } - timePeriodAndExprs = FastList.newInstance(); + timePeriodAndExprs = []; timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, equityAccountClassIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO)); @@ -120,7 +118,7 @@ if (lastClosedTimePeriod) { Map accountMap = UtilMisc.toMap("glAccountId", lastTimePeriodHistory.glAccountId, "accountCode", lastTimePeriodHistory.accountCode, "accountName", lastTimePeriodHistory.accountName, "balance", lastTimePeriodHistory.getBigDecimal("endingBalance"), "D", lastTimePeriodHistory.getBigDecimal("postedDebits"), "C", lastTimePeriodHistory.getBigDecimal("postedCredits")); equityOpeningBalances.put(lastTimePeriodHistory.glAccountId, accountMap); } - timePeriodAndExprs = FastList.newInstance(); + timePeriodAndExprs = []; timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, currentAssetAccountClassIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO)); @@ -130,7 +128,7 @@ if (lastClosedTimePeriod) { Map accountMap = UtilMisc.toMap("glAccountId", lastTimePeriodHistory.glAccountId, "accountCode", lastTimePeriodHistory.accountCode, "accountName", lastTimePeriodHistory.accountName, "balance", lastTimePeriodHistory.getBigDecimal("endingBalance"), "D", lastTimePeriodHistory.getBigDecimal("postedDebits"), "C", lastTimePeriodHistory.getBigDecimal("postedCredits")); currentAssetOpeningBalances.put(lastTimePeriodHistory.glAccountId, accountMap); } - timePeriodAndExprs = FastList.newInstance(); + timePeriodAndExprs = []; timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, longtermAssetAccountClassIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO)); @@ -140,7 +138,7 @@ if (lastClosedTimePeriod) { Map accountMap = UtilMisc.toMap("glAccountId", lastTimePeriodHistory.glAccountId, "accountCode", lastTimePeriodHistory.accountCode, "accountName", lastTimePeriodHistory.accountName, "balance", lastTimePeriodHistory.getBigDecimal("endingBalance"), "D", lastTimePeriodHistory.getBigDecimal("postedDebits"), "C", lastTimePeriodHistory.getBigDecimal("postedCredits")); longtermAssetOpeningBalances.put(lastTimePeriodHistory.glAccountId, accountMap); } - timePeriodAndExprs = FastList.newInstance(); + timePeriodAndExprs = []; timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, currentLiabilityAccountClassIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO)); @@ -154,7 +152,7 @@ if (lastClosedTimePeriod) { List balanceTotalList = []; -List mainAndExprs = FastList.newInstance(); +List mainAndExprs = []; mainAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); mainAndExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y")); mainAndExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId)); @@ -167,7 +165,7 @@ mainAndExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List assetAndExprs = FastList.newInstance(mainAndExprs); +List assetAndExprs = mainAndExprs as LinkedList; assetAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, assetAccountClassIds)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(assetAndExprs).orderBy("glAccountId").queryList(); transactionTotalsMap = [:]; @@ -203,7 +201,7 @@ context.assetBalanceTotal = balanceTotal; accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List currentAssetAndExprs = FastList.newInstance(mainAndExprs); +List currentAssetAndExprs = mainAndExprs as LinkedList; currentAssetAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, currentAssetAccountClassIds)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(currentAssetAndExprs).orderBy("glAccountId").queryList(); transactionTotalsMap = [:]; @@ -238,7 +236,7 @@ balanceTotalList.add(UtilMisc.toMap("totalName", "AccountingCurrentAssets", "bal accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List longtermAssetAndExprs = FastList.newInstance(mainAndExprs); +List longtermAssetAndExprs = mainAndExprs as LinkedList; longtermAssetAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, longtermAssetAccountClassIds)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").orderBy("glAccountId").queryList(); transactionTotalsMap = [:]; @@ -273,7 +271,7 @@ balanceTotalList.add(UtilMisc.toMap("totalName", "AccountingLongTermAssets", "ba accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List contraAssetAndExprs = FastList.newInstance(mainAndExprs); +List contraAssetAndExprs = mainAndExprs as LinkedList; contraAssetAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, contraAssetAccountClassIds)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(contraAssetAndExprs).orderBy("glAccountId").queryList(); @@ -314,7 +312,7 @@ balanceTotalList.add(UtilMisc.toMap("totalName", "AccountingTotalAssets", "balan accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List liabilityAndExprs = FastList.newInstance(mainAndExprs); +List liabilityAndExprs = mainAndExprs as LinkedList; liabilityAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, liabilityAccountClassIds)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(liabilityAndExprs).orderBy("glAccountId").queryList(); transactionTotalsMap = [:]; @@ -350,7 +348,7 @@ context.liabilityBalanceTotal = balanceTotal; accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List currentLiabilityAndExprs = FastList.newInstance(mainAndExprs); +List currentLiabilityAndExprs = mainAndExprs as LinkedList; currentLiabilityAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, currentLiabilityAccountClassIds)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(currentLiabilityAndExprs).orderBy("glAccountId").queryList(); transactionTotalsMap = [:]; @@ -385,7 +383,7 @@ balanceTotalList.add(UtilMisc.toMap("totalName", "AccountingCurrentLiabilities", accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List equityAndExprs = FastList.newInstance(mainAndExprs); +List equityAndExprs = mainAndExprs as LinkedList; equityAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, equityAccountClassIds)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(equityAndExprs).orderBy("glAccountId").queryList(); transactionTotalsMap = [:]; diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy index 7f3e171804..b17a88db06 100644 --- a/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy +++ b/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy @@ -29,9 +29,6 @@ import org.ofbiz.party.party.PartyWorker; import java.sql.Date; import java.sql.Timestamp; -import javolution.util.FastList; -import javolution.util.FastMap; - if (!fromDate) { return; } @@ -65,7 +62,7 @@ GenericValue lastClosedTimePeriod = (GenericValue)lastClosedTimePeriodResult.las // Get the opening balances of Cash Account Map openingCashBalances = [:]; if (lastClosedTimePeriod) { - List timePeriodAndExprs = FastList.newInstance(); + List timePeriodAndExprs = []; timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, glAccountClassIds)); timePeriodAndExprs.add(EntityCondition.makeCondition("endingBalance", EntityOperator.NOT_EQUAL, BigDecimal.ZERO)); @@ -76,7 +73,7 @@ if (lastClosedTimePeriod) { openingCashBalances.(lastTimePeriodHistory.glAccountId) = accountMap; } } -List mainAndExprs = FastList.newInstance(); +List mainAndExprs = []; mainAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); mainAndExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y")); mainAndExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, parameters.glFiscalTypeId)); @@ -87,7 +84,7 @@ mainAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperato accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List openingCashBalanceAndExprs = FastList.newInstance(mainAndExprs); +List openingCashBalanceAndExprs = mainAndExprs as LinkedList; openingCashBalanceAndExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.GREATER_THAN_EQUAL_TO, periodClosingFromDate)); openingCashBalanceAndExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.LESS_THAN, parametersFromDate)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(openingCashBalanceAndExprs).orderBy("glAccountId").queryList(); @@ -132,7 +129,7 @@ openingTransactionKeySet = transactionTotalsMap.keySet(); accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List periodCashBalanceAndExprs = FastList.newInstance(mainAndExprs); +List periodCashBalanceAndExprs = mainAndExprs as LinkedList; periodCashBalanceAndExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.GREATER_THAN_EQUAL_TO, parametersFromDate)); periodCashBalanceAndExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.LESS_THAN, thruDate)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(periodCashBalanceAndExprs).orderBy("glAccountId").queryList(); @@ -174,9 +171,9 @@ cashFlowBalanceTotalList.add("totalName":"AccountingPeriodCashBalance", "balance // GlAccounts from parameter's fromDate to parameter's thruDate. accountBalanceList = []; balanceTotal = BigDecimal.ZERO; -List transactionTotals = FastList.newInstance(); -transactionTotals.addAll(FastList.newInstance(context.openingCashBalanceList)); -transactionTotals.addAll(FastList.newInstance(context.periodCashBalanceList)); +List transactionTotals = []; +transactionTotals.addAll(new LinkedList(context.openingCashBalanceList)); +transactionTotals.addAll(new LinkedList(context.periodCashBalanceList)); transactionTotals = UtilMisc.sortMaps(transactionTotals, UtilMisc.toList("accountCode")); closingTransactionKeySet = []; if (transactionTotals) { @@ -196,7 +193,7 @@ if (transactionTotals) { transactionTotalsMap.(transactionTotal.glAccountId).balance = totalDebitBalance.subtract(totalCreditBalance); } } else { - transactionTotalsMap.(transactionTotal.glAccountId) = FastMap.newInstance(transactionTotal); + transactionTotalsMap.(transactionTotal.glAccountId) = transactionTotal as LinkedList; } accountBalanceList = UtilMisc.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList("accountCode")); } diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy index c74e567961..82b0242224 100644 --- a/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy +++ b/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy @@ -24,9 +24,6 @@ import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.condition.EntityOperator; import org.ofbiz.entity.util.EntityUtil; -import javolution.util.FastList; -import javolution.util.FastMap; - if (!fromDate) { return; } @@ -41,7 +38,7 @@ if (!parameters.glFiscalTypeId) { // Posted transactions totals and grand totals postedTotalDebit = BigDecimal.ZERO; postedTotalCredit = BigDecimal.ZERO; -andExprs = FastList.newInstance(); +andExprs = []; andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); andExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y")); andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, parameters.glFiscalTypeId)); diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/reports/IncomeStatement.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/reports/IncomeStatement.groovy index d4c2d9a649..e2dd94f55e 100644 --- a/applications/accounting/webapp/accounting/WEB-INF/actions/reports/IncomeStatement.groovy +++ b/applications/accounting/webapp/accounting/WEB-INF/actions/reports/IncomeStatement.groovy @@ -25,8 +25,6 @@ import org.ofbiz.entity.condition.EntityOperator; import org.ofbiz.accounting.util.UtilAccounting; import org.ofbiz.party.party.PartyWorker; -import javolution.util.FastList; - if (!fromDate) { return; } @@ -57,7 +55,7 @@ List sgaExpenseAccountClassIds = UtilAccounting.getDescendantGlAccountClassIds(s GenericValue depreciationGlAccountClass = from("GlAccountClass").where("glAccountClassId", "DEPRECIATION").cache(true).queryOne(); List depreciationAccountClassIds = UtilAccounting.getDescendantGlAccountClassIds(depreciationGlAccountClass); -List mainAndExprs = FastList.newInstance(); +List mainAndExprs = []; mainAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); mainAndExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y")); mainAndExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId)); @@ -72,7 +70,7 @@ List balanceTotalList = []; accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List revenueAndExprs = FastList.newInstance(mainAndExprs); +List revenueAndExprs = mainAndExprs as LinkedList; revenueAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, revenueAccountClassIds)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(revenueAndExprs).orderBy("glAccountId").queryList(); if (transactionTotals) { @@ -115,7 +113,7 @@ context.revenueBalanceTotal = balanceTotal; accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List contraRevenueAndExprs = FastList.newInstance(mainAndExprs); +List contraRevenueAndExprs = mainAndExprs as LinkedList; contraRevenueAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, contraRevenueAccountClassIds)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(contraRevenueAndExprs).orderBy("glAccountId").queryList(); if (transactionTotals) { @@ -157,7 +155,7 @@ balanceTotalList.add(UtilMisc.toMap("totalName", "TOTAL CONTRA REVENUE", "balanc accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List expenseAndExprs = FastList.newInstance(mainAndExprs); +List expenseAndExprs = mainAndExprs as LinkedList; expenseAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, expenseAccountClassIds)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(expenseAndExprs).queryList(); if (transactionTotals) { @@ -200,7 +198,7 @@ context.expenseBalanceTotal = balanceTotal; accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List cogsExpenseAndExprs = FastList.newInstance(mainAndExprs); +List cogsExpenseAndExprs = mainAndExprs as LinkedList; cogsExpenseAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, cogsExpenseAccountClassIds)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(cogsExpenseAndExprs).orderBy("glAccountId").queryList(); if (transactionTotals) { @@ -242,7 +240,7 @@ balanceTotalList.add(UtilMisc.toMap("totalName", "AccountingCostOfGoodsSold", "b accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List sgaExpenseAndExprs = FastList.newInstance(mainAndExprs); +List sgaExpenseAndExprs = mainAndExprs as LinkedList; sgaExpenseAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, sgaExpenseAccountClassIds)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(sgaExpenseAndExprs).orderBy("glAccountId").queryList(); if (transactionTotals) { @@ -283,7 +281,7 @@ sgaExpense = balanceTotal; accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List depreciationAndExprs = FastList.newInstance(mainAndExprs); +List depreciationAndExprs = mainAndExprs as LinkedList; depreciationAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, depreciationAccountClassIds)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(depreciationAndExprs).orderBy("glAccountId").queryList(); if (transactionTotals) { @@ -324,7 +322,7 @@ depreciation = balanceTotal; accountBalanceList = []; transactionTotals = []; balanceTotal = BigDecimal.ZERO; -List incomeAndExprs = FastList.newInstance(mainAndExprs); +List incomeAndExprs = mainAndExprs as LinkedList; incomeAndExprs.add(EntityCondition.makeCondition("glAccountClassId", EntityOperator.IN, incomeAccountClassIds)); transactionTotals = select("glAccountId", "accountName", "accountCode", "debitCreditFlag", "amount").from("AcctgTransEntrySums").where(incomeAndExprs).orderBy("glAccountId").queryList(); if (transactionTotals) { diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy index 02d8da8d49..62ba5b909d 100644 --- a/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy +++ b/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.groovy @@ -17,9 +17,6 @@ * under the License. */ -import javolution.util.FastList; -import javolution.util.FastSet; -import javolution.util.FastMap; import org.ofbiz.base.util.*; import org.ofbiz.entity.*; import org.ofbiz.entity.condition.*; @@ -35,12 +32,12 @@ productMemberList = from("ProductCategoryMember").where("productCategoryId", roo categoryRollupList = from("ProductCategoryRollup").where("parentProductCategoryId", rootProductCategoryId).orderBy("sequenceNum").queryList(); // for use in the queries -productIdSet = FastSet.newInstance(); -productCategoryIdSet = FastSet.newInstance(); +productIdSet = []; +productCategoryIdSet = []; // for use in the templates -productList = FastList.newInstance(); -productCategoryList = FastList.newInstance(); +productList = []; +productCategoryList = []; productMemberList.each { productMember -> if (!productIdSet.contains(productMember.productId)) { @@ -56,14 +53,14 @@ categoryRollupList.each { categoryRollup -> } //NOTE: tax, etc also have productId on them, so restrict by type INV_PROD_ITEM, INV_FPROD_ITEM, INV_DPROD_ITEM, others? -baseProductAndExprs = FastList.newInstance(); +baseProductAndExprs = []; baseProductAndExprs.add(EntityCondition.makeCondition("invoiceTypeId", EntityOperator.EQUALS, "SALES_INVOICE")); baseProductAndExprs.add(EntityCondition.makeCondition("invoiceItemTypeId", EntityOperator.IN, ["INV_PROD_ITEM", "INV_FPROD_ITEM", "INV_DPROD_ITEM"])); baseProductAndExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.IN, ["INVOICE_READY", "INVOICE_PAID"])); if (organizationPartyId) baseProductAndExprs.add(EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, organizationPartyId)); if (currencyUomId) baseProductAndExprs.add(EntityCondition.makeCondition("currencyUomId", EntityOperator.EQUALS, currencyUomId)); -baseCategoryAndExprs = FastList.newInstance(); +baseCategoryAndExprs = []; baseCategoryAndExprs.add(EntityCondition.makeCondition("invoiceTypeId", EntityOperator.EQUALS, "SALES_INVOICE")); baseCategoryAndExprs.add(EntityCondition.makeCondition("invoiceItemTypeId", EntityOperator.IN, ["INV_PROD_ITEM", "INV_FPROD_ITEM", "INV_DPROD_ITEM"])); baseCategoryAndExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.IN, ["INVOICE_READY", "INVOICE_PAID"])); @@ -83,13 +80,13 @@ nextMonthCal.setTimeInMillis(monthCal.getTimeInMillis()); nextMonthCal.add(Calendar.MONTH, 1); // iterate through the days and do the queries -productResultMapByDayList = FastList.newInstance(); -productNullResultByDayList = FastList.newInstance(); -categoryResultMapByDayList = FastList.newInstance(); +productResultMapByDayList = []; +productNullResultByDayList = []; +categoryResultMapByDayList = []; -monthProductResultMap = FastMap.newInstance(); -monthCategoryResultMap = FastMap.newInstance(); -monthProductNullResult = FastMap.newInstance(); +monthProductResultMap = [:]; +monthCategoryResultMap = [:]; +monthProductNullResult = [:]; daysInMonth = monthCal.getActualMaximum(Calendar.DAY_OF_MONTH); for (int currentDay = 0; currentDay <= daysInMonth; currentDay++) { @@ -101,14 +98,14 @@ for (int currentDay = 0; currentDay <= daysInMonth; currentDay++) { nextDayBegin = new java.sql.Timestamp(currentDayCal.getTimeInMillis()); // do the product find - productAndExprs = FastList.newInstance(); + productAndExprs = []; productAndExprs.addAll(baseProductAndExprs); if (productIdSet) productAndExprs.add(EntityCondition.makeCondition("productId", EntityOperator.IN, productIdSet)); productAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.GREATER_THAN_EQUAL_TO, currentDayBegin)); productAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.LESS_THAN, nextDayBegin)); productResultListIterator = select("productId", "quantityTotal", "amountTotal").from("InvoiceItemProductSummary").where(productAndExprs).cursorScrollInsensitive().cache(true).queryIterator(); - productResultMap = FastMap.newInstance(); + productResultMap = [:]; while ((productResult = productResultListIterator.next())) { productResultMap[productResult.productId] = productResult; monthProductResult = UtilMisc.getMapFromMap(monthProductResultMap, productResult.productId); @@ -119,13 +116,13 @@ for (int currentDay = 0; currentDay <= daysInMonth; currentDay++) { productResultMapByDayList.add(productResultMap); // do the category find - categoryAndExprs = FastList.newInstance(); + categoryAndExprs = []; categoryAndExprs.addAll(baseCategoryAndExprs); categoryAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.GREATER_THAN_EQUAL_TO, currentDayBegin)); categoryAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.LESS_THAN, nextDayBegin)); categoryResultListIterator = select("productCategoryId", "quantityTotal", "amountTotal").from(InvoiceItemCategorySummary).where(categoryAndExprs).cursorScrollInsensitive().cache(true).queryIterator(); - categoryResultMap = FastMap.newInstance(); + categoryResultMap = [:]; while ((categoryResult = categoryResultListIterator.next())) { categoryResultMap[categoryResult.productCategoryId] = categoryResult; monthCategoryResult = UtilMisc.getMapFromMap(monthCategoryResultMap, categoryResult.productCategoryId); @@ -136,7 +133,7 @@ for (int currentDay = 0; currentDay <= daysInMonth; currentDay++) { categoryResultMapByDayList.add(categoryResultMap); // do a find for InvoiceItem with a null productId - productNullAndExprs = FastList.newInstance(); + productNullAndExprs = []; productNullAndExprs.addAll(baseProductAndExprs); productNullAndExprs.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, null)); productNullAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.GREATER_THAN_EQUAL_TO, currentDayBegin)); @@ -151,7 +148,7 @@ for (int currentDay = 0; currentDay <= daysInMonth; currentDay++) { UtilMisc.addToBigDecimalInMap(monthProductNullResult, "amountTotal", productNullResult.getBigDecimal("amountTotal")); } else { // no result, add an empty Map place holder - productNullResultByDayList.add(FastMap.newInstance()); + productNullResultByDayList.add([:]); } } diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy index 170d2136f8..8f33ce7ccf 100644 --- a/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy +++ b/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy @@ -28,8 +28,6 @@ import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.accounting.util.UtilAccounting; -import javolution.util.FastList; - import java.sql.Date; if (!fromDate) { @@ -55,7 +53,7 @@ if (lastClosedDate) { postedTotals = []; postedTotalDebit = BigDecimal.ZERO; postedTotalCredit = BigDecimal.ZERO; -andExprs = FastList.newInstance(); +andExprs = []; andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); andExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y")); andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId)); @@ -89,7 +87,7 @@ if (postedTransactionTotals) { accountMap.put("balance", BigDecimal.ZERO); } // - List mainAndExprs = FastList.newInstance(); + List mainAndExprs = []; mainAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); mainAndExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y")); mainAndExprs.add(EntityCondition.makeCondition("glAccountId", EntityOperator.EQUALS, postedTransactionTotal.glAccountId)); @@ -108,7 +106,7 @@ if (postedTransactionTotals) { postedTotals = postedTransactionTotalsMap.values().asList(); } // Posted grand total for Debits -andExprs = FastList.newInstance(); +andExprs = []; andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); andExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y")); andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId)); @@ -123,7 +121,7 @@ if (postedDebitTransactionTotals) { } } // Posted grand total for Credits -andExprs = FastList.newInstance(); +andExprs = []; andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); andExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y")); andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId)); @@ -145,7 +143,7 @@ context.postedTransactionTotals = postedTotals; unpostedTotals = []; unpostedTotalDebit = BigDecimal.ZERO; unpostedTotalCredit = BigDecimal.ZERO; -andExprs = FastList.newInstance(); +andExprs = []; andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); andExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "N")); andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId)); @@ -180,7 +178,7 @@ if (unpostedTransactionTotals) { accountMap.put("balance", BigDecimal.ZERO); } // - List mainAndExprs = FastList.newInstance(); + List mainAndExprs = []; mainAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); mainAndExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "N")); mainAndExprs.add(EntityCondition.makeCondition("glAccountId", EntityOperator.EQUALS, unpostedTransactionTotal.glAccountId)); @@ -199,7 +197,7 @@ if (unpostedTransactionTotals) { unpostedTotals = unpostedTransactionTotalsMap.values().asList(); } // Unposted grand total for Debits -andExprs = FastList.newInstance(); +andExprs = []; andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); andExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "N")); andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId)); @@ -214,7 +212,7 @@ if (unpostedDebitTransactionTotals) { } } // Unposted grand total for Credits -andExprs = FastList.newInstance(); +andExprs = []; andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); andExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "N")); andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId)); @@ -237,7 +235,7 @@ context.unpostedTransactionTotals = unpostedTotals; allTotals = []; allTotalDebit = BigDecimal.ZERO; allTotalCredit = BigDecimal.ZERO; -andExprs = FastList.newInstance(); +andExprs = []; andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId)); andExprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate)); @@ -255,7 +253,7 @@ if (allTransactionTotals) { // Get the opening balances at the end of the last closed time period if (UtilAccounting.isAssetAccount(glAccount) || UtilAccounting.isLiabilityAccount(glAccount) || UtilAccounting.isEquityAccount(glAccount)) { if (lastClosedTimePeriod) { - List timePeriodAndExprs = FastList.newInstance(); + List timePeriodAndExprs = []; timePeriodAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.EQUALS, organizationPartyId)); timePeriodAndExprs.add(EntityCondition.makeCondition("glAccountId", EntityOperator.EQUALS, allTransactionTotal.glAccountId)); timePeriodAndExprs.add(EntityCondition.makeCondition("customTimePeriodId", EntityOperator.EQUALS, lastClosedTimePeriod.customTimePeriodId)); @@ -275,7 +273,7 @@ if (allTransactionTotals) { accountMap.put("balance", BigDecimal.ZERO); } // - List mainAndExprs = FastList.newInstance(); + List mainAndExprs = []; mainAndExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); mainAndExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "N")); mainAndExprs.add(EntityCondition.makeCondition("glAccountId", EntityOperator.EQUALS, allTransactionTotal.glAccountId)); @@ -294,7 +292,7 @@ if (allTransactionTotals) { allTotals = allTransactionTotalsMap.values().asList(); } // Posted and unposted grand total for Debits -andExprs = FastList.newInstance(); +andExprs = []; andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId)); andExprs.add(EntityCondition.makeCondition("debitCreditFlag", EntityOperator.EQUALS, "D")); @@ -308,7 +306,7 @@ if (allDebitTransactionTotals) { } } // Posted and unposted grand total for Credits -andExprs = FastList.newInstance(); +andExprs = []; andExprs.add(EntityCondition.makeCondition("organizationPartyId", EntityOperator.IN, partyIds)); andExprs.add(EntityCondition.makeCondition("glFiscalTypeId", EntityOperator.EQUALS, glFiscalTypeId)); andExprs.add(EntityCondition.makeCondition("debitCreditFlag", EntityOperator.EQUALS, "C")); diff --git a/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProdCatalog.groovy b/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProdCatalog.groovy index 39184f6a70..58fb98d308 100644 --- a/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProdCatalog.groovy +++ b/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProdCatalog.groovy @@ -18,13 +18,12 @@ */ import org.ofbiz.base.util.* import org.ofbiz.entity.util.EntityUtil; - import javolution.util.FastList; import org.ofbiz.product.catalog.*; prodCatalog = null; prodCatalogId = parameters.prodCatalogId; showScreen = "origin"; - List errMsgList = FastList.newInstance(); + List errMsgList = []; productStore = EntityUtil.getFirst(delegator.findByAnd("ProductStore", [payToPartyId: partyId], null, false)); if(productStore){ @@ -33,7 +32,7 @@ if(UtilValidate.isEmpty(productStore)){ errMsgList.add("Product Store not set!"); showScreen = "message"; - }else{ + } else { facility = delegator.findOne("Facility", [facilityId : productStore.inventoryFacilityId], false); webSite = EntityUtil.getFirst(delegator.findByAnd("WebSite", [productStoreId: productStore.productStoreId], null, false)); diff --git a/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProductStoreAndWebSite.groovy b/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProductStoreAndWebSite.groovy index 70e8352b39..13d29e718c 100644 --- a/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProductStoreAndWebSite.groovy +++ b/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProductStoreAndWebSite.groovy @@ -18,8 +18,6 @@ */ import org.ofbiz.base.util.* import org.ofbiz.entity.util.EntityUtil; - import javolution.util.FastList; - import javolution.util.FastMap; productStoreId = null; diff --git a/applications/content/script/org/ofbiz/content/content/ContentServices.xml b/applications/content/script/org/ofbiz/content/content/ContentServices.xml index 4fdc8a9561..4ac7b90f73 100644 --- a/applications/content/script/org/ofbiz/content/content/ContentServices.xml +++ b/applications/content/script/org/ofbiz/content/content/ContentServices.xml @@ -1390,7 +1390,7 @@ - + diff --git a/applications/content/src/ControlApplet.java b/applications/content/src/ControlApplet.java index 4083592b94..bc564d44db 100644 --- a/applications/content/src/ControlApplet.java +++ b/applications/content/src/ControlApplet.java @@ -28,11 +28,10 @@ import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.net.URLEncoder; +import java.util.HashMap; import java.util.Map; import java.util.Set; -import javolution.util.FastMap; - import org.ofbiz.base.util.UtilValidate; /** @@ -132,7 +131,7 @@ public class ControlApplet extends Applet implements Runnable { } protected void pull() { - Map params = FastMap.newInstance(); + Map params = new HashMap(); params.put("sessionId", this.sessionId.trim()); params.put("visitId", this.visitId.trim()); @@ -162,7 +161,7 @@ public class ControlApplet extends Applet implements Runnable { } protected void push() { - Map params = FastMap.newInstance(); + Map params = new HashMap(); params.put("sessionId", this.sessionId.trim()); params.put("visitId", this.visitId.trim()); params.put("currentPage", this.currentPage.trim()); diff --git a/applications/content/src/org/ofbiz/content/ContentManagementEvents.java b/applications/content/src/org/ofbiz/content/ContentManagementEvents.java index c34647bc0c..4bd641f89a 100644 --- a/applications/content/src/org/ofbiz/content/ContentManagementEvents.java +++ b/applications/content/src/org/ofbiz/content/ContentManagementEvents.java @@ -19,6 +19,7 @@ package org.ofbiz.content; import java.sql.Timestamp; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -27,8 +28,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.StringUtil; @@ -86,7 +85,7 @@ public class ContentManagementEvents { /* Set keySet = paramMap.keySet(); Iterator itKeySet = keySet.iterator(); - Map contentIdLookup = FastMap.newInstance(); + Map contentIdLookup = new HashMap(); while (itKeySet.hasNext()) { String idxAndContentId = (String)itKeySet.next(); int pos = idxAndContentId.indexOf("_"); @@ -110,7 +109,7 @@ public class ContentManagementEvents { String paramName = Integer.toString(counter) + "_" + pubContentId; String paramValue = (String)paramMap.get(paramName); //if (Debug.infoOn()) Debug.logInfo("in updateStaticValues, contentId:" + contentId + " pubContentId:" + pubContentId + " pubValue:" + pubValue + " paramName:" + paramName + " paramValue:" + paramValue, module); - Map serviceIn = FastMap.newInstance(); + Map serviceIn = new HashMap(); serviceIn.put("userLogin", userLogin); serviceIn.put("contentIdTo", contentId); serviceIn.put("contentId", pubContentId); @@ -208,7 +207,7 @@ public class ContentManagementEvents { // make a map of the values that are passed in using the top subSite as the key. // Content can only be linked to one subsite under a top site (ends with "_MASTER") - Map siteIdLookup = FastMap.newInstance(); + Map siteIdLookup = new HashMap(); for (String param : paramMap.keySet()) { int pos = param.indexOf("select_"); //if (Debug.infoOn()) Debug.logInfo("in updatePublishLinks, param:" + param + " pos:" + pos , module); @@ -268,7 +267,7 @@ public class ContentManagementEvents { } } // create new link - Map serviceIn = FastMap.newInstance(); + Map serviceIn = new HashMap(); serviceIn.put("userLogin", userLogin); serviceIn.put("contentId", targContentId); serviceIn.put("contentAssocTypeId", "PUBLISH_LINK"); @@ -287,7 +286,7 @@ public class ContentManagementEvents { return "error"; } - serviceIn = FastMap.newInstance(); + serviceIn = new HashMap(); serviceIn.put("userLogin", userLogin); serviceIn.put("contentId", targContentId); serviceIn.put("contentAssocTypeId", "PUBLISH_LINK"); diff --git a/applications/content/src/org/ofbiz/content/ContentManagementServices.java b/applications/content/src/org/ofbiz/content/ContentManagementServices.java index 75c1b53e14..7e872b6985 100644 --- a/applications/content/src/org/ofbiz/content/ContentManagementServices.java +++ b/applications/content/src/org/ofbiz/content/ContentManagementServices.java @@ -21,15 +21,14 @@ package org.ofbiz.content; import java.math.BigDecimal; import java.nio.ByteBuffer; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilDateTime; @@ -85,7 +84,7 @@ public class ContentManagementServices { if (UtilValidate.isNotEmpty(assocTypesString)) { List lst = StringUtil.split(assocTypesString, "|"); if (assocTypes == null) { - assocTypes = FastList.newInstance(); + assocTypes = new LinkedList(); } assocTypes.addAll(lst); } @@ -162,7 +161,7 @@ public class ContentManagementServices { // ContentPurposes can get passed in as a delimited string or a list. Combine. List contentPurposeList = UtilGenerics.checkList(context.get("contentPurposeList")); if (contentPurposeList == null) { - contentPurposeList = FastList.newInstance(); + contentPurposeList = new LinkedList(); } String contentPurposeString = (String) context.get("contentPurposeString"); if (UtilValidate.isNotEmpty(contentPurposeString)) { @@ -255,7 +254,7 @@ public class ContentManagementServices { Debug.logInfo("in persist... dataResourceTypeId(0):" + dataResourceTypeId, null); } if (UtilValidate.isNotEmpty(dataResourceTypeId)) { - Map dataResourceResult = FastMap.newInstance(); + Map dataResourceResult = new HashMap(); try { dataResourceResult = persistDataResourceAndDataMethod(dctx, context); } catch (GenericServiceException e) { @@ -297,12 +296,12 @@ public class ContentManagementServices { return ServiceUtil.returnError(e.toString()); } } - //List targetOperations = FastList.newInstance(); + //List targetOperations = new LinkedList(); //context.put("targetOperations", targetOperations); context.putAll(content); if (contentExists) { //targetOperations.add("CONTENT_UPDATE"); - Map contentContext = FastMap.newInstance(); + Map contentContext = new HashMap(); ModelService contentModel = dispatcher.getDispatchContext().getModelService("updateContent"); contentContext.putAll(contentModel.makeValid(content, "IN")); contentContext.put("userLogin", userLogin); @@ -316,7 +315,7 @@ public class ContentManagementServices { //Map thisResult = ContentServices.updateContentMethod(dctx, context); } else { //targetOperations.add("CONTENT_CREATE"); - Map contentContext = FastMap.newInstance(); + Map contentContext = new HashMap(); ModelService contentModel = dispatcher.getDispatchContext().getModelService("createContent"); contentContext.putAll(contentModel.makeValid(content, "IN")); contentContext.put("userLogin", userLogin); @@ -353,7 +352,7 @@ public class ContentManagementServices { } else if (UtilValidate.isNotEmpty(dataResourceTypeId) && UtilValidate.isNotEmpty(contentId)) { // If dataResource was not previously existing, then update the associated content with its id if (UtilValidate.isNotEmpty(dataResourceId) && !dataResourceExists) { - Map map = FastMap.newInstance(); + Map map = new HashMap(); map.put("userLogin", userLogin); map.put("dataResourceId", dataResourceId); map.put("contentId", contentId); @@ -374,7 +373,7 @@ public class ContentManagementServices { if (UtilValidate.isNotEmpty(contentAssocTypeId) && contentAssoc.get("contentId") != null && contentAssoc.get("contentIdTo") != null) { if (Debug.infoOn()) Debug.logInfo("in persistContentAndAssoc, deactivateExisting:" + deactivateExisting, null); - Map contentAssocContext = FastMap.newInstance(); + Map contentAssocContext = new HashMap(); contentAssocContext.put("userLogin", userLogin); contentAssocContext.put("displayFailCond", bDisplayFailCond); contentAssocContext.put("skipPermissionCheck", context.get("skipPermissionCheck")); @@ -447,7 +446,7 @@ public class ContentManagementServices { Delegator delegator = dctx.getDelegator(); GenericValue userLogin = (GenericValue)context.get("userLogin"); //String userLoginPartyId = userLogin.getString("partyId"); - Map results = FastMap.newInstance(); + Map results = new HashMap(); // siteContentId will equal "ADMIN_MASTER", "AGINC_MASTER", etc. // Remember that this service is called in the "multi" mode, // with a new siteContentId each time. @@ -469,7 +468,7 @@ public class ContentManagementServices { } for (GenericValue roleType : siteRoles) { - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.put("partyId", partyId); serviceContext.put("contentId", siteContentId); serviceContext.put("userLogin", userLogin); @@ -494,7 +493,7 @@ public class ContentManagementServices { //return ServiceUtil.returnError(e.toString()); if (fromDate == null) { try { - Map newContext = FastMap.newInstance(); + Map newContext = new HashMap(); newContext.put("contentId", serviceContext.get("contentId")); newContext.put("partyId", serviceContext.get("partyId")); newContext.put("roleTypeId", serviceContext.get("roleTypeId")); @@ -525,7 +524,7 @@ public class ContentManagementServices { //Timestamp thruDate = UtilDateTime.nowTimestamp(); //serviceContext.put("thruDate", thruDate); //serviceContext.put("fromDate", fromDate); - Map newContext = FastMap.newInstance(); + Map newContext = new HashMap(); newContext.put("contentId", serviceContext.get("contentId")); newContext.put("partyId", serviceContext.get("partyId")); newContext.put("roleTypeId", serviceContext.get("roleTypeId")); @@ -552,7 +551,7 @@ public class ContentManagementServices { LocalDispatcher dispatcher = dctx.getDispatcher(); //String contentId = (String)context.get("contentId"); Locale locale = (Locale) context.get("locale"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); try { //GenericValue content = EntityQuery.use(delegator).from("Content").where("contentId", contentId).queryOne(); ModelService checkPermModel = dispatcher.getDispatchContext().getModelService("checkContentPermission"); @@ -586,8 +585,8 @@ public class ContentManagementServices { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Map context = UtilMisc.makeMapWritable(rcontext); - Map result = FastMap.newInstance(); - Map newDrContext = FastMap.newInstance(); + Map result = new HashMap(); + Map newDrContext = new HashMap(); GenericValue dataResource = delegator.makeValue("DataResource"); dataResource.setPKFields(context); dataResource.setNonPKFields(context); @@ -648,7 +647,7 @@ public class ContentManagementServices { Debug.logInfo("in persist... dataResourceId(0):" + dataResourceId, null); } dataResource = (GenericValue)thisResult.get("dataResource"); - Map fileContext = FastMap.newInstance(); + Map fileContext = new HashMap(); fileContext.put("userLogin", userLogin); if (dataResourceTypeId.equals("IMAGE_OBJECT")) { if (imageDataBytes != null) { @@ -680,7 +679,7 @@ public class ContentManagementServices { if (UtilValidate.isNotEmpty(errorMsg)) { return ServiceUtil.returnError(errorMsg); } - Map fileContext = FastMap.newInstance(); + Map fileContext = new HashMap(); fileContext.put("userLogin", userLogin); String forceElectronicText = (String)context.get("forceElectronicText"); if (dataResourceTypeId.equals("IMAGE_OBJECT")) { @@ -708,7 +707,7 @@ public class ContentManagementServices { } } if (dataResourceTypeId.indexOf("_FILE") >=0) { - Map uploadImage = FastMap.newInstance(); + Map uploadImage = new HashMap(); uploadImage.put("userLogin", userLogin); uploadImage.put("dataResourceId", dataResourceId); uploadImage.put("dataResourceTypeId", dataResourceTypeId); @@ -736,8 +735,8 @@ public class ContentManagementServices { public static Map updateSiteRolesDyn(DispatchContext dctx, Map context) { LocalDispatcher dispatcher = dctx.getDispatcher(); Delegator delegator = dctx.getDelegator(); - Map results = FastMap.newInstance(); - Map serviceContext = FastMap.newInstance(); + Map results = new HashMap(); + Map serviceContext = new HashMap(); // siteContentId will equal "ADMIN_MASTER", "AGINC_MASTER", etc. // Remember that this service is called in the "multi" mode, // with a new siteContentId each time. @@ -790,7 +789,7 @@ public class ContentManagementServices { //Timestamp thruDate = UtilDateTime.nowTimestamp(); //serviceContext.put("thruDate", thruDate); //serviceContext.put("fromDate", fromDate); - Map newContext = FastMap.newInstance(); + Map newContext = new HashMap(); newContext.put("contentId", serviceContext.get("contentId")); newContext.put("partyId", serviceContext.get("partyId")); newContext.put("roleTypeId", serviceContext.get("roleTypeId")); @@ -807,12 +806,12 @@ public class ContentManagementServices { } public static Map updateOrRemove(DispatchContext dctx, Map context) { - Map results = FastMap.newInstance(); + Map results = new HashMap(); Delegator delegator = dctx.getDelegator(); String entityName = (String)context.get("entityName"); String action = (String)context.get("action"); String pkFieldCount = (String)context.get("pkFieldCount"); - Map pkFields = FastMap.newInstance(); + Map pkFields = new HashMap(); int fieldCount = Integer.parseInt(pkFieldCount); for (int i=0; i resequence(DispatchContext dctx, Map context) throws GenericServiceException{ - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); String contentIdTo = (String)context.get("contentIdTo"); Integer seqInc = (Integer)context.get("seqInc"); @@ -871,7 +870,7 @@ public class ContentManagementServices { int seqIncrement = seqInc.intValue(); List typeList = UtilGenerics.checkList(context.get("typeList")); if (typeList == null) { - typeList = FastList.newInstance(); + typeList = new LinkedList(); } String contentAssocTypeId = (String)context.get("contentAssocTypeId"); if (UtilValidate.isNotEmpty(contentAssocTypeId)) { @@ -941,7 +940,7 @@ public class ContentManagementServices { } public static Map changeLeafToNode(DispatchContext dctx, Map context) throws GenericServiceException{ - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); String contentId = (String)context.get("contentId"); @@ -1007,7 +1006,7 @@ public class ContentManagementServices { } public static Map updateLeafCount(DispatchContext dctx, Map context) throws GenericServiceException{ - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); List typeList = UtilGenerics.checkList(context.get("typeList")); if (typeList == null) { @@ -1027,7 +1026,7 @@ public class ContentManagementServices { /* public static Map updateLeafChange(DispatchContext dctx, Map context) throws GenericServiceException{ - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); List typeList = (List)context.get("typeList"); if (typeList == null) @@ -1090,11 +1089,11 @@ public class ContentManagementServices { public static Map updatePageType(DispatchContext dctx, Map rcontext) throws GenericServiceException{ Delegator delegator = dctx.getDelegator(); Map context = UtilMisc.makeMapWritable(rcontext); - Map results = FastMap.newInstance(); + Map results = new HashMap(); Locale locale = (Locale) context.get("locale"); Set visitedSet = UtilGenerics.checkSet(context.get("visitedSet")); if (visitedSet == null) { - visitedSet = FastSet.newInstance(); + visitedSet = new HashSet(); context.put("visitedSet", visitedSet); } String pageMode = (String)context.get("pageMode"); @@ -1130,11 +1129,11 @@ public class ContentManagementServices { public static Map resetToOutlineMode(DispatchContext dctx, Map rcontext) throws GenericServiceException{ Delegator delegator = dctx.getDelegator(); Map context = UtilMisc.makeMapWritable(rcontext); - Map results = FastMap.newInstance(); + Map results = new HashMap(); Locale locale = (Locale) context.get("locale"); Set visitedSet = UtilGenerics.checkSet(context.get("visitedSet")); if (visitedSet == null) { - visitedSet = FastSet.newInstance(); + visitedSet = new HashSet(); context.put("visitedSet", visitedSet); } String contentId = (String)context.get("contentId"); @@ -1173,7 +1172,7 @@ public class ContentManagementServices { } public static Map clearContentAssocViewCache(DispatchContext dctx, Map context) throws GenericServiceException{ - Map results = FastMap.newInstance(); + Map results = new HashMap(); UtilCache utilCache = UtilCache.findCache("entitycache.entity-list.default.ContentAssocViewFrom"); if (utilCache != null) { @@ -1189,7 +1188,7 @@ public class ContentManagementServices { } public static Map clearContentAssocDataResourceViewCache(DispatchContext dctx, Map context) throws GenericServiceException{ - Map results = FastMap.newInstance(); + Map results = new HashMap(); UtilCache utilCache = UtilCache.findCache("entitycache.entity-list.default.ContentAssocViewDataResourceFrom"); if (utilCache != null) { @@ -1208,7 +1207,7 @@ public class ContentManagementServices { String contentId = content.getString("contentId"); Set visitedSet = UtilGenerics.checkSet(context.get("visitedSet")); if (visitedSet == null) { - visitedSet = FastSet.newInstance(); + visitedSet = new HashSet(); context.put("visitedSet", visitedSet); } else { if (visitedSet.contains(contentId)) { @@ -1241,7 +1240,7 @@ public class ContentManagementServices { String contentId = content.getString("contentId"); Set visitedSet = UtilGenerics.checkSet(context.get("visitedSet")); if (visitedSet == null) { - visitedSet = FastSet.newInstance(); + visitedSet = new HashSet(); context.put("visitedSet", visitedSet); } else { if (visitedSet.contains(contentId)) { @@ -1280,7 +1279,7 @@ public class ContentManagementServices { } public static Map findSubNodes(DispatchContext dctx, Map context) throws GenericServiceException{ - Map results = FastMap.newInstance(); + Map results = new HashMap(); Delegator delegator = dctx.getDelegator(); String contentIdTo = (String)context.get("contentId"); try { @@ -1315,7 +1314,7 @@ public class ContentManagementServices { } public static Map initContentChildCounts(DispatchContext dctx, Map context) throws GenericServiceException{ - Map result = FastMap.newInstance(); + Map result = new HashMap(); Locale locale = (Locale) context.get("locale"); GenericValue content = (GenericValue)context.get("content"); if (content == null) { @@ -1336,7 +1335,7 @@ public class ContentManagementServices { } public static Map incrementContentChildStats(DispatchContext dctx, Map context) throws GenericServiceException{ - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); String contentId = (String)context.get("contentId"); @@ -1362,7 +1361,7 @@ public class ContentManagementServices { } public static Map decrementContentChildStats(DispatchContext dctx, Map context) throws GenericServiceException{ - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); String contentId = (String)context.get("contentId"); @@ -1388,12 +1387,12 @@ public class ContentManagementServices { } public static Map updateContentChildStats(DispatchContext dctx, Map context) throws GenericServiceException{ - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); String contentId = (String)context.get("contentId"); String contentAssocTypeId = (String)context.get("contentAssocTypeId"); - List typeList = FastList.newInstance(); + List typeList = new LinkedList(); if (UtilValidate.isNotEmpty(contentAssocTypeId)) { typeList.add(contentAssocTypeId); } else { @@ -1409,7 +1408,7 @@ public class ContentManagementServices { } public static Map updateContentSubscription(DispatchContext dctx, Map context) throws GenericServiceException{ - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); @@ -1475,7 +1474,7 @@ public class ContentManagementServices { if (hasExistingContentRole) { contentRole.store(); } else { - Map map = FastMap.newInstance(); + Map map = new HashMap(); map.put("partyId", partyId); map.put("roleTypeId", roleTypeId); map.put("userLogin", userLogin); @@ -1490,7 +1489,7 @@ public class ContentManagementServices { public static Map updateContentSubscriptionByProduct(DispatchContext dctx, Map rcontext) throws GenericServiceException{ Map context = UtilMisc.makeMapWritable(rcontext); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); String productId = (String) context.get("productId"); @@ -1542,7 +1541,7 @@ public class ContentManagementServices { public static Map updateContentSubscriptionByOrder(DispatchContext dctx, Map rcontext) throws GenericServiceException{ Map context = UtilMisc.makeMapWritable(rcontext); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); String orderId = (String) context.get("orderId"); @@ -1604,14 +1603,14 @@ public class ContentManagementServices { String contentId = (String)context.get("contentId"); String serviceName = (String)context.get("serviceName"); String contentAssocTypeId = (String)context.get("contentAssocTypeId"); - List contentAssocTypeIdList = FastList.newInstance(); + List contentAssocTypeIdList = new LinkedList(); if (UtilValidate.isNotEmpty(contentAssocTypeId)) { contentAssocTypeIdList = StringUtil.split(contentAssocTypeId, "|"); } if (contentAssocTypeIdList.size() == 0) { contentAssocTypeIdList.add("SUB_CONTENT"); } - Map ctx = FastMap.newInstance(); + Map ctx = new HashMap(); ctx.put("userLogin", userLogin); ctx.put("contentAssocTypeIdList", contentAssocTypeIdList); try { @@ -1631,7 +1630,7 @@ public class ContentManagementServices { Locale locale = (Locale) context.get("locale"); Set visitedSet = UtilGenerics.checkSet(context.get("visitedSet")); if (visitedSet == null) { - visitedSet = FastSet.newInstance(); + visitedSet = new HashSet(); context.put("visitedSet", visitedSet); } else { if (visitedSet.contains(contentId)) { @@ -1686,9 +1685,9 @@ public class ContentManagementServices { return ServiceUtil.returnError(errorMsg); } String contentId = (String)result.get("contentId"); - List parentList = FastList.newInstance(); + List parentList = new LinkedList(); if (UtilValidate.isEmpty(masterRevisionContentId)) { - Map traversMap = FastMap.newInstance(); + Map traversMap = new HashMap(); traversMap.put("contentId", contentId); traversMap.put("direction", "To"); traversMap.put("contentAssocTypeId", "COMPDOC_PART"); @@ -1699,7 +1698,7 @@ public class ContentManagementServices { } // Update ContentRevision and ContentRevisonItem - Map contentRevisionMap = FastMap.newInstance(); + Map contentRevisionMap = new HashMap(); contentRevisionMap.put("itemContentId", contentId); contentRevisionMap.put("newDataResourceId", result.get("dataResourceId")); contentRevisionMap.put("oldDataResourceId", oldDataResourceId); diff --git a/applications/content/src/org/ofbiz/content/ContentManagementWorker.java b/applications/content/src/org/ofbiz/content/ContentManagementWorker.java index 7d020c53f9..b043c4422a 100644 --- a/applications/content/src/org/ofbiz/content/ContentManagementWorker.java +++ b/applications/content/src/org/ofbiz/content/ContentManagementWorker.java @@ -22,16 +22,15 @@ import java.sql.Timestamp; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.StringUtil; @@ -61,8 +60,8 @@ import org.ofbiz.security.Security; public class ContentManagementWorker { public static final String module = ContentManagementWorker.class.getName(); - public static Map cachedWebSitePublishPoints = FastMap.newInstance(); - public static Map> cachedStaticValues = FastMap.newInstance(); + public static Map cachedWebSitePublishPoints = new HashMap(); + public static Map> cachedStaticValues = new HashMap>(); public static void mruAdd(HttpServletRequest request, GenericEntity pk, String suffix) { HttpSession session = request.getSession(); @@ -81,7 +80,7 @@ public class ContentManagementWorker { Map> lookupCaches = UtilGenerics.checkMap(session.getAttribute("lookupCaches")); if (lookupCaches == null) { - lookupCaches = FastMap.newInstance(); + lookupCaches = new HashMap>(); session.setAttribute("lookupCaches", lookupCaches); } String entityName = pk.getEntityName(); @@ -154,7 +153,7 @@ public class ContentManagementWorker { HttpSession session = request.getSession(); Map currentEntityMap = UtilGenerics.checkMap(session.getAttribute("currentEntityMap")); if (currentEntityMap == null) { - currentEntityMap = FastMap.newInstance(); + currentEntityMap = new HashMap(); session.setAttribute("currentEntityMap", currentEntityMap); } currentEntityMap.put(entityName, ent); @@ -183,7 +182,7 @@ public class ContentManagementWorker { HttpSession session = request.getSession(); Map currentEntityMap = UtilGenerics.checkMap(session.getAttribute("currentEntityMap")); if (currentEntityMap == null) { - currentEntityMap = FastMap.newInstance(); + currentEntityMap = new HashMap(); session.setAttribute("currentEntityMap", currentEntityMap); } Map paramMap = UtilHttp.getParameterMap(request); @@ -276,7 +275,7 @@ public class ContentManagementWorker { } public static List getPermittedPublishPoints(Delegator delegator, List allPublishPoints, GenericValue userLogin, Security security, String permittedAction, String permittedOperations, String passedRoles) throws GeneralException { - List permittedPublishPointList = FastList.newInstance(); + List permittedPublishPointList = new LinkedList(); // Check that user has permission to admin sites for (GenericValue webSitePP : allPublishPoints) { @@ -290,7 +289,7 @@ public class ContentManagementWorker { } List passedPurposes = UtilMisc.toList("ARTICLE"); List roles = StringUtil.split(passedRoles, "|"); - List targetOperationList = FastList.newInstance(); + List targetOperationList = new LinkedList(); if (UtilValidate.isEmpty(permittedOperations)) { targetOperationList.add("CONTENT" + entityAction); } else { @@ -323,7 +322,7 @@ public class ContentManagementWorker { } catch (GenericEntityException e) { throw new GeneralException(e.getMessage()); } - List allPublishPoints = FastList.newInstance(); + List allPublishPoints = new LinkedList(); GenericValue webSitePublishPoint = null; for (GenericValue contentAssoc : relatedPubPts) { String pub = (String)contentAssoc.get("contentId"); @@ -336,7 +335,7 @@ public class ContentManagementWorker { public static Map getPublishPointMap(Delegator delegator, String pubPtId) throws GeneralException { List publishPointList = getAllPublishPoints(delegator, pubPtId); - Map publishPointMap = FastMap.newInstance(); + Map publishPointMap = new HashMap(); for (GenericValue webSitePublishPoint : publishPointList) { String pub = (String)webSitePublishPoint.get("contentId"); publishPointMap.put(pub, webSitePublishPoint); @@ -355,7 +354,7 @@ public class ContentManagementWorker { } public static Map getPublishPointMap(Delegator delegator, List publishPointList) { - Map publishPointMap = FastMap.newInstance(); + Map publishPointMap = new HashMap(); for (GenericValue webSitePublishPoint : publishPointList) { String pub = (String)webSitePublishPoint.get("contentId"); publishPointMap.put(pub, webSitePublishPoint); @@ -371,13 +370,13 @@ public class ContentManagementWorker { throw new GeneralException(e.getMessage()); } - List> staticValueList = FastList.newInstance(); + List> staticValueList = new LinkedList>(); int counter = 0; for (GenericValue content : assocValueList) { String contentId = (String)content.get("contentId"); String contentName = (String)content.get("contentName"); String description = (String)content.get("description"); - Map map = FastMap.newInstance(); + Map map = new HashMap(); map.put("contentId", contentId); map.put("contentName", contentName); map.put("description", description); @@ -465,7 +464,7 @@ public class ContentManagementWorker { if (!ignoreCache) { Map subStaticValueMap = cachedStaticValues.get(parentPlaceholderId); if (subStaticValueMap == null) { - subStaticValueMap = FastMap.newInstance(); + subStaticValueMap = new HashMap(); cachedStaticValues.put(parentPlaceholderId, subStaticValueMap); } //Map staticValueMap = (GenericValue)cachedStaticValues.get(web); @@ -491,15 +490,15 @@ public class ContentManagementWorker { List allPublishPointList = getAllPublishPoints(delegator, rootPubId); //if (Debug.infoOn()) Debug.logInfo("in getPublishLinks, allPublishPointList:" + allPublishPointList, module); List publishPointList = getPermittedPublishPoints(delegator, allPublishPointList, userLogin, security , permittedAction, permittedOperations, passedRoles); - Map publishPointMap = FastMap.newInstance(); - Map publishPointMapAll = FastMap.newInstance(); + Map publishPointMap = new HashMap(); + Map publishPointMapAll = new HashMap(); for (String [] arr : publishPointList) { //GenericValue webSitePublishPoint = (GenericValue)it.next(); //String contentId = (String)webSitePublishPoint.get("contentId"); //String description = (String)webSitePublishPoint.get("description"); String contentId = arr[0]; String description = arr[1]; - List subPointList = FastList.newInstance(); + List subPointList = new LinkedList(); Object nullObj = null; Object [] subArr = {contentId, subPointList, description, nullObj}; publishPointMap.put(contentId, subArr); @@ -549,7 +548,7 @@ public class ContentManagementWorker { } } - List publishedLinkList = FastList.newInstance(); + List publishedLinkList = new LinkedList(); for (String contentId : publishPointMap.keySet()) { Object [] subPointArr = (Object [])publishPointMap.get(contentId); publishedLinkList.add(subPointArr); @@ -581,7 +580,7 @@ public class ContentManagementWorker { } public static List getPermittedDepartmentPoints(Delegator delegator, List allDepartmentPoints, GenericValue userLogin, Security security, String permittedAction, String permittedOperations, String passedRoles) throws GeneralException { - List permittedDepartmentPointList = FastList.newInstance(); + List permittedDepartmentPointList = new LinkedList(); // Check that user has permission to admin sites for (GenericValue content : allDepartmentPoints) { @@ -593,7 +592,7 @@ public class ContentManagementWorker { entityAction = "_ADMIN"; List passedPurposes = UtilMisc.toList("ARTICLE"); List roles = StringUtil.split(passedRoles, "|"); - List targetOperationList = FastList.newInstance(); + List targetOperationList = new LinkedList(); if (UtilValidate.isEmpty(permittedOperations)) { targetOperationList.add("CONTENT" + entityAction); } else { @@ -627,7 +626,7 @@ public class ContentManagementWorker { } catch (GenericEntityException e) { throw new GeneralException(e.getMessage()); } - List allDepartmentPoints = FastList.newInstance(); + List allDepartmentPoints = new LinkedList(); GenericValue departmentContent = null; for (GenericValue contentAssoc : relatedPubPts) { String pub = (String)contentAssoc.get("contentId"); diff --git a/applications/content/src/org/ofbiz/content/ConvertTree.java b/applications/content/src/org/ofbiz/content/ConvertTree.java index 93064855a1..4a75314e66 100644 --- a/applications/content/src/org/ofbiz/content/ConvertTree.java +++ b/applications/content/src/org/ofbiz/content/ConvertTree.java @@ -21,12 +21,11 @@ package org.ofbiz.content; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; +import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilMisc; @@ -109,7 +108,7 @@ In order ta make this service active add the following to the service definition Entity.set("createdTxStamp", UtilDateTime.nowTimestamp()); delegator.create(Entity); - Map contentAssoc = FastMap.newInstance(); + Map contentAssoc = new HashMap(); contentAssoc.put("contentId", "HOME_DUCUMENT"); contentAssoc.put("contentAssocTypeId", "TREE_CHILD"); contentAssoc.put("contentIdTo", "ROOT"); @@ -193,7 +192,7 @@ In order ta make this service active add the following to the service definition .queryList(); if (contentAssocs.size() == 0) { - contentAssoc = FastMap.newInstance(); + contentAssoc = new HashMap(); contentAssoc.put("contentId", contentId); contentAssoc.put("contentAssocTypeId", "TREE_CHILD"); contentAssoc.put("contentIdTo", rootContent); @@ -284,7 +283,7 @@ In order ta make this service active add the following to the service definition contentId = null; if (contentNameMatch == false) { //create DataResource - Map data = FastMap.newInstance(); + Map data = new HashMap(); data.put("userLogin", userLogin); String dataResourceId = dispatcher.runSync("createDataResource", data).get("dataResourceId").toString(); //Debug.logInfo("==dataResourceId" + dataResourceId); @@ -307,7 +306,7 @@ In order ta make this service active add the following to the service definition delegator.create(Entity); //Relation Content - Map contentAssoc = FastMap.newInstance(); + Map contentAssoc = new HashMap(); contentAssoc.put("contentId", contentId); contentAssoc.put("contentAssocTypeId", "SUB_CONTENT"); contentAssoc.put("contentIdTo", rootContent); @@ -346,7 +345,7 @@ In order ta make this service active add the following to the service definition contentId = null; if (contentNameMatch == false) { //create DataResource - Map data = FastMap.newInstance(); + Map data = new HashMap(); data.put("userLogin", userLogin); String dataResourceId = dispatcher.runSync("createDataResource",data).get("dataResourceId").toString(); //Debug.logInfo("==dataResourceId" + dataResourceId); @@ -369,7 +368,7 @@ In order ta make this service active add the following to the service definition delegator.create(Entity); //create ContentAssoc - Map contentAssoc = FastMap.newInstance(); + Map contentAssoc = new HashMap(); contentAssoc.put("contentId", contentId); contentAssoc.put("contentAssocTypeId", "SUB_CONTENT"); contentAssoc.put("contentIdTo", rootContent); diff --git a/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java b/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java index d84ad6e0c7..a916caccf5 100644 --- a/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java +++ b/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java @@ -20,13 +20,12 @@ package org.ofbiz.content.blog; import java.io.IOException; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilMisc; @@ -100,7 +99,7 @@ public class BlogRssServices { } public static List generateEntryList(LocalDispatcher dispatcher, Delegator delegator, String contentId, String entryLink, Locale locale, GenericValue userLogin) { - List entries = FastList.newInstance(); + List entries = new LinkedList(); List contentRecs = null; try { @@ -117,7 +116,7 @@ public class BlogRssServices { for (GenericValue v : contentRecs) { String sub = null; try { - Map dummy = FastMap.newInstance(); + Map dummy = new HashMap(); sub = ContentWorker.renderSubContentAsText(dispatcher, delegator, v.getString("contentId"), mapKey, dummy, locale, mimeTypeId, true); } catch (GeneralException e) { Debug.logError(e, module); diff --git a/applications/content/src/org/ofbiz/content/compdoc/CompDocEvents.java b/applications/content/src/org/ofbiz/content/compdoc/CompDocEvents.java index dbfc4717f1..25901de87b 100644 --- a/applications/content/src/org/ofbiz/content/compdoc/CompDocEvents.java +++ b/applications/content/src/org/ofbiz/content/compdoc/CompDocEvents.java @@ -21,6 +21,7 @@ package org.ofbiz.content.compdoc; import java.io.ByteArrayInputStream; import java.io.IOException; import java.nio.ByteBuffer; +import java.util.HashMap; import java.util.Locale; import java.util.Map; @@ -29,8 +30,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilFormatOut; import org.ofbiz.base.util.UtilHttp; @@ -108,7 +107,7 @@ public class CompDocEvents { request.setAttribute(obj.toString(), val); } // Update ContentRevision and ContentRevisonItem - Map contentRevisionMap = FastMap.newInstance(); + Map contentRevisionMap = new HashMap(); contentRevisionMap.put("itemContentId", contentId); contentRevisionMap.put("contentId", contentId); contentRevisionMap.put("userLogin", userLogin); @@ -160,7 +159,7 @@ public class CompDocEvents { https = (String) servletContext.getAttribute("https"); } - Map mapIn = FastMap.newInstance(); + Map mapIn = new HashMap(); mapIn.put("contentId", contentId); mapIn.put("locale", locale); mapIn.put("rootDir", rootDir); @@ -231,7 +230,7 @@ public class CompDocEvents { https = (String) servletContext.getAttribute("https"); } - Map mapIn = FastMap.newInstance(); + Map mapIn = new HashMap(); mapIn.put("contentId", contentId); mapIn.put("locale", locale); mapIn.put("rootDir", rootDir); diff --git a/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java b/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java index 8e145ad92a..090d413efa 100644 --- a/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java +++ b/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java @@ -21,13 +21,12 @@ package org.ofbiz.content.compdoc; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.ByteBuffer; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilProperties; @@ -72,7 +71,7 @@ public class CompDocServices { */ public static Map persistRootCompDoc(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale)context.get("locale"); @@ -109,7 +108,7 @@ public class CompDocServices { //request.setAttribute("contentId", contentId); // Update ContentRevision and ContentRevisonItem - Map contentRevisionMap = FastMap.newInstance(); + Map contentRevisionMap = new HashMap(); contentRevisionMap.put("itemContentId", contentId); contentRevisionMap.put("contentId", contentId); contentRevisionMap.put("userLogin", userLogin); @@ -144,7 +143,7 @@ public class CompDocServices { GenericValue userLogin = (GenericValue) context.get("userLogin"); try { - List exprList = FastList.newInstance(); + List exprList = new LinkedList(); exprList.add(EntityCondition.makeCondition("contentIdTo", EntityOperator.EQUALS, contentId)); exprList.add(EntityCondition.makeCondition("contentAssocTypeId", EntityOperator.EQUALS, "COMPDOC_PART")); exprList.add(EntityCondition.makeCondition("rootRevisionContentId", EntityOperator.EQUALS, contentId)); diff --git a/applications/content/src/org/ofbiz/content/content/ContentKeywordIndex.java b/applications/content/src/org/ofbiz/content/content/ContentKeywordIndex.java index 3c1e0832d5..c3e820fdf3 100644 --- a/applications/content/src/org/ofbiz/content/content/ContentKeywordIndex.java +++ b/applications/content/src/org/ofbiz/content/content/ContentKeywordIndex.java @@ -19,13 +19,12 @@ package org.ofbiz.content.content; import java.io.IOException; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilMisc; @@ -68,7 +67,7 @@ public class ContentKeywordIndex { Set stemSet = KeywordSearchUtil.getStemSet(); Map keywords = new TreeMap(); - List strings = FastList.newInstance(); + List strings = new LinkedList(); int pidWeight = 1; keywords.put(content.getString("contentId").toLowerCase(), Long.valueOf(pidWeight)); @@ -198,7 +197,7 @@ public class ContentKeywordIndex { } } - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); int keywordMaxLength = Integer.parseInt(EntityUtilProperties.getPropertyValue("contentsearch", "content.keyword.max.length", delegator)); for (Map.Entry entry: keywords.entrySet()) { if (entry.getKey().length() <= keywordMaxLength) { diff --git a/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java b/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java index 095c3c7475..c28215a305 100644 --- a/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java +++ b/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java @@ -21,6 +21,9 @@ package org.ofbiz.content.content; import java.io.IOException; import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -29,10 +32,6 @@ import java.util.Set; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilGenerics; @@ -52,7 +51,7 @@ public class ContentMapFacade implements Map { public static final String module = ContentMapFacade.class.getName(); - protected static final Set mapKeySet = FastSet.newInstance(); + protected static final Set mapKeySet = new HashSet(); static { mapKeySet.add("fields"); mapKeySet.add("link"); @@ -279,10 +278,10 @@ public class ContentMapFacade implements Map { return dataResource; } else if ("subcontent_all".equalsIgnoreCase(name)) { // subcontent list of ordered subcontent - List subContent = FastList.newInstance(); + List subContent = new LinkedList(); List subs = null; try { - Map expressions = FastMap.newInstance(); + Map expressions = new HashMap(); expressions.put("contentIdStart", contentId); if(!this.mapKeyFilter.equals("")) { expressions.put("caMapKey", this.mapKeyFilter); @@ -329,7 +328,7 @@ public class ContentMapFacade implements Map { return "=========> " + errorMsg + " <========="; } // TODO: change to use the MapStack instead of a cloned Map - Map renderCtx = FastMap.newInstance(); + Map renderCtx = new HashMap(); renderCtx.putAll(context); if (this.decoratedContent != null) { renderCtx.put("decoratedContent", decoratedContent); @@ -457,7 +456,7 @@ public class ContentMapFacade implements Map { // key is the mapKey GenericValue sub = null; try { - Map expressions = FastMap.newInstance(); + Map expressions = new HashMap(); expressions.put("contentIdStart", contentId); expressions.put("caMapKey", name); if(!this.statusFilter.equals("")) { diff --git a/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java b/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java index e41c85e291..82302b29af 100644 --- a/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java +++ b/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java @@ -18,13 +18,12 @@ *******************************************************************************/ package org.ofbiz.content.content; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilGenerics; @@ -115,7 +114,7 @@ public class ContentPermissionServices { displayPassCond = true; } Debug.logInfo("displayPassCond(0):" + displayPassCond, ""); - Map results = FastMap.newInstance(); + Map results = new HashMap(); GenericValue userLogin = (GenericValue) context.get("userLogin"); String partyId = (String) context.get("partyId"); if (UtilValidate.isEmpty(partyId)) { @@ -147,7 +146,7 @@ public class ContentPermissionServices { if (UtilValidate.isNotEmpty(contentPurposeString)) { List purposesFromString = StringUtil.split(contentPurposeString, "|"); if (passedPurposes == null) { - passedPurposes = FastList.newInstance(); + passedPurposes = new LinkedList(); } passedPurposes.addAll(purposesFromString); } @@ -164,7 +163,7 @@ public class ContentPermissionServices { if (UtilValidate.isNotEmpty(targetOperationString)) { List operationsFromString = StringUtil.split(targetOperationString, "|"); if (targetOperations == null) { - targetOperations = FastList.newInstance(); + targetOperations = new LinkedList(); } targetOperations.addAll(operationsFromString); } @@ -175,7 +174,7 @@ public class ContentPermissionServices { EntityPermissionChecker.StdRelatedRoleGetter roleGetter = new EntityPermissionChecker.StdRelatedRoleGetter("Content", "roleTypeId", "contentId", "partyId", "ownerContentId", "ContentRole"); //Debug.logInfo("targetOperations(b):" + targetOperations, ""); List passedRoles = UtilGenerics.checkList(context.get("roleTypeList")); - if (passedRoles == null) passedRoles = FastList.newInstance(); + if (passedRoles == null) passedRoles = new LinkedList(); String roleTypeString = (String) context.get("roleTypeString"); if (UtilValidate.isNotEmpty(roleTypeString)) { List rolesFromString = StringUtil.split(roleTypeString, "|"); @@ -191,7 +190,7 @@ public class ContentPermissionServices { StringBuilder errBuf = new StringBuilder(); String permissionStatus = null; - List entityIds = FastList.newInstance(); + List entityIds = new LinkedList(); if (passed) { results.put("permissionStatus", "granted"); permissionStatus = "granted"; @@ -261,7 +260,7 @@ public class ContentPermissionServices { } public static Map checkAssocPermission(DispatchContext dctx, Map context) { - Map results = FastMap.newInstance(); + Map results = new HashMap(); // Security security = dctx.getSecurity(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); @@ -291,12 +290,12 @@ public class ContentPermissionServices { // boolean isMatch = false; // boolean isMatchTo = false; // boolean isMatchFrom = false; - Map permResults = FastMap.newInstance(); + Map permResults = new HashMap(); // Use the purposes from the from entity for both cases. List relatedPurposes = EntityPermissionChecker.getRelatedPurposes(contentFrom, null); List relatedPurposesTo = EntityPermissionChecker.getRelatedPurposes(contentTo, relatedPurposes); - Map serviceInMap = FastMap.newInstance(); + Map serviceInMap = new HashMap(); serviceInMap.put("userLogin", userLogin); serviceInMap.put("targetOperationList", UtilMisc.toList("CONTENT_LINK_TO")); serviceInMap.put("contentPurposeList", relatedPurposesTo); diff --git a/applications/content/src/org/ofbiz/content/content/ContentSearch.java b/applications/content/src/org/ofbiz/content/content/ContentSearch.java index 1d11c30934..6b62f83188 100644 --- a/applications/content/src/org/ofbiz/content/content/ContentSearch.java +++ b/applications/content/src/org/ofbiz/content/content/ContentSearch.java @@ -20,16 +20,15 @@ package org.ofbiz.content.content; import java.sql.Timestamp; import java.util.ArrayList; +import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javolution.util.FastList; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilMisc; @@ -114,17 +113,17 @@ public class ContentSearch { public static class ContentSearchContext { public int index = 1; - public List entityConditionList = FastList.newInstance(); - public List orderByList = FastList.newInstance(); + public List entityConditionList = new LinkedList(); + public List orderByList = new LinkedList(); public Set fieldsToSelect = UtilMisc.toSet("contentId"); public DynamicViewEntity dynamicViewEntity = new DynamicViewEntity(); public boolean contentIdGroupBy = false; public boolean includedKeywordSearch = false; public Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); - public List> keywordFixedOrSetAndList = FastList.newInstance(); - public Set orKeywordFixedSet = FastSet.newInstance(); - public Set andKeywordFixedSet = FastSet.newInstance(); - public List contentSearchConstraintList = FastList.newInstance(); + public List> keywordFixedOrSetAndList = new LinkedList>(); + public Set orKeywordFixedSet = new HashSet(); + public Set andKeywordFixedSet = new HashSet(); + public List contentSearchConstraintList = new LinkedList(); public ResultSortOrder resultSortOrder = null; public Integer resultOffset = null; public Integer maxResults = null; @@ -254,7 +253,7 @@ public class ContentSearch { dynamicViewEntity.addMemberEntity(entityAlias, "ContentKeyword"); dynamicViewEntity.addAlias(entityAlias, prefix + "Keyword", "keyword", null, null, null, null); dynamicViewEntity.addViewLink("CNT", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("contentId")); - List keywordOrList = FastList.newInstance(); + List keywordOrList = new LinkedList(); for (String keyword: keywordFixedOrSet) { keywordOrList.add(EntityCondition.makeCondition(prefix + "Keyword", EntityOperator.LIKE, keyword)); } @@ -362,7 +361,7 @@ public class ContentSearch { int numRetreived = 1; int duplicatesFound = 0; - Set contentIdSet = FastSet.newInstance(); + Set contentIdSet = new HashSet(); contentIds.add(searchResult.getString("contentId")); contentIdSet.add(searchResult.getString("contentId")); @@ -484,7 +483,7 @@ public class ContentSearch { @Override public void addConstraint(ContentSearchContext contentSearchContext) { - Set contentIdSet = FastSet.newInstance(); + Set contentIdSet = new HashSet(); if (includeSubContents) { // find all sub-categories recursively, make a Set of contentId ContentSearch.getAllSubContentIds(contentId, contentIdSet, contentSearchContext.getDelegator(), contentSearchContext.nowTimestamp); @@ -511,7 +510,7 @@ public class ContentSearch { contentSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null); contentSearchContext.dynamicViewEntity.addViewLink("CNT", entityAlias, Boolean.TRUE, ModelKeyMap.makeKeyMapList("contentId","contentIdFrom")); - List assocConditionFromTo = FastList.newInstance(); + List assocConditionFromTo = new LinkedList(); assocConditionFromTo.add(EntityCondition.makeCondition(prefix + "ContentIdTo", EntityOperator.IN, contentIdSet)); if (UtilValidate.isNotEmpty(contentAssocTypeId)) { assocConditionFromTo.add(EntityCondition.makeCondition(prefix + "ContentAssocTypeId", EntityOperator.EQUALS, contentAssocTypeId)); @@ -532,7 +531,7 @@ public class ContentSearch { contentSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null); contentSearchContext.dynamicViewEntity.addViewLink("CNT", entityAlias, Boolean.TRUE, ModelKeyMap.makeKeyMapList("contentId","contentIdTo")); - List assocConditionToFrom = FastList.newInstance(); + List assocConditionToFrom = new LinkedList(); assocConditionToFrom.add(EntityCondition.makeCondition(prefix + "ContentIdFrom", EntityOperator.IN, contentIdSet)); if (UtilValidate.isNotEmpty(contentAssocTypeId)) { assocConditionToFrom.add(EntityCondition.makeCondition(prefix + "ContentAssocTypeId", EntityOperator.EQUALS, contentAssocTypeId)); @@ -678,7 +677,7 @@ public class ContentSearch { expandedSet.add(keyword); } Set fixedSet = KeywordSearchUtil.fixKeywordsForSearch(expandedSet, anyPrefix, anySuffix, removeStems, isAnd); - Set fixedKeywordSet = FastSet.newInstance(); + Set fixedKeywordSet = new HashSet(); fixedKeywordSet.addAll(fixedSet); contentSearchContext.keywordFixedOrSetAndList.add(fixedKeywordSet); } diff --git a/applications/content/src/org/ofbiz/content/content/ContentSearchEvents.java b/applications/content/src/org/ofbiz/content/content/ContentSearchEvents.java index 016017c71a..8c4994d91e 100644 --- a/applications/content/src/org/ofbiz/content/content/ContentSearchEvents.java +++ b/applications/content/src/org/ofbiz/content/content/ContentSearchEvents.java @@ -19,14 +19,13 @@ package org.ofbiz.content.content; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import javolution.util.FastMap; - import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; import org.ofbiz.webapp.stats.VisitHandler; @@ -99,7 +98,7 @@ public class ContentSearchEvents { String searchSortOrderString = ContentSearchSession.searchGetSortOrderString(false, request); // ========== populate the result Map - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put("contentIds", contentIds); result.put("viewIndex", Integer.valueOf(viewIndex)); diff --git a/applications/content/src/org/ofbiz/content/content/ContentSearchSession.java b/applications/content/src/org/ofbiz/content/content/ContentSearchSession.java index 8a8e8f1c42..b94daa8b89 100644 --- a/applications/content/src/org/ofbiz/content/content/ContentSearchSession.java +++ b/applications/content/src/org/ofbiz/content/content/ContentSearchSession.java @@ -19,6 +19,7 @@ package org.ofbiz.content.content; import java.sql.Timestamp; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -26,8 +27,6 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilHttp; @@ -69,7 +68,7 @@ public class ContentSearchSession { public static void addConstraint(ContentSearchConstraint contentSearchConstraint, HttpSession session) { ContentSearchOptions contentSearchOptions = getContentSearchOptions(session); if (contentSearchOptions.constraintList == null) { - contentSearchOptions.constraintList = FastList.newInstance(); + contentSearchOptions.constraintList = new LinkedList(); } if (!contentSearchOptions.constraintList.contains(contentSearchConstraint)) { contentSearchOptions.constraintList.add(contentSearchConstraint); @@ -132,7 +131,7 @@ public class ContentSearchSession { public List searchGetConstraintStrings(boolean detailed, Delegator delegator, Locale locale) { List contentSearchConstraintList = this.getConstraintList(); - List constraintStrings = FastList.newInstance(); + List constraintStrings = new LinkedList(); if (contentSearchConstraintList == null) { return constraintStrings; } @@ -268,7 +267,7 @@ public class ContentSearchSession { public static List getSearchOptionsHistoryList(HttpSession session) { List optionsHistoryList = UtilGenerics.checkList(session.getAttribute("_CONTENT_SEARCH_OPTIONS_HISTORY_")); if (optionsHistoryList == null) { - optionsHistoryList = FastList.newInstance(); + optionsHistoryList = new LinkedList(); session.setAttribute("_CONTENT_SEARCH_OPTIONS_HISTORY_", optionsHistoryList); } return optionsHistoryList; diff --git a/applications/content/src/org/ofbiz/content/content/ContentServices.java b/applications/content/src/org/ofbiz/content/content/ContentServices.java index de96c9c348..df061e1e84 100644 --- a/applications/content/src/org/ofbiz/content/content/ContentServices.java +++ b/applications/content/src/org/ofbiz/content/content/ContentServices.java @@ -22,14 +22,13 @@ import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.StringUtil; @@ -66,7 +65,7 @@ public class ContentServices { */ public static Map findRelatedContent(DispatchContext dctx, Map context) { LocalDispatcher dispatcher = dctx.getDispatcher(); - Map results = FastMap.newInstance(); + Map results = new HashMap(); GenericValue currentContent = (GenericValue) context.get("currentContent"); String fromDate = (String) context.get("fromDate"); @@ -95,12 +94,12 @@ public class ContentServices { return results; } - Map serviceInMap = FastMap.newInstance(); + Map serviceInMap = new HashMap(); serviceInMap.put("userLogin", context.get("userLogin")); serviceInMap.put("targetOperationList", targetOperations); serviceInMap.put("entityOperation", context.get("entityOperation")); - List permittedList = FastList.newInstance(); + List permittedList = new LinkedList(); Map permResults = null; for (GenericValue content : contentList) { serviceInMap.put("currentContent", content); @@ -125,8 +124,8 @@ public class ContentServices { * This is a generic service for traversing a Content tree, typical of a blog response tree. It calls the ContentWorker.traverse method. */ public static Map findContentParents(DispatchContext dctx, Map context) { - Map results = FastMap.newInstance(); - List parentList = FastList.newInstance(); + Map results = new HashMap(); + List parentList = new LinkedList(); results.put("parentList", parentList); LocalDispatcher dispatcher = dctx.getDispatcher(); String contentId = (String)context.get("contentId"); @@ -135,7 +134,7 @@ public class ContentServices { if (UtilValidate.isEmpty(direction)) { direction="To"; } - Map traversMap = FastMap.newInstance(); + Map traversMap = new HashMap(); traversMap.put("contentId", contentId); traversMap.put("direction", direction); traversMap.put("contentAssocTypeId", contentAssocTypeId); @@ -169,7 +168,7 @@ public class ContentServices { */ public static Map traverseContent(DispatchContext dctx, Map context) { Delegator delegator = dctx.getDelegator(); - Map results = FastMap.newInstance(); + Map results = new HashMap(); Locale locale = (Locale) context.get("locale"); String contentId = (String) context.get("contentId"); @@ -204,7 +203,7 @@ public class ContentServices { thruDate = UtilDateTime.toTimestamp(thruDateStr); } - Map whenMap = FastMap.newInstance(); + Map whenMap = new HashMap(); whenMap.put("followWhen", context.get("followWhen")); whenMap.put("pickWhen", context.get("pickWhen")); whenMap.put("returnBeforePickWhen", context.get("returnBeforePickWhen")); @@ -215,8 +214,8 @@ public class ContentServices { startContentAssocTypeId = "PUBLISH"; } - Map nodeMap = FastMap.newInstance(); - List pickList = FastList.newInstance(); + Map nodeMap = new HashMap(); + List pickList = new LinkedList(); ContentWorker.traverse(delegator, content, fromDate, thruDate, whenMap, 0, nodeMap, startContentAssocTypeId, pickList, direction); results.put("nodeMap", nodeMap); @@ -258,7 +257,7 @@ public class ContentServices { context.put("contentPurposeList", contentPurposeList); Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); String contentId = (String) context.get("contentId"); @@ -359,7 +358,7 @@ public class ContentServices { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); // This section guesses how contentId should be used (From or To) if // only a contentIdFrom o contentIdTo is passed in @@ -390,7 +389,7 @@ public class ContentServices { /* String deactivateExisting = (String) context.get("deactivateExisting"); if (deactivateExisting != null && deactivateExisting.equalsIgnoreCase("true")) { - Map andMap = FastMap.newInstance(); + Map andMap = new HashMap(); andMap.put("contentIdTo", contentIdTo); andMap.put("contentAssocTypeId", context.get("contentAssocTypeId")); @@ -412,7 +411,7 @@ public class ContentServices { } */ - GenericValue contentAssoc = delegator.makeValue("ContentAssoc", FastMap.newInstance()); + GenericValue contentAssoc = delegator.makeValue("ContentAssoc"); contentAssoc.put("contentId", contentIdFrom); contentAssoc.put("contentIdTo", contentIdTo); contentAssoc.put("contentAssocTypeId", context.get("contentAssocTypeId")); @@ -463,7 +462,7 @@ public class ContentServices { contentAssoc.put("createdDate", createdDate); contentAssoc.put("lastModifiedDate", lastModifiedDate); - Map serviceInMap = FastMap.newInstance(); + Map serviceInMap = new HashMap(); String permissionStatus = null; serviceInMap.put("userLogin", context.get("userLogin")); serviceInMap.put("targetOperationList", targetOperationList); @@ -525,7 +524,7 @@ public class ContentServices { Map context = UtilMisc.makeMapWritable(rcontext); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); context.put("entityOperation", "_UPDATE"); List targetOperationList = ContentWorker.prepTargetOperationList(context, "_UPDATE"); @@ -607,7 +606,7 @@ public class ContentServices { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); context.put("entityOperation", "_UPDATE"); List targetOperationList = ContentWorker.prepTargetOperationList(context, "_UPDATE"); @@ -663,7 +662,7 @@ public class ContentServices { contentAssoc.put("lastModifiedDate", lastModifiedDate); String permissionStatus = null; - Map serviceInMap = FastMap.newInstance(); + Map serviceInMap = new HashMap(); serviceInMap.put("userLogin", context.get("userLogin")); serviceInMap.put("targetOperationList", targetOperationList); serviceInMap.put("contentPurposeList", contentPurposeList); @@ -720,7 +719,7 @@ public class ContentServices { Map context = UtilMisc.makeMapWritable(rcontext); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Locale locale = (Locale) context.get("locale"); context.put("entityOperation", "_UPDATE"); List targetOperationList = ContentWorker.prepTargetOperationList(context, "_UPDATE"); @@ -760,7 +759,7 @@ public class ContentServices { contentAssoc.put("thruDate", UtilDateTime.nowTimestamp()); String permissionStatus = null; - Map serviceInMap = FastMap.newInstance(); + Map serviceInMap = new HashMap(); serviceInMap.put("userLogin", context.get("userLogin")); serviceInMap.put("targetOperationList", targetOperationList); serviceInMap.put("contentPurposeList", contentPurposeList); @@ -805,7 +804,7 @@ public class ContentServices { Locale locale = (Locale) context.get("locale"); Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); String sequenceNum = null; - Map results = FastMap.newInstance(); + Map results = new HashMap(); try { GenericValue activeAssoc = null; @@ -817,7 +816,7 @@ public class ContentServices { sequenceNum = (String) activeAssoc.get("sequenceNum"); } - List exprList = FastList.newInstance(); + List exprList = new LinkedList(); exprList.add(EntityCondition.makeCondition("mapKey", EntityOperator.EQUALS, mapKey)); if (sequenceNum != null) { exprList.add(EntityCondition.makeCondition("sequenceNum", EntityOperator.EQUALS, sequenceNum)); @@ -858,7 +857,7 @@ public class ContentServices { * matching content. */ public static Map renderSubContentAsText(DispatchContext dctx, Map context) { - Map results = FastMap.newInstance(); + Map results = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); @@ -895,7 +894,7 @@ public class ContentServices { Writer outWriter = new StringWriter(); if (templateContext == null) { - templateContext = FastMap.newInstance(); + templateContext = new HashMap(); } try { @@ -919,7 +918,7 @@ public class ContentServices { * matching content. */ public static Map renderContentAsText(DispatchContext dctx, Map context) { - Map results = FastMap.newInstance(); + Map results = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); Delegator delegator = dctx.getDelegator(); Writer out = (Writer) context.get("outWriter"); @@ -940,7 +939,7 @@ public class ContentServices { } if (templateContext == null) { - templateContext = FastMap.newInstance(); + templateContext = new HashMap(); } Writer outWriter = new StringWriter(); @@ -964,7 +963,7 @@ public class ContentServices { } public static Map linkContentToPubPt(DispatchContext dctx, Map context) { - Map results = FastMap.newInstance(); + Map results = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); @@ -978,7 +977,7 @@ public class ContentServices { if (Debug.infoOn()) Debug.logInfo("in publishContent, statusId:" + statusId, module); if (Debug.infoOn()) Debug.logInfo("in publishContent, userLogin:" + userLogin, module); - Map mapIn = FastMap.newInstance(); + Map mapIn = new HashMap(); mapIn.put("contentId", contentId); mapIn.put("contentIdTo", contentIdTo); mapIn.put("contentAssocTypeId", contentAssocTypeId); @@ -1008,7 +1007,7 @@ public class ContentServices { content.put("statusId", statusId); content.store(); - mapIn = FastMap.newInstance(); + mapIn = new HashMap(); mapIn.put("contentId", contentId); mapIn.put("contentIdTo", contentIdTo); mapIn.put("contentAssocTypeId", contentAssocTypeId); @@ -1043,7 +1042,7 @@ public class ContentServices { } public static Map publishContent(DispatchContext dctx, Map context) throws GenericServiceException{ - Map result = FastMap.newInstance(); + Map result = new HashMap(); GenericValue content = (GenericValue)context.get("content"); try { @@ -1057,10 +1056,10 @@ public class ContentServices { } public static Map getPrefixedMembers(DispatchContext dctx, Map context) throws GenericServiceException{ - Map result = FastMap.newInstance(); + Map result = new HashMap(); Map mapIn = UtilGenerics.checkMap(context.get("mapIn")); String prefix = (String)context.get("prefix"); - Map mapOut = FastMap.newInstance(); + Map mapOut = new HashMap(); result.put("mapOut", mapOut); if (mapIn != null) { Set> entrySet = mapIn.entrySet(); @@ -1077,8 +1076,8 @@ public class ContentServices { } public static Map splitString(DispatchContext dctx, Map context) throws GenericServiceException{ - Map result = FastMap.newInstance(); - List outputList = FastList.newInstance(); + Map result = new HashMap(); + List outputList = new LinkedList(); String delimiter = UtilFormatOut.checkEmpty((String)context.get("delimiter"), "|"); String inputString = (String)context.get("inputString"); if (UtilValidate.isNotEmpty(inputString)) { @@ -1089,7 +1088,7 @@ public class ContentServices { } public static Map joinString(DispatchContext dctx, Map context) throws GenericServiceException{ - Map result = FastMap.newInstance(); + Map result = new HashMap(); String outputString = null; String delimiter = UtilFormatOut.checkEmpty((String)context.get("delimiter"), "|"); List inputList = UtilGenerics.checkList(context.get("inputList")); @@ -1101,8 +1100,8 @@ public class ContentServices { } public static Map urlEncodeArgs(DispatchContext dctx, Map context) throws GenericServiceException{ - Map result = FastMap.newInstance(); - Map mapFiltered = FastMap.newInstance(); + Map result = new HashMap(); + Map mapFiltered = new HashMap(); Map mapIn = UtilGenerics.checkMap(context.get("mapIn")); if (mapIn != null) { Set> entrySet = mapIn.entrySet(); diff --git a/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java b/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java index 4993baed75..53600c075f 100644 --- a/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java +++ b/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java @@ -20,13 +20,12 @@ package org.ofbiz.content.content; import java.sql.Timestamp; import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilDateTime; @@ -81,7 +80,7 @@ public class ContentServicesComplex { } public static Map getAssocAndContentAndDataResourceMethod(Delegator delegator, String contentId, String mapKey, String direction, Timestamp fromDate, Timestamp thruDate, String fromDateStr, String thruDateStr, List assocTypes, List contentTypes) { - List exprList = FastList.newInstance(); + List exprList = new LinkedList(); EntityExpr joinExpr = null; String viewName = null; if (mapKey != null) { @@ -115,7 +114,7 @@ public class ContentServicesComplex { exprList.add(fromExpr); } if (thruDate != null) { - List thruList = FastList.newInstance(); + List thruList = new LinkedList(); //thruDate = UtilDateTime.getDayStart(thruDate, daysLater); EntityExpr thruExpr = EntityCondition.makeCondition("caThruDate", EntityOperator.LESS_THAN, thruDate); @@ -125,7 +124,7 @@ public class ContentServicesComplex { EntityConditionList thruExprList = EntityCondition.makeCondition(thruList, EntityOperator.OR); exprList.add(thruExprList); } else if (fromDate != null) { - List thruList = FastList.newInstance(); + List thruList = new LinkedList(); EntityExpr thruExpr = EntityCondition.makeCondition("caThruDate", EntityOperator.GREATER_THAN, fromDate); thruList.add(thruExpr); @@ -145,7 +144,7 @@ public class ContentServicesComplex { GenericValue a = relatedAssocs.get(i); Debug.logVerbose(" contentId:" + a.get("contentId") + " To:" + a.get("caContentIdTo") + " fromDate:" + a.get("caFromDate") + " thruDate:" + a.get("caThruDate") + " AssocTypeId:" + a.get("caContentAssocTypeId"), null); } - Map results = FastMap.newInstance(); + Map results = new HashMap(); results.put("entityList", relatedAssocs); return results; } @@ -165,7 +164,7 @@ public class ContentServicesComplex { if (UtilValidate.isNotEmpty(assocTypesString)) { List lst = StringUtil.split(assocTypesString, "|"); if (assocTypes == null) { - assocTypes = FastList.newInstance(); + assocTypes = new LinkedList(); } assocTypes.addAll(lst); } @@ -174,7 +173,7 @@ public class ContentServicesComplex { if (UtilValidate.isNotEmpty(contentTypesString)) { List lst = StringUtil.split(contentTypesString, "|"); if (contentTypes == null) { - contentTypes = FastList.newInstance(); + contentTypes = new LinkedList(); } contentTypes.addAll(lst); } @@ -248,7 +247,7 @@ public class ContentServicesComplex { GenericValue contentAssocDataResourceView = null; GenericValue content = null; GenericValue dataResource = null; - List contentAssocDataResourceList = FastList.newInstance(); + List contentAssocDataResourceList = new LinkedList(); Locale locale = Locale.getDefault(); // TODO: this needs to be passed in try{ for (GenericValue contentAssocView : contentAssocsTypeFiltered) { @@ -266,12 +265,12 @@ public class ContentServicesComplex { contentAssocDataResourceView = delegator.makeValue(viewName); contentAssocDataResourceView.setAllFields(content, true, null, null); } - SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocOut", contentAssoc, contentAssocDataResourceView, FastList.newInstance(), locale); + SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocOut", contentAssoc, contentAssocDataResourceView, new LinkedList(), locale); String dataResourceId = content.getString("dataResourceId"); if (UtilValidate.isNotEmpty(dataResourceId)) dataResource = content.getRelatedOne("DataResource", true); if (dataResource != null) { - SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceOut", dataResource, contentAssocDataResourceView, FastList.newInstance(), locale); + SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceOut", dataResource, contentAssocDataResourceView, new LinkedList(), locale); } contentAssocDataResourceList.add(contentAssocDataResourceView); } @@ -284,7 +283,7 @@ public class ContentServicesComplex { List orderByList = StringUtil.split(orderBy, "|"); contentAssocDataResourceList = EntityUtil.orderBy(contentAssocDataResourceList, orderByList); } - Map results = FastMap.newInstance(); + Map results = new HashMap(); results.put("entityList", contentAssocDataResourceList); if (UtilValidate.isNotEmpty(contentAssocDataResourceList)) { results.put("view", contentAssocDataResourceList.get(0)); diff --git a/applications/content/src/org/ofbiz/content/content/ContentWorker.java b/applications/content/src/org/ofbiz/content/content/ContentWorker.java index f7cc67b896..8b9c6350c0 100644 --- a/applications/content/src/org/ofbiz/content/content/ContentWorker.java +++ b/applications/content/src/org/ofbiz/content/content/ContentWorker.java @@ -24,15 +24,13 @@ import java.io.StringWriter; import java.io.Writer; import java.sql.Timestamp; import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.BshUtil; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; @@ -220,7 +218,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte String contentId = content.getString("contentId"); if (templateContext == null) { - templateContext = FastMap.newInstance(); + templateContext = new HashMap(); } // create the content facade @@ -451,27 +449,27 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte contentId = (String) content.get("contentId"); contentTypeId = (String) content.get("contentTypeId"); List topicList = content.getRelated("ToContentAssoc", UtilMisc.toMap("contentAssocTypeId", "TOPIC"), null, false); - List topics = FastList.newInstance(); + List topics = new LinkedList(); for (int i = 0; i < topicList.size(); i++) { GenericValue assoc = topicList.get(i); topics.add(assoc.getString("contentId")); } List keywordList = content.getRelated("ToContentAssoc", UtilMisc.toMap("contentAssocTypeId", "KEYWORD"), null, false); - List keywords = FastList.newInstance(); + List keywords = new LinkedList(); for (int i = 0; i < keywordList.size(); i++) { GenericValue assoc = keywordList.get(i); keywords.add(assoc.getString("contentId")); } List purposeValueList = content.getRelated("ContentPurpose", null, null, true); - List purposes = FastList.newInstance(); + List purposes = new LinkedList(); for (int i = 0; i < purposeValueList.size(); i++) { GenericValue purposeValue = purposeValueList.get(i); purposes.add(purposeValue.getString("contentPurposeTypeId")); } - List contentTypeAncestry = FastList.newInstance(); + List contentTypeAncestry = new LinkedList(); getContentTypeAncestry(delegator, contentTypeId, contentTypeAncestry); - Map context = FastMap.newInstance(); + Map context = new HashMap(); context.put("content", content); context.put("contentAssocTypeId", contentAssocTypeId); //context.put("related", related); @@ -483,13 +481,13 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte boolean isReturnBefore = checkReturnWhen(context, (String) whenMap.get("returnBeforePickWhen")); Map thisNode = null; if (isPick || !isReturnBefore) { - thisNode = FastMap.newInstance(); + thisNode = new HashMap(); thisNode.put("contentId", contentId); thisNode.put("contentTypeId", contentTypeId); thisNode.put("contentAssocTypeId", contentAssocTypeId); List> kids = UtilGenerics.checkList(masterNode.get("kids")); if (kids == null) { - kids = FastList.newInstance(); + kids = new LinkedList>(); masterNode.put("kids", kids); } kids.add(thisNode); @@ -500,9 +498,9 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte } boolean isReturnAfter = checkReturnWhen(context, (String) whenMap.get("returnAfterPickWhen")); if (!isReturnAfter) { - List assocTypes = FastList.newInstance(); + List assocTypes = new LinkedList(); List relatedAssocs = getContentAssocsWithId(delegator, contentId, fromDate, thruDate, direction, assocTypes); - Map assocContext = FastMap.newInstance(); + Map assocContext = new HashMap(); assocContext.put("related", relatedAssocs); for (GenericValue assocValue : relatedAssocs) { contentAssocTypeId = (String) assocValue.get("contentAssocTypeId"); @@ -623,7 +621,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte } public static List getPurposes(GenericValue content) { - List purposes = FastList.newInstance(); + List purposes = new LinkedList(); try { List purposeValueList = content.getRelated("ContentPurpose", null, null, true); for (int i = 0; i < purposeValueList.size(); i++) { @@ -637,7 +635,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte } public static List getSections(GenericValue content) { - List sections = FastList.newInstance(); + List sections = new LinkedList(); try { List sectionValueList = content.getRelated("FromContentAssoc", null, null, true); for (int i = 0; i < sectionValueList.size(); i++) { @@ -654,7 +652,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte } public static List getTopics(GenericValue content) { - List topics = FastList.newInstance(); + List topics = new LinkedList(); try { List topicValueList = content.getRelated("FromContentAssoc", null, null, true); for (int i = 0; i < topicValueList.size(); i++) { @@ -678,7 +676,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte String parentContentId = (String) parentContent.get("contentId"); //if (Debug.infoOn()) Debug.logInfo("traverse, contentAssocTypeId:" + contentAssocTypeId,null); Map whenMap = UtilGenerics.checkMap(ctx.get("whenMap")); - List> kids = FastList.newInstance(); + List> kids = new LinkedList>(); currentNode.put("kids", kids); String direction = (String) ctx.get("direction"); if (UtilValidate.isEmpty(direction)) { @@ -766,7 +764,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte Debug.logInfo("assocList:" + assocList.size() + " contentId:" + currentContent.getString("contentId"), ""); } - List contentList = FastList.newInstance(); + List contentList = new LinkedList(); String contentIdName = "contentId"; if (linkDir != null && linkDir.equalsIgnoreCase("TO")) { contentIdName = contentIdName.concat("To"); @@ -793,8 +791,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte } public static List getAssociatedContentView(GenericValue currentContent, String linkDir, List assocTypes, List contentTypes, String fromDate, String thruDate) throws GenericEntityException { - List contentList = FastList.newInstance(); - List exprListAnd = FastList.newInstance(); + List exprListAnd = new LinkedList(); String origContentId = (String) currentContent.get("contentId"); String contentIdName = "contentId"; @@ -846,9 +843,8 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte @SuppressWarnings("unchecked") public static List getContentAssocsWithId(Delegator delegator, String contentId, Timestamp fromDate, Timestamp thruDate, String direction, List assocTypes) throws GenericEntityException { - List exprList = FastList.newInstance(); + List exprList = new LinkedList(); EntityExpr joinExpr = null; - EntityExpr expr = null; if (direction != null && direction.equalsIgnoreCase("From")) { joinExpr = EntityCondition.makeCondition("contentIdTo", EntityOperator.EQUALS, contentId); } else { @@ -863,7 +859,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte exprList.add(fromExpr); } if (thruDate != null) { - List thruList = FastList.newInstance(); + List thruList = new LinkedList(); //thruDate = UtilDateTime.getDayStart(thruDate, daysLater); EntityExpr thruExpr = EntityCondition.makeCondition("thruDate", EntityOperator.LESS_THAN, thruDate); @@ -873,7 +869,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte EntityConditionList thruExprList = EntityCondition.makeCondition(thruList, EntityOperator.OR); exprList.add(thruExprList); } else if (fromDate != null) { - List thruList = FastList.newInstance(); + List thruList = new LinkedList(); EntityExpr thruExpr = EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, fromDate); thruList.add(thruExpr); @@ -969,8 +965,8 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte } public static List> getContentAncestryNodeTrail(Delegator delegator, String contentId, String contentAssocTypeId, String direction) throws GenericEntityException { - List contentAncestorList = FastList.newInstance(); - List> nodeTrail = FastList.newInstance(); + List contentAncestorList = new LinkedList(); + List> nodeTrail = new LinkedList>(); getContentAncestry(delegator, contentId, contentAssocTypeId, direction, contentAncestorList); for (GenericValue value : contentAncestorList) { Map thisNode = ContentWorker.makeNode(value); @@ -980,7 +976,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte } public static String getContentAncestryNodeTrailCsv(Delegator delegator, String contentId, String contentAssocTypeId, String direction) throws GenericEntityException { - List contentAncestorList = FastList.newInstance(); + List contentAncestorList = new LinkedList(); getContentAncestry(delegator, contentId, contentAssocTypeId, direction, contentAncestorList); String csv = StringUtil.join(contentAncestorList, ","); return csv; @@ -1033,13 +1029,13 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte } public static Map callContentPermissionCheckResult(Delegator delegator, LocalDispatcher dispatcher, Map context) { - Map permResults = FastMap.newInstance(); + Map permResults = new HashMap(); String skipPermissionCheck = (String) context.get("skipPermissionCheck"); if (UtilValidate.isEmpty(skipPermissionCheck) || (!"true".equalsIgnoreCase(skipPermissionCheck) && !"granted".equalsIgnoreCase(skipPermissionCheck))) { GenericValue userLogin = (GenericValue) context.get("userLogin"); - Map serviceInMap = FastMap.newInstance(); + Map serviceInMap = new HashMap(); serviceInMap.put("userLogin", userLogin); serviceInMap.put("targetOperationList", context.get("targetOperationList")); serviceInMap.put("contentPurposeList", context.get("contentPurposeList")); @@ -1143,7 +1139,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte if (UtilValidate.isNotEmpty(trail)) { passedGlobalNodeTrail = UtilGenerics.checkList(UtilMisc.makeListWritable(trail)); } else { - passedGlobalNodeTrail = FastList.newInstance(); + passedGlobalNodeTrail = new LinkedList>(); } //if (Debug.infoOn()) Debug.logInfo("in getCurrentContent, passedGlobalNodeTrail(3):" + passedGlobalNodeTrail , module); int sz = passedGlobalNodeTrail.size(); @@ -1208,7 +1204,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte } public static Map buildPickContext(Delegator delegator, String contentAssocTypeId, String assocContentId, String direction, GenericValue thisContent) throws GenericEntityException { - Map ctx = FastMap.newInstance(); + Map ctx = new HashMap(); ctx.put("contentAssocTypeId", contentAssocTypeId); ctx.put("contentId", assocContentId); // This needs to be the opposite @@ -1222,7 +1218,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte ctx.put("content", thisContent); List purposes = getPurposes(thisContent); ctx.put("purposes", purposes); - List contentTypeAncestry = FastList.newInstance(); + List contentTypeAncestry = new LinkedList(); String contentTypeId = thisContent.getString("contentTypeId"); getContentTypeAncestry(delegator, contentTypeId, contentTypeAncestry); ctx.put("typeAncestry", contentTypeAncestry); @@ -1235,14 +1231,14 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte } public static void checkConditions(Delegator delegator, Map trailNode, Map contentAssoc, Map whenMap) { - Map context = FastMap.newInstance(); + Map context = new HashMap(); GenericValue content = (GenericValue)trailNode.get("value"); // String contentId = (String)trailNode.get("contentId"); if (contentAssoc == null && content != null && (content.getEntityName().indexOf("Assoc") >= 0)) { contentAssoc = delegator.makeValue("ContentAssoc"); try { // TODO: locale needs to be gotten correctly - SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", content, contentAssoc, FastList.newInstance(), Locale.getDefault()); + SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", content, contentAssoc, new LinkedList(), Locale.getDefault()); context.put("contentAssocTypeId", contentAssoc.get("contentAssocTypeId")); context.put("contentAssocPredicateId", contentAssoc.get("contentAssocPredicateId")); context.put("mapKey", contentAssoc.get("mapKey")); @@ -1263,7 +1259,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte List topics = getTopics(content); context.put("topics", topics); String contentTypeId = (String)content.get("contentTypeId"); - List contentTypeAncestry = FastList.newInstance(); + List contentTypeAncestry = new LinkedList(); try { getContentTypeAncestry(delegator, contentTypeId, contentTypeAncestry); } catch (GenericEntityException e) { @@ -1297,12 +1293,12 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte if (UtilValidate.isNotEmpty(targetOperationString)) { List opsFromString = StringUtil.split(targetOperationString, "|"); if (UtilValidate.isEmpty(targetOperationList)) { - targetOperationList = FastList.newInstance(); + targetOperationList = new LinkedList(); } targetOperationList.addAll(opsFromString); } if (UtilValidate.isEmpty(targetOperationList)) { - targetOperationList = FastList.newInstance(); + targetOperationList = new LinkedList(); if (UtilValidate.isEmpty(md)) { md ="_CREATE"; } @@ -1329,12 +1325,12 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte if (UtilValidate.isNotEmpty(contentPurposeString)) { List purposesFromString = StringUtil.split(contentPurposeString, "|"); if (UtilValidate.isEmpty(contentPurposeList)) { - contentPurposeList = FastList.newInstance(); + contentPurposeList = new LinkedList(); } contentPurposeList.addAll(purposesFromString); } if (UtilValidate.isEmpty(contentPurposeList)) { - contentPurposeList = FastList.newInstance(); + contentPurposeList = new LinkedList(); } if (Debug.infoOn()) { Debug.logInfo("in prepContentPurposeList, contentPurposeList(0):" + contentPurposeList, ""); @@ -1357,7 +1353,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte } public static List getContentAssocViewList(Delegator delegator, String contentIdTo, String contentId, String contentAssocTypeId, String statusId, String privilegeEnumId) throws GenericEntityException { - List exprListAnd = FastList.newInstance(); + List exprListAnd = new LinkedList(); if (UtilValidate.isNotEmpty(contentIdTo)) { EntityExpr expr = EntityCondition.makeCondition("caContentIdTo", EntityOperator.EQUALS, contentIdTo); @@ -1406,7 +1402,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte return thisNode; } - thisNode = FastMap.newInstance(); + thisNode = new HashMap(); thisNode.put("value", thisContent); String contentId = (String)thisContent.get("contentId"); thisNode.put("contentId", contentId); @@ -1442,29 +1438,25 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte } public static List> csvToList(String csv, Delegator delegator) { - List> outList = FastList.newInstance(); + List> outList = new LinkedList>(); List contentIdList = StringUtil.split(csv, ","); GenericValue content = null; String contentName = null; - List values = null; for (String contentId : contentIdList) { try { content = EntityQuery.use(delegator).from("Content").where("contentId", contentId).cache().queryOne(); } catch (GenericEntityException e) { Debug.logError(e.getMessage(), module); - return FastList.newInstance(); + return new LinkedList>(); } contentName = (String)content.get("contentName"); - values = FastList.newInstance(); - values.add(contentId); - values.add(contentName); - outList.add(values); + outList.add(UtilMisc.toList(contentId, contentName)); } return outList; } public static List csvToContentList(String csv, Delegator delegator) { - List trail = FastList.newInstance(); + List trail = new LinkedList(); if (csv == null) { return trail; } @@ -1475,7 +1467,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte content = EntityQuery.use(delegator).from("Content").where("contentId", contentId).cache().queryOne(); } catch (GenericEntityException e) { Debug.logError(e.getMessage(), module); - return FastList.newInstance(); + return new LinkedList(); } trail.add(content); } @@ -1483,7 +1475,7 @@ public class ContentWorker implements org.ofbiz.widget.content.ContentWorkerInte } public static List> csvToTrail(String csv, Delegator delegator) { - List> trail = FastList.newInstance(); + List> trail = new LinkedList>(); if (csv == null) { return trail; } diff --git a/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java b/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java index c1c06342e4..575b256beb 100644 --- a/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java +++ b/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java @@ -18,12 +18,11 @@ *******************************************************************************/ package org.ofbiz.content.content; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilProperties; @@ -42,7 +41,7 @@ public class PermissionRecorder { protected boolean isOn = false; protected GenericValue userLogin; - protected List> permCheckResults = FastList.newInstance(); + protected List> permCheckResults = new LinkedList>(); protected boolean entityPermCheckResult = false; protected String currentContentId = ""; protected Map currentContentMap; @@ -127,10 +126,10 @@ public class PermissionRecorder { public void setCurrentContentId(String id) { if (!currentContentId.equals(id)) { - currentContentMap = FastMap.newInstance(); + currentContentMap = new HashMap(); permCheckResults.add(currentContentMap); currentContentMap.put("contentId", id); - currentContentMap.put("checkResults", FastList.newInstance()); + currentContentMap.put("checkResults", new LinkedList()); } currentContentId = id; } @@ -158,7 +157,7 @@ public class PermissionRecorder { } public void startMatchGroup(List targetOperations, List purposes, List roles, List targStatusList, String targPrivilegeEnumId, String contentId) { - currentContentMap = FastMap.newInstance(); + currentContentMap = new HashMap(); permCheckResults.add(currentContentMap); String s = null; if (targetOperations != null) { @@ -185,7 +184,7 @@ public class PermissionRecorder { //if (Debug.infoOn()) Debug.logInfo("startMatchGroup, targStatusList(string):" + s, module); currentContentMap.put("statusId", s); } - List> checkResultList = FastList.newInstance(); + List> checkResultList = new LinkedList>(); currentContentMap.put("privilegeEnumId", privilegeEnumId); currentContentMap.put("contentId", contentId); currentContentMap.put("checkResultList", checkResultList); diff --git a/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java b/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java index db84612d29..229364db0d 100644 --- a/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java +++ b/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java @@ -18,6 +18,8 @@ *******************************************************************************/ package org.ofbiz.content.content; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -26,9 +28,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileUploadException; import org.apache.commons.fileupload.disk.DiskFileItemFactory; @@ -95,7 +94,7 @@ public class UploadContentAndImage { return "error"; } - Map passedParams = FastMap.newInstance(); + Map passedParams = new HashMap(); FileItem fi = null; FileItem imageFi = null; byte[] imageBytes = {}; @@ -124,7 +123,7 @@ public class UploadContentAndImage { passedParams.put("targetOperationList", targetOperationList); // Create or update FTL template - Map ftlContext = FastMap.newInstance(); + Map ftlContext = new HashMap(); ftlContext.put("userLogin", userLogin); ftlContext.put("contentId", passedParams.get("ftlContentId")); ftlContext.put("ownerContentId", passedParams.get("ownerContentId")); @@ -155,7 +154,7 @@ public class UploadContentAndImage { } String ftlContentId = (String)ftlResults.get("contentId"); if (UtilValidate.isNotEmpty(contentIdTo)) { - Map map = FastMap.newInstance(); + Map map = new HashMap(); map.put("fromDate", UtilDateTime.nowTimestamp()); map.put("contentId", ftlContentId); map.put("contentIdTo", contentIdTo); @@ -198,7 +197,7 @@ public class UploadContentAndImage { //if (Debug.infoOn()) Debug.logInfo("[UploadContentAndImage]ftlDataResourceId:" + ftlDataResourceId, module); // Create or update summary text subContent if (passedParams.containsKey("summaryData")) { - Map sumContext = FastMap.newInstance(); + Map sumContext = new HashMap(); sumContext.put("userLogin", userLogin); sumContext.put("contentId", passedParams.get("sumContentId")); sumContext.put("ownerContentId", ftlContentId); @@ -228,7 +227,7 @@ public class UploadContentAndImage { // Create or update electronic text subContent if (passedParams.containsKey("textData")) { - Map txtContext = FastMap.newInstance(); + Map txtContext = new HashMap(); txtContext.put("userLogin", userLogin); txtContext.put("contentId", passedParams.get("txtContentId")); txtContext.put("ownerContentId", ftlContentId); @@ -257,7 +256,7 @@ public class UploadContentAndImage { } // Create or update image subContent - Map imgContext = FastMap.newInstance(); + Map imgContext = new HashMap(); if (imageBytes.length > 0) { imgContext.put("userLogin", userLogin); imgContext.put("contentId", passedParams.get("imgContentId")); @@ -362,7 +361,7 @@ public class UploadContentAndImage { return "error"; } - Map passedParams = FastMap.newInstance(); + Map passedParams = new HashMap(); FileItem fi = null; FileItem imageFi = null; byte[] imageBytes = {}; @@ -433,7 +432,7 @@ public class UploadContentAndImage { Delegator delegator = (Delegator)request.getAttribute("delegator"); HttpSession session = request.getSession(); GenericValue userLogin = (GenericValue)session.getAttribute("userLogin"); - Map ftlContext = FastMap.newInstance(); + Map ftlContext = new HashMap(); String contentPurposeString = (String)passedParams.get("contentPurposeString" + suffix); if (UtilValidate.isEmpty(contentPurposeString)) { @@ -463,8 +462,8 @@ public class UploadContentAndImage { ModelEntity modelEntity = delegator.getModelEntity("ContentAssocDataResourceViewFrom"); List fieldNames = modelEntity.getAllFieldNames(); - Map ftlContext2 = FastMap.newInstance(); - Map ftlContext3 = FastMap.newInstance(); + Map ftlContext2 = new HashMap(); + Map ftlContext3 = new HashMap(); for (String keyName : fieldNames) { Object obj = passedParams.get(keyName + suffix); ftlContext2.put(keyName, obj); @@ -472,17 +471,17 @@ public class UploadContentAndImage { if (Debug.infoOn()) { Debug.logInfo("[UploadContentStuff]ftlContext2:" + ftlContext2, module); } - List errorMessages = FastList.newInstance(); + List errorMessages = new LinkedList(); Locale loc = Locale.getDefault(); try { SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentIn", ftlContext2, ftlContext3, errorMessages, loc); SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentOut", ftlContext3, ftlContext, errorMessages, loc); - ftlContext3 = FastMap.newInstance(); + ftlContext3 = new HashMap(); SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceIn", ftlContext2, ftlContext3, errorMessages, loc); SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceOut", ftlContext3, ftlContext, errorMessages, loc); - ftlContext3 = FastMap.newInstance(); + ftlContext3 = new HashMap(); SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", ftlContext2, ftlContext3, errorMessages, loc); SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocOut", ftlContext3, ftlContext, errorMessages, loc); } catch (MiniLangException e) { @@ -512,7 +511,7 @@ public class UploadContentAndImage { Debug.logInfo("[UploadContentStuff]msg:" + msg, module); } if (errorMsgList == null) { - errorMsgList = FastList.newInstance(); + errorMsgList = new LinkedList(); request.setAttribute("errorMessageList", errorMsgList); } errorMsgList.add(msg); @@ -523,7 +522,7 @@ public class UploadContentAndImage { request.setAttribute("_ERROR_MESSAGE_", msg); List errorMsgList = UtilGenerics.checkList(request.getAttribute("_EVENT_MESSAGE_LIST_")); if (errorMsgList == null) { - errorMsgList = FastList.newInstance(); + errorMsgList = new LinkedList(); request.setAttribute("errorMessageList", errorMsgList); } errorMsgList.add(msg); @@ -543,7 +542,7 @@ public class UploadContentAndImage { String caContentIdTo = (String)passedParams.get("caContentIdTo"); if (UtilValidate.isNotEmpty(caContentIdTo)) { - Map resequenceContext = FastMap.newInstance(); + Map resequenceContext = new HashMap(); resequenceContext.put("contentIdTo", caContentIdTo); resequenceContext.put("userLogin", userLogin); try { @@ -559,7 +558,7 @@ public class UploadContentAndImage { Debug.logInfo("[UploadContentStuff]msg:" + msg, module); } if (errorMsgList == null) { - errorMsgList = FastList.newInstance(); + errorMsgList = new LinkedList(); request.setAttribute("errorMessageList", errorMsgList); } errorMsgList.add(msg); diff --git a/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java b/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java index 21fc021841..071fb38a88 100644 --- a/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java +++ b/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java @@ -33,6 +33,8 @@ import java.net.URL; import java.net.URLConnection; import java.nio.ByteBuffer; import java.util.Comparator; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -43,9 +45,6 @@ import javax.servlet.http.HttpSession; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileUploadException; import org.apache.commons.fileupload.disk.DiskFileItemFactory; @@ -119,11 +118,11 @@ public class DataResourceWorker implements org.ofbiz.widget.content.DataResourc .where("parentCategoryId", parentCategoryId) .cache().queryList(); categoryNode.put("count", Integer.valueOf(categoryValues.size())); - List> subCategoryIds = FastList.newInstance(); + List> subCategoryIds = new LinkedList>(); for (GenericValue category : categoryValues) { String id = (String) category.get("dataCategoryId"); String categoryName = (String) category.get("categoryName"); - Map newNode = FastMap.newInstance(); + Map newNode = new HashMap(); newNode.put("id", id); newNode.put("name", categoryName); errorMsg = getDataCategoryMap(delegator, depth + 1, newNode, categoryTypeIds, getAll); @@ -171,7 +170,7 @@ public class DataResourceWorker implements org.ofbiz.widget.content.DataResourc String spc = ""; for (int i = 0; i < depth; i++) spc += "  "; - Map map = FastMap.newInstance(); + Map map = new HashMap(); map.put("dataCategoryId", id); map.put("categoryName", spc + nm); if (id != null && !id.equals("ROOT") && !id.equals("")) { @@ -214,7 +213,7 @@ public class DataResourceWorker implements org.ofbiz.widget.content.DataResourc FileItem fi = null; FileItem imageFi = null; String imageFileName = null; - Map passedParams = FastMap.newInstance(); + Map passedParams = new HashMap(); HttpSession session = request.getSession(); GenericValue userLogin = (GenericValue)session.getAttribute("userLogin"); passedParams.put("userLogin", userLogin); @@ -290,14 +289,14 @@ public class DataResourceWorker implements org.ofbiz.widget.content.DataResourc */ public static Map callDataResourcePermissionCheckResult(Delegator delegator, LocalDispatcher dispatcher, Map context) { - Map permResults = FastMap.newInstance(); + Map permResults = new HashMap(); String skipPermissionCheck = (String) context.get("skipPermissionCheck"); if (Debug.infoOn()) Debug.logInfo("in callDataResourcePermissionCheckResult, skipPermissionCheck:" + skipPermissionCheck,""); if (UtilValidate.isEmpty(skipPermissionCheck) || (!"true".equalsIgnoreCase(skipPermissionCheck) && !"granted".equalsIgnoreCase(skipPermissionCheck))) { GenericValue userLogin = (GenericValue) context.get("userLogin"); - Map serviceInMap = FastMap.newInstance(); + Map serviceInMap = new HashMap(); serviceInMap.put("userLogin", userLogin); serviceInMap.put("targetOperationList", context.get("targetOperationList")); serviceInMap.put("contentPurposeList", context.get("contentPurposeList")); @@ -391,7 +390,7 @@ public class DataResourceWorker implements org.ofbiz.widget.content.DataResourc } public static String buildRequestPrefix(Delegator delegator, Locale locale, String webSiteId, String https) { - Map prefixValues = FastMap.newInstance(); + Map prefixValues = new HashMap(); String prefix; NotificationServices.setBaseUrl(delegator, webSiteId, prefixValues); @@ -612,7 +611,7 @@ public class DataResourceWorker implements org.ofbiz.widget.content.DataResourc throw new GeneralException("Cannot lookup data resource with for a null dataResourceId"); } if (templateContext == null) { - templateContext = FastMap.newInstance(); + templateContext = new HashMap(); } if (UtilValidate.isEmpty(targetMimeTypeId)) { targetMimeTypeId = "text/html"; @@ -731,7 +730,7 @@ public class DataResourceWorker implements org.ofbiz.widget.content.DataResourc // prepare the map for preRenderedContent String textData = (String) context.get("textData"); if (UtilValidate.isNotEmpty(textData)) { - Map prc = FastMap.newInstance(); + Map prc = new HashMap(); String mapKey = (String) context.get("mapKey"); if (mapKey != null) { prc.put(mapKey, mapKey); @@ -794,7 +793,7 @@ public class DataResourceWorker implements org.ofbiz.widget.content.DataResourc Delegator delegator, Appendable out, boolean cache) throws IOException, GeneralException { Map context = UtilGenerics.checkMap(templateContext.get("context")); if (context == null) { - context = FastMap.newInstance(); + context = new HashMap(); } String webSiteId = (String) templateContext.get("webSiteId"); if (UtilValidate.isEmpty(webSiteId)) { @@ -908,7 +907,7 @@ public class DataResourceWorker implements org.ofbiz.widget.content.DataResourc if (mimeTypeTemplate != null && mimeTypeTemplate.get("templateLocation") != null) { // prepare the context - Map mimeContext = FastMap.newInstance(); + Map mimeContext = new HashMap(); mimeContext.putAll(context); mimeContext.put("dataResource", dataResource); mimeContext.put("textData", textData); diff --git a/applications/content/src/org/ofbiz/content/data/DataServices.java b/applications/content/src/org/ofbiz/content/data/DataServices.java index 566e0fde4f..939977dc9d 100644 --- a/applications/content/src/org/ofbiz/content/data/DataServices.java +++ b/applications/content/src/org/ofbiz/content/data/DataServices.java @@ -28,11 +28,10 @@ import java.io.StringWriter; import java.io.Writer; import java.nio.ByteBuffer; import java.sql.Timestamp; +import java.util.HashMap; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -75,7 +74,7 @@ public class DataServices { */ public static Map createDataResourceAndText(DispatchContext dctx, Map rcontext) { Map context = UtilMisc.makeMapWritable(rcontext); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Map thisResult = createDataResourceMethod(dctx, context); if (thisResult.get(ModelService.RESPONSE_MESSAGE) != null) { @@ -106,7 +105,7 @@ public class DataServices { public static Map createDataResourceMethod(DispatchContext dctx, Map rcontext) { Map context = UtilMisc.makeMapWritable(rcontext); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); GenericValue userLogin = (GenericValue) context.get("userLogin"); String userLoginId = (String) userLogin.get("userLoginId"); @@ -167,7 +166,7 @@ public class DataServices { } public static Map createElectronicTextMethod(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); String dataResourceId = (String) context.get("dataResourceId"); String textData = (String) context.get("textData"); @@ -300,7 +299,7 @@ public class DataServices { } public static Map updateDataResourceMethod(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); GenericValue dataResource = null; Locale locale = (Locale) context.get("locale"); @@ -349,7 +348,7 @@ public class DataServices { * @return update the ElectronicText */ public static Map updateElectronicTextMethod(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); GenericValue electronicText = null; Locale locale = (Locale) context.get("locale"); @@ -398,7 +397,7 @@ public class DataServices { } public static Map updateFileMethod(DispatchContext dctx, Map context) throws GenericServiceException { - Map result = FastMap.newInstance(); + Map result = new HashMap(); //GenericValue fileText = null; Locale locale = (Locale) context.get("locale"); //String dataResourceId = (String) dataResource.get("dataResourceId"); @@ -470,7 +469,7 @@ public class DataServices { } public static Map renderDataResourceAsText(DispatchContext dctx, Map context) throws GeneralException, IOException { - Map results = FastMap.newInstance(); + Map results = new HashMap(); Delegator delegator = dctx.getDelegator(); //LocalDispatcher dispatcher = dctx.getDispatcher(); Writer out = (Writer) context.get("outWriter"); @@ -488,7 +487,7 @@ public class DataServices { Locale locale = (Locale) context.get("locale"); if (templateContext == null) { - templateContext = FastMap.newInstance(); + templateContext = new HashMap(); } // GenericValue view = (GenericValue) context.get("subContentDataResourceView"); @@ -513,7 +512,7 @@ public class DataServices { } public static Map updateImageMethod(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); //Locale locale = (Locale) context.get("locale"); String dataResourceId = (String) context.get("dataResourceId"); @@ -548,7 +547,7 @@ public class DataServices { } public static Map createImageMethod(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); String dataResourceId = (String) context.get("dataResourceId"); ByteBuffer byteBuffer = (ByteBuffer)context.get("imageData"); @@ -584,7 +583,7 @@ public class DataServices { } public static Map createBinaryFileMethod(DispatchContext dctx, Map context) throws GenericServiceException { - Map result = FastMap.newInstance(); + Map result = new HashMap(); GenericValue dataResource = (GenericValue) context.get("dataResource"); //String dataResourceId = (String) dataResource.get("dataResourceId"); String dataResourceTypeId = (String) dataResource.get("dataResourceTypeId"); @@ -641,7 +640,7 @@ public class DataServices { } public static Map updateBinaryFileMethod(DispatchContext dctx, Map context) throws GenericServiceException { - Map result = FastMap.newInstance(); + Map result = new HashMap(); GenericValue dataResource = (GenericValue) context.get("dataResource"); //String dataResourceId = (String) dataResource.get("dataResourceId"); String dataResourceTypeId = (String) dataResource.get("dataResourceTypeId"); diff --git a/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java b/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java index dbb69c8d36..630a8cd872 100644 --- a/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java +++ b/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java @@ -21,6 +21,8 @@ package org.ofbiz.content.layout; import java.nio.ByteBuffer; import java.sql.Timestamp; import java.util.Collection; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -29,9 +31,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilGenerics; @@ -69,7 +68,7 @@ public class LayoutEvents { Map uploadResults = LayoutWorker.uploadImageAndParameters(request, "imageData"); //Debug.logVerbose("in createLayoutImage(java), uploadResults:" + uploadResults, ""); Map formInput = UtilGenerics.checkMap(uploadResults.get("formInput")); - Map context = FastMap.newInstance(); + Map context = new HashMap(); ByteBuffer byteWrap = (ByteBuffer) uploadResults.get("imageData"); if (byteWrap == null) { String errMsg = UtilProperties.getMessage(LayoutEvents.err_resource, "layoutEvents.image_data_null", locale); @@ -87,7 +86,7 @@ public class LayoutEvents { } } String mimeTypeId = "image/" + imageFileNameExt; - List errorMessages = FastList.newInstance(); + List errorMessages = new LinkedList(); if (locale == null) { locale = Locale.getDefault(); } @@ -120,7 +119,7 @@ public class LayoutEvents { String dataResourceId = (String) result.get("dataResourceId"); String activeContentId = (String) result.get("contentId"); if (UtilValidate.isNotEmpty(activeContentId)) { - Map context2 = FastMap.newInstance(); + Map context2 = new HashMap(); context2.put("activeContentId", activeContentId); //context2.put("dataResourceId", dataResourceId); context2.put("contentAssocTypeId", result.get("contentAssocTypeId")); @@ -228,7 +227,7 @@ public class LayoutEvents { LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher"); HttpSession session = request.getSession(); Locale locale = UtilHttp.getLocale(request); - Map context = FastMap.newInstance(); + Map context = new HashMap(); Map paramMap = UtilHttp.getParameterMap(request); Debug.logVerbose("in replaceSubContent, paramMap:" + paramMap, module); String dataResourceId = (String) paramMap.get("dataResourceId"); @@ -277,7 +276,7 @@ public class LayoutEvents { Map result = dispatcher.runSync("persistContentAndAssoc", context); //Debug.logVerbose("in replaceSubContent, result:" + result, module); request.setAttribute("contentId", contentIdTo); - Map context2 = FastMap.newInstance(); + Map context2 = new HashMap(); context2.put("activeContentId", contentId); //context2.put("dataResourceId", dataResourceId); context2.put("contentAssocTypeId", "SUB_CONTENT"); @@ -369,7 +368,7 @@ public class LayoutEvents { request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); return "error"; } - Map serviceIn = FastMap.newInstance(); + Map serviceIn = new HashMap(); Map results = null; serviceIn.put("fromDate", UtilDateTime.nowTimestamp()); serviceIn.put("contentId", contentId); @@ -389,14 +388,14 @@ public class LayoutEvents { return "error"; } - serviceIn = FastMap.newInstance(); + serviceIn = new HashMap(); serviceIn.put("userLogin", session.getAttribute("userLogin")); // Can't count on records being unique - Map beenThere = FastMap.newInstance(); + Map beenThere = new HashMap(); for (int i=0; i errorMessages = FastList.newInstance(); + List errorMessages = new LinkedList(); if (locale == null) { locale = Locale.getDefault(); } @@ -450,7 +449,7 @@ public class LayoutEvents { Debug.logVerbose("in createSubContent, contentIdTo:" + contentIdTo, module); Debug.logVerbose("in createSubContent, mapKey:" + mapKey, module); } - Map context = FastMap.newInstance(); + Map context = new HashMap(); List errorMessages = null; Locale loc = (Locale) request.getSession().getServletContext().getAttribute("locale"); if (loc == null) { @@ -497,7 +496,7 @@ public class LayoutEvents { request.setAttribute("contentId", contentId); request.setAttribute("drDataResourceId", dataResourceId); request.setAttribute("currentEntityName", "SubContentDataResourceId"); - Map context2 = FastMap.newInstance(); + Map context2 = new HashMap(); context2.put("activeContentId", contentId); //context2.put("dataResourceId", dataResourceId); context2.put("contentAssocTypeId", "SUB_CONTENT"); @@ -522,7 +521,7 @@ public class LayoutEvents { Map paramMap = UtilHttp.getParameterMap(request); // String contentIdTo = (String) paramMap.get("contentIdTo"); // String mapKey = (String) paramMap.get("mapKey"); - Map context = FastMap.newInstance(); + Map context = new HashMap(); List errorMessages = null; Locale loc = (Locale) request.getSession().getServletContext().getAttribute("locale"); if (loc == null) { @@ -563,7 +562,7 @@ public class LayoutEvents { request.setAttribute("drDataResourceId", dataResourceId); request.setAttribute("currentEntityName", "SubContentDataResourceId"); /* - Map context2 = FastMap.newInstance(); + Map context2 = new HashMap(); context2.put("activeContentId", contentId); //context2.put("dataResourceId", dataResourceId); context2.put("contentAssocTypeId", "SUB_CONTENT"); diff --git a/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java b/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java index b8810304a1..6ce9a1fa1b 100644 --- a/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java +++ b/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java @@ -20,14 +20,13 @@ package org.ofbiz.content.layout; import java.io.File; import java.nio.ByteBuffer; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastMap; - import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileUploadException; import org.apache.commons.fileupload.disk.DiskFileItemFactory; @@ -56,8 +55,8 @@ public class LayoutWorker { //Debug.logVerbose("in uploadAndStoreImage", ""); Locale locale = UtilHttp.getLocale(request); - Map results = FastMap.newInstance(); - Map formInput = FastMap.newInstance(); + Map results = new HashMap(); + Map formInput = new HashMap(); results.put("formInput", formInput); ServletFileUpload fu = new ServletFileUpload(new DiskFileItemFactory(10240, new File(new File("runtime"), "tmp"))); List lst = null; diff --git a/applications/content/src/org/ofbiz/content/output/OutputServices.java b/applications/content/src/org/ofbiz/content/output/OutputServices.java index f6755dd99b..47136e3b78 100644 --- a/applications/content/src/org/ofbiz/content/output/OutputServices.java +++ b/applications/content/src/org/ofbiz/content/output/OutputServices.java @@ -26,6 +26,7 @@ import java.io.InputStream; import java.io.StringReader; import java.io.StringWriter; import java.io.Writer; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -47,8 +48,6 @@ import javax.print.attribute.PrintServiceAttributeSet; import javax.print.attribute.standard.PrinterName; import javax.xml.transform.stream.StreamSource; -import javolution.util.FastMap; - import org.apache.fop.apps.Fop; import org.apache.fop.apps.MimeConstants; import org.ofbiz.base.util.Debug; @@ -87,7 +86,7 @@ public class OutputServices { String printerContentType = (String) serviceContext.remove("printerContentType"); if (UtilValidate.isEmpty(screenContext)) { - screenContext = FastMap.newInstance(); + screenContext = new HashMap(); } screenContext.put("locale", locale); if (UtilValidate.isEmpty(contentType)) { @@ -200,7 +199,7 @@ public class OutputServices { String fileName = (String) serviceContext.remove("fileName"); if (UtilValidate.isEmpty(screenContext)) { - screenContext = FastMap.newInstance(); + screenContext = new HashMap(); } screenContext.put("locale", locale); if (UtilValidate.isEmpty(contentType)) { diff --git a/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java b/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java index 00c54e7c7b..19f77287d7 100644 --- a/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java +++ b/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java @@ -26,14 +26,13 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.sql.Timestamp; import java.util.Date; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -308,7 +307,7 @@ public class PdfSurveyServices { /** */ public static Map getAcroFieldsFromPdf(DispatchContext dctx, Map context) { - Map acroFieldMap = FastMap.newInstance(); + Map acroFieldMap = new HashMap(); try { ByteArrayOutputStream os = new ByteArrayOutputStream(); Delegator delegator = dctx.getDelegator(); @@ -488,7 +487,7 @@ public class PdfSurveyServices { //LocalDispatcher dispatcher = dctx.getDispatcher(); Map results = ServiceUtil.returnSuccess(); String surveyResponseId = (String)context.get("surveyResponseId"); - List qAndA = FastList.newInstance(); + List qAndA = new LinkedList(); try { List responses = EntityQuery.use(delegator).from("SurveyResponseAnswer").where("surveyResponseId", surveyResponseId).queryList(); @@ -512,7 +511,7 @@ public class PdfSurveyServices { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Map results = ServiceUtil.returnSuccess(); - Map acroFieldMap = FastMap.newInstance(); + Map acroFieldMap = new HashMap(); String surveyResponseId = (String)context.get("surveyResponseId"); String acroFormContentId = null; diff --git a/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java b/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java index 032e7a6cf6..3d7f3d868e 100644 --- a/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java +++ b/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java @@ -25,14 +25,13 @@ import java.io.StringWriter; import java.io.Writer; import java.net.MalformedURLException; import java.net.URL; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.location.FlexibleLocation; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; @@ -101,7 +100,7 @@ public class SurveyWrapper { */ public void setPassThru(Map passThru) { if (passThru != null) { - this.passThru = FastMap.newInstance(); + this.passThru = new HashMap(); this.passThru.putAll(passThru); } } @@ -112,7 +111,7 @@ public class SurveyWrapper { */ public void setDefaultValues(Map defaultValues) { if (defaultValues != null) { - this.defaultValues = FastMap.newInstance(); + this.defaultValues = new HashMap(); this.defaultValues.putAll(defaultValues); } } @@ -124,7 +123,7 @@ public class SurveyWrapper { */ public void addToTemplateContext(String name, Object value) { if (templateContext == null) { - templateContext = FastMap.newInstance(); + templateContext = new HashMap(); } templateContext.put(name, value); } @@ -179,7 +178,7 @@ public class SurveyWrapper { currentAnswers = this.getResponseAnswers(null); } - Map sqaaWithColIdListByMultiRespId = FastMap.newInstance(); + Map sqaaWithColIdListByMultiRespId = new HashMap(); for (GenericValue surveyQuestionAndAppl : surveyQuestionAndAppls) { String surveyMultiRespColId = surveyQuestionAndAppl.getString("surveyMultiRespColId"); if (UtilValidate.isNotEmpty(surveyMultiRespColId)) { @@ -189,7 +188,7 @@ public class SurveyWrapper { } if (templateContext == null) { - templateContext = FastMap.newInstance(); + templateContext = new HashMap(); } templateContext.put("partyId", partyId); @@ -197,7 +196,7 @@ public class SurveyWrapper { templateContext.put("surveyResults", results); templateContext.put("surveyQuestionAndAppls", surveyQuestionAndAppls); templateContext.put("sqaaWithColIdListByMultiRespId", sqaaWithColIdListByMultiRespId); - templateContext.put("alreadyShownSqaaPkWithColId", FastSet.newInstance()); + templateContext.put("alreadyShownSqaaPkWithColId", new HashSet()); templateContext.put("surveyAnswers", currentAnswers); templateContext.put("surveyResponseId", responseId); templateContext.put("sequenceSort", UtilMisc.toList("sequenceNum")); @@ -283,7 +282,7 @@ public class SurveyWrapper { // returns a list of SurveyQuestions (in order by sequence number) for the current Survey public List getSurveyQuestionAndAppls() { - List questions = FastList.newInstance(); + List questions = new LinkedList(); try { questions = EntityQuery.use(delegator).from("SurveyQuestionAndAppl") @@ -355,7 +354,7 @@ public class SurveyWrapper { // returns a Map of answers keyed on SurveyQuestion ID from the most current SurveyResponse ID public Map getResponseAnswers(String responseId) throws SurveyWrapperException { - Map answerMap = FastMap.newInstance(); + Map answerMap = new HashMap(); if (responseId != null) { List answers = null; @@ -378,7 +377,7 @@ public class SurveyWrapper { if (key.toUpperCase().startsWith("ANSWERS_")) { int splitIndex = key.indexOf('_'); String questionId = key.substring(splitIndex+1); - Map thisAnswer = FastMap.newInstance(); + Map thisAnswer = new HashMap(); String answer = (String) passThru.remove(key); thisAnswer.put("booleanResponse", answer); thisAnswer.put("currencyResponse", answer); @@ -432,7 +431,7 @@ public class SurveyWrapper { } public Map getResults(List questions) throws SurveyWrapperException { - Map questionResults = FastMap.newInstance(); + Map questionResults = new HashMap(); if (questions != null) { for (GenericValue question : questions) { Map results = getResultInfo(question); @@ -446,7 +445,7 @@ public class SurveyWrapper { // returns a map of question reqsults public Map getResultInfo(GenericValue question) throws SurveyWrapperException { - Map resultMap = FastMap.newInstance(); + Map resultMap = new HashMap(); // special keys in the result: // "_q_type" - question type (SurveyQuestionTypeId) @@ -477,7 +476,7 @@ public class SurveyWrapper { // create the map of option info ("_total", "_percent") for (String optId : thisResult.keySet()) { - Map optMap = FastMap.newInstance(); + Map optMap = new HashMap(); Long optTotal = (Long) thisResult.get(optId); if (optTotal == null) { optTotal = Long.valueOf(0); @@ -671,7 +670,7 @@ public class SurveyWrapper { } private Map getOptionResult(GenericValue question) throws SurveyWrapperException { - Map result = FastMap.newInstance(); + Map result = new HashMap(); long total = 0; boolean beganTransaction = false; diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/CheckPermissionTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/CheckPermissionTransform.java index b03afe6852..59dc39f210 100644 --- a/applications/content/src/org/ofbiz/content/webapp/ftl/CheckPermissionTransform.java +++ b/applications/content/src/org/ofbiz/content/webapp/ftl/CheckPermissionTransform.java @@ -20,14 +20,13 @@ package org.ofbiz.content.webapp.ftl; import java.io.IOException; import java.io.Writer; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilGenerics; @@ -96,7 +95,7 @@ public class CheckPermissionTransform implements TemplateTransformModel { FreeMarkerWorker.overrideWithArgs(templateCtx, args); final String mode = (String)templateCtx.get("mode"); final String quickCheckContentId = (String)templateCtx.get("quickCheckContentId"); - final Map savedValues = FastMap.newInstance(); + final Map savedValues = new HashMap(); //Debug.logInfo("in CheckPermission, contentId(1):" + templateCtx.get("contentId"),""); //Debug.logInfo("in CheckPermission, subContentId(1):" + templateCtx.get("subContentId"),""); @@ -151,7 +150,7 @@ public class CheckPermissionTransform implements TemplateTransformModel { String passedStatusId = (String)templateCtx.get("statusId"); List statusList = StringUtil.split(passedStatusId, "|"); if (statusList == null) { - statusList = FastList.newInstance(); + statusList = new LinkedList(); } if (UtilValidate.isNotEmpty(statusId) && !statusList.contains(statusId)) { statusList.add(statusId); @@ -171,7 +170,7 @@ public class CheckPermissionTransform implements TemplateTransformModel { //Debug.logInfo("in CheckPermission, templateCtx:" + templateCtx,""); throw new IOException("targetOperationList has zero size."); } - List roleList = FastList.newInstance(); + List roleList = new LinkedList(); String privilegeEnumId = (String)currentContent.get("privilegeEnumId"); Map results = EntityPermissionChecker.checkPermission(currentContent, statusList, userLogin, purposeList, targetOperationList, roleList, delegator, security, entityOperation, privilegeEnumId, quickCheckContentId); diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java index b905df2235..c85403ac9b 100644 --- a/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java +++ b/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java @@ -20,14 +20,13 @@ package org.ofbiz.content.webapp.ftl; import java.io.IOException; import java.io.Writer; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilGenerics; @@ -127,7 +126,7 @@ public class EditRenderSubContentCacheTransform implements TemplateTransformMode templateCtx.put("dataResourceId", dataResourceId); templateCtx.put("subContentIdSub", subContentIdSub); templateCtx.put("subDataResourceTypeId", subDataResourceTypeId); - final Map savedValues = FastMap.newInstance(); + final Map savedValues = new HashMap(); FreeMarkerWorker.saveContextValues(templateCtx, saveKeyNames, savedValues); return new Writer(out) { diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java index 1c52528dee..7ef94b33f9 100644 --- a/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java +++ b/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java @@ -21,15 +21,14 @@ package org.ofbiz.content.webapp.ftl; import java.io.IOException; import java.io.Writer; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.StringUtil; @@ -94,9 +93,9 @@ public class LimitedSubContentCacheTransform implements TemplateTransformModel { final Delegator delegator = FreeMarkerWorker.getWrappedObject("delegator", env); final HttpServletRequest request = FreeMarkerWorker.getWrappedObject("request", env); FreeMarkerWorker.getSiteParameters(request, templateRoot); - final Map savedValuesUp = FastMap.newInstance(); + final Map savedValuesUp = new HashMap(); FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp); - final Map savedValues = FastMap.newInstance(); + final Map savedValues = new HashMap(); FreeMarkerWorker.overrideWithArgs(templateRoot, args); String contentAssocTypeId = (String) templateRoot.get("contentAssocTypeId"); @@ -105,7 +104,7 @@ public class LimitedSubContentCacheTransform implements TemplateTransformModel { templateRoot.put("contentAssocTypeId ", contentAssocTypeId); } - final Map pickedEntityIds = FastMap.newInstance(); + final Map pickedEntityIds = new HashMap(); List assocTypes = StringUtil.split(contentAssocTypeId, "|"); String contentPurposeTypeId = (String) templateRoot.get("contentPurposeTypeId"); @@ -117,7 +116,7 @@ public class LimitedSubContentCacheTransform implements TemplateTransformModel { templateRoot.put("locale", locale); } - Map whenMap = FastMap.newInstance(); + Map whenMap = new HashMap(); whenMap.put("followWhen", templateRoot.get("followWhen")); whenMap.put("pickWhen", templateRoot.get("pickWhen")); whenMap.put("returnBeforePickWhen", templateRoot.get("returnBeforePickWhen")); @@ -266,7 +265,7 @@ public class LimitedSubContentCacheTransform implements TemplateTransformModel { isPickObj.booleanValue()) || (isFollowObj != null && isFollowObj.booleanValue()))) { List> globalNodeTrail = UtilGenerics.checkList(ctx.get("globalNodeTrail")); if (globalNodeTrail == null) { - globalNodeTrail = FastList.newInstance(); + globalNodeTrail = new LinkedList>(); } globalNodeTrail.add(trailNode); ctx.put("globalNodeTrail", globalNodeTrail); diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAndSubContent.java b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAndSubContent.java index 6e75d77da3..574d58cfc7 100644 --- a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAndSubContent.java +++ b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAndSubContent.java @@ -61,11 +61,11 @@ public class RenderContentAndSubContent implements TemplateTransformModel { ((MapStack)templateRoot).push(envMap); if (Debug.verboseOn()) Debug.logVerbose("in RenderContentAndSubContent, contentId(0):" + templateRoot.get("contentId"), module); FreeMarkerWorker.getSiteParameters(request, templateRoot); - // final Map savedValuesUp = FastMap.newInstance(); + // final Map savedValuesUp = new HashMap(); // FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp); FreeMarkerWorker.overrideWithArgs(templateRoot, args); - // final Map savedValues = FastMap.newInstance(); + // final Map savedValues = new HashMap(); return new Writer(out) { diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java index bf1c375b9b..8348e68fa3 100644 --- a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java +++ b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java @@ -20,6 +20,7 @@ package org.ofbiz.content.webapp.ftl; import java.io.IOException; import java.io.Writer; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -28,8 +29,6 @@ import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilFormatOut; @@ -61,7 +60,7 @@ public class RenderContentAsText implements TemplateTransformModel { public Writer getWriter(final Writer out, Map args) { final Environment env = Environment.getCurrentEnvironment(); //final Map templateCtx = FreeMarkerWorker.getWrappedObject("context", env); - //final Map templateCtx = FastMap.newInstance(); + //final Map templateCtx = new HashMap(); final LocalDispatcher dispatcher = FreeMarkerWorker.getWrappedObject("dispatcher", env); final Delegator delegator = FreeMarkerWorker.getWrappedObject("delegator", env); final HttpServletRequest request = FreeMarkerWorker.getWrappedObject("request", env); @@ -71,7 +70,7 @@ public class RenderContentAsText implements TemplateTransformModel { Debug.logVerbose("in RenderSubContent, contentId(0):" + templateRoot.get("contentId"), module); } FreeMarkerWorker.getSiteParameters(request, templateRoot); - final Map savedValuesUp = FastMap.newInstance(); + final Map savedValuesUp = new HashMap(); FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp); FreeMarkerWorker.overrideWithArgs(templateRoot, args); if (Debug.verboseOn()) { @@ -130,7 +129,7 @@ public class RenderContentAsText implements TemplateTransformModel { templateRoot.put("subDataResourceTypeId", subDataResourceTypeId); */ - final Map savedValues = FastMap.newInstance(); + final Map savedValues = new HashMap(); return new Writer(out) { diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java index f526413172..35f094538f 100644 --- a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java +++ b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java @@ -20,14 +20,13 @@ package org.ofbiz.content.webapp.ftl; import java.io.IOException; import java.io.Writer; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilFormatOut; @@ -58,7 +57,7 @@ public class RenderSubContentAsText implements TemplateTransformModel { public Writer getWriter(final Writer out, Map args) { final Environment env = Environment.getCurrentEnvironment(); // final Map templateCtx = FreeMarkerWorker.getWrappedObject("context", env); - // final Map templateCtx = FastMap.newInstance(); + // final Map templateCtx = new HashMap(); final LocalDispatcher dispatcher = FreeMarkerWorker.getWrappedObject("dispatcher", env); final Delegator delegator = FreeMarkerWorker.getWrappedObject("delegator", env); final HttpServletRequest request = FreeMarkerWorker.getWrappedObject("request", env); @@ -68,7 +67,7 @@ public class RenderSubContentAsText implements TemplateTransformModel { Debug.logInfo("in RenderSubContent, contentId(0):" + templateRoot.get("contentId"), module); } FreeMarkerWorker.getSiteParameters(request, templateRoot); - final Map savedValuesUp = FastMap.newInstance(); + final Map savedValuesUp = new HashMap(); FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp); FreeMarkerWorker.overrideWithArgs(templateRoot, args); if (Debug.infoOn()) { @@ -129,7 +128,7 @@ public class RenderSubContentAsText implements TemplateTransformModel { templateRoot.put("subDataResourceTypeId", subDataResourceTypeId); */ - final Map savedValues = FastMap.newInstance(); + final Map savedValues = new HashMap(); return new Writer(out) { diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java index 5bc5558ceb..84b83a9c8d 100644 --- a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java +++ b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java @@ -20,6 +20,7 @@ package org.ofbiz.content.webapp.ftl; import java.io.IOException; import java.io.Writer; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -28,8 +29,6 @@ import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilGenerics; @@ -61,7 +60,7 @@ public class RenderSubContentCacheTransform implements TemplateTransformModel { // final StringBuilder buf = new StringBuilder(); final Environment env = Environment.getCurrentEnvironment(); //final Map templateCtx = FreeMarkerWorker.getWrappedObject("context", env); - //final Map templateCtx = FastMap.newInstance(); + //final Map templateCtx = new HashMap(); final LocalDispatcher dispatcher = FreeMarkerWorker.getWrappedObject("dispatcher", env); final Delegator delegator = FreeMarkerWorker.getWrappedObject("delegator", env); final HttpServletRequest request = FreeMarkerWorker.getWrappedObject("request", env); @@ -69,7 +68,7 @@ public class RenderSubContentCacheTransform implements TemplateTransformModel { final Map templateRoot = FreeMarkerWorker.createEnvironmentMap(env); //if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, contentId(0):" + templateRoot.get("contentId"), module); FreeMarkerWorker.getSiteParameters(request, templateRoot); - final Map savedValuesUp = FastMap.newInstance(); + final Map savedValuesUp = new HashMap(); FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp); FreeMarkerWorker.overrideWithArgs(templateRoot, args); //if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, contentId(2):" + templateRoot.get("contentId"), module); @@ -120,7 +119,7 @@ public class RenderSubContentCacheTransform implements TemplateTransformModel { templateRoot.put("subContentId", subContentIdSub); templateRoot.put("subDataResourceTypeId", subDataResourceTypeId); - //final Map savedValues = FastMap.newInstance(); + //final Map savedValues = new HashMap(); //FreeMarkerWorker.saveContextValues(templateCtx, saveKeyNames, savedValues); return new Writer(out) { diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java index a368fad587..bdc1600698 100644 --- a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java +++ b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java @@ -21,6 +21,7 @@ package org.ofbiz.content.webapp.ftl; import java.io.IOException; import java.io.Writer; import java.sql.Timestamp; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -28,8 +29,6 @@ import java.util.Map; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -79,7 +78,7 @@ public class RenderSubContentTransform implements TemplateTransformModel { final Environment env = Environment.getCurrentEnvironment(); Map ctx = FreeMarkerWorker.getWrappedObject("context", env); if (ctx == null) { - ctx = FastMap.newInstance(); + ctx = new HashMap(); } final String mapKey = FreeMarkerWorker.getArg(args, "mapKey", ctx); final String subContentId = FreeMarkerWorker.getArg(args, "subContentId", ctx); diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java index 6c76fa1838..6e2e654b12 100644 --- a/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java +++ b/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java @@ -21,14 +21,13 @@ package org.ofbiz.content.webapp.ftl; import java.io.IOException; import java.io.Writer; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilGenerics; @@ -86,9 +85,9 @@ public class TraverseSubContentCacheTransform implements TemplateTransformModel //final Map templateRoot = FreeMarkerWorker.getWrappedObject("context", env); final Map templateRoot = FreeMarkerWorker.createEnvironmentMap(env); //FreeMarkerWorker.convertContext(templateRoot); - final Map savedValuesUp = FastMap.newInstance(); + final Map savedValuesUp = new HashMap(); FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp); - final Map savedValues = FastMap.newInstance(); + final Map savedValues = new HashMap(); FreeMarkerWorker.overrideWithArgs(templateRoot, args); String startContentAssocTypeId = (String)templateRoot.get("contentAssocTypeId"); // if (Debug.infoOn()) Debug.logInfo("in TraverseSubContentCache, startContentAssocTypeId:" + startContentAssocTypeId, module); @@ -114,9 +113,9 @@ public class TraverseSubContentCacheTransform implements TemplateTransformModel // final GenericValue view = val; - final Map traverseContext = FastMap.newInstance(); + final Map traverseContext = new HashMap(); traverseContext.put("delegator", delegator); - Map whenMap = FastMap.newInstance(); + Map whenMap = new HashMap(); whenMap.put("followWhen", templateRoot.get("followWhen")); whenMap.put("pickWhen", templateRoot.get("pickWhen")); whenMap.put("returnBeforePickWhen", templateRoot.get("returnBeforePickWhen")); @@ -170,7 +169,7 @@ public class TraverseSubContentCacheTransform implements TemplateTransformModel // if (Debug.infoOn()) Debug.logInfo("in TraverseSubContentCache, onStart, trailCsv(1):" + trailCsv , module); if (globalNodeTrail.size() > 0) { int sz = globalNodeTrail.size() ; - nodeTrail = FastList.newInstance(); + nodeTrail = new LinkedList>(); //nodeTrail = passedGlobalNodeTrail.subList(sz - 1, sz); node = UtilGenerics.checkMap(globalNodeTrail.get(sz - 1)); //if (Debug.infoOn()) Debug.logInfo("in TraverseSubContentCache, onStart, node(1):" + node , module); @@ -265,7 +264,7 @@ public class TraverseSubContentCacheTransform implements TemplateTransformModel Map ndStart = nodeTrail.get(0); contentIdStart = (String)ndStart.get("contentId"); } else { - globalNodeTrail = FastList.newInstance(); + globalNodeTrail = new LinkedList>(); } //if (Debug.infoOn()) Debug.logInfo("in TraverseSubContentCache, populateContext, contentIdEnd(1):" + contentIdEnd + " contentIdStart:" + contentIdStart + " equals:" + (contentIdStart.equals(contentIdEnd)), module); boolean bIdEnd = UtilValidate.isNotEmpty(contentIdEnd); diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java index 457a01ae45..0d070c1901 100644 --- a/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java +++ b/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java @@ -21,13 +21,12 @@ package org.ofbiz.content.webapp.ftl; import java.io.IOException; import java.io.Writer; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -133,9 +132,9 @@ public class TraverseSubContentTransform implements TemplateTransformModel { } final GenericValue subContentDataResourceView = view; - final Map traverseContext = FastMap.newInstance(); + final Map traverseContext = new HashMap(); traverseContext.put("delegator", delegator); - Map whenMap = FastMap.newInstance(); + Map whenMap = new HashMap(); whenMap.put("followWhen", templateCtx.get("followWhen")); whenMap.put("pickWhen", templateCtx.get("pickWhen")); whenMap.put("returnBeforePickWhen", templateCtx.get("returnBeforePickWhen")); @@ -180,7 +179,7 @@ public class TraverseSubContentTransform implements TemplateTransformModel { @Override public int onStart() throws TemplateModelException, IOException { //templateContext.put("buf", new StringBuilder()); - List> nodeTrail = FastList.newInstance(); + List> nodeTrail = new LinkedList>(); traverseContext.put("nodeTrail", nodeTrail); // GenericValue content = null; /* @@ -287,7 +286,7 @@ public class TraverseSubContentTransform implements TemplateTransformModel { private boolean checkWhen (GenericValue thisContent, String contentAssocTypeId) { boolean isPick = false; - Map assocContext = FastMap.newInstance(); + Map assocContext = new HashMap(); if (UtilValidate.isEmpty(contentAssocTypeId)) { contentAssocTypeId = ""; } @@ -309,7 +308,7 @@ public class TraverseSubContentTransform implements TemplateTransformModel { assocContext.put("content", thisContent); List purposes = ContentWorker.getPurposes(thisContent); assocContext.put("purposes", purposes); - List contentTypeAncestry = FastList.newInstance(); + List contentTypeAncestry = new LinkedList(); String contentTypeId = (String)thisContent.get("contentTypeId"); try { ContentWorker.getContentTypeAncestry(delegator, contentTypeId, contentTypeAncestry); diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java index 3405827c3f..045643877c 100644 --- a/applications/content/src/org/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java +++ b/applications/content/src/org/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java @@ -20,14 +20,13 @@ package org.ofbiz.content.webapp.ftl; import java.io.IOException; import java.io.Writer; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilGenerics; @@ -94,7 +93,7 @@ public class WrapSubContentCacheTransform implements TemplateTransformModel { final Delegator delegator = FreeMarkerWorker.getWrappedObject("delegator", env); final HttpServletRequest request = FreeMarkerWorker.getWrappedObject("request", env); FreeMarkerWorker.getSiteParameters(request, templateCtx); - final Map savedValuesUp = FastMap.newInstance(); + final Map savedValuesUp = new HashMap(); FreeMarkerWorker.saveContextValues(templateCtx, upSaveKeyNames, savedValuesUp); //if (Debug.infoOn()) Debug.logInfo("in Wrap(0a), savedValuesUp ." + savedValuesUp , module); FreeMarkerWorker.overrideWithArgs(templateCtx, args); @@ -135,7 +134,7 @@ public class WrapSubContentCacheTransform implements TemplateTransformModel { // the parent context. But it will already have one and it is the same context that is // being passed. } - final Map savedValues = FastMap.newInstance(); + final Map savedValues = new HashMap(); FreeMarkerWorker.saveContextValues(templateCtx, saveKeyNames, savedValues); //if (Debug.infoOn()) Debug.logInfo("in Wrap(1), savedValues ." + savedValues , module); // This order is taken so that the mimeType can be overridden in the transform arguments. diff --git a/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java b/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java index ae067901ff..5d08842007 100644 --- a/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java +++ b/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java @@ -19,14 +19,13 @@ package org.ofbiz.humanres; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; @@ -82,10 +81,10 @@ public class HumanResEvents { title = memGroupCtx.getString("groupName"); } - Map josonMap = FastMap.newInstance(); - Map dataMap = FastMap.newInstance(); - Map dataAttrMap = FastMap.newInstance(); - Map attrMap = FastMap.newInstance(); + Map josonMap = new HashMap(); + Map dataMap = new HashMap(); + Map dataAttrMap = new HashMap(); + Map attrMap = new HashMap(); dataAttrMap.put("onClick", onclickFunction + "('" + memberId + additionParam + "')"); @@ -124,10 +123,10 @@ public class HumanResEvents { String catNameField = null; String title = null; - Map josonMap = FastMap.newInstance(); - Map dataMap = FastMap.newInstance(); - Map dataAttrMap = FastMap.newInstance(); - Map attrMap = FastMap.newInstance(); + Map josonMap = new HashMap(); + Map dataMap = new HashMap(); + Map dataAttrMap = new HashMap(); + Map attrMap = new HashMap(); catId = childOfCom.get("partyIdTo"); @@ -198,10 +197,10 @@ public class HumanResEvents { if (UtilValidate.isNotEmpty(isEmpls)) { for (GenericValue childOfEmpl : isEmpls ) { - Map emplMap = FastMap.newInstance(); - Map emplAttrMap = FastMap.newInstance(); - Map empldataMap = FastMap.newInstance(); - Map emplDataAttrMap = FastMap.newInstance(); + Map emplMap = new HashMap(); + Map emplAttrMap = new HashMap(); + Map empldataMap = new HashMap(); + Map emplDataAttrMap = new HashMap(); String emplId = (String) childOfEmpl.get("emplPositionId"); String typeId = (String) childOfEmpl.get("emplPositionTypeId"); diff --git a/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy b/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy index f893074161..4f1f3f166d 100644 --- a/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy +++ b/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy @@ -26,9 +26,6 @@ import org.ofbiz.base.util.*; import org.ofbiz.party.party.PartyHelper; import org.ofbiz.product.catalog.*; import org.ofbiz.product.category.*; -import javolution.util.FastMap; -import javolution.util.FastList; -import javolution.util.FastList.*; import org.ofbiz.entity.*; import java.util.List; @@ -36,17 +33,17 @@ import java.util.List; // The separateRootType function will return the list of category of given catalog. // PLEASE NOTE : The structure of the list of separateRootType function is according to the JSON_DATA plugin of the jsTree. -completedTree = FastList.newInstance(); -completedTreeContext = FastList.newInstance(); -existParties = FastList.newInstance(); -subtopLists = FastList.newInstance(); +completedTree = []; +completedTreeContext = []; +existParties = []; +subtopLists = []; //internalOrg list partyRelationships = from("PartyRelationship").where("partyIdFrom", partyId, "partyRelationshipTypeId", "GROUP_ROLLUP").filterByDate().queryList(); if (partyRelationships) { //root partyRoot = from("PartyGroup").where("partyId", partyId).queryOne(); - partyRootMap = FastMap.newInstance(); + partyRootMap = []; partyRootMap.put("partyId", partyId); partyRootMap.put("groupName", partyRoot.getString("groupName")); @@ -62,8 +59,8 @@ if (partyRelationships) { partyRootMap.put("child", completedTreeContext); completedTree.add(partyRootMap); - } + // The complete tree list for the category tree context.completedTree = completedTree; context.subtopLists = subtopLists; diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java b/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java index 871bd882e4..ff5da0c54b 100644 --- a/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java +++ b/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java @@ -22,12 +22,11 @@ package org.ofbiz.manufacturing.bom; import java.math.BigDecimal; import java.sql.Timestamp; import java.util.Date; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilGenerics; @@ -73,8 +72,8 @@ public class BOMNode { this.delegator = product.getDelegator(); this.dispatcher = dispatcher; this.userLogin = userLogin; - children = FastList.newInstance(); - childrenNodes = FastList.newInstance(); + children = new LinkedList(); + childrenNodes = new LinkedList(); parentNode = null; productForRules = null; bomTypeId = null; @@ -111,9 +110,9 @@ public class BOMNode { .orderBy("sequenceNum") .filterByDate(inDate).queryList(); } - children = FastList.newInstance(); + children = new LinkedList(); children.addAll(rows); - childrenNodes = FastList.newInstance(); + childrenNodes = new LinkedList(); BOMNode oneChildNode = null; for (GenericValue oneChild : children) { // Configurator @@ -272,7 +271,7 @@ public class BOMNode { // ----------------------------------------------------------- // We try to apply directly the selected features if (newNode.equals(oneChildNode)) { - Map selectedFeatures = FastMap.newInstance(); + Map selectedFeatures = new HashMap(); if (productFeatures != null) { GenericValue feature = null; for (int j = 0; j < productFeatures.size(); j++) { @@ -282,7 +281,7 @@ public class BOMNode { } if (selectedFeatures.size() > 0) { - Map context = FastMap.newInstance(); + Map context = new HashMap(); context.put("productId", node.get("productIdTo")); context.put("selectedFeatures", selectedFeatures); Map storeResult = null; @@ -338,9 +337,9 @@ public class BOMNode { .orderBy("sequenceNum") .filterByDate(inDate).queryList(); } - children = FastList.newInstance(); + children = new LinkedList(); children.addAll(rows); - childrenNodes = FastList.newInstance(); + childrenNodes = new LinkedList(); BOMNode oneChildNode = null; for (GenericValue oneChild : children) { @@ -506,7 +505,7 @@ public class BOMNode { Timestamp endDate = null; if (isManufactured(ignoreSupplierProducts)) { BOMNode oneChildNode = null; - List childProductionRuns = FastList.newInstance(); + List childProductionRuns = new LinkedList(); Timestamp maxEndDate = null; for (int i = 0; i < childrenNodes.size(); i++) { oneChildNode = childrenNodes.get(i); @@ -528,7 +527,7 @@ public class BOMNode { } Timestamp startDate = UtilDateTime.toTimestamp(UtilDateTime.toDateTimeString(date)); - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); if (!useSubstitute) { serviceContext.put("productId", getProduct().getString("productId")); serviceContext.put("facilityId", getProduct().getString("facilityId")); diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java b/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java index 680f593988..15d63abe5f 100644 --- a/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java +++ b/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java @@ -22,13 +22,12 @@ package org.ofbiz.manufacturing.bom; import java.math.BigDecimal; import java.sql.Timestamp; import java.util.Date; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilMisc; @@ -62,7 +61,7 @@ public class BOMServices { * @return returns the product's low level code (llc) i.e. the maximum depth */ public static Map getMaxDepth(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); String productId = (String) context.get("productId"); String fromDateStr = (String) context.get("fromDate"); @@ -79,7 +78,7 @@ public class BOMServices { if (fromDate == null) { fromDate = new Date(); } - List bomTypes = FastList.newInstance(); + List bomTypes = new LinkedList(); if (bomType == null) { try { List bomTypesValues = EntityQuery.use(delegator).from("ProductAssocType") @@ -120,7 +119,7 @@ public class BOMServices { * @return the results of the updates the product's low level code */ public static Map updateLowLevelCode(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); String productId = (String) context.get("productIdTo"); @@ -167,7 +166,7 @@ public class BOMServices { if (alsoComponents.booleanValue()) { Map treeResult = dispatcher.runSync("getBOMTree", UtilMisc.toMap("productId", productId, "bomType", "MANUF_COMPONENT")); BOMTree tree = (BOMTree)treeResult.get("tree"); - List products = FastList.newInstance(); + List products = new LinkedList(); tree.print(products, llc.intValue()); for (int i = 0; i < products.size(); i++) { BOMNode oneNode = products.get(i); @@ -207,7 +206,7 @@ public class BOMServices { * @return the results of the updates the product's low level code */ public static Map initLowLevelCode(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -215,7 +214,7 @@ public class BOMServices { try { List products = EntityQuery.use(delegator).from("Product").orderBy("isVirtual DESC").queryList(); Long zero = Long.valueOf(0); - List allProducts = FastList.newInstance(); + List allProducts = new LinkedList(); for (GenericValue product : products) { product.set("billOfMaterialLevel", zero); allProducts.add(product); @@ -247,7 +246,7 @@ public class BOMServices { * @return returns the ProductAssoc generic value for a duplicate productIdKey ancestor if present */ public static Map searchDuplicatedAncestor(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue)context.get("userLogin"); @@ -280,7 +279,7 @@ public class BOMServices { * @return return the bill of material tree */ public static Map getBOMTree(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue)context.get("userLogin"); @@ -331,7 +330,7 @@ public class BOMServices { * @return return the list of manufacturing components */ public static Map getManufacturingComponents(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue)context.get("userLogin"); @@ -367,7 +366,7 @@ public class BOMServices { // Components // BOMTree tree = null; - List components = FastList.newInstance(); + List components = new LinkedList(); try { tree = new BOMTree(productId, "MANUF_COMPONENT", fromDate, BOMTree.EXPLOSION_SINGLE_LEVEL, delegator, dispatcher, userLogin); tree.setRootQuantity(quantity); @@ -403,9 +402,9 @@ public class BOMServices { result.put("components", components); // also return a componentMap (useful in scripts and simple language code) - List> componentsMap = FastList.newInstance(); + List> componentsMap = new LinkedList>(); for (BOMNode node : components) { - Map componentMap = FastMap.newInstance(); + Map componentMap = new HashMap(); componentMap.put("product", node.getProduct()); componentMap.put("quantity", node.getQuantity()); componentsMap.add(componentMap); @@ -415,7 +414,7 @@ public class BOMServices { } public static Map getNotAssembledComponents(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); String productId = (String) context.get("productId"); @@ -444,8 +443,8 @@ public class BOMServices { } BOMTree tree = null; - List components = FastList.newInstance(); - List notAssembledComponents = FastList.newInstance(); + List components = new LinkedList(); + List notAssembledComponents = new LinkedList(); try { tree = new BOMTree(productId, "MANUF_COMPONENT", fromDate, BOMTree.EXPLOSION_MANUFACTURING, delegator, dispatcher, userLogin); tree.setRootQuantity(quantity); @@ -467,7 +466,7 @@ public class BOMServices { // Service for the Product (Shipment) component // public static Map createShipmentPackages(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -489,8 +488,8 @@ public class BOMServices { } catch (GenericEntityException gee) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingBomErrorLoadingShipmentItems", locale)); } - Map orderReadHelpers = FastMap.newInstance(); - Map partyOrderShipments = FastMap.newInstance(); + Map orderReadHelpers = new HashMap(); + Map partyOrderShipments = new HashMap(); for (GenericValue shipmentItem : shipmentItems) { // Get the OrderShipments GenericValue orderShipment = null; @@ -511,7 +510,7 @@ public class BOMServices { String partyId = (orderReadHelper.getPlacingParty() != null? orderReadHelper.getPlacingParty().getString("partyId"): null); // FIXME: is it the customer? if (partyId != null) { if (!partyOrderShipments.containsKey(partyId)) { - List> orderShipmentReadMapList = FastList.newInstance(); + List> orderShipmentReadMapList = new LinkedList>(); partyOrderShipments.put(partyId, orderShipmentReadMapList); } List> orderShipmentReadMapList = UtilGenerics.checkList(partyOrderShipments.get(partyId)); @@ -529,7 +528,7 @@ public class BOMServices { OrderReadHelper orderReadHelper = (OrderReadHelper)orderShipmentReadMap.get("orderReadHelper"); GenericValue orderItem = orderReadHelper.getOrderItem(orderShipment.getString("orderItemSeqId")); // getProductsInPackages - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.put("productId", orderItem.getString("productId")); serviceContext.put("quantity", orderShipment.getBigDecimal("quantity")); Map resultService = null; @@ -556,9 +555,9 @@ public class BOMServices { } // Group together products and components // of the same box type. - Map boxTypes = FastMap.newInstance(); + Map boxTypes = new HashMap(); for (Map.Entry partyOrderShipment : partyOrderShipments.entrySet()) { - Map>> boxTypeContent = FastMap.newInstance(); + Map>> boxTypeContent = new HashMap>>(); List> orderShipmentReadMapList = UtilGenerics.checkList(partyOrderShipment.getValue()); for (int i = 0; i < orderShipmentReadMapList.size(); i++) { Map orderShipmentReadMap = UtilGenerics.checkMap(orderShipmentReadMapList.get(i)); @@ -570,7 +569,7 @@ public class BOMServices { // this is a multi package shipment item for (int j = 0; j < productsInPackages.size(); j++) { BOMNode component = productsInPackages.get(j); - Map boxTypeContentMap = FastMap.newInstance(); + Map boxTypeContentMap = new HashMap(); boxTypeContentMap.put("content", orderShipmentReadMap); boxTypeContentMap.put("componentIndex", Integer.valueOf(j)); GenericValue product = component.getProduct(); @@ -584,7 +583,7 @@ public class BOMServices { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingPackageConfiguratorError", locale)); } boxTypes.put(boxTypeId, boxType); - List> box = FastList.newInstance(); + List> box = new LinkedList>(); boxTypeContent.put(boxTypeId, box); } List> boxTypeContentList = UtilGenerics.checkList(boxTypeContent.get(boxTypeId)); @@ -594,7 +593,7 @@ public class BOMServices { } else { // no subcomponents, the product has its own package: // this is a single package shipment item - Map boxTypeContentMap = FastMap.newInstance(); + Map boxTypeContentMap = new HashMap(); boxTypeContentMap.put("content", orderShipmentReadMap); GenericValue orderItem = orderReadHelper.getOrderItem(orderShipment.getString("orderItemSeqId")); GenericValue product = null; @@ -614,7 +613,7 @@ public class BOMServices { } boxTypes.put(boxTypeId, boxType); - List> box = FastList.newInstance(); + List> box = new LinkedList>(); boxTypeContent.put(boxTypeId, box); } List> boxTypeContentList = UtilGenerics.checkList(boxTypeContent.get(boxTypeId)); @@ -733,7 +732,7 @@ public class BOMServices { * @return returns the list of products in packages */ public static Map getProductsInPackages(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue)context.get("userLogin"); @@ -760,7 +759,7 @@ public class BOMServices { // Components // BOMTree tree = null; - List components = FastList.newInstance(); + List components = new LinkedList(); try { tree = new BOMTree(productId, "MANUF_COMPONENT", fromDate, BOMTree.EXPLOSION_MANUFACTURING, delegator, dispatcher, userLogin); tree.setRootQuantity(quantity); diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMTree.java b/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMTree.java index 216362e46e..d93a24dd2f 100644 --- a/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMTree.java +++ b/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMTree.java @@ -21,11 +21,10 @@ package org.ofbiz.manufacturing.bom; import java.math.BigDecimal; import java.util.Date; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import javolution.util.FastList; - import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; @@ -106,7 +105,7 @@ public class BOMTree { .where("productId", productId, "productFeatureApplTypeId", "STANDARD_FEATURE") .queryList(); - List productFeatures = FastList.newInstance(); + List productFeatures = new LinkedList(); GenericValue oneProductFeatureAppl = null; for (int i = 0; i < productFeaturesAppl.size(); i++) { oneProductFeatureAppl = productFeaturesAppl.get(i); @@ -184,7 +183,7 @@ public class BOMTree { * */ public boolean isConfigured() { - List notConfiguredParts = FastList.newInstance(); + List notConfiguredParts = new LinkedList(); root.isConfigured(notConfiguredParts); return (notConfiguredParts.size() == 0); } @@ -301,8 +300,8 @@ public class BOMTree { * @return List containing all the tree's productId. */ public List getAllProductsId() { - List nodeArr = FastList.newInstance(); - List productsId = FastList.newInstance(); + List nodeArr = new LinkedList(); + List productsId = new LinkedList(); print(nodeArr); for (int i = 0; i < nodeArr.size(); i++) { productsId.add((nodeArr.get(i)).getProduct().getString("productId")); diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java b/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java index ae05d5e19e..544930baa7 100644 --- a/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java +++ b/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java @@ -22,11 +22,10 @@ package org.ofbiz.manufacturing.jobshopmgt; import java.math.BigDecimal; import java.sql.Timestamp; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; @@ -329,7 +328,7 @@ public class ProductionRun { if (productionRunRoutingTasks == null) this.getProductionRunRoutingTasks(); if (productionRunRoutingTasks != null) { try { - productionRunComponents = FastList.newInstance(); + productionRunComponents = new LinkedList(); GenericValue routingTask; for (Iterator iter = productionRunRoutingTasks.iterator(); iter.hasNext();) { routingTask = iter.next(); diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java b/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java index 239e8cf4b3..df3921e62e 100644 --- a/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java +++ b/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java @@ -21,14 +21,13 @@ package org.ofbiz.manufacturing.jobshopmgt; import java.math.BigDecimal; import java.sql.Timestamp; import java.util.Collection; +import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilMisc; @@ -62,7 +61,7 @@ public class ProductionRunEvents { } Collection> componentRows = UtilHttp.parseMultiFormData(parameters); - Map componentsLocationMap = FastMap.newInstance(); + Map componentsLocationMap = new HashMap(); for (MapcomponentRow : componentRows) { Timestamp fromDate = null; try { diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java b/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java index 90e2ced8fe..9fd5259821 100644 --- a/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java +++ b/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java @@ -18,11 +18,10 @@ *******************************************************************************/ package org.ofbiz.manufacturing.jobshopmgt; +import java.util.HashMap; import java.util.List; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; @@ -54,7 +53,7 @@ public class ProductionRunHelper { *
  • the productionRunProduct */ public static Map getProductionRun(Delegator delegator, String productionRunId) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); try { if (productionRunId != null) { diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java b/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java index a73f730889..244a9307bd 100644 --- a/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java +++ b/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java @@ -21,16 +21,15 @@ package org.ofbiz.manufacturing.jobshopmgt; import java.math.BigDecimal; import java.sql.Timestamp; import java.util.Date; +import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilGenerics; @@ -89,7 +88,7 @@ public class ProductionRunServices { * @return Map with the result of the service, the output parameters. */ public static Map cancelProductionRun(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -107,7 +106,7 @@ public class ProductionRunServices { if (currentStatusId.equals("PRUN_CREATED") || currentStatusId.equals("PRUN_DOC_PRINTED") || currentStatusId.equals("PRUN_SCHEDULED")) { try { // First of all, make sure that there aren't production runs that depend on this one. - List mandatoryWorkEfforts = FastList.newInstance(); + List mandatoryWorkEfforts = new LinkedList(); ProductionRunHelper.getLinkedProductionRuns(delegator, dispatcher, productionRunId, mandatoryWorkEfforts); for (int i = 1; i < mandatoryWorkEfforts.size(); i++) { GenericValue mandatoryWorkEffort = (mandatoryWorkEfforts.get(i)).getGenericValue(); @@ -115,7 +114,7 @@ public class ProductionRunServices { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunStatusNotChangedMandatoryProductionRunFound", locale)); } } - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); // change the production run (header) status to PRUN_CANCELLED serviceContext.put("workEffortId", productionRunId); serviceContext.put("currentStatusId", "PRUN_CANCELLED"); @@ -182,7 +181,7 @@ public class ProductionRunServices { * @return Map with the result of the service, the output parameters. */ public static Map createProductionRun(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -246,7 +245,7 @@ public class ProductionRunServices { // The components are retrieved using the getManufacturingComponents service // (that performs a bom breakdown and if needed runs the configurator). List components = null; - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.put("productId", productId); // the product that we want to manufacture serviceContext.put("quantity", pRQuantity); // the quantity that we want to manufacture serviceContext.put("userLogin", userLogin); @@ -556,7 +555,7 @@ public class ProductionRunServices { } public static Map changeProductionRunStatus(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -580,7 +579,7 @@ public class ProductionRunServices { // PRUN_CREATED --> PRUN_SCHEDULED if ("PRUN_CREATED".equals(currentStatusId) && "PRUN_SCHEDULED".equals(statusId)) { // change the production run status to PRUN_SCHEDULED - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.clear(); serviceContext.put("workEffortId", productionRunId); serviceContext.put("currentStatusId", statusId); @@ -612,7 +611,7 @@ public class ProductionRunServices { // PRUN_CREATED or PRUN_SCHEDULED --> PRUN_DOC_PRINTED if ((currentStatusId.equals("PRUN_CREATED") || currentStatusId.equals("PRUN_SCHEDULED")) && (statusId == null || statusId.equals("PRUN_DOC_PRINTED"))) { // change only the production run (header) status to PRUN_DOC_PRINTED - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.clear(); serviceContext.put("workEffortId", productionRunId); serviceContext.put("currentStatusId", "PRUN_DOC_PRINTED"); @@ -664,7 +663,7 @@ public class ProductionRunServices { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunStatusNotChanged", locale)); } - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.clear(); serviceContext.put("workEffortId", productionRunId); serviceContext.put("currentStatusId", "PRUN_RUNNING"); @@ -685,7 +684,7 @@ public class ProductionRunServices { // this should be called only when the last task is completed if (currentStatusId.equals("PRUN_RUNNING") && (statusId == null || statusId.equals("PRUN_COMPLETED"))) { // change only the production run (header) status to PRUN_COMPLETED - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.clear(); serviceContext.put("workEffortId", productionRunId); serviceContext.put("currentStatusId", "PRUN_COMPLETED"); @@ -705,7 +704,7 @@ public class ProductionRunServices { // PRUN_COMPLETED --> PRUN_CLOSED if (currentStatusId.equals("PRUN_COMPLETED") && (statusId == null || statusId.equals("PRUN_CLOSED"))) { // change the production run status to PRUN_CLOSED - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.clear(); serviceContext.put("workEffortId", productionRunId); serviceContext.put("currentStatusId", "PRUN_CLOSED"); @@ -739,7 +738,7 @@ public class ProductionRunServices { } public static Map changeProductionRunTaskStatus(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -799,7 +798,7 @@ public class ProductionRunServices { if (productionRun.getGenericValue().getString("currentStatusId").equals("PRUN_CREATED")) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunTaskCannotStartDocsNotPrinted", locale)); } - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.clear(); serviceContext.put("workEffortId", taskId); serviceContext.put("currentStatusId", "PRUN_RUNNING"); @@ -832,7 +831,7 @@ public class ProductionRunServices { // PRUN_RUNNING --> PRUN_COMPLETED // this should be called only when the last task is completed if (currentStatusId.equals("PRUN_RUNNING") && (statusId == null || statusId.equals("PRUN_COMPLETED"))) { - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); if (issueAllComponents.booleanValue()) { // Issue all the components, if this task needs components and they still need to be issued try { @@ -974,7 +973,7 @@ public class ProductionRunServices { } public static Map getWorkEffortCosts(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); String workEffortId = (String)context.get("workEffortId"); Locale locale = (Locale) context.get("locale"); @@ -1008,7 +1007,7 @@ public class ProductionRunServices { } public static Map getProductionRunCost(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -1152,7 +1151,7 @@ public class ProductionRunServices { } // materials costs: these are the costs derived from the materials used by the production run task try { - Map materialsCostByCurrency = FastMap.newInstance(); + Map materialsCostByCurrency = new HashMap(); for (GenericValue inventoryConsumed : EntityQuery.use(delegator).from("WorkEffortAndInventoryAssign") .where("workEffortId", productionRunTaskId).queryList()) { BigDecimal quantity = inventoryConsumed.getBigDecimal("quantity"); @@ -1266,7 +1265,7 @@ public class ProductionRunServices { } public static Map addProductionRunComponent(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Timestamp now = UtilDateTime.nowTimestamp(); @@ -1316,7 +1315,7 @@ public class ProductionRunServices { Debug.logWarning(e.getMessage(), module); return ServiceUtil.returnError(e.getMessage()); } - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.clear(); serviceContext.put("workEffortId", workEffortId); serviceContext.put("productId", productId); @@ -1337,7 +1336,7 @@ public class ProductionRunServices { } public static Map updateProductionRunComponent(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -1390,7 +1389,7 @@ public class ProductionRunServices { Debug.logWarning(e.getMessage(), module); return ServiceUtil.returnError(e.getMessage()); } - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.clear(); serviceContext.put("workEffortId", theComponent.getString("workEffortId")); serviceContext.put("workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED"); @@ -1411,7 +1410,7 @@ public class ProductionRunServices { } public static Map addProductionRunRoutingTask(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -1487,7 +1486,7 @@ public class ProductionRunServices { long totalTime = ProductionRun.getEstimatedTaskTime(routingTask, pRQuantity, dispatcher); estimatedCompletionDate = TechDataServices.addForward(TechDataServices.getTechDataCalendar(routingTask), estimatedStartDate, totalTime); } - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.clear(); serviceContext.put("priority", priority); serviceContext.put("workEffortPurposeTypeId", routingTask.get("workEffortPurposeTypeId")); @@ -1555,7 +1554,7 @@ public class ProductionRunServices { } public static Map productionRunProduce(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -1583,7 +1582,7 @@ public class ProductionRunServices { autoCreateLot = Boolean.FALSE; } - List inventoryItemIds = FastList.newInstance(); + List inventoryItemIds = new LinkedList(); result.put("inventoryItemIds", inventoryItemIds); // The production run is loaded ProductionRun productionRun = new ProductionRun(productionRunId, delegator, dispatcher); @@ -1707,7 +1706,7 @@ public class ProductionRunServices { serviceContext.put("inventoryItemId", inventoryItemId); resultService = dispatcher.runSync("createWorkEffortInventoryProduced", serviceContext); // Recompute reservations - serviceContext = FastMap.newInstance(); + serviceContext = new HashMap(); serviceContext.put("inventoryItemId", inventoryItemId); serviceContext.put("userLogin", userLogin); resultService = dispatcher.runSync("balanceInventoryItems", serviceContext); @@ -1745,7 +1744,7 @@ public class ProductionRunServices { serviceContext.put("inventoryItemId", inventoryItemId); resultService = dispatcher.runSync("createWorkEffortInventoryProduced", serviceContext); // Recompute reservations - serviceContext = FastMap.newInstance(); + serviceContext = new HashMap(); serviceContext.put("inventoryItemId", inventoryItemId); serviceContext.put("userLogin", userLogin); if (orderItem != null) { @@ -1775,7 +1774,7 @@ public class ProductionRunServices { } public static Map productionRunDeclareAndProduce(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -1832,7 +1831,7 @@ public class ProductionRunServices { } } try { - Map inputMap = FastMap.newInstance(); + Map inputMap = new HashMap(); inputMap.putAll(context); inputMap.remove("componentsLocationMap"); result = dispatcher.runSync("productionRunProduce", inputMap); @@ -1844,7 +1843,7 @@ public class ProductionRunServices { } public static Map productionRunTaskProduce(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -1872,7 +1871,7 @@ public class ProductionRunServices { ProductionRun productionRun = new ProductionRun(productionRunTaskId, delegator, dispatcher); facilityId = productionRun.getGenericValue().getString("facilityId"); } - List inventoryItemIds = FastList.newInstance(); + List inventoryItemIds = new LinkedList(); if ("SERIALIZED_INV_ITEM".equals(inventoryItemTypeId)) { try { int numOfItems = quantity.intValue(); @@ -1908,7 +1907,7 @@ public class ProductionRunServices { resultService = dispatcher.runSync("createWorkEffortInventoryProduced", serviceContext); inventoryItemIds.add(inventoryItemId); // Recompute reservations - serviceContext = FastMap.newInstance(); + serviceContext = new HashMap(); serviceContext.put("inventoryItemId", inventoryItemId); serviceContext.put("userLogin", userLogin); resultService = dispatcher.runSync("balanceInventoryItems", serviceContext); @@ -1949,7 +1948,7 @@ public class ProductionRunServices { resultService = dispatcher.runSync("createWorkEffortInventoryProduced", serviceContext); inventoryItemIds.add(inventoryItemId); // Recompute reservations - serviceContext = FastMap.newInstance(); + serviceContext = new HashMap(); serviceContext.put("inventoryItemId", inventoryItemId); serviceContext.put("userLogin", userLogin); resultService = dispatcher.runSync("balanceInventoryItems", serviceContext); @@ -2027,7 +2026,7 @@ public class ProductionRunServices { } public static Map updateProductionRunTask(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -2177,7 +2176,7 @@ public class ProductionRunServices { GenericValue timeEntry = delegator.makeValue("TimeEntry", timeEntryFields); timeEntry.create(); */ - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.clear(); serviceContext.put("workEffortId", workEffortId); if (addTaskTime != null) { @@ -2233,7 +2232,7 @@ public class ProductionRunServices { } public static Map createProductionRunFromRequirement(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -2258,7 +2257,7 @@ public class ProductionRunServices { if (quantity == null) { quantity = requirement.getBigDecimal("quantity"); } - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.clear(); serviceContext.put("productId", requirement.getString("productId")); serviceContext.put("quantity", quantity); @@ -2293,7 +2292,7 @@ public class ProductionRunServices { } public static Map createProductionRunFromConfiguration(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -2327,7 +2326,7 @@ public class ProductionRunServices { return ServiceUtil.returnError(e.getMessage()); } - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.clear(); serviceContext.put("productId", instanceProductId); serviceContext.put("pRQuantity", quantity); @@ -2344,7 +2343,7 @@ public class ProductionRunServices { String productionRunId = (String)resultService.get("productionRunId"); result.put("productionRunId", productionRunId); - Map components = FastMap.newInstance(); + Map components = new HashMap(); for (ConfigOption co : config.getSelectedOptions()) { //components.addAll(co.getComponents()); for (GenericValue selComponent : co.getComponents()) { @@ -2431,7 +2430,7 @@ public class ProductionRunServices { componentQuantity = BigDecimal.ONE; } resultService = null; - serviceContext = FastMap.newInstance(); + serviceContext = new HashMap(); serviceContext.put("productionRunId", productionRunId); serviceContext.put("productId", productId); serviceContext.put("estimatedQuantity", componentQuantity); @@ -2455,7 +2454,7 @@ public class ProductionRunServices { } public static Map createProductionRunForMktgPkg(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -2510,7 +2509,7 @@ public class ProductionRunServices { // how many should we produce? If there already is some inventory, then just produce enough to bring ATP back up to zero. BigDecimal qtyRequired = BigDecimal.ZERO.subtract(existingAtp); // ok so that's how many we WANT to produce, but let's check how many we can actually produce based on the available components - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.put("productId", orderItem.getString("productId")); serviceContext.put("facilityId", facilityId); serviceContext.put("userLogin", userLogin); @@ -2567,7 +2566,7 @@ public class ProductionRunServices { } public static Map createProductionRunsForOrder(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue)context.get("userLogin"); @@ -2620,7 +2619,7 @@ public class ProductionRunServices { return ServiceUtil.returnError(UtilProperties.getMessage(resourceOrder, "OrderProblemsReadingOrderItemInformation", UtilMisc.toMap("errorString", gee.getMessage()), locale)); } } - List productionRuns = FastList.newInstance(); + List productionRuns = new LinkedList(); for (int i = 0; i < orderItems.size(); i++) { GenericValue orderItemOrShipGroupAssoc = orderItems.get(i); String productId = null; @@ -2673,7 +2672,7 @@ public class ProductionRunServices { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturinWorkOrderItemFulfillmentError", UtilMisc.toMap("errorString", gee.getMessage()), locale)); } try { - List components = FastList.newInstance(); + List components = new LinkedList(); BOMTree tree = new BOMTree(productId, "MANUF_COMPONENT", fromDate, BOMTree.EXPLOSION_MANUFACTURING, delegator, dispatcher, userLogin); tree.setRootQuantity(quantity); tree.setRootAmount(amount); @@ -2688,7 +2687,7 @@ public class ProductionRunServices { } public static Map createProductionRunsForProductBom(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin =(GenericValue)context.get("userLogin"); @@ -2705,7 +2704,7 @@ public class ProductionRunServices { quantity = BigDecimal.ONE; } try { - List components = FastList.newInstance(); + List components = new LinkedList(); BOMTree tree = new BOMTree(productId, "MANUF_COMPONENT", startDate, BOMTree.EXPLOSION_MANUFACTURING, delegator, dispatcher, userLogin); tree.setRootQuantity(quantity); tree.setRootAmount(BigDecimal.ZERO); @@ -2717,7 +2716,7 @@ public class ProductionRunServices { if (workEffortId == null) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunIsNotRequiredForProductId", UtilMisc.toMap("productId", productId, "startDate", startDate), locale)); } - List productionRuns = FastList.newInstance(); + List productionRuns = new LinkedList(); result.put("productionRuns" , productionRuns); result.put("productionRunId" , workEffortId); return result; @@ -2741,7 +2740,7 @@ public class ProductionRunServices { String taskId = (String) context.get("taskId"); try { - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); Map resultService = null; GenericValue task = EntityQuery.use(delegator).from("WorkEffort").where("workEffortId", taskId).queryOne(); String currentStatusId = task.getString("currentStatusId"); @@ -2794,7 +2793,7 @@ public class ProductionRunServices { oneTask = tasks.get(i); taskId = oneTask.getString("workEffortId"); try { - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.put("productionRunId", productionRunId); serviceContext.put("taskId", taskId); serviceContext.put("userLogin", userLogin); @@ -2863,7 +2862,7 @@ public class ProductionRunServices { String startAllTasks = (String) context.get("startAllTasks"); try { - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); // Change the task status to running if (statusId.equals("PRUN_DOC_PRINTED") || @@ -2931,13 +2930,13 @@ public class ProductionRunServices { } BigDecimal totQty = BigDecimal.ZERO; try { - List findOutgoingProductionRunsConds = FastList.newInstance(); + List findOutgoingProductionRunsConds = new LinkedList(); findOutgoingProductionRunsConds.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId)); findOutgoingProductionRunsConds.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "WEGS_CREATED")); findOutgoingProductionRunsConds.add(EntityCondition.makeCondition("estimatedStartDate", EntityOperator.LESS_THAN_EQUAL_TO, startDate)); - List findOutgoingProductionRunsStatusConds = FastList.newInstance(); + List findOutgoingProductionRunsStatusConds = new LinkedList(); findOutgoingProductionRunsStatusConds.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, "PRUN_CREATED")); findOutgoingProductionRunsStatusConds.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, "PRUN_SCHEDULED")); findOutgoingProductionRunsStatusConds.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, "PRUN_DOC_PRINTED")); @@ -3006,7 +3005,7 @@ public class ProductionRunServices { } public static Map decomposeInventoryItem(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Timestamp now = UtilDateTime.nowTimestamp(); @@ -3015,7 +3014,7 @@ public class ProductionRunServices { // Mandatory input fields String inventoryItemId = (String)context.get("inventoryItemId"); BigDecimal quantity = (BigDecimal)context.get("quantity"); - List inventoryItemIds = FastList.newInstance(); + List inventoryItemIds = new LinkedList(); try { GenericValue inventoryItem = EntityQuery.use(delegator).from("InventoryItem") .where("inventoryItemId", inventoryItemId).queryOne(); @@ -3115,7 +3114,7 @@ public class ProductionRunServices { Delegator delegator = ctx.getDelegator(); Timestamp now = UtilDateTime.nowTimestamp(); Locale locale = (Locale) context.get("locale"); - Map> products = FastMap.newInstance(); + Map> products = new HashMap>(); try { List resultList = EntityQuery.use(delegator).from("WorkEffortAndGoods") @@ -3151,7 +3150,7 @@ public class ProductionRunServices { TreeMap productMap = products.get(productId); if (!productMap.containsKey(estimatedShipDate)) { productMap.put(estimatedShipDate, - UtilMisc.toMap("remainingQty", BigDecimal.ZERO, "reservations", FastList.newInstance())); + UtilMisc.toMap("remainingQty", BigDecimal.ZERO, "reservations", new LinkedList())); } Map dateMap = UtilGenerics.checkMap(productMap.get(estimatedShipDate)); BigDecimal remainingQty = (BigDecimal)dateMap.get("remainingQty"); @@ -3200,7 +3199,7 @@ public class ProductionRunServices { } TreeMap productMap = products.get(productId); if (!productMap.containsKey(estimatedShipDate)) { - productMap.put(estimatedShipDate, UtilMisc.toMap("remainingQty", BigDecimal.ZERO, "reservations", FastList.newInstance())); + productMap.put(estimatedShipDate, UtilMisc.toMap("remainingQty", BigDecimal.ZERO, "reservations", new LinkedList())); } Map dateMap = UtilGenerics.checkMap(productMap.get(estimatedShipDate)); BigDecimal remainingQty = (BigDecimal)dateMap.get("remainingQty"); @@ -3210,7 +3209,7 @@ public class ProductionRunServices { } // backorders - List backordersCondList = FastList.newInstance(); + List backordersCondList = new LinkedList(); backordersCondList.add(EntityCondition.makeCondition("quantityNotAvailable", EntityOperator.NOT_EQUAL, null)); backordersCondList.add(EntityCondition.makeCondition("quantityNotAvailable", EntityOperator.GREATER_THAN, BigDecimal.ZERO)); //backordersCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "ITEM_CREATED"), EntityOperator.OR, EntityCondition.makeCondition("statusId", EntityOperator.LESS_THAN, "ITEM_APPROVED"))); diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java b/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java index 9ea99227d3..38cd616807 100644 --- a/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java +++ b/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java @@ -21,14 +21,13 @@ package org.ofbiz.manufacturing.mrp; import java.math.BigDecimal; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.ListIterator; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilGenerics; @@ -92,7 +91,7 @@ public class MrpServices { // Proposed requirements are deleted listResult = null; - List listResultRoles = FastList.newInstance(); + List listResultRoles = new LinkedList(); try { listResult = EntityQuery.use(delegator).from("Requirement") .where("requirementTypeId", "PRODUCT_REQUIREMENT", @@ -494,7 +493,7 @@ public class MrpServices { } } } - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS); Debug.logInfo("return from initMrpEvent", module); return result; @@ -833,8 +832,8 @@ public class MrpServices { // if there are 3 levels with no inventoryEvenPanned we stop } while (bomLevelWithNoEvent < 3); - result = FastMap.newInstance(); - List msgResult = FastList.newInstance(); + result = new HashMap(); + List msgResult = new LinkedList(); result.put("msgResult", msgResult); result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS); Debug.logInfo("return from executeMrp", module); diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java b/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java index 34456d82c7..b1eddaf2d3 100644 --- a/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java +++ b/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java @@ -21,13 +21,12 @@ package org.ofbiz.manufacturing.mrp; import java.math.BigDecimal; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.ListIterator; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilMisc; @@ -115,7 +114,7 @@ public class ProposedOrder { if (routing == null) { // try to find a routing linked to the virtual product BOMTree tree = null; - List components = FastList.newInstance(); + List components = new LinkedList(); try { tree = new BOMTree(product.getString("productId"), "MANUF_COMPONENT", requiredByDate, BOMTree.EXPLOSION_SINGLE_LEVEL, delegator, dispatcher, userLogin); tree.setRootQuantity(quantity); @@ -136,7 +135,7 @@ public class ProposedOrder { } } if (routing != null) { - result = FastMap.newInstance(); + result = new HashMap(); //Looks for all the routingTask (ordered by inversed (begin from the end) sequence number) if (listRoutingTaskAssoc == null) { try { @@ -234,7 +233,7 @@ public class ProposedOrder { Map parameters = UtilMisc.toMap("userLogin", userLogin); if (isBuilt) { try { - List bom = FastList.newInstance(); + List bom = new LinkedList(); BOMTree tree = new BOMTree(productId, "MANUF_COMPONENT", null, BOMTree.EXPLOSION_MANUFACTURING, delegator, dispatcher, userLogin); tree.setRootQuantity(quantity); tree.print(bom); diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/routing/RoutingServices.java b/applications/manufacturing/src/org/ofbiz/manufacturing/routing/RoutingServices.java index 89563cf873..a074f501d3 100644 --- a/applications/manufacturing/src/org/ofbiz/manufacturing/routing/RoutingServices.java +++ b/applications/manufacturing/src/org/ofbiz/manufacturing/routing/RoutingServices.java @@ -19,11 +19,10 @@ package org.ofbiz.manufacturing.routing; import java.math.BigDecimal; +import java.util.HashMap; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilProperties; import org.ofbiz.entity.Delegator; @@ -51,7 +50,7 @@ public class RoutingServices { * @return Map with the result of the service, the output parameters. */ public static Map getEstimatedTaskTime(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java b/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java index eafb645c0c..c96b92777a 100644 --- a/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java +++ b/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java @@ -20,13 +20,12 @@ package org.ofbiz.manufacturing.techdata; import java.sql.Time; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilMisc; @@ -64,13 +63,13 @@ public class TechDataServices { */ public static Map lookupRoutingTask(DispatchContext ctx, Map context) { Delegator delegator = ctx.getDelegator(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Locale locale = (Locale) context.get("locale"); String workEffortName = (String) context.get("workEffortName"); String fixedAssetId = (String) context.get("fixedAssetId"); List listRoutingTask = null; - List constraints = FastList.newInstance(); + List constraints = new LinkedList(); if (UtilValidate.isNotEmpty(workEffortName)) { constraints.add(EntityCondition.makeCondition("workEffortName", EntityOperator.GREATER_THAN_EQUAL_TO, workEffortName)); @@ -91,7 +90,7 @@ public class TechDataServices { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingTechDataWorkEffortNotExist", UtilMisc.toMap("errorString", e.toString()), locale)); } if (listRoutingTask == null) { - listRoutingTask = FastList.newInstance(); + listRoutingTask = new LinkedList(); } if (listRoutingTask.size() == 0) { //FIXME is it correct ? @@ -111,15 +110,15 @@ public class TechDataServices { */ public static Map checkRoutingTaskAssoc(DispatchContext ctx, Map context) { Delegator delegator = ctx.getDelegator(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); String sequenceNumNotOk = "N"; Locale locale = (Locale) context.get("locale"); String workEffortIdFrom = (String) context.get("workEffortIdFrom"); String workEffortIdTo = (String) context.get("workEffortIdTo"); String workEffortAssocTypeId = (String) context.get("workEffortAssocTypeId"); Long sequenceNum = (Long) context.get("sequenceNum"); - Timestamp fromDate = (Timestamp) context.get("fromDate"); - Timestamp thruDate = (Timestamp) context.get("thruDate"); + Timestamp fromDate = (Timestamp) context.get("fromDate"); + Timestamp thruDate = (Timestamp) context.get("thruDate"); String create = (String) context.get("create"); boolean createProcess = (create !=null && create.equals("Y")) ? true : false; @@ -217,7 +216,7 @@ public class TechDataServices { * @return a map with the capacity (Double) available and moveDay (int): the number of day it's necessary to move to have capacity available */ public static Map dayStartCapacityAvailable(GenericValue techDataCalendarWeek, int dayStart) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); int moveDay = 0; Double capacity = null; Time startTime = null; @@ -301,7 +300,7 @@ public class TechDataServices { * @return a map with Timestamp dateTo, Double nextCapacity */ public static Map startNextDay(GenericValue techDataCalendar, Timestamp dateFrom) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Timestamp dateTo = null; GenericValue techDataCalendarWeek = null; // TODO read TechDataCalendarExcWeek to manage execption week (maybe it's needed to refactor the entity definition @@ -351,7 +350,7 @@ public class TechDataServices { amount = 0; } else amount -= nextCapacity; - Map result = FastMap.newInstance(); + Map result = new HashMap(); while (amount > 0) { result = startNextDay(techDataCalendar, dateTo); dateTo = (Timestamp) result.get("dateTo"); @@ -372,7 +371,7 @@ public class TechDataServices { * @return a map with the capacity (Double) available, the startTime and moveDay (int): the number of day it's necessary to move to have capacity available */ public static Map dayEndCapacityAvailable(GenericValue techDataCalendarWeek, int dayEnd) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); int moveDay = 0; Double capacity = null; Time startTime = null; @@ -455,7 +454,7 @@ public class TechDataServices { * @return a map with Timestamp dateTo, Double previousCapacity */ public static Map endPreviousDay(GenericValue techDataCalendar, Timestamp dateFrom) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Timestamp dateTo = null; GenericValue techDataCalendarWeek = null; // TODO read TechDataCalendarExcWeek to manage exception week (maybe it's needed to refactor the entity definition @@ -507,7 +506,7 @@ public class TechDataServices { amount = 0; } else amount -= previousCapacity; - Map result = FastMap.newInstance(); + Map result = new HashMap(); while (amount > 0) { result = endPreviousDay(techDataCalendar, dateTo); dateTo = (Timestamp) result.get("dateTo"); diff --git a/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy b/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy index 8299ad1d0b..d4577f68fd 100644 --- a/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy +++ b/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy @@ -25,8 +25,6 @@ import org.ofbiz.entity.GenericValue; import org.ofbiz.widget.renderer.html.HtmlFormWrapper; import org.ofbiz.manufacturing.jobshopmgt.ProductionRun; -import javolution.util.FastList; - productionRunId = parameters.productionRunId ?: parameters.workEffortId; if (productionRunId) { ProductionRun productionRun = new ProductionRun(productionRunId, delegator, dispatcher); @@ -160,9 +158,9 @@ if (productionRunId) { // Product components list productionRunComponents = productionRun.getProductionRunComponents(); - productionRunComponentsData = FastList.newInstance(); - productionRunComponentsDataReadyForIssuance = FastList.newInstance(); - productionRunComponentsAlreadyIssued = FastList.newInstance(); + productionRunComponentsData = []; + productionRunComponentsDataReadyForIssuance = []; + productionRunComponentsAlreadyIssued = []; if (productionRunComponents) { productionRunComponents.each { component -> product = component.getRelatedOne("Product", false); diff --git a/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/productionRunAllFixedAssets.groovy b/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/productionRunAllFixedAssets.groovy index 80879606d0..0f4f751bb4 100644 --- a/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/productionRunAllFixedAssets.groovy +++ b/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/productionRunAllFixedAssets.groovy @@ -19,13 +19,11 @@ import org.ofbiz.manufacturing.jobshopmgt.ProductionRun; -import javolution.util.FastList; - productionRunId = parameters.productionRunId ?: parameters.workEffortId; if (productionRunId) { ProductionRun productionRun = new ProductionRun(productionRunId, delegator, dispatcher); if (productionRun.exist()) { - productionRunFixedAssetsData = FastList.newInstance(); + productionRunFixedAssetsData = []; productionRunRoutingTasks = productionRun.getProductionRunRoutingTasks(); productionRunRoutingTasks.each { prodRunTask -> taskFixedAssets = prodRunTask.getRelated("WorkEffortFixedAssetAssign", null, null, false); diff --git a/applications/marketing/src/org/ofbiz/marketing/report/ReportHelper.java b/applications/marketing/src/org/ofbiz/marketing/report/ReportHelper.java index 7ae590cd5d..ce494003a9 100644 --- a/applications/marketing/src/org/ofbiz/marketing/report/ReportHelper.java +++ b/applications/marketing/src/org/ofbiz/marketing/report/ReportHelper.java @@ -18,12 +18,14 @@ *******************************************************************************/ package org.ofbiz.marketing.report; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + import org.ofbiz.base.util.UtilMisc; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.util.EntityUtil; -import java.util.*; -import javolution.util.FastList; -import javolution.util.FastMap; /** * Marketing Report Helper @@ -42,11 +44,11 @@ public class ReportHelper { * conversionRate - # orders/# visits */ public static List> calcConversionRates(List visits, List orders, String keyFieldName) { - List> conversionRates = FastList.newInstance(); + List> conversionRates = new LinkedList>(); // loop through all the visits for (GenericValue visit: visits) { - Map reportValue = FastMap.newInstance(); + Map reportValue = new HashMap(); reportValue.put(keyFieldName, visit.getString(keyFieldName)); reportValue.put("visits", visit.getLong("visitId")); // actually # of visits diff --git a/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java b/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java index d4b558bb1c..f58797edd3 100644 --- a/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java +++ b/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java @@ -19,6 +19,7 @@ package org.ofbiz.marketing.tracking; import java.sql.Timestamp; +import java.util.LinkedList; import java.util.List; import javax.servlet.http.Cookie; @@ -26,8 +27,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilMisc; @@ -286,7 +285,7 @@ public class TrackingCodeEvents { String prodCatalogId = trackingCode.getString("prodCatalogId"); if (UtilValidate.isNotEmpty(prodCatalogId)) { session.setAttribute("CURRENT_CATALOG_ID", prodCatalogId); - CategoryWorker.setTrail(request, FastList.newInstance()); + CategoryWorker.setTrail(request, new LinkedList()); } // if forward/redirect is needed, do a response.sendRedirect and return null to tell the control servlet to not do any other requests/views @@ -435,7 +434,7 @@ public class TrackingCodeEvents { public static List makeTrackingCodeOrders(HttpServletRequest request) { Delegator delegator = (Delegator) request.getAttribute("delegator"); java.sql.Timestamp nowStamp = UtilDateTime.nowTimestamp(); - List trackingCodeOrders = FastList.newInstance(); + List trackingCodeOrders = new LinkedList(); Cookie[] cookies = request.getCookies(); Timestamp affiliateReferredTimeStamp = null; diff --git a/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java b/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java index c880d30acd..d4f81bc178 100644 --- a/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java +++ b/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java @@ -26,11 +26,11 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; +import java.util.HashMap; import java.util.Iterator; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; import net.wimpi.pim.Pim; import net.wimpi.pim.contact.basicimpl.AddressImpl; import net.wimpi.pim.contact.basicimpl.EmailAddressImpl; @@ -85,7 +85,7 @@ public class VCard { InputStream in = new ByteArrayInputStream(inputByteArray); String partyType = (String) context.get("partyType"); Boolean isGroup = "PartyGroup".equals(partyType); // By default we import a Person. - Map serviceCtx = FastMap.newInstance(); + Map serviceCtx = new HashMap(); try { ContactIOFactory ciof = Pim.getContactIOFactory(); diff --git a/applications/order/src/org/ofbiz/order/OrderManagerEvents.java b/applications/order/src/org/ofbiz/order/OrderManagerEvents.java index 91bfd64c36..5465b81147 100644 --- a/applications/order/src/org/ofbiz/order/OrderManagerEvents.java +++ b/applications/order/src/org/ofbiz/order/OrderManagerEvents.java @@ -19,6 +19,7 @@ package org.ofbiz.order; import java.math.BigDecimal; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -27,8 +28,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.ObjectType; @@ -68,7 +67,7 @@ public class OrderManagerEvents { if (session.getAttribute("OFFLINE_PAYMENTS") != null) { String orderId = (String) request.getAttribute("orderId"); - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); List paymentPrefs = null; GenericValue placingCustomer = null; try { @@ -220,7 +219,7 @@ public class OrderManagerEvents { } } - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); for (GenericValue paymentMethodType : paymentMethodTypes) { String paymentMethodTypeId = paymentMethodType.getString("paymentMethodTypeId"); String amountStr = request.getParameter(paymentMethodTypeId + "_amount"); diff --git a/applications/order/src/org/ofbiz/order/order/OrderContentWrapper.java b/applications/order/src/org/ofbiz/order/order/OrderContentWrapper.java index c43ffcda45..8818ed5097 100644 --- a/applications/order/src/org/ofbiz/order/order/OrderContentWrapper.java +++ b/applications/order/src/org/ofbiz/order/order/OrderContentWrapper.java @@ -21,13 +21,12 @@ package org.ofbiz.order.order; import java.io.IOException; import java.io.StringWriter; import java.io.Writer; +import java.util.HashMap; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilHttp; @@ -140,7 +139,7 @@ public class OrderContentWrapper { .cache().filterByDate().queryFirst(); if (orderContent != null) { // when rendering the order content, always include the OrderHeader/OrderItem and OrderContent records that this comes from - Map inContext = FastMap.newInstance(); + Map inContext = new HashMap(); inContext.put("order", order); inContext.put("orderContent", orderContent); ContentWorker.renderContentAsText(dispatcher, delegator, orderContent.getString("contentId"), outWriter, inContext, locale, mimeTypeId, null, null, false); diff --git a/applications/order/src/org/ofbiz/order/order/OrderEvents.java b/applications/order/src/org/ofbiz/order/order/OrderEvents.java index f34f1851b0..1d3ab7b186 100644 --- a/applications/order/src/org/ofbiz/order/order/OrderEvents.java +++ b/applications/order/src/org/ofbiz/order/order/OrderEvents.java @@ -20,6 +20,7 @@ package org.ofbiz.order.order; import java.io.IOException; import java.io.OutputStream; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -37,14 +38,11 @@ import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.util.EntityQuery; - import org.ofbiz.service.GenericServiceException; import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ServiceUtil; import org.ofbiz.webapp.website.WebSiteWorker; -import javolution.util.FastMap; - /** * Order Events */ @@ -109,7 +107,7 @@ public class OrderEvents { GenericValue userLogin = (GenericValue) session.getAttribute("userLogin"); Locale locale = UtilHttp.getLocale(request); - Map resultMap = FastMap.newInstance(); + Map resultMap = new HashMap(); String orderId = request.getParameter("orderId"); String[] orderItemSeqIds = request.getParameterValues("selectedItem"); @@ -122,7 +120,7 @@ public class OrderEvents { GenericValue orderItemShipGroup = orderItemShipGroupAssoc.getRelatedOne("OrderItemShipGroup", false); String shipGroupSeqId = orderItemShipGroup.getString("shipGroupSeqId"); - Map contextMap = FastMap.newInstance(); + Map contextMap = new HashMap(); contextMap.put("orderId", orderId); contextMap.put("orderItemSeqId", orderItemSeqId); contextMap.put("shipGroupSeqId", shipGroupSeqId); diff --git a/applications/order/src/org/ofbiz/order/order/OrderListState.java b/applications/order/src/org/ofbiz/order/order/OrderListState.java index dd42415e44..6d1a1670f8 100644 --- a/applications/order/src/org/ofbiz/order/order/OrderListState.java +++ b/applications/order/src/org/ofbiz/order/order/OrderListState.java @@ -20,16 +20,15 @@ package org.ofbiz.order.order; import java.io.Serializable; import java.sql.Timestamp; +import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilValidate; @@ -76,7 +75,7 @@ public class OrderListState implements Serializable { protected static final Map parameterToOrderTypeId; protected static final Map parameterToFilterId; static { - Map map = FastMap.newInstance(); + Map map = new HashMap(); map.put("viewcompleted", "ORDER_COMPLETED"); map.put("viewcancelled", "ORDER_CANCELLED"); map.put("viewrejected", "ORDER_REJECTED"); @@ -87,12 +86,12 @@ public class OrderListState implements Serializable { map.put("viewhold", "ORDER_HOLD"); parameterToOrderStatusId = map; - map = FastMap.newInstance(); + map = new HashMap(); map.put("view_SALES_ORDER", "SALES_ORDER"); map.put("view_PURCHASE_ORDER", "PURCHASE_ORDER"); parameterToOrderTypeId = map; - map = FastMap.newInstance(); + map = new HashMap(); map.put("filterInventoryProblems", "filterInventoryProblems"); map.put("filterAuthProblems", "filterAuthProblems"); map.put("filterPartiallyReceivedPOs", "filterPartiallyReceivedPOs"); @@ -110,9 +109,9 @@ public class OrderListState implements Serializable { protected OrderListState() { viewSize = 10; viewIndex = 0; - orderStatusState = FastMap.newInstance(); - orderTypeState = FastMap.newInstance(); - orderFilterState = FastMap.newInstance(); + orderStatusState = new HashMap(); + orderTypeState = new HashMap(); + orderFilterState = new HashMap(); // defaults (TODO: configuration) orderStatusState.put("viewcreated", "Y"); @@ -226,25 +225,25 @@ public class OrderListState implements Serializable { * Get the OrderHeaders corresponding to the state. */ public List getOrders(String facilityId, Timestamp filterDate, Delegator delegator) throws GenericEntityException { - List allConditions = FastList.newInstance(); + List allConditions = new LinkedList(); if (facilityId != null) { allConditions.add(EntityCondition.makeCondition("originFacilityId", EntityOperator.EQUALS, facilityId)); } if (filterDate != null) { - List andExprs = FastList.newInstance(); + List andExprs = new LinkedList(); andExprs.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, UtilDateTime.getDayStart(filterDate))); andExprs.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, UtilDateTime.getDayEnd(filterDate))); allConditions.add(EntityCondition.makeCondition(andExprs, EntityOperator.AND)); } - List statusConditions = FastList.newInstance(); + List statusConditions = new LinkedList(); for (String status : orderStatusState.keySet()) { if (!hasStatus(status)) continue; statusConditions.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, parameterToOrderStatusId.get(status))); } - List typeConditions = FastList.newInstance(); + List typeConditions = new LinkedList(); for (String type : orderTypeState.keySet()) { if (!hasType(type)) continue; typeConditions.add(EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, parameterToOrderTypeId.get(type))); diff --git a/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java b/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java index c8614be3ae..bb1c5a087e 100644 --- a/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java +++ b/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java @@ -20,14 +20,13 @@ package org.ofbiz.order.order; import java.math.BigDecimal; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.ObjectType; @@ -77,7 +76,7 @@ public class OrderLookupServices { } // list of fields to select (initial list) - Set fieldsToSelect = FastSet.newInstance(); + Set fieldsToSelect = new HashSet(); fieldsToSelect.add("orderId"); fieldsToSelect.add("orderName"); fieldsToSelect.add("statusId"); @@ -91,10 +90,10 @@ public class OrderLookupServices { List orderBy = UtilMisc.toList("-orderDate", "-orderId"); // list to hold the parameters - List paramList = FastList.newInstance(); + List paramList = new LinkedList(); // list of conditions - List conditions = FastList.newInstance(); + List conditions = new LinkedList(); // check security flag for purchase orders boolean canViewPo = security.hasEntityPermission("ORDERMGR", "_PURCHASE_VIEW", userLogin); @@ -119,7 +118,7 @@ public class OrderLookupServices { // the base order header fields List orderTypeList = UtilGenerics.checkList(context.get("orderTypeId")); if (orderTypeList != null) { - List orExprs = FastList.newInstance(); + List orExprs = new LinkedList(); for (String orderTypeId : orderTypeList) { paramList.add("orderTypeId=" + orderTypeId); @@ -138,11 +137,11 @@ public class OrderLookupServices { List orderStatusList = UtilGenerics.checkList(context.get("orderStatusId")); if (orderStatusList != null) { - List orExprs = FastList.newInstance(); + List orExprs = new LinkedList(); for (String orderStatusId : orderStatusList) { paramList.add("orderStatusId=" + orderStatusId); if ("PENDING".equals(orderStatusId)) { - List pendExprs = FastList.newInstance(); + List pendExprs = new LinkedList(); pendExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "ORDER_CREATED")); pendExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "ORDER_PROCESSING")); pendExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "ORDER_APPROVED")); @@ -156,7 +155,7 @@ public class OrderLookupServices { List productStoreList = UtilGenerics.checkList(context.get("productStoreId")); if (productStoreList != null) { - List orExprs = FastList.newInstance(); + List orExprs = new LinkedList(); for (String productStoreId : productStoreList) { paramList.add("productStoreId=" + productStoreId); orExprs.add(EntityCondition.makeCondition("productStoreId", EntityOperator.EQUALS, productStoreId)); @@ -166,7 +165,7 @@ public class OrderLookupServices { List webSiteList = UtilGenerics.checkList(context.get("orderWebSiteId")); if (webSiteList != null) { - List orExprs = FastList.newInstance(); + List orExprs = new LinkedList(); for (String webSiteId : webSiteList) { paramList.add("webSiteId=" + webSiteId); orExprs.add(EntityCondition.makeCondition("webSiteId", EntityOperator.EQUALS, webSiteId)); @@ -176,7 +175,7 @@ public class OrderLookupServices { List saleChannelList = UtilGenerics.checkList(context.get("salesChannelEnumId")); if (saleChannelList != null) { - List orExprs = FastList.newInstance(); + List orExprs = new LinkedList(); for (String salesChannelEnumId : saleChannelList) { paramList.add("salesChannelEnumId=" + salesChannelEnumId); orExprs.add(EntityCondition.makeCondition("salesChannelEnumId", EntityOperator.EQUALS, salesChannelEnumId)); @@ -329,7 +328,7 @@ public class OrderLookupServices { if (roleTypeList != null) { fieldsToSelect.add("roleTypeId"); - List orExprs = FastList.newInstance(); + List orExprs = new LinkedList(); for (String roleTypeId : roleTypeList) { paramList.add("roleTypeId=" + roleTypeId); orExprs.add(makeExpr("roleTypeId", roleTypeId)); @@ -393,7 +392,7 @@ public class OrderLookupServices { if (product != null) { String isVirtual = product.getString("isVirtual"); if (isVirtual != null && "Y".equals(isVirtual)) { - List orExprs = FastList.newInstance(); + List orExprs = new LinkedList(); orExprs.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId)); Map varLookup = null; @@ -532,7 +531,7 @@ public class OrderLookupServices { conditions.add(EntityCondition.makeCondition("quantityNotAvailable", EntityOperator.NOT_EQUAL, null)); conditions.add(EntityCondition.makeCondition("quantityNotAvailable", EntityOperator.GREATER_THAN, BigDecimal.ZERO)); } else if ("N".equals(hasBackOrders)) { - List orExpr = FastList.newInstance(); + List orExpr = new LinkedList(); orExpr.add(EntityCondition.makeCondition("quantityNotAvailable", EntityOperator.EQUALS, null)); orExpr.add(EntityCondition.makeCondition("quantityNotAvailable", EntityOperator.EQUALS, BigDecimal.ZERO)); conditions.add(EntityCondition.makeCondition(orExpr, EntityOperator.OR)); @@ -577,7 +576,7 @@ public class OrderLookupServices { Debug.logInfo("Find order query: " + cond.toString(), module); } - List orderList = FastList.newInstance(); + List orderList = new LinkedList(); int orderCount = 0; // get the index for the partial list @@ -648,7 +647,7 @@ public class OrderLookupServices { } public static void filterInventoryProblems(Map context, Map result, List orderList, List paramList) { - List filterInventoryProblems = FastList.newInstance(); + List filterInventoryProblems = new LinkedList(); String doFilter = (String) context.get("filterInventoryProblems"); if (doFilter == null) { @@ -666,9 +665,9 @@ public class OrderLookupServices { } } - List filterPOsOpenPastTheirETA = FastList.newInstance(); - List filterPOsWithRejectedItems = FastList.newInstance(); - List filterPartiallyReceivedPOs = FastList.newInstance(); + List filterPOsOpenPastTheirETA = new LinkedList(); + List filterPOsWithRejectedItems = new LinkedList(); + List filterPartiallyReceivedPOs = new LinkedList(); String filterPOReject = (String) context.get("filterPOsWithRejectedItems"); String filterPOPast = (String) context.get("filterPOsOpenPastTheirETA"); diff --git a/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java b/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java index 154751ed07..580516e516 100644 --- a/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java +++ b/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java @@ -23,18 +23,16 @@ import java.sql.Timestamp; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashSet; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilFormatOut; @@ -192,7 +190,7 @@ public class OrderReadHelper { Debug.logError(e, module); } if (adjustments == null) - adjustments = FastList.newInstance(); + adjustments = new LinkedList(); } return adjustments; } @@ -213,10 +211,10 @@ public class OrderReadHelper { * @return returns a Map of paymentMethodId -> amount charged (BigDecimal) based on PaymentGatewayResponse. */ public Map getReceivedPaymentTotalsByPaymentMethod() { - Map paymentMethodAmounts = FastMap.newInstance(); + Map paymentMethodAmounts = new HashMap(); List paymentPrefs = getPaymentPreferences(); for (GenericValue paymentPref : paymentPrefs) { - List payments = FastList.newInstance(); + List payments = new LinkedList(); try { List exprs = UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_RECEIVED"), EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_CONFIRMED")); @@ -258,10 +256,10 @@ public class OrderReadHelper { * @return returns a Map of paymentMethodId -> amount refunded */ public Map getReturnedTotalsByPaymentMethod() { - Map paymentMethodAmounts = FastMap.newInstance(); + Map paymentMethodAmounts = new HashMap(); List paymentPrefs = getPaymentPreferences(); for (GenericValue paymentPref : paymentPrefs) { - List returnItemResponses = FastList.newInstance(); + List returnItemResponses = new LinkedList(); try { returnItemResponses = orderHeader.getDelegator().findByAnd("ReturnItemResponse", UtilMisc.toMap("orderPaymentPreferenceId", paymentPref.getString("orderPaymentPreferenceId")), null, false); } catch (GenericEntityException e) { @@ -286,7 +284,7 @@ public class OrderReadHelper { } public List getOrderPayments(GenericValue orderPaymentPreference) { - List orderPayments = FastList.newInstance(); + List orderPayments = new LinkedList(); List prefs = null; if (orderPaymentPreference == null) { @@ -428,7 +426,7 @@ public class OrderReadHelper { } public List getShippingLocations() { - List shippingLocations = FastList.newInstance(); + List shippingLocations = new LinkedList(); List shippingCms = this.getOrderContactMechs("SHIPPING_LOCATION"); if (shippingCms != null) { for (GenericValue ocm : shippingCms) { @@ -483,7 +481,7 @@ public class OrderReadHelper { } public List getBillingLocations() { - List billingLocations = FastList.newInstance(); + List billingLocations = new LinkedList(); List billingCms = this.getOrderContactMechs("BILLING_LOCATION"); if (billingCms != null) { for (GenericValue ocm : billingCms) { @@ -817,7 +815,7 @@ public class OrderReadHelper { } public Map getFeatureIdQtyMap(String shipGroupSeqId) { - Map featureMap = FastMap.newInstance(); + Map featureMap = new HashMap(); List validItems = getValidOrderItems(shipGroupSeqId); if (validItems != null) { for (GenericValue item : validItems) { @@ -1020,7 +1018,7 @@ public class OrderReadHelper { } public List getShippableSizes() { - List shippableSizes = FastList.newInstance(); + List shippableSizes = new LinkedList(); List validItems = getValidOrderItems(); if (validItems != null) { @@ -1190,7 +1188,7 @@ public class OrderReadHelper { } public List> getShippableItemInfo(String shipGroupSeqId) { - List> shippableInfo = FastList.newInstance(); + List> shippableInfo = new LinkedList>(); List validItems = getValidOrderItems(shipGroupSeqId); if (validItems != null) { @@ -1203,7 +1201,7 @@ public class OrderReadHelper { } public Map getItemInfoMap(GenericValue item) { - Map itemInfo = FastMap.newInstance(); + Map itemInfo = new HashMap(); itemInfo.put("productId", item.getString("productId")); itemInfo.put("quantity", getOrderItemQuantity(item)); itemInfo.put("weight", this.getItemWeight(item)); @@ -1470,7 +1468,7 @@ public class OrderReadHelper { } public List getValidDigitalItems() { - List digitalItems = FastList.newInstance(); + List digitalItems = new LinkedList(); // only approved or complete items apply List exprs = UtilMisc.toList( EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "ITEM_APPROVED"), @@ -1652,7 +1650,7 @@ public class OrderReadHelper { /** Get a set of productIds in the order. */ public Collection getOrderProductIds() { - Set productIds = FastSet.newInstance(); + Set productIds = new HashSet(); for (GenericValue orderItem : getOrderItems()) { if (orderItem.get("productId") != null) { productIds.add(orderItem.getString("productId")); @@ -1685,7 +1683,7 @@ public class OrderReadHelper { List returnItems = getOrderReturnItems(); // since we don't have a handy grouped view entity, we'll have to group the return items by hand - Map returnMap = FastMap.newInstance(); + Map returnMap = new HashMap(); for (GenericValue orderItem : this.getValidOrderItems()) { List group = EntityUtil.filterByAnd(returnItems, UtilMisc.toList( EntityCondition.makeCondition("orderId", orderItem.get("orderId")), @@ -1762,7 +1760,7 @@ public class OrderReadHelper { } BigDecimal returnedAmount = ZERO; String orderId = orderHeader.getString("orderId"); - List returnHeaderList = FastList.newInstance(); + List returnHeaderList = new LinkedList(); for (GenericValue returnedItem : returnedItems) { if ((returnedItem.get("returnPrice") != null) && (returnedItem.get("returnQuantity") != null)) { returnedAmount = returnedAmount.add(returnedItem.getBigDecimal("returnPrice").multiply(returnedItem.getBigDecimal("returnQuantity")).setScale(scale, rounding)); @@ -1816,7 +1814,7 @@ public class OrderReadHelper { returnedItems.addAll(EntityUtil.filterByAnd(returnedItemsBase, UtilMisc.toMap("statusId", "RETURN_RECEIVED"))); returnedItems.addAll(EntityUtil.filterByAnd(returnedItemsBase, UtilMisc.toMap("statusId", "RETURN_COMPLETED"))); - Map itemReturnedQuantities = FastMap.newInstance(); + Map itemReturnedQuantities = new HashMap(); for (GenericValue returnedItem : returnedItems) { String orderItemSeqId = returnedItem.getString("orderItemSeqId"); BigDecimal returnedQuantity = returnedItem.getBigDecimal("returnQuantity"); @@ -2175,7 +2173,7 @@ public class OrderReadHelper { public Set getProductPromoCodesEntered() { Delegator delegator = orderHeader.getDelegator(); - Set productPromoCodesEntered = FastSet.newInstance(); + Set productPromoCodesEntered = new HashSet(); try { for (GenericValue orderProductPromoCode: EntityQuery.use(delegator).from("OrderProductPromoCode").where("orderId", orderHeader.get("orderId")).cache().queryList()) { productPromoCodesEntered.add(orderProductPromoCode.getString("productPromoCodeId")); @@ -2193,7 +2191,7 @@ public class OrderReadHelper { } catch (GenericEntityException e) { Debug.logError(e, module); } - return FastList.newInstance(); + return new LinkedList(); } /** @@ -2290,12 +2288,12 @@ public class OrderReadHelper { List contraints1 = UtilMisc.toList(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, null)); List contraints2 = UtilMisc.toList(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, DataModelConstants.SEQ_ID_NA)); List contraints3 = UtilMisc.toList(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, "")); - List contraints4 = FastList.newInstance(); + List contraints4 = new LinkedList(); if (shipGroupSeqId != null) { contraints4.add(EntityCondition.makeCondition("shipGroupSeqId", EntityOperator.EQUALS, shipGroupSeqId)); } List toFilter = null; - List adj = FastList.newInstance(); + List adj = new LinkedList(); if (shipGroupSeqId != null) { toFilter = EntityUtil.filterByAnd(adjustments, contraints4); @@ -2318,7 +2316,7 @@ public class OrderReadHelper { contraints2.add(EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, DataModelConstants.SEQ_ID_NA)); contraints2.add(EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, "")); - List newOrderStatuses = FastList.newInstance(); + List newOrderStatuses = new LinkedList(); newOrderStatuses.addAll(EntityUtil.filterByOr(orderStatuses, contraints1)); return EntityUtil.orderBy(EntityUtil.filterByOr(newOrderStatuses, contraints2), UtilMisc.toList("-statusDatetime")); } @@ -2338,7 +2336,7 @@ public class OrderReadHelper { } if (responses == null) { - responses = FastList.newInstance(); + responses = new LinkedList(); } return responses; } @@ -2355,7 +2353,7 @@ public class OrderReadHelper { } if (responses == null) { - responses = FastList.newInstance(); + responses = new LinkedList(); } return responses; } @@ -2572,7 +2570,7 @@ public class OrderReadHelper { contraints2.add(EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, DataModelConstants.SEQ_ID_NA)); contraints2.add(EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, "")); - List newOrderStatuses = FastList.newInstance(); + List newOrderStatuses = new LinkedList(); newOrderStatuses.addAll(EntityUtil.filterByAnd(orderStatuses, contraints1)); return EntityUtil.orderBy(EntityUtil.filterByOr(newOrderStatuses, contraints2), UtilMisc.toList("-statusDatetime")); } @@ -2631,7 +2629,7 @@ public class OrderReadHelper { } public static List filterOrderAdjustments(List adjustments, boolean includeOther, boolean includeTax, boolean includeShipping, boolean forTax, boolean forShipping) { - List newOrderAdjustmentsList = FastList.newInstance(); + List newOrderAdjustmentsList = new LinkedList(); if (UtilValidate.isNotEmpty(adjustments)) { for (GenericValue orderAdjustment : adjustments) { @@ -2734,7 +2732,7 @@ public class OrderReadHelper { */ public List getAvailableOrderHeaderAdjustments() { List orderHeaderAdjustments = this.getOrderHeaderAdjustments(); - List filteredAdjustments = FastList.newInstance(); + List filteredAdjustments = new LinkedList(); if (orderHeaderAdjustments != null) { for (GenericValue orderAdjustment : orderHeaderAdjustments) { long count = 0; @@ -2807,7 +2805,7 @@ public class OrderReadHelper { contraints1.add(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, "")); List contraints2 = UtilMisc.toList(EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.NOT_EQUAL, null)); - List newOrderStatuses = FastList.newInstance(); + List newOrderStatuses = new LinkedList(); newOrderStatuses.addAll(EntityUtil.filterByOr(orderStatuses, contraints1)); return EntityUtil.orderBy(EntityUtil.filterByAnd(newOrderStatuses, contraints2), UtilMisc.toList("-statusDatetime")); @@ -2845,7 +2843,7 @@ public class OrderReadHelper { public static Map getOrderTaxByTaxAuthGeoAndParty(List orderAdjustments) { BigDecimal taxGrandTotal = BigDecimal.ZERO; - List> taxByTaxAuthGeoAndPartyList = FastList.newInstance(); + List> taxByTaxAuthGeoAndPartyList = new LinkedList>(); if (UtilValidate.isNotEmpty(orderAdjustments)) { // get orderAdjustment where orderAdjustmentTypeId is SALES_TAX. orderAdjustments = EntityUtil.filterByAnd(orderAdjustments, UtilMisc.toMap("orderAdjustmentTypeId", "SALES_TAX")); @@ -2856,7 +2854,7 @@ public class OrderReadHelper { List distinctTaxAuthPartyIdList = EntityUtil.getFieldListFromEntityList(orderAdjustments, "taxAuthPartyId", true); // Keep a list of amount that have been added to make sure none are missed (if taxAuth* information is missing) - List processedAdjustments = FastList.newInstance(); + List processedAdjustments = new LinkedList(); // For each taxAuthGeoId get and add amount from orderAdjustment for (String taxAuthGeoId : distinctTaxAuthGeoIdList) { for (String taxAuthPartyId : distinctTaxAuthPartyIdList) { @@ -2880,7 +2878,7 @@ public class OrderReadHelper { } } // Process any adjustments that got missed - List missedAdjustments = FastList.newInstance(); + List missedAdjustments = new LinkedList(); missedAdjustments.addAll(orderAdjustments); missedAdjustments.removeAll(processedAdjustments); for (GenericValue orderAdjustment : missedAdjustments) { @@ -2888,7 +2886,7 @@ public class OrderReadHelper { } taxGrandTotal = taxGrandTotal.setScale(taxFinalScale, taxRounding); } - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put("taxByTaxAuthGeoAndPartyList", taxByTaxAuthGeoAndPartyList); result.put("taxGrandTotal", taxGrandTotal); return result; @@ -2900,8 +2898,8 @@ public class OrderReadHelper { public static Map getOrderTaxByTaxAuthGeoAndPartyForDisplay(List orderAdjustmentsOriginal) { BigDecimal taxGrandTotal = BigDecimal.ZERO; - List> taxByTaxAuthGeoAndPartyList = FastList.newInstance(); - List orderAdjustmentsToUse = FastList.newInstance(); + List> taxByTaxAuthGeoAndPartyList = new LinkedList>(); + List orderAdjustmentsToUse = new LinkedList(); if (UtilValidate.isNotEmpty(orderAdjustmentsOriginal)) { // get orderAdjustment where orderAdjustmentTypeId is SALES_TAX. orderAdjustmentsToUse.addAll(EntityUtil.filterByAnd(orderAdjustmentsOriginal, UtilMisc.toMap("orderAdjustmentTypeId", "SALES_TAX"))); @@ -2913,7 +2911,7 @@ public class OrderReadHelper { List distinctTaxAuthPartyIdList = EntityUtil.getFieldListFromEntityList(orderAdjustmentsToUse, "taxAuthPartyId", true); // Keep a list of amount that have been added to make sure none are missed (if taxAuth* information is missing) - List processedAdjustments = FastList.newInstance(); + List processedAdjustments = new LinkedList(); // For each taxAuthGeoId get and add amount from orderAdjustment for (String taxAuthGeoId : distinctTaxAuthGeoIdList) { for (String taxAuthPartyId : distinctTaxAuthPartyIdList) { @@ -2942,7 +2940,7 @@ public class OrderReadHelper { } } // Process any adjustments that got missed - List missedAdjustments = FastList.newInstance(); + List missedAdjustments = new LinkedList(); missedAdjustments.addAll(orderAdjustmentsToUse); missedAdjustments.removeAll(processedAdjustments); for (GenericValue orderAdjustment : missedAdjustments) { @@ -2950,7 +2948,7 @@ public class OrderReadHelper { } taxGrandTotal = taxGrandTotal.setScale(taxFinalScale, taxRounding); } - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put("taxByTaxAuthGeoAndPartyList", taxByTaxAuthGeoAndPartyList); result.put("taxGrandTotal", taxGrandTotal); return result; diff --git a/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java b/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java index 9ba7a00ff4..7ddb0d8be8 100644 --- a/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java +++ b/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java @@ -22,16 +22,15 @@ package org.ofbiz.order.order; import java.math.BigDecimal; import java.sql.Timestamp; import java.util.Date; +import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; +import java.util.LinkedList; import java.util.List; import java.util.ListIterator; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralRuntimeException; import org.ofbiz.base.util.UtilDateTime; @@ -210,7 +209,7 @@ public class OrderReturnServices { // get the return items List returnItems = null; - List returnAdjustments = FastList.newInstance(); + List returnAdjustments = new LinkedList(); try { returnItems = returnHeader.getRelated("ReturnItem", null, null, false); returnAdjustments = EntityQuery.use(delegator).from("ReturnAdjustment") @@ -247,7 +246,7 @@ public class OrderReturnServices { // get the email setting and send the mail if (UtilValidate.isNotEmpty(productStoreId)) { - Map sendMap = FastMap.newInstance(); + Map sendMap = new HashMap(); GenericValue productStoreEmail = null; try { @@ -539,7 +538,7 @@ public class OrderReturnServices { if (((BigDecimal) serviceResult.get("returnableQuantity")).compareTo(BigDecimal.ZERO) == 0) { continue; } - Map returnInfo = FastMap.newInstance(); + Map returnInfo = new HashMap(); // first the return info (quantity/price) returnInfo.put("returnableQuantity", serviceResult.get("returnableQuantity")); returnInfo.put("returnablePrice", serviceResult.get("returnablePrice")); @@ -576,7 +575,7 @@ public class OrderReturnServices { } if (UtilValidate.isNotEmpty(itemAdjustments)) { for (GenericValue itemAdjustment : itemAdjustments) { - returnInfo = FastMap.newInstance(); + returnInfo = new HashMap(); returnInfo.put("returnableQuantity", BigDecimal.ONE); // TODO: the returnablePrice should be set to the amount minus the already returned amount returnInfo.put("returnablePrice", itemAdjustment.get("amount")); @@ -630,7 +629,7 @@ public class OrderReturnServices { } } - List completedItems = FastList.newInstance(); + List completedItems = new LinkedList(); if (returnHeader != null && UtilValidate.isNotEmpty(returnItems)) { for (GenericValue item : returnItems) { String itemStatus = item != null ? item.getString("statusId") : null; @@ -768,7 +767,7 @@ public class OrderReturnServices { if (finAccountId == null && billingAccountId == null) { // First find a Billing Account with negative balance, and if found store credit to that - List billingAccounts = FastList.newInstance(); + List billingAccounts = new LinkedList(); try { billingAccounts = EntityQuery.use(delegator).from("BillingAccountRoleAndAddress") .where("partyId", fromPartyId, "roleTypeId", "BILL_TO_CUSTOMER") @@ -833,7 +832,7 @@ public class OrderReturnServices { } if (finAccountId == null) { - Map createAccountCtx = FastMap.newInstance(); + Map createAccountCtx = new HashMap(); createAccountCtx.put("ownerPartyId", fromPartyId); createAccountCtx.put("finAccountTypeId", "STORE_CREDIT_ACCT"); createAccountCtx.put("productStoreId", productStore.getString("productStoreId")); @@ -1089,10 +1088,10 @@ public class OrderReturnServices { Locale locale = (Locale) context.get("locale"); GenericValue userLogin = (GenericValue) context.get("userLogin"); String orderId = (String) context.get("orderId"); - Map serviceResult = FastMap.newInstance(); + Map serviceResult = new HashMap(); GenericValue orderHeader = null; - List orderPayPrefs = FastList.newInstance(); + List orderPayPrefs = new LinkedList(); try { orderHeader = EntityQuery.use(delegator).from("OrderHeader").where("orderId", orderId).queryOne(); orderPayPrefs = orderHeader.getRelated("OrderPaymentPreference", null, UtilMisc.toList("-maxAmount"), false); @@ -1104,7 +1103,7 @@ public class OrderReturnServices { // Check for replacement order if (UtilValidate.isEmpty(orderPayPrefs)) { - List returnItemResponses = FastList.newInstance(); + List returnItemResponses = new LinkedList(); try { returnItemResponses = orderHeader.getRelated("ReplacementReturnItemResponse", null, null, false); } catch (GenericEntityException e) { @@ -1167,8 +1166,8 @@ public class OrderReturnServices { BigDecimal adjustments = getReturnAdjustmentTotal(delegator, UtilMisc.toMap("returnId", returnId, "returnTypeId", returnTypeId)); if (returnHeader != null && (UtilValidate.isNotEmpty(returnItems) || adjustments.compareTo(ZERO) > 0)) { - Map> itemsByOrder = FastMap.newInstance(); - Map totalByOrder = FastMap.newInstance(); + Map> itemsByOrder = new HashMap>(); + Map totalByOrder = new HashMap(); // make sure total refunds on a return don't exceed amount of returned orders Map serviceResult = null; @@ -1265,7 +1264,7 @@ public class OrderReturnServices { * Then group these refund amounts and orderPaymentPreferences by paymentMethodTypeId. That is, * the intent is to get the refundable amounts per orderPaymentPreference, grouped by payment method type. */ - Map>> prefSplitMap = FastMap.newInstance(); + Map>> prefSplitMap = new HashMap>>(); for (GenericValue orderPayPref : orderPayPrefs) { String paymentMethodTypeId = orderPayPref.getString("paymentMethodTypeId"); String orderPayPrefKey = orderPayPref.getString("paymentMethodId") != null ? orderPayPref.getString("paymentMethodId") : orderPayPref.getString("paymentMethodTypeId"); @@ -1287,7 +1286,7 @@ public class OrderReturnServices { // add the refundable amount and orderPaymentPreference to the paymentMethodTypeId map if (orderPayPrefAvailableTotal.compareTo(ZERO) > 0) { - Map orderPayPrefDetails = FastMap.newInstance(); + Map orderPayPrefDetails = new HashMap(); orderPayPrefDetails.put("orderPaymentPreference", orderPayPref); orderPayPrefDetails.put("availableTotal", orderPayPrefAvailableTotal); if (prefSplitMap.containsKey(paymentMethodTypeId)) { @@ -1312,7 +1311,7 @@ public class OrderReturnServices { } } // This defines the ordered part of the sequence of refund processing - List orderedRefundPaymentMethodTypes = FastList.newInstance(); + List orderedRefundPaymentMethodTypes = new LinkedList(); orderedRefundPaymentMethodTypes.add("EXT_BILLACT"); orderedRefundPaymentMethodTypes.add("FIN_ACCOUNT"); orderedRefundPaymentMethodTypes.add("GIFT_CARD"); @@ -1320,7 +1319,7 @@ public class OrderReturnServices { orderedRefundPaymentMethodTypes.add("EFT_ACCOUNT"); // Add all the other paymentMethodTypes, in no particular order - List otherPaymentMethodTypes = FastList.newInstance(); + List otherPaymentMethodTypes = new LinkedList(); try { otherPaymentMethodTypes = EntityQuery.use(delegator).from("PaymentMethodType") .where(EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.NOT_IN, orderedRefundPaymentMethodTypes)) @@ -1425,7 +1424,7 @@ public class OrderReturnServices { } // Fill out the data for the new ReturnItemResponse - Map response = FastMap.newInstance(); + Map response = new HashMap(); if (UtilValidate.isNotEmpty(refundOrderPaymentPreference)) { response.put("orderPaymentPreferenceId", refundOrderPaymentPreference.getString("orderPaymentPreferenceId")); } else { @@ -1611,7 +1610,7 @@ public class OrderReturnServices { String paymentId = response.getString("paymentId"); // for each return item in the response, get the list of return item billings and then a list of invoices - Map returnInvoices = FastMap.newInstance(); // key is invoiceId, value is Invoice GenericValue + Map returnInvoices = new HashMap(); // key is invoiceId, value is Invoice GenericValue List items = response.getRelated("ReturnItem", null, null, false); for (GenericValue item : items) { List billings = item.getRelated("ReturnItemBilling", null, null, false); @@ -1626,7 +1625,7 @@ public class OrderReturnServices { } // for each return invoice found, sum up the related billings - Map invoiceTotals = FastMap.newInstance(); // key is invoiceId, value is the sum of all billings for that invoice + Map invoiceTotals = new HashMap(); // key is invoiceId, value is the sum of all billings for that invoice BigDecimal grandTotal = ZERO; // The sum of all return invoice totals for (GenericValue invoice : returnInvoices.values()) { List billings = invoice.getRelated("ReturnItemBilling", null, null, false); @@ -1697,10 +1696,10 @@ public class OrderReturnServices { "OrderErrorGettingReturnHeaderItemInformation", locale)); } String returnHeaderTypeId = returnHeader.getString("returnHeaderTypeId"); - List createdOrderIds = FastList.newInstance(); + List createdOrderIds = new LinkedList(); if (returnHeader != null && UtilValidate.isNotEmpty(returnItems)) { - Map> returnItemsByOrderId = FastMap.newInstance(); - Map totalByOrder = FastMap.newInstance(); + Map> returnItemsByOrderId = new HashMap>(); + Map totalByOrder = new HashMap(); groupReturnItemsByOrder(returnItems, returnItemsByOrderId, totalByOrder, delegator, returnId, returnTypeId); // process each one by order @@ -1745,7 +1744,7 @@ public class OrderReturnServices { orderMap.put("grandTotal", BigDecimal.ZERO); // make the contact mechs - List contactMechs = FastList.newInstance(); + List contactMechs = new LinkedList(); List orderCm = null; try { orderCm = orderHeader.getRelated("OrderContactMech", null, null, false); @@ -1782,10 +1781,10 @@ public class OrderReturnServices { // make the order items BigDecimal orderPriceTotal = BigDecimal.ZERO; BigDecimal additionalItemTotal = BigDecimal.ZERO; - List orderItems = FastList.newInstance(); - List orderItemShipGroupInfo = FastList.newInstance(); - List orderItemShipGroupIds = FastList.newInstance(); // this is used to store the ship group ids of the groups already added to the orderItemShipGroupInfo list - List orderItemAssocs = FastList.newInstance(); + List orderItems = new LinkedList(); + List orderItemShipGroupInfo = new LinkedList(); + List orderItemShipGroupIds = new LinkedList(); // this is used to store the ship group ids of the groups already added to the orderItemShipGroupInfo list + List orderItemAssocs = new LinkedList(); if (returnItemList != null) { int itemCount = 1; for (GenericValue returnItem : returnItemList) { @@ -1916,7 +1915,7 @@ public class OrderReturnServices { newItem = delegator.makeValue("OrderItem", UtilMisc.toMap("orderItemSeqId", UtilFormatOut.formatPaddedNumber(itemCount++, 5))); // price - Map priceContext = FastMap.newInstance(); + Map priceContext = new HashMap(); priceContext.put("currencyUomId", orderHeader.get("currencyUom")); if (placingPartyId != null) { priceContext.put("partyId", placingPartyId); @@ -2043,12 +2042,12 @@ public class OrderReturnServices { // we'll assume the new order has the same order roles of the original one try { List orderRoles = orderHeader.getRelated("OrderRole", null, null, false); - Map> orderRolesMap = FastMap.newInstance(); + Map> orderRolesMap = new HashMap>(); if (orderRoles != null) { for (GenericValue orderRole : orderRoles) { List parties = orderRolesMap.get(orderRole.getString("roleTypeId")); if (parties == null) { - parties = FastList.newInstance(); + parties = new LinkedList(); orderRolesMap.put(orderRole.getString("roleTypeId"), parties); } parties.add(orderRole.getString("partyId")); @@ -2102,7 +2101,7 @@ public class OrderReturnServices { } // create a ReturnItemResponse and attach to each ReturnItem - Map itemResponse = FastMap.newInstance(); + Map itemResponse = new HashMap(); itemResponse.put("replacementOrderId", createdOrderId); itemResponse.put("responseAmount", orderPriceTotal); itemResponse.put("responseDate", nowTimestamp); @@ -2123,7 +2122,7 @@ public class OrderReturnServices { } for (GenericValue returnItem : returnItemList) { - Map updateReturnItemCtx = FastMap.newInstance(); + Map updateReturnItemCtx = new HashMap(); updateReturnItemCtx.put("returnId", returnId); updateReturnItemCtx.put("returnItemSeqId", returnItem.get("returnItemSeqId")); updateReturnItemCtx.put("returnItemResponseId", returnItemResponseId); @@ -2235,7 +2234,7 @@ public class OrderReturnServices { List returnItemList = returnItemsByOrderId.get(orderId); if (returnItemList == null) { - returnItemList = FastList.newInstance(); + returnItemList = new LinkedList(); } if (totalForOrder == null) { totalForOrder = BigDecimal.ZERO; @@ -2284,7 +2283,7 @@ public class OrderReturnServices { String returnId = (String) context.get("returnId"); Locale locale = (Locale) context.get("locale"); List returnItems = null; - Map returnAmountByOrder = FastMap.newInstance(); + Map returnAmountByOrder = new HashMap(); try { returnItems = EntityQuery.use(delegator).from("ReturnItem").where("returnId", returnId).queryList(); @@ -2294,7 +2293,7 @@ public class OrderReturnServices { "OrderErrorGettingReturnHeaderItemInformation", locale)); } if ((returnItems != null) && (returnItems.size() > 0)) { - List paymentList = FastList.newInstance(); + List paymentList = new LinkedList(); for (GenericValue returnItem : returnItems) { String orderId = returnItem.getString("orderId"); try { diff --git a/applications/order/src/org/ofbiz/order/order/OrderServices.java b/applications/order/src/org/ofbiz/order/order/OrderServices.java index 3ec0187c59..3aac1f3bb5 100644 --- a/applications/order/src/org/ofbiz/order/order/OrderServices.java +++ b/applications/order/src/org/ofbiz/order/order/OrderServices.java @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -35,10 +36,7 @@ import java.util.concurrent.Callable; import javax.transaction.Transaction; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - +import org.apache.tools.ant.taskdefs.condition.HasMethod; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.GeneralRuntimeException; @@ -98,8 +96,8 @@ public class OrderServices { public static final String resourceProduct = "ProductUiLabels"; public static final String resourceCommon = "CommonUiLabels"; - public static Map salesAttributeRoleMap = FastMap.newInstance(); - public static Map purchaseAttributeRoleMap = FastMap.newInstance(); + public static Map salesAttributeRoleMap = new HashMap(); + public static Map purchaseAttributeRoleMap = new HashMap(); static { salesAttributeRoleMap.put("placingCustomerPartyId", "PLACING_CUSTOMER"); salesAttributeRoleMap.put("billToCustomerPartyId", "BILL_TO_CUSTOMER"); @@ -256,10 +254,10 @@ public class OrderServices { List orderItemPriceInfo = UtilGenerics.checkList(context.get("orderItemPriceInfos")); // check inventory and other things for each item - List errorMessages = FastList.newInstance(); - Map normalizedItemQuantities = FastMap.newInstance(); - Map normalizedItemNames = FastMap.newInstance(); - Map itemValuesBySeqId = FastMap.newInstance(); + List errorMessages = new LinkedList(); + Map normalizedItemQuantities = new HashMap(); + Map normalizedItemNames = new HashMap(); + Map itemValuesBySeqId = new HashMap(); Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); // need to run through the items combining any cases where multiple lines refer to the @@ -434,7 +432,7 @@ public class OrderServices { } if (UtilValidate.isNotEmpty(orgPartyId)) { - Map getNextOrderIdContext = FastMap.newInstance(); + Map getNextOrderIdContext = new HashMap(); getNextOrderIdContext.putAll(context); getNextOrderIdContext.put("partyId", orgPartyId); getNextOrderIdContext.put("userLogin", userLogin); @@ -833,7 +831,7 @@ public class OrderServices { } // set the order item ship groups - List dropShipGroupIds = FastList.newInstance(); // this list will contain the ids of all the ship groups for drop shipments (no reservations) + List dropShipGroupIds = new LinkedList(); // this list will contain the ids of all the ship groups for drop shipments (no reservations) if (UtilValidate.isNotEmpty(orderItemShipGroupInfo)) { for (GenericValue valueObj : orderItemShipGroupInfo) { valueObj.set("orderId", orderId); @@ -1101,7 +1099,7 @@ public class OrderServices { } } - Map ripCtx = FastMap.newInstance(); + Map ripCtx = new HashMap(); if (UtilValidate.isNotEmpty(inventoryFacilityId) && UtilValidate.isNotEmpty(productId) && orderItem.getBigDecimal("quantity").compareTo(BigDecimal.ZERO) > 0) { // do something tricky here: run as the "system" user GenericValue permUserLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", "system").cache().queryOne(); @@ -2151,7 +2149,7 @@ public class OrderServices { changeComments = itemCommentMap.get(orderItem.getString("orderItemSeqId")); } - Map serviceCtx = FastMap.newInstance(); + Map serviceCtx = new HashMap(); serviceCtx.put("orderId", orderItem.getString("orderId")); serviceCtx.put("orderItemSeqId", orderItem.getString("orderItemSeqId")); serviceCtx.put("cancelQuantity", thisCancelQty); @@ -2574,7 +2572,7 @@ public class OrderServices { } // prepare the order information - Map sendMap = FastMap.newInstance(); + Map sendMap = new HashMap(); // get the order header and store GenericValue orderHeader = null; @@ -3243,7 +3241,7 @@ public class OrderServices { } // single list with all invoice items - List itemsToInvoice = FastList.newInstance(); + List itemsToInvoice = new LinkedList(); itemsToInvoice.addAll(nonProductItems); itemsToInvoice.addAll(digitalItems); @@ -3369,7 +3367,7 @@ public class OrderServices { if (UtilValidate.isEmpty(allProductContent) && ("Y".equals(product.getString("isVariant")))) { GenericValue parentProduct = ProductWorker.getParentProduct(product.getString("productId"), delegator); if (allProductContent == null) { - allProductContent = FastList.newInstance(); + allProductContent = new LinkedList(); } if (parentProduct != null) { allProductContent.addAll(parentProduct.getRelated("ProductContent", null, null, false)); @@ -3472,7 +3470,7 @@ public class OrderServices { orderItems = orh.getOrderItemsByCondition(EntityCondition.makeCondition("statusId", "ITEM_APPROVED")); // find any service items - List serviceItems = FastList.newInstance(); + List serviceItems = new LinkedList(); if (UtilValidate.isNotEmpty(orderItems)) { for (GenericValue item : orderItems) { GenericValue product = null; @@ -3493,7 +3491,7 @@ public class OrderServices { // now process the service items if (UtilValidate.isNotEmpty(serviceItems)) { // Make sure there is actually something needing invoicing because createInvoiceForOrder doesn't check - List billItems = FastList.newInstance(); + List billItems = new LinkedList(); for (GenericValue item : serviceItems) { BigDecimal orderQuantity = OrderReadHelper.getOrderItemQuantity(item); BigDecimal invoiceQuantity = OrderReadHelper.getOrderItemInvoicedQuantity(item); @@ -3519,7 +3517,7 @@ public class OrderServices { // update the status of service goods to COMPLETED; for (GenericValue item : serviceItems) { - Map statusCtx = FastMap.newInstance(); + Map statusCtx = new HashMap(); statusCtx.put("orderId", item.getString("orderId")); statusCtx.put("orderItemSeqId", item.getString("orderItemSeqId")); statusCtx.put("statusId", "ITEM_COMPLETED"); @@ -3653,7 +3651,7 @@ public class OrderServices { // set the order item attributes if (itemAttributesMap != null) { // go through the item attributes map once to get a list of key names - Set attributeNames =FastSet.newInstance(); + Set attributeNames = new HashSet(); Set keys = itemAttributesMap.keySet(); for (String key : keys) { attributeNames.add(key); @@ -3837,7 +3835,7 @@ public class OrderServices { // update the order item attributes if (itemAttributesMap != null) { // go through the item attributes map once to get a list of key names - Set attributeNames =FastSet.newInstance(); + Set attributeNames = new HashSet(); Set keys = itemAttributesMap.keySet(); for (String key : keys) { String[] attributeInfo = key.split(":"); @@ -4241,8 +4239,8 @@ public class OrderServices { } // get the new orderItems, adjustments, shipping info, payments and order item attributes from the cart - List> modifiedItems = FastList.newInstance(); - List> newItems = FastList.newInstance(); + List> modifiedItems = new LinkedList>(); + List> newItems = new LinkedList>(); List toStore = new LinkedList(); List toAddList = new ArrayList(); toAddList.addAll(cart.makeAllAdjustments()); @@ -4299,20 +4297,19 @@ public class OrderServices { } } } - } else { + } else { // add all the cart adjustments toStore.addAll(toAddList); } - + // Creating objects for New Shipping and Handling Charges Adjustment and Sales Tax Adjustment toStore.addAll(cart.makeAllShipGroupInfos()); toStore.addAll(cart.makeAllOrderPaymentInfos(dispatcher)); - toStore.addAll(cart.makeAllOrderItemAttributes(orderId, ShoppingCart.FILLED_ONLY)); + toStore.addAll(cart.makeAllOrderItemAttributes(orderId, ShoppingCart.FILLED_ONLY)); - - List toRemove = FastList.newInstance(); + List toRemove = new LinkedList(); if (deleteItems) { - // flag to delete existing order items and adjustments + // flag to delete existing order items and adjustments try { toRemove.addAll(EntityQuery.use(delegator).from("OrderItemShipGroupAssoc").where("orderId", orderId).queryList()); toRemove.addAll(EntityQuery.use(delegator).from("OrderItemContactMech").where("orderId", orderId).queryList()); @@ -4355,7 +4352,7 @@ public class OrderServices { toRemove.addAll(existingPromoUses); // set the orderId & other information on all new value objects - List dropShipGroupIds = FastList.newInstance(); // this list will contain the ids of all the ship groups for drop shipments (no reservations) + List dropShipGroupIds = new LinkedList(); // this list will contain the ids of all the ship groups for drop shipments (no reservations) for (GenericValue valueObj : toStore) { valueObj.set("orderId", orderId); if ("OrderItemShipGroup".equals(valueObj.getEntityName())) { @@ -4391,7 +4388,7 @@ public class OrderServices { // ignore promotion items. They are added/canceled automatically if ("Y".equals(valueObj.getString("isPromo"))) { //Fetching the new promo items and adding it to list so that we can create OrderStatus record for that items. - Map promoItem = FastMap.newInstance(); + Map promoItem = new HashMap(); promoItem.put("orderId", valueObj.getString("orderId")); promoItem.put("orderItemSeqId", valueObj.getString("orderItemSeqId")); promoItem.put("quantity", valueObj.getBigDecimal("quantity")); @@ -4414,7 +4411,7 @@ public class OrderServices { String oldItemComment = oldOrderItem.getString("comments") != null ? oldOrderItem.getString("comments") : ""; boolean changeFound = false; - Map modifiedItem = FastMap.newInstance(); + Map modifiedItem = new HashMap(); if (!oldItemDescription.equals(valueObj.getString("itemDescription"))) { modifiedItem.put("itemDescription", oldItemDescription); changeFound = true; @@ -4454,7 +4451,7 @@ public class OrderServices { // this is a new item appended to the order Map itemReasonMap = UtilGenerics.checkMap(changeMap.get("itemReasonMap")); Map itemCommentMap = UtilGenerics.checkMap(changeMap.get("itemCommentMap")); - Map appendedItem = FastMap.newInstance(); + Map appendedItem = new HashMap(); if (UtilValidate.isNotEmpty(itemReasonMap)) { String changeReasonId = itemReasonMap.get("reasonEnumId"); appendedItem.put("reasonEnumId", changeReasonId); @@ -4473,7 +4470,7 @@ public class OrderServices { } } } - + if (Debug.verboseOn()) Debug.logVerbose("To Store Contains: " + toStore, module); @@ -4496,7 +4493,7 @@ public class OrderServices { // store the OrderItemChange if (UtilValidate.isNotEmpty(modifiedItems)) { for (Map modifiendItem: modifiedItems) { - Map serviceCtx = FastMap.newInstance(); + Map serviceCtx = new HashMap(); serviceCtx.put("orderId", modifiendItem.get("orderId")); serviceCtx.put("orderItemSeqId", modifiendItem.get("orderItemSeqId")); serviceCtx.put("itemDescription", modifiendItem.get("itemDescription")); @@ -4776,7 +4773,7 @@ public class OrderServices { "OrderOrderNotFound", UtilMisc.toMap("orderId", orderId), locale)); } - Map ctx = FastMap.newInstance(); + Map ctx = new HashMap(); ctx.put("statusId", statusId); ctx.put("orderId", orderId); ctx.put("setItemStatus", "Y"); @@ -4818,7 +4815,7 @@ public class OrderServices { "OrderOrderNotFound", UtilMisc.toMap("orderId", orderId), locale)); } - Map ctx = FastMap.newInstance(); + Map ctx = new HashMap(); ctx.put("statusId", statusId); ctx.put("orderId", orderId); ctx.put("userLogin", userLogin); @@ -4846,7 +4843,7 @@ public class OrderServices { if (UtilValidate.isEmpty(orderId)) { continue; } - Map ctx = FastMap.newInstance(); + Map ctx = new HashMap(); ctx.put("userLogin", userLogin); ctx.put("orderId", orderId); @@ -4871,7 +4868,7 @@ public class OrderServices { GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); // grouped by facility - Map> facilityOrdersMap = FastMap.newInstance(); + Map> facilityOrdersMap = new HashMap>(); // make the list per facility List orderIds = UtilGenerics.checkList(context.get("orderIdList")); @@ -4903,7 +4900,7 @@ public class OrderServices { for (String facilityId : facilityOrdersMap.keySet()) { List orderIdList = facilityOrdersMap.get(facilityId); - Map ctx = FastMap.newInstance(); + Map ctx = new HashMap(); ctx.put("userLogin", userLogin); ctx.put("orderIdList", orderIdList); ctx.put("facilityId", facilityId); @@ -4936,7 +4933,7 @@ public class OrderServices { if (UtilValidate.isEmpty(orderId)) { continue; } - Map ctx = FastMap.newInstance(); + Map ctx = new HashMap(); ctx.put("userLogin", userLogin); ctx.put("screenLocation", screenLocation); //ctx.put("contentType", "application/postscript"); @@ -4965,7 +4962,7 @@ public class OrderServices { if (UtilValidate.isEmpty(orderId)) { continue; } - Map ctx = FastMap.newInstance(); + Map ctx = new HashMap(); ctx.put("userLogin", userLogin); ctx.put("screenLocation", screenLocation); //ctx.put("contentType", "application/postscript"); @@ -4991,7 +4988,7 @@ public class OrderServices { if (UtilValidate.isEmpty(orderId)) { continue; } - Map ctx = FastMap.newInstance(); + Map ctx = new HashMap(); ctx.put("orderId", orderId); ctx.put("userLogin", userLogin); @@ -6290,7 +6287,7 @@ public class OrderServices { } for (String orderId: orderIds) { - Map svcIn = FastMap.newInstance(); + Map svcIn = new HashMap(); svcIn.put("userLogin", context.get("userLogin")); svcIn.put("orderId", orderId); try { @@ -6355,7 +6352,7 @@ public class OrderServices { updateCtx.put("quantity", newQuantity); dispatcher.runSync("updateProductAssoc", updateCtx); } else { - Map createCtx = FastMap.newInstance(); + Map createCtx = new HashMap(); createCtx.put("userLogin", context.get("userLogin")); createCtx.put("productId", productId); createCtx.put("productIdTo", productIdTo); diff --git a/applications/order/src/org/ofbiz/order/quote/QuoteServices.java b/applications/order/src/org/ofbiz/order/quote/QuoteServices.java index 09a89411c3..3868b5b0d8 100644 --- a/applications/order/src/org/ofbiz/order/quote/QuoteServices.java +++ b/applications/order/src/org/ofbiz/order/quote/QuoteServices.java @@ -19,12 +19,11 @@ package org.ofbiz.order.quote; import java.sql.Timestamp; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilMisc; @@ -59,7 +58,7 @@ public class QuoteServices { String note = (String) context.get("note"); // prepare the order information - Map sendMap = FastMap.newInstance(); + Map sendMap = new HashMap(); // get the quote and store GenericValue quote = null; @@ -167,7 +166,7 @@ public class QuoteServices { //TODO create Quote Term Attributes still to be implemented //List quoteTermAttributes = UtilGenerics.cast(context.get("quoteTermAttributes")); - Map result = FastMap.newInstance(); + Map result = new HashMap(); try { Map quoteIn = UtilMisc.toMap("quoteTypeId", quoteTypeId, "partyId", partyId, "issueDate", issueDate, "statusId", statusId, "currencyUomId", currencyUomId); diff --git a/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java b/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java index 0074d8531f..2a98e466b5 100644 --- a/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java +++ b/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java @@ -22,10 +22,6 @@ import java.util.*; import java.math.BigDecimal; import java.sql.Timestamp; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.*; import org.ofbiz.entity.condition.*; import org.ofbiz.entity.Delegator; @@ -86,23 +82,23 @@ public class RequirementServices { .queryList(); // maps to cache the associated suppliers and products data, so we don't do redundant DB and service requests - Map suppliers = FastMap.newInstance(); - Map gids = FastMap.newInstance(); - Map> inventories = FastMap.newInstance(); - Map productsSold = FastMap.newInstance(); + Map suppliers = new HashMap(); + Map gids = new HashMap(); + Map> inventories = new HashMap>(); + Map productsSold = new HashMap(); // to count quantity, running total, and distinct products in list BigDecimal quantity = BigDecimal.ZERO; BigDecimal amountTotal = BigDecimal.ZERO; - Set products = FastSet.newInstance(); + Set products = new HashSet(); // time period to count products ordered from, six months ago and the 1st of that month Timestamp timePeriodStart = UtilDateTime.getMonthStart(UtilDateTime.nowTimestamp(), 0, -6); // join in fields with extra data about the suppliers and products - List> requirements = FastList.newInstance(); + List> requirements = new LinkedList>(); for (GenericValue requirement : requirementAndRoles) { - Map union = FastMap.newInstance(); + Map union = new HashMap(); String productId = requirement.getString("productId"); partyId = requirement.getString("partyId"); String facilityId = requirement.getString("facilityId"); diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java b/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java index 1451d09e20..606cd5d0a8 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java @@ -29,8 +29,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.GeneralRuntimeException; @@ -304,7 +302,7 @@ public class CheckOutEvents { if (paymentMethods != null) { for (int i = 0; i < paymentMethods.length; i++) { - Map paymentMethodInfo = FastMap.newInstance(); + Map paymentMethodInfo = new HashMap(); String securityCode = request.getParameter("securityCode_" + paymentMethods[i]); if (UtilValidate.isNotEmpty(securityCode)) { diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java index 87d86af2f8..b3df9e992b 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java @@ -38,9 +38,6 @@ import java.util.Map.Entry; import java.util.Set; import java.util.TreeMap; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.GeneralRuntimeException; @@ -128,22 +125,22 @@ public class ShoppingCart implements Iterable, Serializable { private String autoSaveListId = null; /** Holds value of order adjustments. */ - private List adjustments = FastList.newInstance(); + private List adjustments = new LinkedList(); // OrderTerms private boolean orderTermSet = false; private List orderTerms = new LinkedList(); - private List cartLines = FastList.newInstance(); - private Map itemGroupByNumberMap = FastMap.newInstance(); + private List cartLines = new LinkedList(); + private Map itemGroupByNumberMap = new HashMap(); protected long nextGroupNumber = 1; - private List paymentInfo = FastList.newInstance(); - private List shipInfo = FastList. newInstance(); + private List paymentInfo = new LinkedList(); + private List shipInfo = new LinkedList(); private Map contactMechIdsMap = new HashMap(); - private Map orderAttributes = FastMap.newInstance(); - private Map attributes = FastMap.newInstance(); // user defined attributes + private Map orderAttributes = new HashMap(); + private Map attributes = new HashMap(); // user defined attributes // Lists of internal/public notes: when the order is stored they are transformed into OrderHeaderNotes - private List internalOrderNotes = FastList.newInstance(); // internal notes - private List orderNotes = FastList.newInstance(); // public notes (printed on documents etc.) + private List internalOrderNotes = new LinkedList(); // internal notes + private List orderNotes = new LinkedList(); // public notes (printed on documents etc.) /** contains a list of partyId for each roleTypeId (key) */ private Map> additionalPartyRole = new HashMap>(); @@ -153,7 +150,7 @@ public class ShoppingCart implements Iterable, Serializable { private Timestamp defaultShipBeforeDate = null; /** Contains a List for each productPromoId (key) containing a productPromoCodeId (or empty string for no code) for each use of the productPromoId */ - private List productPromoUseInfoList = FastList.newInstance(); + private List productPromoUseInfoList = new LinkedList(); /** Contains the promo codes entered */ private Set productPromoCodes = new HashSet(); private List freeShippingProductPromoActions = new ArrayList(); @@ -707,7 +704,7 @@ public class ShoppingCart implements Iterable, Serializable { public List findAllCartItems(String productId, String groupNumber) { if (productId == null) return this.items(); - List itemsToReturn = FastList.newInstance(); + List itemsToReturn = new LinkedList(); // Check for existing cart item. for (ShoppingCartItem cartItem : cartLines) { if (UtilValidate.isNotEmpty(groupNumber) && !cartItem.isInItemGroup(groupNumber)) { @@ -725,7 +722,7 @@ public class ShoppingCart implements Iterable, Serializable { if (productCategoryId == null) return this.items(); Delegator delegator = this.getDelegator(); - List itemsToReturn = FastList.newInstance(); + List itemsToReturn = new LinkedList(); try { // Check for existing cart item for (ShoppingCartItem cartItem : cartLines) { @@ -769,7 +766,7 @@ public class ShoppingCart implements Iterable, Serializable { if (multipleItems.size() <= maxItems) return; // remove all except first in list from the cart, first because new cart items are added to the beginning... - List localList = FastList.newInstance(); + List localList = new LinkedList(); localList.addAll(multipleItems); // the ones to keep... for (int i=0; i, Serializable { } public static List getItemsProducts(List cartItems) { - List productList = FastList.newInstance(); + List productList = new LinkedList(); for (ShoppingCartItem item : cartItems) { GenericValue product = item.getProduct(); if (product != null) { @@ -955,7 +952,7 @@ public class ShoppingCart implements Iterable, Serializable { /** Returns a Collection of items in the cart object. */ public List items() { - List result = FastList.newInstance(); + List result = new LinkedList(); result.addAll(cartLines); return result; } @@ -999,7 +996,7 @@ public class ShoppingCart implements Iterable, Serializable { } public List getCartItemsInNoGroup() { - List cartItemList = FastList.newInstance(); + List cartItemList = new LinkedList(); for (ShoppingCartItem cartItem : cartLines) { if (cartItem.getItemGroup() == null) { cartItemList.add(cartItem); @@ -1009,7 +1006,7 @@ public class ShoppingCart implements Iterable, Serializable { } public List getCartItemsInGroup(String groupNumber) { - List cartItemList = FastList.newInstance(); + List cartItemList = new LinkedList(); ShoppingCart.ShoppingCartItemGroup itemGroup = this.getItemGroupByNumber(groupNumber); if (itemGroup != null) { for (ShoppingCartItem cartItem : cartLines) { @@ -1792,7 +1789,7 @@ public class ShoppingCart implements Iterable, Serializable { /** Returns the Payment Method Ids */ public List getPaymentMethodTypeIds() { - List pmt = FastList.newInstance(); + List pmt = new LinkedList(); for (CartPaymentInfo inf : paymentInfo) { if (inf.paymentMethodTypeId != null) { pmt.add(inf.paymentMethodTypeId); @@ -1803,7 +1800,7 @@ public class ShoppingCart implements Iterable, Serializable { /** Returns a list of PaymentMethod value objects selected in the cart */ public List getPaymentMethods() { - List methods = FastList.newInstance(); + List methods = new LinkedList(); if (UtilValidate.isNotEmpty(paymentInfo)) { for (String paymentMethodId : getPaymentMethodIds()) { try { @@ -2045,7 +2042,7 @@ public class ShoppingCart implements Iterable, Serializable { /** Returns the ShoppingCartItem (key) and quantity (value) associated with the ship group */ public Map getShipGroupItems(int idx) { CartShipInfo csi = this.getShipInfo(idx); - Map qtyMap = FastMap.newInstance(); + Map qtyMap = new HashMap(); for (ShoppingCartItem item : csi.shipItemInfo.keySet()) { CartShipInfo.CartShipItemInfo csii = csi.shipItemInfo.get(item); qtyMap.put(item, csii.quantity); @@ -2714,8 +2711,8 @@ public class ShoppingCart implements Iterable, Serializable { return itemsTotal; } public BigDecimal getOrderGlobalAdjusments() { - List cartAdjustments = this.getAdjustments(); - List tempAdjustmentsList = FastList.newInstance(); + List cartAdjustments = this.getAdjustments(); + List tempAdjustmentsList = new LinkedList(); if (cartAdjustments != null) { Iterator cartAdjustmentIter = cartAdjustments.iterator(); while (cartAdjustmentIter.hasNext()) { @@ -2937,7 +2934,7 @@ public class ShoppingCart implements Iterable, Serializable { if (orderAdjustmentTypeId == null) return; // make a list of adjustment lists including the cart adjustments and the cartItem adjustments for each item - List> adjsLists = FastList.newInstance(); + List> adjsLists = new LinkedList>(); adjsLists.add(this.getAdjustments()); @@ -3037,7 +3034,7 @@ public class ShoppingCart implements Iterable, Serializable { /** Returns a List of shippable item's size for a specific ship group. */ public List getShippableSizes(int idx) { CartShipInfo info = this.getShipInfo(idx); - List shippableSizes = FastList.newInstance(); + List shippableSizes = new LinkedList(); for (ShoppingCartItem item : info.shipItemInfo.keySet()) { CartShipInfo.CartShipItemInfo csii = info.shipItemInfo.get(item); @@ -3054,7 +3051,7 @@ public class ShoppingCart implements Iterable, Serializable { /** Returns a List of shippable item info (quantity, size, weight) for a specific ship group */ public List> getShippableItemInfo(int idx) { CartShipInfo info = this.getShipInfo(idx); - List> itemInfos = FastList.newInstance(); + List> itemInfos = new LinkedList>(); for (ShoppingCartItem item : info.shipItemInfo.keySet()) { CartShipInfo.CartShipItemInfo csii = info.shipItemInfo.get(item); @@ -3097,7 +3094,7 @@ public class ShoppingCart implements Iterable, Serializable { /** Returns a Map of all features applied to products in the cart with quantities for a specific ship group. */ public Map getFeatureIdQtyMap(int idx) { CartShipInfo info = this.getShipInfo(idx); - Map featureMap = FastMap.newInstance(); + Map featureMap = new HashMap(); for (ShoppingCartItem item : info.shipItemInfo.keySet()) { CartShipInfo.CartShipItemInfo csii = info.shipItemInfo.get(item); @@ -3542,7 +3539,7 @@ public class ShoppingCart implements Iterable, Serializable { } public List makeOrderItemGroups() { - List result = FastList.newInstance(); + List result = new LinkedList(); for (ShoppingCart.ShoppingCartItemGroup itemGroup : this.itemGroupByNumberMap.values()) { result.add(itemGroup.makeOrderItemGroup(this.getDelegator())); } @@ -3617,7 +3614,7 @@ public class ShoppingCart implements Iterable, Serializable { // now build the lines synchronized (cartLines) { - List result = FastList.newInstance(); + List result = new LinkedList(); for (ShoppingCartItem item : cartLines) { if (UtilValidate.isEmpty(item.getOrderItemSeqId())) { @@ -3716,7 +3713,7 @@ public class ShoppingCart implements Iterable, Serializable { /** make a list of all adjustments including order adjustments, order line adjustments, and special adjustments (shipping and tax if applicable) */ public List makeAllAdjustments() { - List allAdjs = FastList.newInstance(); + List allAdjs = new LinkedList(); // before returning adjustments, go through them to find all that need counter adjustments (for instance: free shipping) for (GenericValue orderAdjustment: this.getAdjustments()) { @@ -3804,7 +3801,7 @@ public class ShoppingCart implements Iterable, Serializable { * Internally, the quote adjustments are created from the order adjustments. */ public List makeAllQuoteAdjustments() { - List quoteAdjs = FastList.newInstance(); + List quoteAdjs = new LinkedList(); for (GenericValue orderAdj: makeAllAdjustments()) { GenericValue quoteAdj = this.getDelegator().makeValue("QuoteAdjustment"); @@ -3898,7 +3895,7 @@ public class ShoppingCart implements Iterable, Serializable { } public List makeProductPromoUses() { - List productPromoUses = FastList.newInstance(); + List productPromoUses = new LinkedList(); String partyId = this.getPartyId(); int sequenceValue = 0; for (ProductPromoUseInfo productPromoUseInfo: this.productPromoUseInfoList) { @@ -4013,7 +4010,7 @@ public class ShoppingCart implements Iterable, Serializable { // now build order item attributes synchronized (cartLines) { - List result = FastList.newInstance(); + List result = new LinkedList(); for (ShoppingCartItem item : cartLines) { Map orderItemAttributes = item.getOrderItemAttributes(); @@ -4060,7 +4057,7 @@ public class ShoppingCart implements Iterable, Serializable { public List makeAllOrderAttributes(String orderId, int mode) { - List allOrderAttributes = FastList.newInstance(); + List allOrderAttributes = new LinkedList(); for (Map.Entry entry: orderAttributes.entrySet()) { GenericValue orderAtt = this.getDelegator().makeValue("OrderAttribute"); @@ -4499,8 +4496,8 @@ public class ShoppingCart implements Iterable, Serializable { } public static class CartShipInfo implements Serializable { - public Map shipItemInfo = FastMap.newInstance(); - public List shipTaxAdj = FastList.newInstance(); + public Map shipItemInfo = new HashMap(); + public List shipTaxAdj = new LinkedList(); public String orderTypeId = null; private String internalContactMechId = null; public String telecomContactMechId = null; @@ -4520,7 +4517,7 @@ public class ShoppingCart implements Iterable, Serializable { private String associatedShipGroupSeqId = null; public String vendorPartyId = null; public String productStoreShipMethId = null; - public Map attributes = FastMap.newInstance(); + public Map attributes = new HashMap(); public void setAttribute(String name, Object value) { this.attributes.put(name, value); @@ -4626,7 +4623,7 @@ public class ShoppingCart implements Iterable, Serializable { values.add(shipGroup); //set estimated ship dates - FastList estimatedShipDates = FastList.newInstance(); + LinkedList estimatedShipDates = new LinkedList(); for (ShoppingCartItem item : shipItemInfo.keySet()) { Timestamp estimatedShipDate = item.getEstimatedShipDate(); if (estimatedShipDate != null) { @@ -4640,7 +4637,7 @@ public class ShoppingCart implements Iterable, Serializable { } //set estimated delivery dates - FastList estimatedDeliveryDates = FastList.newInstance(); + LinkedList estimatedDeliveryDates = new LinkedList(); for (ShoppingCartItem item : shipItemInfo.keySet()) { Timestamp estimatedDeliveryDate = item.getDesiredDeliveryDate(); if (estimatedDeliveryDate != null) { @@ -4770,7 +4767,7 @@ public class ShoppingCart implements Iterable, Serializable { } public BigDecimal getTotalTax(ShoppingCart cart) { - List taxAdjustments = FastList.newInstance(); + List taxAdjustments = new LinkedList(); taxAdjustments.addAll(shipTaxAdj); for (CartShipItemInfo info : shipItemInfo.values()) { taxAdjustments.addAll(info.itemTaxAdj); @@ -5126,7 +5123,7 @@ public class ShoppingCart implements Iterable, Serializable { .where("productId", itemProductId) .filterByDate() .queryList(); - Map productPriceMap = FastMap.newInstance(); + Map productPriceMap = new HashMap(); for (GenericValue productPrice : productPriceList) { productPriceMap.put(productPrice.getString("productPriceTypeId"), productPrice.getBigDecimal("price")); } diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java index c0ab772bca..0baa3c1905 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java @@ -34,9 +34,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.ObjectType; import org.ofbiz.base.util.UtilDateTime; @@ -580,7 +577,7 @@ public class ShoppingCartEvents { EntityCondition.makeCondition(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId), EntityOperator.OR, EntityCondition.makeCondition("productIdTo", EntityOperator.EQUALS, productId)), EntityCondition.makeCondition("productAssocTypeId", EntityOperator.EQUALS, "PRODUCT_INCOMPATABLE")), EntityOperator.AND); productAssocs = EntityQuery.use(delegator).from("ProductAssoc").where(cond).filterByDate().queryList(); - List productList = FastList.newInstance(); + List productList = new LinkedList(); for (GenericValue productAssoc : productAssocs) { if (productId.equals(productAssoc.getString("productId"))) { productList.add(productAssoc.getString("productIdTo")); @@ -988,7 +985,7 @@ public class ShoppingCartEvents { } List cartList = UtilGenerics.checkList(session.getAttribute("shoppingCartList")); if (UtilValidate.isEmpty(cartList)) { - cartList = FastList.newInstance(); + cartList = new LinkedList(); session.setAttribute("shoppingCartList", cartList); } ShoppingCart currentCart = (ShoppingCart) session.getAttribute("shoppingCart"); @@ -2067,7 +2064,7 @@ public class ShoppingCartEvents { ", quantity = " + quantity + ", itemType = " + itemType + " and itemDescription = " + itemDescription, module); HttpSession session = request.getSession(); GenericValue userLogin = (GenericValue) session.getAttribute("userLogin"); - Map appendOrderItemMap = FastMap.newInstance(); + Map appendOrderItemMap = new HashMap(); appendOrderItemMap.put("productId", productId); appendOrderItemMap.put("quantity", quantity); appendOrderItemMap.put("orderId", orderId); diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java index d4eb93900b..fdb4a3e2d1 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java @@ -31,8 +31,6 @@ import java.util.Locale; import java.util.Map; import java.util.Map.Entry; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.ObjectType; @@ -210,7 +208,7 @@ public class ShoppingCartHelper { // Get the additional features selected for the product (if any) Map selectedFeatures = UtilHttp.makeParamMapWithPrefix(context, null, "FT", null); - Map additionalFeaturesMap = FastMap.newInstance(); + Map additionalFeaturesMap = new HashMap(); for (String selectedFeatureType : selectedFeatures.keySet()) { String selectedFeatureValue = (String)selectedFeatures.get(selectedFeatureType); if (UtilValidate.isNotEmpty(selectedFeatureValue)) { @@ -231,7 +229,7 @@ public class ShoppingCartHelper { } // get order item attributes - Map orderItemAttributes = FastMap.newInstance(); + Map orderItemAttributes = new HashMap(); String orderItemAttributePrefix = EntityUtilProperties.getPropertyValue("order.properties", "order.item.attr.prefix", delegator); for (Entry entry : context.entrySet()) { if (entry.getKey().toString().contains(orderItemAttributePrefix) && UtilValidate.isNotEmpty(entry.getValue())) { diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java index 97ccd7ab4d..b6848afc63 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java @@ -33,9 +33,6 @@ import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -143,9 +140,9 @@ public class ShoppingCartItem implements java.io.Serializable { private Timestamp estimatedShipDate = null; private Timestamp cancelBackOrderDate = null; - private Map contactMechIdsMap = FastMap.newInstance(); + private Map contactMechIdsMap = new HashMap(); private List orderItemPriceInfos = null; - private List itemAdjustments = FastList.newInstance(); + private List itemAdjustments = new LinkedList(); private boolean isPromo = false; private BigDecimal promoQuantityUsed = BigDecimal.ZERO; private Map quantityUsedPerPromoCandidate = new HashMap(); @@ -679,7 +676,7 @@ public class ShoppingCartItem implements java.io.Serializable { this.orderItemAssocTypeId = item.getOrderItemAssocTypeId(); this.setStatusId(item.getStatusId()); if (UtilValidate.isEmpty(item.getOrderItemAttributes())) { - this.orderItemAttributes = FastMap.newInstance(); + this.orderItemAttributes = new HashMap(); this.orderItemAttributes.putAll(item.getOrderItemAttributes()); } this.attributes = item.getAttributes() == null ? new HashMap() : new HashMap(item.getAttributes()); @@ -700,7 +697,7 @@ public class ShoppingCartItem implements java.io.Serializable { this.additionalProductFeatureAndAppls = item.getAdditionalProductFeatureAndAppls() == null ? null : new HashMap(item.getAdditionalProductFeatureAndAppls()); if (item.getAlternativeOptionProductIds() != null) { - List tempAlternativeOptionProductIds = FastList.newInstance(); + List tempAlternativeOptionProductIds = new LinkedList(); tempAlternativeOptionProductIds.addAll(item.getAlternativeOptionProductIds()); this.setAlternativeOptionProductIds(tempAlternativeOptionProductIds); } @@ -1132,7 +1129,7 @@ public class ShoppingCartItem implements java.io.Serializable { // set basePrice using the calculateProductPrice service if (_product != null && isModifiedPrice == false) { try { - Map priceContext = FastMap.newInstance(); + Map priceContext = new HashMap(); String partyId = cart.getPartyId(); if (partyId != null) { @@ -1270,7 +1267,7 @@ public class ShoppingCartItem implements java.io.Serializable { } // no try to do a recurring price calculation; not all products have recurring prices so may be null - Map recurringPriceContext = FastMap.newInstance(); + Map recurringPriceContext = new HashMap(); recurringPriceContext.putAll(priceContext); recurringPriceContext.put("productPricePurposeId", "RECURRING_CHARGE"); Map recurringPriceResult = dispatcher.runSync("calculateProductPrice", recurringPriceContext); @@ -1936,7 +1933,7 @@ public class ShoppingCartItem implements java.io.Serializable { public Map getItemProductInfo() { - Map itemInfo = FastMap.newInstance(); + Map itemInfo = new HashMap(); itemInfo.put("productId", this.getProductId()); itemInfo.put("weight", this.getWeight()); itemInfo.put("weightUomId", this.getProduct().getString("weightUomId")); @@ -2176,7 +2173,7 @@ public class ShoppingCartItem implements java.io.Serializable { } public Map getFeatureIdQtyMap(BigDecimal quantity) { - Map featureMap = FastMap.newInstance(); + Map featureMap = new HashMap(); GenericValue product = this.getProduct(); if (product != null) { List featureAppls = null; @@ -2242,7 +2239,7 @@ public class ShoppingCartItem implements java.io.Serializable { /** Creates an OrderItemAttribute entry. */ public void setOrderItemAttribute(String name, String value) { - if (orderItemAttributes == null) orderItemAttributes = FastMap.newInstance(); + if (orderItemAttributes == null) orderItemAttributes = new HashMap(); this.orderItemAttributes.put(name, value); } @@ -2253,7 +2250,7 @@ public class ShoppingCartItem implements java.io.Serializable { } public Map getOrderItemAttributes() { - Map attrs = FastMap.newInstance(); + Map attrs = new HashMap(); if (orderItemAttributes != null) { attrs.putAll(orderItemAttributes); } @@ -2497,7 +2494,7 @@ public class ShoppingCartItem implements java.io.Serializable { return ProductWorker.getOptionalProductFeatures(getDelegator(), this.productId); } else { // non-product items do not have features - return FastMap.newInstance(); + return new HashMap>(); } } diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java index 8535013684..447100ced7 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java @@ -23,13 +23,11 @@ import java.math.MathContext; import java.sql.Timestamp; import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -366,8 +364,8 @@ public class ShoppingCartServices { try { product = EntityQuery.use(delegator).from("Product").where("productId", productId).queryOne(); if ("DIGITAL_GOOD".equals(product.getString("productTypeId"))) { - Map surveyResponseMap = FastMap.newInstance(); - Map answers = FastMap.newInstance(); + Map surveyResponseMap = new HashMap(); + Map answers = new HashMap(); List surveyResponseAndAnswers = EntityQuery.use(delegator).from("SurveyResponseAndAnswer").where("orderId", orderId, "orderItemSeqId", orderItemSeqId).queryList(); if (UtilValidate.isNotEmpty(surveyResponseAndAnswers)) { String surveyId = EntityUtil.getFirst(surveyResponseAndAnswers).getString("surveyId"); @@ -757,11 +755,11 @@ public class ShoppingCartServices { // Convert the quote adjustment to order header adjustments and // put them in a map: the key/values pairs are quoteItemSeqId/List of adjs - Map> orderAdjsMap = FastMap.newInstance() ; + Map> orderAdjsMap = new HashMap>() ; for (GenericValue quoteAdj : quoteAdjs) { List orderAdjs = orderAdjsMap.get(UtilValidate.isNotEmpty(quoteAdj.getString("quoteItemSeqId")) ? quoteAdj.getString("quoteItemSeqId") : quoteId); if (orderAdjs == null) { - orderAdjs = FastList.newInstance(); + orderAdjs = new LinkedList(); orderAdjsMap.put(UtilValidate.isNotEmpty(quoteAdj.getString("quoteItemSeqId")) ? quoteAdj.getString("quoteItemSeqId") : quoteId, orderAdjs); } // convert quote adjustments to order adjustments @@ -1113,7 +1111,7 @@ public class ShoppingCartServices { result.put("displayGrandTotalCurrencyFormatted",org.ofbiz.base.util.UtilFormatOut.formatCurrency(shoppingCart.getDisplayGrandTotal(), isoCode, locale)); BigDecimal orderAdjustmentsTotal = OrderReadHelper.calcOrderAdjustments(OrderReadHelper.getOrderHeaderAdjustments(shoppingCart.getAdjustments(), null), shoppingCart.getSubTotal(), true, true, true); result.put("displayOrderAdjustmentsTotalCurrencyFormatted", org.ofbiz.base.util.UtilFormatOut.formatCurrency(orderAdjustmentsTotal, isoCode, locale)); - Map cartItemData = FastMap.newInstance(); + Map cartItemData = new HashMap(); for (ShoppingCartItem cartLine : shoppingCart) { int cartLineIndex = shoppingCart.getItemIndex(cartLine); cartItemData.put("displayItemQty_" + cartLineIndex, cartLine.getQuantity()); @@ -1166,7 +1164,7 @@ public class ShoppingCartServices { Debug.logError(e.toString(), module); return ServiceUtil.returnError(e.toString()); } - Map vendorMap = FastMap.newInstance(); + Map vendorMap = new HashMap(); for (ShoppingCartItem item : cart) { GenericValue vendorProduct = null; String productId = item.getParentProductId(); diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java b/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java index 707a7bf639..94baac513b 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java @@ -24,15 +24,13 @@ import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Map; import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilMisc; @@ -67,7 +65,7 @@ public class ProductDisplayWorker { List cartAssocs = null; try { - Map products = FastMap.newInstance(); + Map products = new HashMap(); Iterator cartiter = cart.iterator(); @@ -117,16 +115,16 @@ public class ProductDisplayWorker { String currentCatalogId = CatalogWorker.getCurrentCatalogId(request); String viewProductCategoryId = CatalogWorker.getCatalogViewAllowCategoryId(delegator, currentCatalogId); if (viewProductCategoryId != null) { - List tempList = FastList.newInstance(); + List tempList = new LinkedList(); tempList.addAll(products.values()); tempList = CategoryWorker.filterProductsInCategory(delegator, tempList, viewProductCategoryId, "productId"); - cartAssocs = FastList.newInstance(); + cartAssocs = new LinkedList(); cartAssocs.addAll(tempList); } } if (cartAssocs == null) { - cartAssocs = FastList.newInstance(); + cartAssocs = new LinkedList(); cartAssocs.addAll(products.values()); } @@ -150,7 +148,7 @@ public class ProductDisplayWorker { Delegator delegator = (Delegator) request.getAttribute("delegator"); HttpServletRequest httpRequest = (HttpServletRequest) request; GenericValue userLogin = (GenericValue) httpRequest.getSession().getAttribute("userLogin"); - Map results = FastMap.newInstance(); + Map results = new HashMap(); if (userLogin == null) userLogin = (GenericValue) httpRequest.getSession().getAttribute("autoUserLogin"); if (userLogin == null) return results; @@ -250,7 +248,7 @@ public class ProductDisplayWorker { } //} - List reorderProds = FastList.newInstance(); + List reorderProds = new LinkedList(); reorderProds.addAll(products.values()); /* @@ -264,7 +262,7 @@ public class ProductDisplayWorker { // sort descending by new metric... BigDecimal occurancesModifier = BigDecimal.ONE; BigDecimal quantityModifier = BigDecimal.ONE; - Map newMetric = FastMap.newInstance(); + Map newMetric = new HashMap(); for (Map.Entry entry : productOccurances.entrySet()) { String prodId = entry.getKey(); Integer quantity = entry.getValue(); @@ -301,7 +299,7 @@ public class ProductDisplayWorker { if (values == null) return null; if (values.size() == 0) return UtilMisc.toList(values); - List result = FastList.newInstance(); + List result = new LinkedList(); result.addAll(values); Collections.sort(result, new ProductByMapComparator(orderByMap, descending)); diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java b/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java index c4e84b85bf..fed4bbf9b8 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java @@ -24,7 +24,9 @@ import java.sql.Timestamp; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -33,10 +35,6 @@ import java.util.Set; import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -82,7 +80,7 @@ public class ProductPromoWorker { public static final MathContext generalRounding = new MathContext(10); public static List getStoreProductPromos(Delegator delegator, LocalDispatcher dispatcher, ServletRequest request) { - List productPromos = FastList.newInstance(); + List productPromos = new LinkedList(); Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); // get the ShoppingCart out of the session. @@ -161,7 +159,7 @@ public class ProductPromoWorker { } public static Set getStoreProductPromoCodes(ShoppingCart cart) { - Set promoCodes = FastSet.newInstance(); + Set promoCodes = new HashSet(); Delegator delegator = cart.getDelegator(); String productStoreId = cart.getProductStoreId(); @@ -198,7 +196,7 @@ public class ProductPromoWorker { } public static List getProductStorePromotions(ShoppingCart cart, Timestamp nowTimestamp, LocalDispatcher dispatcher) { - List productPromoList = FastList.newInstance(); + List productPromoList = new LinkedList(); Delegator delegator = cart.getDelegator(); @@ -241,7 +239,7 @@ public class ProductPromoWorker { } public static List getAgreementPromotions(ShoppingCart cart, Timestamp nowTimestamp, LocalDispatcher dispatcher) { - List productPromoList = FastList.newInstance(); + List productPromoList = new LinkedList(); Delegator delegator = cart.getDelegator(); @@ -633,7 +631,7 @@ public class ProductPromoWorker { } // check email address in ProductPromoCodeEmail - List validEmailCondList = FastList.newInstance(); + List validEmailCondList = new LinkedList(); validEmailCondList.add(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId)); validEmailCondList.add(EntityCondition.makeCondition("productPromoCodeId", EntityOperator.EQUALS, productPromoCodeId)); validEmailCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, nowTimestamp)); @@ -1462,7 +1460,7 @@ public class ProductPromoWorker { } } - List optionProductIds = FastList.newInstance(); + List optionProductIds = new LinkedList(); String productId = productPromoAction.getString("productId"); GenericValue product = null; @@ -1711,7 +1709,7 @@ public class ProductPromoWorker { Set productIds = ProductPromoWorker.getPromoRuleActionProductIds(productPromoAction, delegator, nowTimestamp); - List cartItemsUsed = FastList.newInstance(); + List cartItemsUsed = new LinkedList(); List lineOrderedByBasePriceList = cart.getLineListOrderedByBasePrice(false); Iterator lineOrderedByBasePriceIter = lineOrderedByBasePriceList.iterator(); while (quantityDesired.compareTo(BigDecimal.ZERO) > 0 && lineOrderedByBasePriceIter.hasNext()) { @@ -1833,7 +1831,7 @@ public class ProductPromoWorker { } protected static List getCartItemsUsed(ShoppingCart cart, GenericValue productPromoAction) { - List cartItemsUsed = FastList.newInstance(); + List cartItemsUsed = new LinkedList(); for (ShoppingCartItem cartItem : cart) { BigDecimal quantityUsed = cartItem.getPromoQuantityCandidateUseActionAndAllConds(productPromoAction); if (quantityUsed.compareTo(BigDecimal.ZERO) > 0) { @@ -1976,7 +1974,7 @@ public class ProductPromoWorker { List productPromoProducts = EntityUtil.filterByAnd(productPromoProductsAll, UtilMisc.toMap("productPromoRuleId", "_NA_", "productPromoCondSeqId", "_NA_")); productPromoProducts.addAll(EntityUtil.filterByAnd(productPromoProductsAll, UtilMisc.toMap("productPromoRuleId", productPromoCond.get("productPromoRuleId"), "productPromoCondSeqId", productPromoCond.get("productPromoCondSeqId")))); - Set productIds = FastSet.newInstance(); + Set productIds = new HashSet(); makeProductPromoIdSet(productIds, productPromoCategories, productPromoProducts, delegator, nowTimestamp, false); return productIds; } @@ -1991,7 +1989,7 @@ public class ProductPromoWorker { List productPromoProducts = EntityUtil.filterByAnd(productPromoProductsAll, UtilMisc.toMap("productPromoRuleId", "_NA_", "productPromoActionSeqId", "_NA_")); productPromoProducts.addAll(EntityUtil.filterByAnd(productPromoProductsAll, UtilMisc.toMap("productPromoRuleId", productPromoAction.get("productPromoRuleId"), "productPromoActionSeqId", productPromoAction.get("productPromoActionSeqId")))); - Set productIds = FastSet.newInstance(); + Set productIds = new HashSet(); makeProductPromoIdSet(productIds, productPromoCategories, productPromoProducts, delegator, nowTimestamp, false); return productIds; } @@ -2022,10 +2020,10 @@ public class ProductPromoWorker { List productPromoCategoriesAll = EntityQuery.use(delegator).from("ProductPromoCategory").where("productPromoId", productPromoId).cache(true).queryList(); List productPromoProductsAll = EntityQuery.use(delegator).from("ProductPromoProduct").where("productPromoId", productPromoId).cache(true).queryList(); - List productPromoProductsCond = FastList.newInstance(); - List productPromoCategoriesCond = FastList.newInstance(); - List productPromoProductsAction = FastList.newInstance(); - List productPromoCategoriesAction = FastList.newInstance(); + List productPromoProductsCond = new LinkedList(); + List productPromoCategoriesCond = new LinkedList(); + List productPromoProductsAction = new LinkedList(); + List productPromoCategoriesAction = new LinkedList(); for (GenericValue productPromoProduct : productPromoProductsAll) { // if the rule id is null then this is a global promo one, so always include @@ -2080,12 +2078,12 @@ public class ProductPromoWorker { protected static void handleProductPromoCategories(Set productIds, List productPromoCategories, String productPromoApplEnumId, Delegator delegator, Timestamp nowTimestamp) throws GenericEntityException { boolean include = !"PPPA_EXCLUDE".equals(productPromoApplEnumId); - Set productCategoryIds = FastSet.newInstance(); - Map>> productCategoryGroupSetListMap = FastMap.newInstance(); + Set productCategoryIds = new HashSet(); + Map>> productCategoryGroupSetListMap = new HashMap>>(); for (GenericValue productPromoCategory : productPromoCategories) { if (productPromoApplEnumId.equals(productPromoCategory.getString("productPromoApplEnumId"))) { - Set tempCatIdSet = FastSet.newInstance(); + Set tempCatIdSet = new HashSet(); if ("Y".equals(productPromoCategory.getString("includeSubCategories"))) { ProductSearch.getAllSubCategoryIds(productPromoCategory.getString("productCategoryId"), tempCatIdSet, delegator, nowTimestamp); } else { @@ -2098,7 +2096,7 @@ public class ProductPromoWorker { } else { List> catIdSetList = productCategoryGroupSetListMap.get(andGroupId); if (catIdSetList == null) { - catIdSetList = FastList.newInstance(); + catIdSetList = new LinkedList>(); } catIdSetList.add(tempCatIdSet); } @@ -2134,11 +2132,11 @@ public class ProductPromoWorker { for (Map.Entry>> entry : productCategoryGroupSetListMap.entrySet()) { List> catIdSetList = entry.getValue(); // get all productIds for this catIdSetList - List> productIdSetList = FastList.newInstance(); + List> productIdSetList = new LinkedList>(); for (Set catIdSet : catIdSetList) { // make a Set of productIds including all ids from all categories - Set groupProductIdSet = FastSet.newInstance(); + Set groupProductIdSet = new HashSet(); getAllProductIds(catIdSet, groupProductIdSet, delegator, nowTimestamp, true); productIdSetList.add(groupProductIdSet); } diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEstimateWrapper.java b/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEstimateWrapper.java index 8d79f200fb..ee7351f463 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEstimateWrapper.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEstimateWrapper.java @@ -19,11 +19,10 @@ package org.ofbiz.order.shoppingcart.shipping; import java.math.BigDecimal; +import java.util.HashMap; import java.util.List; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericValue; @@ -86,7 +85,7 @@ public class ShippingEstimateWrapper { } protected void loadEstimates() { - this.shippingEstimates = FastMap.newInstance(); + this.shippingEstimates = new HashMap(); if (shippingMethods != null) { for (GenericValue shipMethod : shippingMethods) { String shippingMethodTypeId = shipMethod.getString("shipmentMethodTypeId"); diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java b/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java index 5f2645dbe4..bfad1addee 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java @@ -19,15 +19,14 @@ package org.ofbiz.order.shoppingcart.shipping; import java.math.BigDecimal; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilMisc; @@ -148,7 +147,7 @@ public class ShippingEvents { String productStoreId, String supplierPartyId, List> itemInfo, BigDecimal shippableWeight, BigDecimal shippableQuantity, BigDecimal shippableTotal, String partyId, String productStoreShipMethId) { String standardMessage = "A problem occurred calculating shipping. Fees will be calculated offline."; - List errorMessageList = FastList.newInstance(); + List errorMessageList = new LinkedList(); if ("NO_SHIPPING".equals(shipmentMethodTypeId)) { return ServiceUtil.returnSuccess(); @@ -208,7 +207,7 @@ public class ShippingEvents { BigDecimal shippingTotal = BigDecimal.ZERO; // prepare the service invocation fields - Map serviceFields = FastMap.newInstance(); + Map serviceFields = new HashMap(); serviceFields.put("initialEstimateAmt", shippingTotal); serviceFields.put("shippableTotal", shippableTotal); serviceFields.put("shippableQuantity", shippableQuantity); diff --git a/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java b/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java index 5b67f97364..2ae2de8f1f 100644 --- a/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java +++ b/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java @@ -20,6 +20,8 @@ package org.ofbiz.order.shoppinglist; import java.math.BigDecimal; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -30,9 +32,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -223,7 +222,7 @@ public class ShoppingListEvents { shoppingListItems = shoppingList.getRelated("ShoppingListItem", null, null, false); if (shoppingListItems == null) { - shoppingListItems = FastList.newInstance(); + shoppingListItems = new LinkedList(); } // include all items of child lists if flagged to do so @@ -272,7 +271,7 @@ public class ShoppingListEvents { String listId = shoppingListItem.getString("shoppingListId"); String itemId = shoppingListItem.getString("shoppingListItemSeqId"); - Map attributes = FastMap.newInstance(); + Map attributes = new HashMap(); // list items are noted in the shopping cart if (setAsListItem) { attributes.put("shoppingListId", listId); @@ -335,7 +334,7 @@ public class ShoppingListEvents { // do nothing, just won't pass to service if it is null } - Map serviceInMap = FastMap.newInstance(); + Map serviceInMap = new HashMap(); serviceInMap.put("shoppingListId", request.getParameter("shoppingListId")); serviceInMap.put("shoppingListItemSeqId", request.getParameter("shoppingListItemSeqId")); serviceInMap.put("productId", request.getParameter("add_product_id")); @@ -571,7 +570,7 @@ public class ShoppingListEvents { * Returns Map keyed on item sequence ID containing a list of survey response IDs */ public static Map> getItemSurveyInfos(List items) { - Map> surveyInfos = FastMap.newInstance(); + Map> surveyInfos = new HashMap>(); if (UtilValidate.isNotEmpty(items)) { for (GenericValue item : items) { String listId = item.getString("shoppingListId"); @@ -587,7 +586,7 @@ public class ShoppingListEvents { * Returns a list of survey response IDs for a shopping list item */ public static List getItemSurveyInfo(GenericValue item) { - List responseIds = FastList.newInstance(); + List responseIds = new LinkedList(); List surveyResp = null; try { surveyResp = item.getRelated("ShoppingListItemSurvey", null, null, false); diff --git a/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java b/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java index edcd79d134..f3e4651192 100644 --- a/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java +++ b/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java @@ -21,12 +21,11 @@ package org.ofbiz.order.shoppinglist; import java.math.BigDecimal; import java.sql.Timestamp; import java.util.Date; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -355,7 +354,7 @@ public class ShoppingListServices { GenericValue paymentPref = EntityUtil.getFirst(orh.getPaymentPreferences()); GenericValue shipGroup = EntityUtil.getFirst(orh.getOrderItemShipGroups()); - Map slCtx = FastMap.newInstance(); + Map slCtx = new HashMap(); slCtx.put("shipmentMethodTypeId", shipGroup.get("shipmentMethodTypeId")); slCtx.put("carrierRoleTypeId", shipGroup.get("carrierRoleTypeId")); slCtx.put("carrierPartyId", shipGroup.get("carrierPartyId")); @@ -551,7 +550,7 @@ public class ShoppingListServices { * @return Map with the result of the service, the output parameters */ public static Map updateShoppingListQuantitiesFromOrder(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); String orderId = (String) context.get("orderId"); try { diff --git a/applications/order/src/org/ofbiz/order/test/OrderTestServices.java b/applications/order/src/org/ofbiz/order/test/OrderTestServices.java index f39e5f3f8e..28852de5ef 100644 --- a/applications/order/src/org/ofbiz/order/test/OrderTestServices.java +++ b/applications/order/src/org/ofbiz/order/test/OrderTestServices.java @@ -19,13 +19,12 @@ package org.ofbiz.order.test; import java.math.BigDecimal; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Random; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilMisc; @@ -85,11 +84,11 @@ public class OrderTestServices { salesChannel = "WEB_SALES_CHANNEL"; } - List productsList = FastList.newInstance(); + List productsList = new LinkedList(); try { if (UtilValidate.isNotEmpty(productId)) { productsList.add(productId); - numberOfProductsPerOrder = Integer.valueOf(1); + numberOfProductsPerOrder = 1; } else { Map result = dispatcher.runSync("getProductCategoryMembers", UtilMisc.toMap("categoryId", productCategoryId)); if (result.get("categoryMembers") != null) { diff --git a/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java b/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java index fe4461fc70..92699b7918 100644 --- a/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java +++ b/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java @@ -19,12 +19,11 @@ package org.ofbiz.order.test; import java.math.BigDecimal; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.UtilMisc; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.util.EntityQuery; @@ -50,7 +49,7 @@ public class PurchaseOrderTest extends OFBizTestCase { } public void testCreatePurchaseOrder() throws Exception { - Map ctx = FastMap.newInstance(); + Map ctx = new HashMap(); ctx.put("partyId", "Company"); ctx.put("orderTypeId", "PURCHASE_ORDER"); ctx.put("currencyUom", "USD"); @@ -61,30 +60,30 @@ public class PurchaseOrderTest extends OFBizTestCase { orderItem.set("unitListPrice", BigDecimal.ZERO); orderItem.set("isModifiedPrice", "N"); orderItem.set("statusId", "ITEM_CREATED"); - List orderItems = FastList.newInstance(); + List orderItems = new LinkedList(); orderItems.add(orderItem); ctx.put("orderItems", orderItems); GenericValue orderContactMech = delegator.makeValue("OrderContactMech", UtilMisc.toMap("contactMechPurposeTypeId", "SHIPPING_LOCATION", "contactMechId", "9000")); - List orderContactMechs = FastList.newInstance(); + List orderContactMechs = new LinkedList(); orderContactMechs.add(orderContactMech); ctx.put("orderContactMechs", orderContactMechs); GenericValue orderItemContactMech = delegator.makeValue("OrderItemContactMech", UtilMisc.toMap("contactMechPurposeTypeId", "SHIPPING_LOCATION", "contactMechId", "9000", "orderItemSeqId", "00001")); - List orderItemContactMechs = FastList.newInstance(); + List orderItemContactMechs = new LinkedList(); orderItemContactMechs.add(orderItemContactMech); ctx.put("orderItemContactMechs", orderItemContactMechs); GenericValue orderItemShipGroup = delegator.makeValue("OrderItemShipGroup", UtilMisc.toMap("carrierPartyId", "UPS", "contactMechId", "9000", "isGift", "N", "maySplit", "N", "shipGroupSeqId", "00001", "shipmentMethodTypeId", "NEXT_DAY")); orderItemShipGroup.set("carrierRoleTypeId","CARRIER"); - List orderItemShipGroupInfo = FastList.newInstance(); + List orderItemShipGroupInfo = new LinkedList(); orderItemShipGroupInfo.add(orderItemShipGroup); ctx.put("orderItemShipGroupInfo", orderItemShipGroupInfo); - List orderTerms = FastList.newInstance(); + List orderTerms = new LinkedList(); ctx.put("orderTerms", orderTerms); - List orderAdjustments = FastList.newInstance(); + List orderAdjustments = new LinkedList(); ctx.put("orderAdjustments", orderAdjustments); ctx.put("billToCustomerPartyId", "Company"); diff --git a/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java b/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java index 908e5f566d..ad16a796b9 100644 --- a/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java +++ b/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java @@ -19,12 +19,10 @@ package org.ofbiz.order.test; import java.math.BigDecimal; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.UtilMisc; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.util.EntityQuery; @@ -50,7 +48,7 @@ public class SalesOrderTest extends OFBizTestCase { public void testCreateSalesOrder() throws Exception { Map ctx = UtilMisc.toMap("partyId", "DemoCustomer", "orderTypeId", "SALES_ORDER", "currencyUom", "USD", "productStoreId", "9000"); - List orderPaymentInfo = FastList.newInstance(); + List orderPaymentInfo = new LinkedList(); GenericValue orderContactMech = delegator.makeValue("OrderContactMech", UtilMisc.toMap("contactMechId", "9015", "contactMechPurposeTypeId", "BILLING_LOCATION")); orderPaymentInfo.add(orderContactMech); @@ -59,7 +57,7 @@ public class SalesOrderTest extends OFBizTestCase { orderPaymentInfo.add(orderPaymentPreference); ctx.put("orderPaymentInfo", orderPaymentInfo); - List orderItemShipGroupInfo = FastList.newInstance(); + List orderItemShipGroupInfo = new LinkedList(); orderContactMech.set("contactMechPurposeTypeId", "SHIPPING_LOCATION"); orderItemShipGroupInfo.add(orderContactMech); @@ -103,12 +101,12 @@ public class SalesOrderTest extends OFBizTestCase { ctx.put("orderItemShipGroupInfo", orderItemShipGroupInfo); - List orderAdjustments = FastList.newInstance(); + List orderAdjustments = new LinkedList(); orderAdjustment = delegator.makeValue("OrderAdjustment", UtilMisc.toMap("orderAdjustmentTypeId", "PROMOTION_ADJUSTMENT", "productPromoActionSeqId", "01", "productPromoId", "9011", "productPromoRuleId", "01", "amount", new BigDecimal(-3.84))); orderAdjustments.add(orderAdjustment); ctx.put("orderAdjustments", orderAdjustments); - List orderItems = FastList.newInstance(); + List orderItems = new LinkedList(); GenericValue orderItem = delegator.makeValue("OrderItem", UtilMisc.toMap("orderItemSeqId", "00001", "orderItemTypeId", "PRODUCT_ORDER_ITEM", "prodCatalogId", "DemoCatalog", "productId", "GZ-2644", "quantity", BigDecimal.ONE, "selectedAmount", BigDecimal.ZERO)); orderItem.set("isPromo", "N"); orderItem.set("isModifiedPrice", "N"); @@ -127,13 +125,13 @@ public class SalesOrderTest extends OFBizTestCase { ctx.put("orderItems", orderItems); - List orderTerms = FastList.newInstance(); + List orderTerms = new LinkedList(); ctx.put("orderTerms", orderTerms); - GenericValue OrderContactMech = delegator.makeValue("OrderContactMech", FastMap.newInstance()); + GenericValue OrderContactMech = delegator.makeValue("OrderContactMech"); OrderContactMech.set("contactMechPurposeTypeId", "SHIPPING_LOCATION"); OrderContactMech.set("contactMechId", "10000"); - List orderContactMechs = FastList.newInstance(); + List orderContactMechs = new LinkedList(); orderContactMechs.add(OrderContactMech); ctx.put("placingCustomerPartyId", "DemoCustomer"); diff --git a/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java b/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java index 0e613ca6ec..9df58c779a 100644 --- a/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java +++ b/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java @@ -19,14 +19,13 @@ package org.ofbiz.order.thirdparty.paypal; import java.io.IOException; +import java.util.HashMap; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilMisc; @@ -128,7 +127,7 @@ public class ExpressCheckoutEvents { LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher"); CheckoutType checkoutType = determineCheckoutType(request); if (checkoutType.equals(CheckoutType.STANDARD)) { - Map inMap = FastMap.newInstance(); + Map inMap = new HashMap(); inMap.put("request", request); inMap.put("response", response); try { @@ -180,7 +179,7 @@ public class ExpressCheckoutEvents { } else if (checkoutType.equals(CheckoutType.STANDARD)) { serviceName = "payPalDoExpressCheckout"; } - Map inMap = FastMap.newInstance(); + Map inMap = new HashMap(); inMap.put("userLogin", userLogin); inMap.put("orderPaymentPreference", paymentPref); Map result = null; diff --git a/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java b/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java index 1ec3901368..887af372b2 100644 --- a/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java +++ b/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java @@ -23,12 +23,11 @@ import java.net.URL; import java.sql.Timestamp; import java.text.ParseException; import java.text.SimpleDateFormat; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.StringUtil; @@ -226,8 +225,8 @@ public class ZipSalesServices { String city = shippingAddress.getString("city"); // setup the return lists. - List orderAdjustments = FastList.newInstance(); - List> itemAdjustments = FastList.newInstance(); + List orderAdjustments = new LinkedList(); + List> itemAdjustments = new LinkedList>(); // check for a valid state/province geo String validStates = EntityUtilProperties.getPropertyValue("zipsales.properties", "zipsales.valid.states", delegator); @@ -264,7 +263,7 @@ public class ZipSalesServices { } private static ListgetItemTaxList(Delegator delegator, GenericValue item, String zipCode, String city, BigDecimal itemAmount, BigDecimal shippingAmount, boolean isUseTax) throws GeneralException { - List adjustments = FastList.newInstance(); + List adjustments = new LinkedList(); // check the item for tax status if (item != null && item.get("taxable") != null && "N".equals(item.getString("taxable"))) { diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/AddGiftCertificates.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/AddGiftCertificates.groovy index 63213bd8fb..b76f2977e4 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/AddGiftCertificates.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/AddGiftCertificates.groovy @@ -16,7 +16,6 @@ * specific language governing permissions and limitations * under the License. */ -import javolution.util.FastList; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.condition.EntityOperator; @@ -31,7 +30,7 @@ if (productStoreId == null) { // Get Gift cards availbale in data giftCardCategories = from("ProductCategory").where("productCategoryTypeId", "GIFT_CARD_CATEGORY").queryList(); -giftCardProductList = FastList.newInstance(); +giftCardProductList = []; if (UtilValidate.isNotEmpty(giftCardCategories)) { giftCardCategories.each { giftCardCategory -> giftCardCategoryMembers = from("ProductCategoryMember").where("productCategoryId", giftCardCategory.productCategoryId).queryList(); diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutShippingAddress.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutShippingAddress.groovy index db6ca94554..6efe5c5068 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutShippingAddress.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutShippingAddress.groovy @@ -26,7 +26,6 @@ import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.condition.EntityExpr; import org.ofbiz.entity.condition.EntityOperator; -import javolution.util.FastList; cart = session.getAttribute("shoppingCart"); party = userLogin.getRelatedOne("Party", false); diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShipSettings.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShipSettings.groovy index e2576c9b17..ef98bb9e62 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShipSettings.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShipSettings.groovy @@ -26,9 +26,6 @@ import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.util.EntityUtil; -import javolution.util.FastMap; -import javolution.util.FastList; - cart = session.getAttribute("shoppingCart"); if (cart) { @@ -84,7 +81,7 @@ if ("SALES_ORDER".equals(cart.getOrderType())) { companyId = cart.getBillToCustomerPartyId(); if (companyId) { - facilityMaps = FastList.newInstance(); + facilityMaps = [:]; facilities = from("Facility").where("ownerPartyId", companyId).cache(true).queryList(); // if facilites is null then check the PartyRelationship where there is a relationship set for Parent & Child organization. Then also fetch the value of companyId from there. @@ -96,7 +93,7 @@ if ("SALES_ORDER".equals(cart.getOrderType())) { } } facilities.each { facility -> - facilityMap = FastMap.newInstance(); + facilityMap = [:]; facilityContactMechValueMaps = ContactMechWorker.getFacilityContactMechValueMaps(delegator, facility.facilityId, false, null); facilityMap.facilityContactMechList = facilityContactMechValueMaps; facilityMap.facility = facility; diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/SideDeepCategory.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/SideDeepCategory.groovy index a6f29dec08..51c172a285 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/SideDeepCategory.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/SideDeepCategory.groovy @@ -25,7 +25,6 @@ import org.ofbiz.base.util.*; import org.ofbiz.product.catalog.*; import org.ofbiz.product.category.*; -import javolution.util.FastMap; CategoryWorker.getRelatedCategories(request, "topLevelList", CatalogWorker.getCatalogTopCategoryId(request, CatalogWorker.getCurrentCatalogId(request)), true); curCategoryId = parameters.category_id ?: parameters.CATEGORY_ID ?: ""; @@ -34,7 +33,7 @@ CategoryWorker.setTrail(request, curCategoryId); categoryList = request.getAttribute("topLevelList"); if (categoryList) { - catContentWrappers = FastMap.newInstance(); + catContentWrappers = [:]; CategoryWorker.getCategoryContentWrappers(catContentWrappers, categoryList, request); context.catContentWrappers = catContentWrappers; } diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy index a4fe97c3dd..ef668dc3fe 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy @@ -17,7 +17,6 @@ * under the License. */ -import javolution.util.FastList; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.condition.EntityOperator; @@ -32,7 +31,7 @@ if (productId != null) { products = EntityUtil.filterByAnd(prodAssocs, [EntityCondition.makeCondition("productAssocTypeId", EntityOperator.NOT_EQUAL, "PRODUCT_VARIANT")]); if (UtilValidate.isNotEmpty(products)) { - productList = FastList.newInstance(); + productList = []; products.each { product -> if (product != null) { String productIdTo = product.getString("productIdTo"); diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy index 775c61f7a9..8e043351c3 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy @@ -31,8 +31,6 @@ import org.ofbiz.product.inventory.InventoryWorker; import org.ofbiz.product.catalog.CatalogWorker; import org.ofbiz.accounting.payment.*; -import javolution.util.FastMap; - orderId = parameters.orderId; context.orderId = orderId; @@ -348,7 +346,7 @@ if (orderHeader) { facilitiesForShipGroup = [:]; if (orderReadHelper.getBillToParty()) { ownerPartyId = orderReadHelper.getBillToParty().partyId; - Map ownedFacilities = FastMap.newInstance(); + Map ownedFacilities = [:]; shipGroups.each { shipGroup -> lookupMap = [ownerPartyId : ownerPartyId]; if (shipGroup.contactMechId) { @@ -412,8 +410,8 @@ if (orderHeader) { onOrderMap = InventoryWorker.getOutstandingProductQuantitiesForPurchaseOrders(productIds, delegator); context.onOrderProductQuantityMap = onOrderMap; } else { - context.requiredProductQuantityMap = FastMap.newInstance(); - context.onOrderProductQuantityMap = FastMap.newInstance(); + context.requiredProductQuantityMap = [:]; + context.onOrderProductQuantityMap = [:]; } // list to find all the POSTAL_ADDRESS for the shipment party. diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy b/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy index 191bdcff54..ace2afef74 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy @@ -17,9 +17,6 @@ * under the License. */ -import javolution.util.FastMap; -import javolution.util.FastList; - import org.ofbiz.base.util.UtilMisc; import org.ofbiz.entity.util.EntityTypeUtil; import org.ofbiz.entity.util.EntityUtil; @@ -37,12 +34,12 @@ shipGroups = from("OrderItemShipGroup").where(findMap).orderBy("shipGroupSeqId") context.shipGroups = shipGroups; // method to expand the marketing packages -FastList expandProductGroup(product, quantityInGroup, quantityShipped, quantityOpen, assocType) { - sublines = FastList.newInstance(); +LinkedList expandProductGroup(product, quantityInGroup, quantityShipped, quantityOpen, assocType) { + sublines = []; associations = product.getRelated("MainProductAssoc", [productAssocTypeId : assocType], null, false); associations = EntityUtil.filterByDate(associations); associations.each { association -> - line = FastMap.newInstance(); + line = [:]; line.product = association.getRelatedOne("AssocProduct", false); // determine the quantities @@ -56,9 +53,9 @@ FastList expandProductGroup(product, quantityInGroup, quantityShipped, quantityO return sublines; } -groupData = FastMap.newInstance(); +groupData = [:]; shipGroups.each { shipGroup -> - data = FastMap.newInstance(); + data = [:]; address = shipGroup.getRelatedOne("PostalAddress", false); data.address = address; @@ -73,14 +70,14 @@ shipGroups.each { shipGroup -> } // the lines in a page, each line being a row of data to display - lines = FastList.newInstance(); + lines = []; // process the order item to ship group associations, each being a line item for the group orderItemAssocs = shipGroup.getRelated("OrderItemShipGroupAssoc", null, ["orderItemSeqId"], false); orderItemAssocs.each { orderItemAssoc -> orderItem = orderItemAssoc.getRelatedOne("OrderItem", false); product = orderItem.getRelatedOne("Product", false); - line = FastMap.newInstance(); + line = []; // the quantity in group quantityInGroup = orderItemAssoc.quantity; diff --git a/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java b/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java index f25349d375..9d7a6b922f 100644 --- a/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java +++ b/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java @@ -21,16 +21,17 @@ package org.ofbiz.party.contact; import java.security.SecureRandom; import java.sql.Timestamp; + import com.ibm.icu.util.Calendar; + import java.util.Date; +import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Locale; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.crypto.HashCrypt; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; @@ -68,13 +69,13 @@ public class ContactMechServices { *@return Map with the result of the service, the output parameters */ public static Map createContactMech(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Timestamp now = UtilDateTime.nowTimestamp(); - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); String partyId = ServiceUtil.getPartyIdCheckSecurity(userLogin, security, context, result, "PARTYMGR", "_PCM_CREATE"); @@ -131,13 +132,13 @@ public class ContactMechServices { *@return Map with the result of the service, the output parameters */ public static Map updateContactMech(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Timestamp now = UtilDateTime.nowTimestamp(); - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); boolean isModified = false; String partyId = ServiceUtil.getPartyIdCheckSecurity(userLogin, security, context, result, "PARTYMGR", "_PCM_UPDATE"); @@ -265,7 +266,7 @@ public class ContactMechServices { *@return Map with the result of the service, the output parameters */ public static Map deleteContactMech(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -323,13 +324,13 @@ public class ContactMechServices { *@return Map with the result of the service, the output parameters */ public static Map createPostalAddress(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Timestamp now = UtilDateTime.nowTimestamp(); - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); String partyId = ServiceUtil.getPartyIdCheckSecurity(userLogin, security, context, result, "PARTYMGR", "_PCM_CREATE"); @@ -395,13 +396,13 @@ public class ContactMechServices { *@return Map with the result of the service, the output parameters */ public static Map updatePostalAddress(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Timestamp now = UtilDateTime.nowTimestamp(); - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); boolean isModified = false; String partyId = ServiceUtil.getPartyIdCheckSecurity(userLogin, security, context, result, "PARTYMGR", "_PCM_UPDATE"); @@ -563,13 +564,13 @@ public class ContactMechServices { *@return Map with the result of the service, the output parameters */ public static Map createTelecomNumber(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Timestamp now = UtilDateTime.nowTimestamp(); - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); String partyId = ServiceUtil.getPartyIdCheckSecurity(userLogin, security, context, result, "PARTYMGR", "_PCM_CREATE"); @@ -617,13 +618,13 @@ public class ContactMechServices { *@return Map with the result of the service, the output parameters */ public static Map updateTelecomNumber(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Timestamp now = UtilDateTime.nowTimestamp(); - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); boolean isModified = false; String partyId = ServiceUtil.getPartyIdCheckSecurity(userLogin, security, context, result, "PARTYMGR", "_PCM_UPDATE"); @@ -798,7 +799,7 @@ public class ContactMechServices { */ public static Map createPartyContactMechPurpose(DispatchContext ctx, Map context) { //Debug.logInfo(new Exception(), "In createPartyContactMechPurpose context: " + context, module); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -860,7 +861,7 @@ public class ContactMechServices { public static Map deletePartyContactMechPurposeIfExists(DispatchContext ctx, Map context) { //Debug.logInfo(new Exception(), "In createPartyContactMechPurpose context: " + context, module); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -916,7 +917,7 @@ public class ContactMechServices { *@return Map with the result of the service, the output parameters */ public static Map deletePartyContactMechPurpose(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); diff --git a/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java b/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java index 9de00c5b70..b2de8d601a 100644 --- a/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java +++ b/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java @@ -22,15 +22,14 @@ package org.ofbiz.party.contact; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.Collection; +import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Map; import javax.servlet.ServletRequest; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Assert; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; @@ -57,14 +56,14 @@ public class ContactMechWorker { } public static List> getPartyContactMechValueMaps(Delegator delegator, String partyId, boolean showOld, String contactMechTypeId) { - List> partyContactMechValueMaps = FastList.newInstance(); + List> partyContactMechValueMaps = new LinkedList>(); List allPartyContactMechs = null; try { List tempCol = EntityQuery.use(delegator).from("PartyContactMech").where("partyId", partyId).queryList(); if (contactMechTypeId != null) { - List tempColTemp = FastList.newInstance(); + List tempColTemp = new LinkedList(); for (GenericValue partyContactMech: tempCol) { GenericValue contactMech = delegator.getRelatedOne("ContactMech", partyContactMech, false); if (contactMech != null && contactMechTypeId.equals(contactMech.getString("contactMechTypeId"))) { @@ -91,7 +90,7 @@ public class ContactMechWorker { Debug.logWarning(e, module); } if (contactMech != null) { - Map partyContactMechValueMap = FastMap.newInstance(); + Map partyContactMechValueMap = new HashMap(); partyContactMechValueMaps.add(partyContactMechValueMap); partyContactMechValueMap.put("contactMech", contactMech); @@ -128,14 +127,14 @@ public class ContactMechWorker { } public static List> getFacilityContactMechValueMaps(Delegator delegator, String facilityId, boolean showOld, String contactMechTypeId) { - List> facilityContactMechValueMaps = FastList.newInstance(); + List> facilityContactMechValueMaps = new LinkedList>(); List allFacilityContactMechs = null; try { List tempCol = EntityQuery.use(delegator).from("FacilityContactMech").where("facilityId", facilityId).queryList(); if (contactMechTypeId != null) { - List tempColTemp = FastList.newInstance(); + List tempColTemp = new LinkedList(); for (GenericValue partyContactMech: tempCol) { GenericValue contactMech = delegator.getRelatedOne("ContactMech", partyContactMech, false); if (contactMech != null && contactMechTypeId.equals(contactMech.getString("contactMechTypeId"))) { @@ -162,7 +161,7 @@ public class ContactMechWorker { Debug.logWarning(e, module); } if (contactMech != null) { - Map facilityContactMechValueMap = FastMap.newInstance(); + Map facilityContactMechValueMap = new HashMap(); facilityContactMechValueMaps.add(facilityContactMechValueMap); facilityContactMechValueMap.put("contactMech", contactMech); @@ -200,7 +199,7 @@ public class ContactMechWorker { public static List> getOrderContactMechValueMaps(Delegator delegator, String orderId) { - List> orderContactMechValueMaps = FastList.newInstance(); + List> orderContactMechValueMaps = new LinkedList>(); List allOrderContactMechs = null; @@ -224,7 +223,7 @@ public class ContactMechWorker { Debug.logWarning(e, module); } if (contactMech != null) { - Map orderContactMechValueMap = FastMap.newInstance(); + Map orderContactMechValueMap = new HashMap(); orderContactMechValueMaps.add(orderContactMechValueMap); orderContactMechValueMap.put("contactMech", contactMech); @@ -260,7 +259,7 @@ public class ContactMechWorker { } public static Collection> getWorkEffortContactMechValueMaps(Delegator delegator, String workEffortId) { - Collection> workEffortContactMechValueMaps = FastList.newInstance(); + Collection> workEffortContactMechValueMaps = new LinkedList>(); List allWorkEffortContactMechs = null; @@ -284,7 +283,7 @@ public class ContactMechWorker { Debug.logWarning(e, module); } if (contactMech != null) { - Map workEffortContactMechValueMap = FastMap.newInstance(); + Map workEffortContactMechValueMap = new HashMap(); workEffortContactMechValueMaps.add(workEffortContactMechValueMap); workEffortContactMechValueMap.put("contactMech", contactMech); @@ -391,7 +390,7 @@ public class ContactMechWorker { Debug.logWarning(e, module); } - Collection purposeTypes = FastList.newInstance(); + Collection purposeTypes = new LinkedList(); Iterator typePurposes = null; try { @@ -495,7 +494,7 @@ public class ContactMechWorker { for (String purposeType: purposeTypes) { List facilityContactMechPurposes = null; - List conditionList = FastList.newInstance(); + List conditionList = new LinkedList(); conditionList.add(EntityCondition.makeCondition("facilityId", facilityId)); conditionList.add(EntityCondition.makeCondition("contactMechPurposeTypeId", purposeType)); EntityCondition entityCondition = EntityCondition.makeCondition(conditionList); @@ -513,7 +512,7 @@ public class ContactMechWorker { for (GenericValue facilityContactMechPurpose: facilityContactMechPurposes) { String contactMechId = facilityContactMechPurpose.getString("contactMechId"); List facilityContactMechs = null; - conditionList = FastList.newInstance(); + conditionList = new LinkedList(); conditionList.add(EntityCondition.makeCondition("facilityId", facilityId)); conditionList.add(EntityCondition.makeCondition("contactMechId", contactMechId)); entityCondition = EntityCondition.makeCondition(conditionList); @@ -616,7 +615,7 @@ public class ContactMechWorker { Debug.logWarning(e, module); } - Collection purposeTypes = FastList.newInstance(); + Collection purposeTypes = new LinkedList(); Iterator typePurposes = null; try { @@ -710,7 +709,7 @@ public class ContactMechWorker { public static List> getPartyPostalAddresses(ServletRequest request, String partyId, String curContactMechId) { Delegator delegator = (Delegator) request.getAttribute("delegator"); - List> postalAddressInfos = FastList.newInstance(); + List> postalAddressInfos = new LinkedList>(); List allPartyContactMechs = null; @@ -731,7 +730,7 @@ public class ContactMechWorker { Debug.logWarning(e, module); } if (contactMech != null && "POSTAL_ADDRESS".equals(contactMech.getString("contactMechTypeId")) && !contactMech.getString("contactMechId").equals(curContactMechId)) { - Map postalAddressInfo = FastMap.newInstance(); + Map postalAddressInfo = new HashMap(); postalAddressInfos.add(postalAddressInfo); postalAddressInfo.put("contactMech", contactMech); @@ -758,7 +757,7 @@ public class ContactMechWorker { public static Map getCurrentPostalAddress(ServletRequest request, String partyId, String curContactMechId) { Delegator delegator = (Delegator) request.getAttribute("delegator"); - Map results = FastMap.newInstance(); + Map results = new HashMap(); if (curContactMechId != null) { List partyContactMechs = null; @@ -869,7 +868,7 @@ public class ContactMechWorker { // get all company addresses Delegator delegator = postalAddress.getDelegator(); - List postalAddresses = FastList.newInstance(); + List postalAddresses = new LinkedList(); try { List partyContactMechs = EntityQuery.use(delegator).from("PartyContactMech") .where("partyId", companyPartyId) diff --git a/applications/party/src/org/ofbiz/party/content/PartyContentWrapper.java b/applications/party/src/org/ofbiz/party/content/PartyContentWrapper.java index ff154b8464..ddf77aad41 100644 --- a/applications/party/src/org/ofbiz/party/content/PartyContentWrapper.java +++ b/applications/party/src/org/ofbiz/party/content/PartyContentWrapper.java @@ -32,14 +32,12 @@ import org.ofbiz.entity.model.ModelEntity; import org.ofbiz.service.LocalDispatcher; import javax.servlet.http.HttpServletRequest; + import java.util.*; import java.io.Writer; import java.io.IOException; import java.io.StringWriter; -import javolution.util.FastList; -import javolution.util.FastMap; - /** * WorkEffortContentWrapper; gets work effort content for display */ @@ -224,7 +222,7 @@ public class PartyContentWrapper implements ContentWrapper { } if (partyContent != null) { // when rendering the product content, always include the Product and ProductContent records that this comes from - Map inContext = FastMap.newInstance(); + Map inContext = new HashMap(); inContext.put("party", party); inContext.put("partyContent", partyContent); ContentWorker.renderContentAsText(dispatcher, delegator, partyContent.getString("contentId"), outWriter, inContext, locale, mimeTypeId, null, null, false); @@ -239,11 +237,11 @@ public class PartyContentWrapper implements ContentWrapper { .filterByDate() .queryList(); - List contentList = FastList.newInstance(); + List contentList = new LinkedList(); if (partyContentList != null) { for (GenericValue partyContent: partyContentList) { StringWriter outWriter = new StringWriter(); - Map inContext = FastMap.newInstance(); + Map inContext = new HashMap(); inContext.put("party", party); inContext.put("partyContent", partyContent); ContentWorker.renderContentAsText(dispatcher, delegator, partyContent.getString("contentId"), outWriter, inContext, locale, mimeTypeId, null, null, false); diff --git a/applications/party/src/org/ofbiz/party/party/PartyRelationshipHelper.java b/applications/party/src/org/ofbiz/party/party/PartyRelationshipHelper.java index 383107f4c4..f494a8850d 100644 --- a/applications/party/src/org/ofbiz/party/party/PartyRelationshipHelper.java +++ b/applications/party/src/org/ofbiz/party/party/PartyRelationshipHelper.java @@ -20,11 +20,10 @@ package org.ofbiz.party.party; import java.sql.Timestamp; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilMisc; @@ -56,7 +55,7 @@ public class PartyRelationshipHelper { String partyRelationshipTypeId = (String) partyRelationshipValues.get("partyRelationshipTypeId") ; Timestamp fromDate = UtilDateTime.nowTimestamp(); - List condList = FastList.newInstance(); + List condList = new LinkedList(); condList.add(EntityCondition.makeCondition("partyIdFrom", partyIdFrom)); condList.add(EntityCondition.makeCondition("partyIdTo", partyIdTo)); condList.add(EntityCondition.makeCondition("roleTypeIdFrom", roleTypeIdFrom)); diff --git a/applications/party/src/org/ofbiz/party/party/PartyRelationshipServices.java b/applications/party/src/org/ofbiz/party/party/PartyRelationshipServices.java index 7776f8f683..3df5e3ea7b 100644 --- a/applications/party/src/org/ofbiz/party/party/PartyRelationshipServices.java +++ b/applications/party/src/org/ofbiz/party/party/PartyRelationshipServices.java @@ -19,12 +19,11 @@ package org.ofbiz.party.party; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilMisc; @@ -57,7 +56,7 @@ public class PartyRelationshipServices { *@return Map with the result of the service, the output parameters */ public static Map createPartyRelationshipType(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -109,7 +108,7 @@ public class PartyRelationshipServices { *@return Map with the result of the service, the output parameters */ public static Map createUpdatePartyRelationshipAndRoles(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); diff --git a/applications/party/src/org/ofbiz/party/party/PartyServices.java b/applications/party/src/org/ofbiz/party/party/PartyServices.java index 591e128652..7d19b39c32 100644 --- a/applications/party/src/org/ofbiz/party/party/PartyServices.java +++ b/applications/party/src/org/ofbiz/party/party/PartyServices.java @@ -26,13 +26,12 @@ import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.sql.Timestamp; import java.util.Collection; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVRecord; import org.ofbiz.base.util.Debug; @@ -106,10 +105,10 @@ public class PartyServices { * @return Map with the result of the service, the output parameters. */ public static Map createPerson(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Timestamp now = UtilDateTime.nowTimestamp(); - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); Locale locale = (Locale) context.get("locale"); // in most cases userLogin will be null, but get anyway so we can keep track of that info if it is available GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -279,7 +278,7 @@ public class PartyServices { * @return Map with the result of the service, the output parameters. */ public static Map updatePerson(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -351,7 +350,7 @@ public class PartyServices { * @return Map with the result of the service, the output parameters. */ public static Map createPartyGroup(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Timestamp now = UtilDateTime.nowTimestamp(); @@ -457,7 +456,7 @@ public class PartyServices { * @return Map with the result of the service, the output parameters. */ public static Map updatePartyGroup(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -524,7 +523,7 @@ public class PartyServices { * @return Map with the result of the service, the output parameters. */ public static Map createAffiliate(DispatchContext ctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = ctx.getDelegator(); Locale locale = (Locale) context.get("locale"); Timestamp now = UtilDateTime.nowTimestamp(); @@ -643,7 +642,7 @@ public class PartyServices { * @return Map with the result of the service, the output parameters. */ public static Map createPartyNote(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -715,9 +714,9 @@ public class PartyServices { * @return Map with the result of the service, the output parameters. */ public static Map getPartyFromExactEmail(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); - Collection> parties = FastList.newInstance(); + Collection> parties = new LinkedList>(); String email = (String) context.get("email"); Locale locale = (Locale) context.get("locale"); @@ -753,9 +752,9 @@ public class PartyServices { } public static Map getPartyFromEmail(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); - Collection> parties = FastList.newInstance(); + Collection> parties = new LinkedList>(); String email = (String) context.get("email"); Locale locale = (Locale) context.get("locale"); @@ -798,9 +797,9 @@ public class PartyServices { */ public static Map getPartyFromUserLogin(DispatchContext dctx, Map context) { Debug.logWarning("Running the getPartyFromUserLogin Service...", module); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); - Collection> parties = FastList.newInstance(); + Collection> parties = new LinkedList>(); String userLoginId = (String) context.get("userLoginId"); Locale locale = (Locale) context.get("locale"); @@ -828,7 +827,7 @@ public class PartyServices { "partyservices.cannot_get_party_entities_read", UtilMisc.toMap("errMessage", e.getMessage()), locale)); } - if (parties.size() > 0) { + if (UtilValidate.isNotEmpty(parties)) { result.put("parties", parties); } return result; @@ -841,9 +840,9 @@ public class PartyServices { * @return Map with the result of the service, the output parameters. */ public static Map getPartyFromPerson(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); - Collection> parties = FastList.newInstance(); + Collection> parties = new LinkedList>(); String firstName = (String) context.get("firstName"); String lastName = (String) context.get("lastName"); Locale locale = (Locale) context.get("locale"); @@ -891,9 +890,9 @@ public class PartyServices { * @return Map with the result of the service, the output parameters. */ public static Map getPartyFromPartyGroup(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); - Collection> parties = FastList.newInstance(); + Collection> parties = new LinkedList>(); String groupName = (String) context.get("groupName"); Locale locale = (Locale) context.get("locale"); @@ -928,7 +927,7 @@ public class PartyServices { } public static Map getPerson(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); String partyId = (String) context.get("partyId"); Locale locale = (Locale) context.get("locale"); @@ -948,7 +947,7 @@ public class PartyServices { } public static Map createRoleType(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); GenericValue roleType = null; @@ -1136,11 +1135,11 @@ public class PartyServices { dynamicView.addRelation("many", "", "UserLogin", ModelKeyMap.makeKeyMapList("partyId")); // define the main condition & expression list - List andExprs = FastList.newInstance(); + List andExprs = new LinkedList(); EntityCondition mainCond = null; - List orderBy = FastList.newInstance(); - List fieldsToSelect = FastList.newInstance(); + List orderBy = new LinkedList(); + List fieldsToSelect = new LinkedList(); // fields we need to select; will be used to set distinct fieldsToSelect.add("partyId"); fieldsToSelect.add("statusId"); @@ -1500,7 +1499,7 @@ public class PartyServices { } } - if (partyList == null) partyList = FastList.newInstance(); + if (partyList == null) partyList = new LinkedList(); result.put("partyList", partyList); result.put("partyListSize", Integer.valueOf(partyListSize)); result.put("paramList", paramList); @@ -1882,8 +1881,8 @@ public class PartyServices { String csvString = Charset.forName(encoding).decode(fileBytes).toString(); final BufferedReader csvReader = new BufferedReader(new StringReader(csvString)); CSVFormat fmt = CSVFormat.DEFAULT.withHeader(); - List errMsgs = FastList.newInstance(); - List newErrMsgs = FastList.newInstance(); + List errMsgs = new LinkedList(); + List newErrMsgs = new LinkedList(); String lastPartyId = null; // last partyId read from the csv file String currentPartyId = null; // current partyId from the csv file String newPartyId = null; // new to create/update partyId in the system @@ -2099,7 +2098,7 @@ public class PartyServices { partiesCreated++; } else { errMsgs.addAll(newErrMsgs); - newErrMsgs = FastList.newInstance(); + newErrMsgs = new LinkedList(); } } @@ -2201,31 +2200,23 @@ public class PartyServices { partyContactMechPurpose.put("contactMechId", newContactMechId); result = dispatcher.runSync("createPartyContactMechPurpose", partyContactMechPurpose); } - - lastPartyId = currentPartyId; - errMsgs.addAll(newErrMsgs); - newErrMsgs = FastList.newInstance(); + lastPartyId = currentPartyId; + errMsgs.addAll(newErrMsgs); + newErrMsgs = new LinkedList(); } } - } - - } - catch (GenericServiceException e) { - Debug.logError(e, module); + } catch (GenericServiceException e) { + Debug.logError(e, module); + return ServiceUtil.returnError(e.getMessage()); + } catch (GenericEntityException e) { + Debug.logError(e, module); + return ServiceUtil.returnError(e.getMessage()); + } catch (IOException e) { + Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); } - - catch (GenericEntityException e) { - Debug.logError(e, module); - return ServiceUtil.returnError(e.getMessage()); - } - - catch (IOException e) { - Debug.logError(e, module); - return ServiceUtil.returnError(e.getMessage()); - } - + if (errMsgs.size() > 0) { return ServiceUtil.returnError(errMsgs); } diff --git a/applications/party/src/org/ofbiz/party/party/PartyWorker.java b/applications/party/src/org/ofbiz/party/party/PartyWorker.java index 9262fc90de..8f61237cc5 100644 --- a/applications/party/src/org/ofbiz/party/party/PartyWorker.java +++ b/applications/party/src/org/ofbiz/party/party/PartyWorker.java @@ -20,15 +20,14 @@ package org.ofbiz.party.party; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import javax.servlet.ServletRequest; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilFormatOut; @@ -57,7 +56,7 @@ public class PartyWorker { public static Map getPartyOtherValues(ServletRequest request, String partyId, String partyAttr, String personAttr, String partyGroupAttr) { Delegator delegator = (Delegator) request.getAttribute("delegator"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); try { GenericValue party = EntityQuery.use(delegator).from("Party").where("partyId", partyId).queryOne(); @@ -248,7 +247,7 @@ public class PartyWorker { String stateProvinceGeoId, String postalCode, String postalCodeExt, String countryGeoId, String firstName, String middleName, String lastName) throws GeneralException { // return list - List returnList = FastList.newInstance(); + List returnList = new LinkedList(); // address information if (firstName == null || lastName == null) { @@ -319,7 +318,7 @@ public class PartyWorker { throw new IllegalArgumentException(); } - List addrExprs = FastList.newInstance(); + List addrExprs = new LinkedList(); if (stateProvinceGeoId != null) { if ("**".equals(stateProvinceGeoId)) { Debug.logWarning("Illegal state code passed!", module); @@ -369,7 +368,7 @@ public class PartyWorker { return addresses; } - List validFound = FastList.newInstance(); + List validFound = new LinkedList(); // check the address line for (GenericValue address: addresses) { // address 1 field @@ -443,7 +442,7 @@ public class PartyWorker { } public static List getAssociatedPartyIdsByRelationshipType(Delegator delegator, String partyIdFrom, String partyRelationshipTypeId) { - List partyList = FastList.newInstance(); + List partyList = new LinkedList(); List partyIds = null; try { EntityConditionList baseExprs = EntityCondition.makeCondition(UtilMisc.toList( @@ -452,7 +451,7 @@ public class PartyWorker { List associatedParties = EntityQuery.use(delegator).from("PartyRelationship").where(baseExprs).cache(true).queryList(); partyList.addAll(associatedParties); while (UtilValidate.isNotEmpty(associatedParties)) { - List currentAssociatedParties = FastList.newInstance(); + List currentAssociatedParties = new LinkedList(); for (GenericValue associatedParty : associatedParties) { EntityConditionList innerExprs = EntityCondition.makeCondition(UtilMisc.toList( EntityCondition.makeCondition("partyIdFrom", associatedParty.get("partyIdTo")), diff --git a/applications/party/webapp/partymgr/WEB-INF/actions/communication/ListCommunications.groovy b/applications/party/webapp/partymgr/WEB-INF/actions/communication/ListCommunications.groovy index 9144061d98..ff68897ffc 100644 --- a/applications/party/webapp/partymgr/WEB-INF/actions/communication/ListCommunications.groovy +++ b/applications/party/webapp/partymgr/WEB-INF/actions/communication/ListCommunications.groovy @@ -20,8 +20,6 @@ import org.ofbiz.entity.condition.EntityOperator; import org.ofbiz.entity.condition.EntityCondition; -import javolution.util.FastList; - partyId = parameters.partyId; context.partyId = partyId; @@ -38,10 +36,10 @@ if (previousSort?.equals(sortField)) { sortField = "-" + sortField; } -List eventExprs = FastList.newInstance(); +List eventExprs = []; expr = EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, partyId); eventExprs.add(expr); -expr = EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, "partyId"); +expr = EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, partyId); eventExprs.add(expr); ecl = EntityCondition.makeCondition(eventExprs, EntityOperator.OR); events = from("CommunicationEvent").where(ecl).orderBy(sortField).queryList(); diff --git a/applications/party/webapp/partymgr/WEB-INF/actions/communication/getPartyEmailFromCommEventInfo.groovy b/applications/party/webapp/partymgr/WEB-INF/actions/communication/getPartyEmailFromCommEventInfo.groovy index 05bbb35d19..b88354cd34 100644 --- a/applications/party/webapp/partymgr/WEB-INF/actions/communication/getPartyEmailFromCommEventInfo.groovy +++ b/applications/party/webapp/partymgr/WEB-INF/actions/communication/getPartyEmailFromCommEventInfo.groovy @@ -19,7 +19,6 @@ import org.ofbiz.base.util.*; import org.ofbiz.entity.util.EntityUtil; -import javolution.util.FastList; communicationEvent = from("CommunicationEvent").where("communicationEventId", parameters.communicationEventId).cache(true).queryOne(); @@ -40,7 +39,7 @@ name = communicationEvent.note.substring(startName, endName); if (name) { counter = 0; lastBlank = 0; - List names = FastList.newInstance(); + List names = []; while ((nextBlank = name.indexOf(" ", lastBlank)) != -1) { names.add(name.substring(lastBlank, nextBlank)); lastBlank = nextBlank + 1; diff --git a/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy b/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy index d2b6f73b05..7dda55ac9e 100644 --- a/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy +++ b/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy @@ -25,7 +25,6 @@ import org.ofbiz.accounting.payment.*; import org.ofbiz.entity.*; import org.ofbiz.entity.condition.*; import org.ofbiz.entity.util.*; -import javolution.util.FastMap; Boolean actualCurrency = new Boolean(context.actualCurrency); if (actualCurrency == null) { diff --git a/applications/party/webapp/partymgr/WEB-INF/actions/party/UnAppliedInvoicesForParty.groovy b/applications/party/webapp/partymgr/WEB-INF/actions/party/UnAppliedInvoicesForParty.groovy index cd6ae8d63c..5c27d86e19 100644 --- a/applications/party/webapp/partymgr/WEB-INF/actions/party/UnAppliedInvoicesForParty.groovy +++ b/applications/party/webapp/partymgr/WEB-INF/actions/party/UnAppliedInvoicesForParty.groovy @@ -25,7 +25,6 @@ import org.ofbiz.accounting.payment.*; import org.ofbiz.entity.*; import org.ofbiz.entity.condition.*; import org.ofbiz.entity.util.*; -import javolution.util.FastMap; Boolean actualCurrency = new Boolean(context.actualCurrency); if (actualCurrency == null) { diff --git a/applications/party/webapp/partymgr/WEB-INF/actions/party/UnAppliedPaymentsForParty.groovy b/applications/party/webapp/partymgr/WEB-INF/actions/party/UnAppliedPaymentsForParty.groovy index 397279368d..2f422f3b81 100644 --- a/applications/party/webapp/partymgr/WEB-INF/actions/party/UnAppliedPaymentsForParty.groovy +++ b/applications/party/webapp/partymgr/WEB-INF/actions/party/UnAppliedPaymentsForParty.groovy @@ -25,7 +25,6 @@ import org.ofbiz.accounting.payment.*; import org.ofbiz.entity.*; import org.ofbiz.entity.condition.*; import org.ofbiz.entity.util.*; -import javolution.util.FastMap; Boolean actualCurrency = new Boolean(context.actualCurrency); if (actualCurrency == null) { diff --git a/applications/product/script/org/ofbiz/product/catalog/CatalogServices.xml b/applications/product/script/org/ofbiz/product/catalog/CatalogServices.xml index 7d7713053c..07bbfe985d 100644 --- a/applications/product/script/org/ofbiz/product/catalog/CatalogServices.xml +++ b/applications/product/script/org/ofbiz/product/catalog/CatalogServices.xml @@ -449,7 +449,7 @@ under the License. - + diff --git a/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java b/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java index dd27d7beaa..5a35f97db1 100644 --- a/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java +++ b/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java @@ -19,6 +19,7 @@ package org.ofbiz.product.catalog; import java.util.Collection; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -26,8 +27,6 @@ import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilHttp; @@ -69,7 +68,7 @@ public class CatalogWorker { } public static List getAllCatalogIds(ServletRequest request) { - List catalogIds = FastList.newInstance(); + List catalogIds = new LinkedList(); List catalogs = null; Delegator delegator = (Delegator) request.getAttribute("delegator"); try { @@ -177,7 +176,7 @@ public class CatalogWorker { if (!fromSession) { if (Debug.verboseOn()) Debug.logVerbose("[CatalogWorker.getCurrentCatalogId] Setting new catalog name: " + prodCatalogId, module); session.setAttribute("CURRENT_CATALOG_ID", prodCatalogId); - CategoryWorker.setTrail(request, FastList.newInstance()); + CategoryWorker.setTrail(request, new LinkedList()); } return prodCatalogId; } @@ -195,8 +194,8 @@ public class CatalogWorker { } public static List getCatalogIdsAvailable(List partyCatalogs, List storeCatalogs) { - List categoryIds = FastList.newInstance(); - List allCatalogLinks = FastList.newInstance(); + List categoryIds = new LinkedList(); + List allCatalogLinks = new LinkedList(); if (partyCatalogs != null) allCatalogLinks.addAll(partyCatalogs); if (storeCatalogs != null) allCatalogLinks.addAll(storeCatalogs); @@ -387,7 +386,7 @@ public class CatalogWorker { public static Collection getCatalogQuickaddCategories(ServletRequest request, String prodCatalogId) { if (prodCatalogId == null || prodCatalogId.length() <= 0) return null; - Collection categoryIds = FastList.newInstance(); + Collection categoryIds = new LinkedList(); Collection prodCatalogCategories = getProdCatalogCategories(request, prodCatalogId, "PCCT_QUICK_ADD"); diff --git a/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java b/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java index ebfbf673ed..631ad24140 100644 --- a/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java +++ b/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java @@ -20,6 +20,7 @@ package org.ofbiz.product.category; import java.io.IOException; import java.util.Collections; +import java.util.LinkedList; import java.util.List; import javax.servlet.FilterChain; @@ -31,8 +32,6 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.StringUtil.StringWrapper; @@ -89,7 +88,7 @@ public class CatalogUrlFilter extends ContextFilter { try { // look for productId if (alternativeUrl.endsWith("-p")) { - List productContentConds = FastList.newInstance(); + List productContentConds = new LinkedList(); productContentConds.add(EntityCondition.makeCondition("productContentTypeId", "ALTERNATIVE_URL")); productContentConds.add(EntityUtil.getFilterByDateExpr()); List productContentInfos = EntityQuery.use(delegator).from("ProductContentAndInfo").where(productContentConds).orderBy("-fromDate").cache(true).queryList(); @@ -144,7 +143,7 @@ public class CatalogUrlFilter extends ContextFilter { // look for productCategoryId if (alternativeUrl.endsWith("-c")) { - List productCategoryContentConds = FastList.newInstance(); + List productCategoryContentConds = new LinkedList(); productCategoryContentConds.add(EntityCondition.makeCondition("prodCatContentTypeId", "ALTERNATIVE_URL")); productCategoryContentConds.add(EntityUtil.getFilterByDateExpr()); List productCategoryContentInfos = EntityQuery.use(delegator).from("ProductCategoryContentAndInfo").where(productCategoryContentConds).orderBy("-fromDate").cache(true).queryList(); @@ -209,7 +208,7 @@ public class CatalogUrlFilter extends ContextFilter { if (UtilValidate.isNotEmpty(productId)) { try { - List conds = FastList.newInstance(); + List conds = new LinkedList(); conds.add(EntityCondition.makeCondition("productId", productId)); conds.add(EntityUtil.getFilterByDateExpr()); List productCategoryMembers = EntityQuery.use(delegator).select("productCategoryId").from("ProductCategoryMember").where(conds).orderBy("-fromDate").cache(true).queryList(); @@ -234,7 +233,7 @@ public class CatalogUrlFilter extends ContextFilter { // look for productCategoryId from productId if (UtilValidate.isNotEmpty(productId)) { try { - List rolllupConds = FastList.newInstance(); + List rolllupConds = new LinkedList(); rolllupConds.add(EntityCondition.makeCondition("productId", productId)); rolllupConds.add(EntityUtil.getFilterByDateExpr()); List productCategoryMembers = EntityQuery.use(delegator).from("ProductCategoryMember").where(rolllupConds).orderBy("-fromDate").cache(true).queryList(); @@ -252,13 +251,13 @@ public class CatalogUrlFilter extends ContextFilter { // generate trail elements from productCategoryId if (UtilValidate.isNotEmpty(productCategoryId)) { - List trailElements = FastList.newInstance(); + List trailElements = new LinkedList(); trailElements.add(productCategoryId); String parentProductCategoryId = productCategoryId; while (UtilValidate.isNotEmpty(parentProductCategoryId)) { // find product category rollup try { - List rolllupConds = FastList.newInstance(); + List rolllupConds = new LinkedList(); rolllupConds.add(EntityCondition.makeCondition("productCategoryId", parentProductCategoryId)); rolllupConds.add(EntityUtil.getFilterByDateExpr()); List productCategoryRollups = EntityQuery.use(delegator).from("ProductCategoryRollup").where(rolllupConds).orderBy("-fromDate").cache(true).queryList(); @@ -283,7 +282,7 @@ public class CatalogUrlFilter extends ContextFilter { List trail = CategoryWorker.getTrail(httpRequest); if (trail == null) { - trail = FastList.newInstance(); + trail = new LinkedList(); } // adjust trail @@ -405,7 +404,7 @@ public class CatalogUrlFilter extends ContextFilter { url = urlBuilder.toString(); } else { if (UtilValidate.isEmpty(trail)) { - trail = FastList.newInstance(); + trail = new LinkedList(); } url = CatalogUrlServlet.makeCatalogUrl(contextPath, trail, productId, productCategoryId, previousCategoryId); } @@ -448,7 +447,7 @@ public class CatalogUrlFilter extends ContextFilter { url = urlBuilder.toString(); } else { if (UtilValidate.isEmpty(trail)) { - trail = FastList.newInstance(); + trail = new LinkedList(); } url = CatalogUrlServlet.makeCatalogUrl(contextPath, trail, productId, productCategoryId, previousCategoryId); } diff --git a/applications/product/src/org/ofbiz/product/category/CatalogUrlServlet.java b/applications/product/src/org/ofbiz/product/category/CatalogUrlServlet.java index cf1e0551c3..22245581f4 100644 --- a/applications/product/src/org/ofbiz/product/category/CatalogUrlServlet.java +++ b/applications/product/src/org/ofbiz/product/category/CatalogUrlServlet.java @@ -19,6 +19,7 @@ package org.ofbiz.product.category; import java.io.IOException; +import java.util.LinkedList; import java.util.List; import javax.servlet.RequestDispatcher; @@ -28,8 +29,6 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilValidate; @@ -110,7 +109,7 @@ public class CatalogUrlServlet extends HttpServlet { } else if (pathElements.size() > 2) { List trail = CategoryWorker.getTrail(request); if (trail == null) { - trail = FastList.newInstance(); + trail = new LinkedList(); } if (trail.contains(pathElements.get(0))) { diff --git a/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java b/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java index 6df9d93681..2b666ba611 100644 --- a/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java +++ b/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java @@ -21,14 +21,13 @@ package org.ofbiz.product.category; import java.io.IOException; import java.io.StringWriter; import java.io.Writer; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.StringUtil; @@ -145,7 +144,7 @@ public class CategoryContentWrapper implements ContentWrapper { GenericValue categoryContent = EntityUtil.getFirst(categoryContentList); if (categoryContent != null) { // when rendering the category content, always include the Product Category and ProductCategoryContent records that this comes from - Map inContext = FastMap.newInstance(); + Map inContext = new HashMap(); inContext.put("productCategory", productCategory); inContext.put("categoryContent", categoryContent); ContentWorker.renderContentAsText(dispatcher, delegator, categoryContent.getString("contentId"), outWriter, inContext, locale, mimeTypeId, null, null, true); diff --git a/applications/product/src/org/ofbiz/product/category/CategoryServices.java b/applications/product/src/org/ofbiz/product/category/CategoryServices.java index 971a1f3ea2..3fdef9244e 100644 --- a/applications/product/src/org/ofbiz/product/category/CategoryServices.java +++ b/applications/product/src/org/ofbiz/product/category/CategoryServices.java @@ -19,6 +19,8 @@ package org.ofbiz.product.category; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -26,9 +28,6 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -97,7 +96,7 @@ public class CategoryServices { } List orderByFields = UtilGenerics.checkList(context.get("orderByFields")); - if (orderByFields == null) orderByFields = FastList.newInstance(); + if (orderByFields == null) orderByFields = new LinkedList(); String entityName = getCategoryFindEntityName(delegator, orderByFields, introductionDateLimit, releaseDateLimit); GenericValue productCategory; @@ -112,7 +111,7 @@ public class CategoryServices { if (activeOnly) { productCategoryMembers = EntityUtil.filterByDate(productCategoryMembers, true); } - List filterConditions = FastList.newInstance(); + List filterConditions = new LinkedList(); if (introductionDateLimit != null) { EntityCondition condition = EntityCondition.makeCondition(EntityCondition.makeCondition("introductionDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("introductionDate", EntityOperator.LESS_THAN_EQUAL_TO, introductionDateLimit)); filterConditions.add(condition); @@ -218,7 +217,7 @@ public class CategoryServices { Timestamp releaseDateLimit = (Timestamp) context.get("releaseDateLimit"); List orderByFields = UtilGenerics.checkList(context.get("orderByFields")); - if (orderByFields == null) orderByFields = FastList.newInstance(); + if (orderByFields == null) orderByFields = new LinkedList(); String entityName = getCategoryFindEntityName(delegator, orderByFields, introductionDateLimit, releaseDateLimit); String prodCatalogId = (String) context.get("prodCatalogId"); @@ -236,7 +235,6 @@ public class CategoryServices { } Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); - int viewIndex = 0; try { viewIndex = Integer.valueOf((String) context.get("viewIndexString")).intValue(); @@ -291,7 +289,7 @@ public class CategoryServices { if (activeOnly) { productCategoryMembers = EntityUtil.filterByDate(productCategoryMembers, true); } - List filterConditions = FastList.newInstance(); + List filterConditions = new LinkedList(); if (introductionDateLimit != null) { EntityCondition condition = EntityCondition.makeCondition(EntityCondition.makeCondition("introductionDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("introductionDate", EntityOperator.LESS_THAN_EQUAL_TO, introductionDateLimit)); filterConditions.add(condition); @@ -335,7 +333,7 @@ public class CategoryServices { highIndex = listSize; } } else { - List mainCondList = FastList.newInstance(); + List mainCondList = new LinkedList(); mainCondList.add(EntityCondition.makeCondition("productCategoryId", EntityOperator.EQUALS, productCategory.getString("productCategoryId"))); if (activeOnly) { mainCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, nowTimestamp)); @@ -357,7 +355,7 @@ public class CategoryServices { if (limitView) { if (viewProductCategoryId != null) { // do manual checking to filter view allow - productCategoryMembers = FastList.newInstance(); + productCategoryMembers = new LinkedList(); GenericValue nextValue; int chunkSize = 0; listSize = 0; @@ -399,7 +397,7 @@ public class CategoryServices { } // null safety if (productCategoryMembers == null) { - productCategoryMembers = FastList.newInstance(); + productCategoryMembers = new LinkedList(); } if (highIndex > listSize) { @@ -414,7 +412,7 @@ public class CategoryServices { } } - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put("viewIndex", Integer.valueOf(viewIndex)); result.put("viewSize", Integer.valueOf(viewSize)); result.put("lowIndex", Integer.valueOf(lowIndex)); @@ -438,7 +436,7 @@ public class CategoryServices { String hrefString2 = request.getParameter("hrefString2"); String entityName = null; String primaryKeyName = null; - + if (isCatalog.equals("true")) { entityName = "ProdCatalog"; primaryKeyName = "prodCatalogId"; @@ -446,11 +444,11 @@ public class CategoryServices { entityName = "ProductCategory"; primaryKeyName = "productCategoryId"; } - - List categoryList = FastList.newInstance(); + + List categoryList = new LinkedList(); List childOfCats; List sortList = org.ofbiz.base.util.UtilMisc.toList("sequenceNum", "title"); - + try { GenericValue category = EntityQuery.use(delegator).from(entityName).where(primaryKeyName, productCategoryId).queryOne(); if (UtilValidate.isNotEmpty(category)) { @@ -472,50 +470,47 @@ public class CategoryServices { catId = childOfCat.get("productCategoryId"); catNameField = "CATEGORY_NAME"; - - Map josonMap = FastMap.newInstance(); + + Map josonMap = new HashMap(); List childList = null; - + // Get the child list of chosen category childList = EntityQuery.use(delegator).from("ProductCategoryRollup").where("parentProductCategoryId", catId).filterByDate().queryList(); - + // Get the chosen category information for the categoryContentWrapper GenericValue cate = EntityQuery.use(delegator).from("ProductCategory").where("productCategoryId",catId).queryOne(); - + // If chosen category's child exists, then put the arrow before category icon if (UtilValidate.isNotEmpty(childList)) { josonMap.put("state", "closed"); } - Map dataMap = FastMap.newInstance(); - Map dataAttrMap = FastMap.newInstance(); + Map dataMap = new HashMap(); + Map dataAttrMap = new HashMap(); CategoryContentWrapper categoryContentWrapper = new CategoryContentWrapper(cate, request); - String title = null; if (UtilValidate.isNotEmpty(categoryContentWrapper.get(catNameField))) { - title = categoryContentWrapper.get(catNameField)+" "+"["+catId+"]"; + title = new StringBuffer(categoryContentWrapper.get(catNameField).toString()).append(" [").append(catId).append("]").toString(); dataMap.put("title", title); } else { title = catId.toString(); dataMap.put("title", catId); } - dataAttrMap.put("onClick", onclickFunction + "('" + catId + additionParam + "')"); - + dataAttrMap.put("onClick", new StringBuffer(onclickFunction).append("('").append(catId).append(additionParam).append("')").toString()); + String hrefStr = hrefString + catId; if (UtilValidate.isNotEmpty(hrefString2)) { hrefStr = hrefStr + hrefString2; } dataAttrMap.put("href", hrefStr); - dataMap.put("attr", dataAttrMap); josonMap.put("data", dataMap); - Map attrMap = FastMap.newInstance(); + Map attrMap = new HashMap(); attrMap.put("id", catId); attrMap.put("isCatalog", false); attrMap.put("rel", "CATEGORY"); - josonMap.put("attr",attrMap); - josonMap.put("sequenceNum",childOfCat.get("sequenceNum")); - josonMap.put("title",title); - + josonMap.put("attr", attrMap); + josonMap.put("sequenceNum", childOfCat.get("sequenceNum")); + josonMap.put("title", title); categoryList.add(josonMap); } List> sortedCategoryList = UtilMisc.sortMaps(categoryList, sortList); diff --git a/applications/product/src/org/ofbiz/product/category/CategoryWorker.java b/applications/product/src/org/ofbiz/product/category/CategoryWorker.java index b7563198c6..8965acaca8 100644 --- a/applications/product/src/org/ofbiz/product/category/CategoryWorker.java +++ b/applications/product/src/org/ofbiz/product/category/CategoryWorker.java @@ -20,6 +20,7 @@ package org.ofbiz.product.category; import java.util.Collection; import java.util.Collections; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -28,8 +29,6 @@ import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilFormatOut; @@ -87,7 +86,7 @@ public class CategoryWorker { public static void getCategoriesWithNoParent(ServletRequest request, String attributeName) { Delegator delegator = (Delegator) request.getAttribute("delegator"); - Collection results = FastList.newInstance(); + Collection results = new LinkedList(); try { Collection allCategories = EntityQuery.use(delegator).from("ProductCategory").queryList(); @@ -141,7 +140,7 @@ public class CategoryWorker { } public static List getRelatedCategoriesRet(Delegator delegator, String attributeName, String parentId, boolean limitView, boolean excludeEmpty, boolean recursive) { - List categories = FastList.newInstance(); + List categories = new LinkedList(); if (Debug.verboseOn()) Debug.logVerbose("[CategoryWorker.getRelatedCategories] ParentID: " + parentId, module); @@ -231,12 +230,12 @@ public class CategoryWorker { } private static EntityCondition buildCountCondition(String fieldName, String fieldValue) { - List orCondList = FastList.newInstance(); + List orCondList = new LinkedList(); orCondList.add(EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, UtilDateTime.nowTimestamp())); orCondList.add(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null)); EntityCondition orCond = EntityCondition.makeCondition(orCondList, EntityOperator.OR); - List andCondList = FastList.newInstance(); + List andCondList = new LinkedList(); andCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN, UtilDateTime.nowTimestamp())); andCondList.add(EntityCondition.makeCondition(fieldName, EntityOperator.EQUALS, fieldValue)); andCondList.add(orCond); @@ -266,7 +265,7 @@ public class CategoryWorker { } public static List adjustTrail(List origTrail, String currentCategoryId, String previousCategoryId) { - List trail = FastList.newInstance(); + List trail = new LinkedList(); if (origTrail != null) { trail.addAll(origTrail); } @@ -390,7 +389,7 @@ public class CategoryWorker { } public static List filterProductsInCategory(Delegator delegator, List valueObjects, String productCategoryId, String productIdFieldName) throws GenericEntityException { - List newList = FastList.newInstance(); + List newList = new LinkedList(); if (productCategoryId == null) return newList; if (valueObjects == null) return null; @@ -443,13 +442,13 @@ public class CategoryWorker { String productCategoryId = (String) context.get("productCategoryId"); Map results = ServiceUtil.returnSuccess(); Delegator delegator = dctx.getDelegator(); - List trailElements = FastList.newInstance(); + List trailElements = new LinkedList(); trailElements.add(productCategoryId); String parentProductCategoryId = productCategoryId; while (UtilValidate.isNotEmpty(parentProductCategoryId)) { // find product category rollup try { - List rolllupConds = FastList.newInstance(); + List rolllupConds = new LinkedList(); rolllupConds.add(EntityCondition.makeCondition("productCategoryId", parentProductCategoryId)); rolllupConds.add(EntityUtil.getFilterByDateExpr()); List productCategoryRollups = EntityQuery.use(delegator).from("ProductCategoryRollup").where(rolllupConds).orderBy("sequenceNum").cache(true).queryList(); diff --git a/applications/product/src/org/ofbiz/product/category/SeoCatalogUrlServlet.java b/applications/product/src/org/ofbiz/product/category/SeoCatalogUrlServlet.java index ac7bf6e7cb..ff1df63095 100644 --- a/applications/product/src/org/ofbiz/product/category/SeoCatalogUrlServlet.java +++ b/applications/product/src/org/ofbiz/product/category/SeoCatalogUrlServlet.java @@ -19,6 +19,7 @@ package org.ofbiz.product.category; import java.io.IOException; +import java.util.LinkedList; import java.util.List; import javax.servlet.RequestDispatcher; @@ -28,8 +29,6 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilMisc; @@ -105,7 +104,7 @@ public class SeoCatalogUrlServlet extends HttpServlet { } else if (pathElements.size() > 2) { List trail = CategoryWorker.getTrail(request); if (trail == null) { - trail = FastList.newInstance(); + trail = new LinkedList(); } if (trail.contains(pathElements.get(0))) { diff --git a/applications/product/src/org/ofbiz/product/category/SeoConfigUtil.java b/applications/product/src/org/ofbiz/product/category/SeoConfigUtil.java index fdbc46f3fa..bd1e20a1b9 100644 --- a/applications/product/src/org/ofbiz/product/category/SeoConfigUtil.java +++ b/applications/product/src/org/ofbiz/product/category/SeoConfigUtil.java @@ -22,6 +22,8 @@ import java.io.FileInputStream; import java.io.IOException; import java.net.URL; import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; @@ -29,10 +31,6 @@ import java.util.Set; import javax.servlet.http.HttpServletResponse; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.apache.oro.text.regex.MalformedPatternException; import org.apache.oro.text.regex.Pattern; import org.apache.oro.text.regex.Perl5Compiler; @@ -110,9 +108,9 @@ public class SeoConfigUtil { seoReplacements = new HashMap(); forwardReplacements = new HashMap(); forwardResponseCodes = new HashMap(); - userExceptionPatterns = FastList.newInstance(); - specialProductIds = FastMap.newInstance(); - charFilters = FastMap.newInstance(); + userExceptionPatterns = new LinkedList(); + specialProductIds = new HashMap(); + charFilters = new HashMap(); try { URL seoConfigFilename = UtilURL.fromResource(SEO_CONFIG_FILENAME); Document configDoc = UtilXml.readXmlDocument(seoConfigFilename, false); @@ -140,7 +138,7 @@ public class SeoConfigUtil { if (categoryUrlEnabled) { String allowedContextValue = UtilXml.childElementValue(categoryUrlElement, ELEMENT_ALLOWED_CONTEXT_PATHS, null); - allowedContextPaths = FastSet.newInstance(); + allowedContextPaths = new HashSet(); if (UtilValidate.isNotEmpty(allowedContextValue)) { List allowedContextPathList = StringUtil.split(allowedContextValue, ALLOWED_CONTEXT_PATHS_SEPERATOR); for (String path : allowedContextPathList) { diff --git a/applications/product/src/org/ofbiz/product/category/SeoContentUrlFilter.java b/applications/product/src/org/ofbiz/product/category/SeoContentUrlFilter.java index 9d0b1436b6..0d9d9166a6 100644 --- a/applications/product/src/org/ofbiz/product/category/SeoContentUrlFilter.java +++ b/applications/product/src/org/ofbiz/product/category/SeoContentUrlFilter.java @@ -20,6 +20,7 @@ package org.ofbiz.product.category; import java.io.IOException; +import java.util.LinkedList; import java.util.List; import java.util.Set; @@ -32,8 +33,6 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilCodec; import org.ofbiz.base.util.UtilHttp; @@ -113,7 +112,7 @@ public class SeoContentUrlFilter extends ContextFilter { Delegator delegator = (Delegator) request.getAttribute("delegator"); String url = null; try { - List expr = FastList.newInstance(); + List expr = new LinkedList(); expr.add(EntityCondition.makeCondition("caContentAssocTypeId", EntityOperator.EQUALS, "ALTERNATIVE_URL")); expr.add(EntityCondition.makeCondition("caThruDate", EntityOperator.EQUALS, null)); expr.add(EntityCondition.makeCondition("contentIdStart", EntityOperator.EQUALS, contentId)); diff --git a/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java b/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java index 0530eea21c..ac91ef1d78 100644 --- a/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java +++ b/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java @@ -23,6 +23,7 @@ import static org.ofbiz.base.util.UtilGenerics.checkMap; import java.io.IOException; import java.net.URL; import java.util.Collection; +import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; @@ -38,8 +39,6 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastSet; - import org.apache.oro.text.regex.Pattern; import org.apache.oro.text.regex.Perl5Matcher; import org.ofbiz.base.util.Debug; @@ -69,12 +68,12 @@ import org.ofbiz.webapp.website.WebSiteWorker; public class SeoContextFilter extends ContextFilter { public static final String module = SeoContextFilter.class.getName(); - - protected Set WebServlets = FastSet.newInstance(); - + + protected Set WebServlets = new HashSet(); + public void init(FilterConfig config) throws ServletException { super.init(config); - + Map servletRegistrations = config.getServletContext().getServletRegistrations(); for (String key : servletRegistrations.keySet()) { Collection servlets = servletRegistrations.get(key).getMappings(); diff --git a/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java b/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java index c2d713d7b3..3a09910023 100644 --- a/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java +++ b/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java @@ -21,6 +21,8 @@ package org.ofbiz.product.category.ftl; import java.io.IOException; import java.io.Writer; import java.util.Collection; +import java.util.Hashtable; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -29,9 +31,6 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.apache.oro.text.regex.MalformedPatternException; import org.apache.oro.text.regex.Pattern; import org.apache.oro.text.regex.Perl5Compiler; @@ -187,8 +186,8 @@ public class CatalogUrlSeoTransform implements TemplateTransformModel { public static synchronized void initCategoryMap(HttpServletRequest request, Delegator delegator) { if (SeoConfigUtil.checkCategoryUrl()) { - categoryNameIdMap = FastMap.newInstance(); - categoryIdNameMap = FastMap.newInstance(); + categoryNameIdMap = new Hashtable(); + categoryIdNameMap = new Hashtable(); Perl5Matcher matcher = new Perl5Matcher(); try { @@ -556,7 +555,7 @@ public class CatalogUrlSeoTransform implements TemplateTransformModel { String tempProductId = urlElements.get(i); while (i >= 0) { try { - List exprs = FastList.newInstance(); + List exprs = new LinkedList(); exprs.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, lastPathElement)); // if (SeoConfigUtil.isSpecialProductId(tempProductId)) { // exprs.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, SeoConfigUtil.getSpecialProductId(tempProductId))); diff --git a/applications/product/src/org/ofbiz/product/config/ProductConfigItemContentWrapper.java b/applications/product/src/org/ofbiz/product/config/ProductConfigItemContentWrapper.java index 79b2fc7e34..df59665019 100644 --- a/applications/product/src/org/ofbiz/product/config/ProductConfigItemContentWrapper.java +++ b/applications/product/src/org/ofbiz/product/config/ProductConfigItemContentWrapper.java @@ -21,13 +21,13 @@ package org.ofbiz.product.config; import java.io.IOException; import java.io.StringWriter; import java.io.Writer; +import java.util.HashMap; +import java.util.List; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilHttp; @@ -167,7 +167,7 @@ public class ProductConfigItemContentWrapper implements java.io.Serializable { .queryFirst(); if (productConfigItemContent != null) { // when rendering the product config item content, always include the ProductConfigItem and ProdConfItemContent records that this comes from - Map inContext = FastMap.newInstance(); + Map inContext = new HashMap(); inContext.put("productConfigItem", productConfigItem); inContext.put("productConfigItemContent", productConfigItemContent); ContentWorker.renderContentAsText(dispatcher, delegator, productConfigItemContent.getString("contentId"), outWriter, inContext, locale, mimeTypeId, null, null, false); diff --git a/applications/product/src/org/ofbiz/product/config/ProductConfigWorker.java b/applications/product/src/org/ofbiz/product/config/ProductConfigWorker.java index dc3ced7056..3a6c222e58 100644 --- a/applications/product/src/org/ofbiz/product/config/ProductConfigWorker.java +++ b/applications/product/src/org/ofbiz/product/config/ProductConfigWorker.java @@ -18,6 +18,7 @@ *******************************************************************************/ package org.ofbiz.product.config; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -25,8 +26,6 @@ import java.util.Enumeration; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilHttp; @@ -142,7 +141,7 @@ public class ProductConfigWorker { if (ProductWorker.isVirtual((Delegator)request.getAttribute("delegator"), selectedProductId)) { if ("VV_FEATURETREE".equals(ProductWorker.getProductVirtualVariantMethod((Delegator)request.getAttribute("delegator"), selectedProductId))) { // get the selected features - List selectedFeatures = FastList.newInstance(); + List selectedFeatures = new LinkedList(); Enumeration paramNames = UtilGenerics.cast(request.getParameterNames()); while (paramNames.hasMoreElements()) { String paramName = paramNames.nextElement(); @@ -189,12 +188,12 @@ public class ProductConfigWorker { if (configWrapper == null || (!configWrapper.isCompleted())) return; String configId = null; List questions = configWrapper.getQuestions(); - List configsToCheck = FastList.newInstance(); + List configsToCheck = new LinkedList(); int selectedOptionSize = 0; for (ConfigItem ci: questions) { String configItemId = null; Long sequenceNum = null; - List selectedOptions = FastList.newInstance(); + List selectedOptions = new LinkedList(); List options = ci.getOptions(); if (ci.isStandard()) { selectedOptions.addAll(options); @@ -243,7 +242,7 @@ public class ProductConfigWorker { for (ConfigItem ci: questions) { String configItemId = null; Long sequenceNum = null; - List selectedOptions = FastList.newInstance(); + List selectedOptions = new LinkedList(); List options = ci.getOptions(); if (ci.isStandard()) { selectedOptions.addAll(options); @@ -309,7 +308,7 @@ public class ProductConfigWorker { for (ConfigItem ci: questions) { String configItemId = null; Long sequenceNum = null; - List selectedOptions = FastList.newInstance(); + List selectedOptions = new LinkedList(); List options = ci.getOptions(); if (ci.isStandard()) { selectedOptions.addAll(options); @@ -330,7 +329,7 @@ public class ProductConfigWorker { configItemId = ci.getConfigItemAssoc().getString("configItemId"); sequenceNum = ci.getConfigItemAssoc().getLong("sequenceNum"); for (ConfigOption oneOption: selectedOptions) { - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); String configOptionId = oneOption.configOption.getString("configOptionId"); String description = oneOption.getComments(); GenericValue productConfigConfig = delegator.makeValue("ProductConfigConfig"); diff --git a/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java b/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java index 00530457ac..e99f563b48 100644 --- a/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java +++ b/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java @@ -22,15 +22,14 @@ package org.ofbiz.product.config; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; @@ -42,7 +41,6 @@ import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ServiceContainer; - /** * Product Config Wrapper: gets product config to display */ @@ -80,7 +78,7 @@ public class ProductConfigWrapper implements Serializable { listPrice = pcw.listPrice; basePrice = pcw.basePrice; defaultPrice = pcw.defaultPrice; - questions = FastList.newInstance(); + questions = new LinkedList(); delegator = pcw.getDelegator(); delegatorName = delegator.getDelegatorName(); dispatcher = pcw.getDispatcher(); @@ -122,10 +120,10 @@ public class ProductConfigWrapper implements Serializable { if (price != null) { basePrice = price; } - questions = FastList.newInstance(); + questions = new LinkedList(); if ("AGGREGATED".equals(product.getString("productTypeId")) || "AGGREGATED_SERVICE".equals(product.getString("productTypeId"))) { List questionsValues = EntityQuery.use(delegator).from("ProductConfig").where("productId", productId).orderBy("sequenceNum").filterByDate().queryList(); - Set itemIds = FastSet.newInstance(); + Set itemIds = new HashSet(); for (GenericValue questionsValue: questionsValues) { ConfigItem oneQuestion = new ConfigItem(questionsValue); oneQuestion.setContent(locale, "text/html"); // TODO: mime-type shouldn't be hardcoded @@ -285,18 +283,17 @@ public class ProductConfigWrapper implements Serializable { GenericValue oneComponent = components.get(component); if (theOption.isVirtualComponent(oneComponent)) { if (theOption.componentOptions == null) { - theOption.componentOptions = FastMap.newInstance(); + theOption.componentOptions = new HashMap(); } theOption.componentOptions.put(oneComponent.getString("productId"), componentOption); // recalculate option price theOption.recalculateOptionPrice(this); - } } public List getSelectedOptions() { - List selectedOptions = FastList.newInstance(); + List selectedOptions = new LinkedList(); for (ConfigItem ci: questions) { if (ci.isStandard()) { selectedOptions.addAll(ci.getOptions()); @@ -312,7 +309,7 @@ public class ProductConfigWrapper implements Serializable { } public List getDefaultOptions() { - List defaultOptions = FastList.newInstance(); + List defaultOptions = new LinkedList(); for (ConfigItem ci: questions) { ConfigOption co = ci.getDefault(); if (co != null) { @@ -397,13 +394,13 @@ public class ProductConfigWrapper implements Serializable { public ConfigItem(GenericValue questionAssoc) throws Exception { configItemAssoc = questionAssoc; configItem = configItemAssoc.getRelatedOne("ConfigItemProductConfigItem", false); - options = FastList.newInstance(); + options = new LinkedList(); } public ConfigItem(ConfigItem ci) { configItem = GenericValue.create(ci.configItem); configItemAssoc = GenericValue.create(ci.configItemAssoc); - options = FastList.newInstance(); + options = new LinkedList(); for (ConfigOption co: ci.options) { options.add(new ConfigOption(co)); } @@ -602,7 +599,7 @@ public class ProductConfigWrapper implements Serializable { public ConfigOption(ConfigOption co) { configOption = GenericValue.create(co.configOption); - componentList = FastList.newInstance(); + componentList = new LinkedList(); for (GenericValue component: co.componentList) { componentList.add(GenericValue.create(component)); } diff --git a/applications/product/src/org/ofbiz/product/feature/ParametricSearch.java b/applications/product/src/org/ofbiz/product/feature/ParametricSearch.java index 57c1e6cd6d..4879f17c7f 100644 --- a/applications/product/src/org/ofbiz/product/feature/ParametricSearch.java +++ b/applications/product/src/org/ofbiz/product/feature/ParametricSearch.java @@ -18,6 +18,9 @@ *******************************************************************************/ package org.ofbiz.product.feature; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; @@ -25,10 +28,6 @@ import java.util.Set; import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilMisc; @@ -62,7 +61,7 @@ public class ParametricSearch { } public static Map> makeCategoryFeatureLists(String productCategoryId, Delegator delegator, int perTypeMaxSize) { - Map> productFeaturesByTypeMap = FastMap.newInstance(); + Map> productFeaturesByTypeMap = new HashMap>(); try { List productFeatureCategoryAppls = EntityQuery.use(delegator).from("ProductFeatureCategoryAppl").where("productCategoryId", productCategoryId).cache(true).queryList(); productFeatureCategoryAppls = EntityUtil.filterByDate(productFeatureCategoryAppls, true); @@ -73,7 +72,7 @@ public class ParametricSearch { String productFeatureTypeId = productFeature.getString("productFeatureTypeId"); Map featuresByType = productFeaturesByTypeMap.get(productFeatureTypeId); if (featuresByType == null) { - featuresByType = FastMap.newInstance(); + featuresByType = new HashMap(); productFeaturesByTypeMap.put(productFeatureTypeId, featuresByType); } if (featuresByType.size() < perTypeMaxSize) { @@ -98,7 +97,7 @@ public class ParametricSearch { String productFeatureTypeId = productFeature.getString("productFeatureTypeId"); Map featuresByType = productFeaturesByTypeMap.get(productFeatureTypeId); if (featuresByType == null) { - featuresByType = FastMap.newInstance(); + featuresByType = new HashMap(); productFeaturesByTypeMap.put(productFeatureTypeId, featuresByType); } if (featuresByType.size() < perTypeMaxSize) { @@ -112,7 +111,7 @@ public class ParametricSearch { } // now before returning, order the features in each list by description - Map> productFeaturesByTypeMapSorted = FastMap.newInstance(); + Map> productFeaturesByTypeMapSorted = new HashMap>(); for (Map.Entry> entry: productFeaturesByTypeMap.entrySet()) { List sortedFeatures = EntityUtil.orderBy(entry.getValue().values(), UtilMisc.toList("description","defaultSequenceNum")); productFeaturesByTypeMapSorted.put(entry.getKey(), sortedFeatures); @@ -125,16 +124,16 @@ public class ParametricSearch { return getAllFeaturesByType(delegator, DEFAULT_PER_TYPE_MAX_SIZE); } public static Map> getAllFeaturesByType(Delegator delegator, int perTypeMaxSize) { - Map> productFeaturesByTypeMap = FastMap.newInstance(); + Map> productFeaturesByTypeMap = new HashMap>(); try { - Set typesWithOverflowMessages = FastSet.newInstance(); + Set typesWithOverflowMessages = new HashSet(); EntityListIterator productFeatureEli = EntityQuery.use(delegator).from("ProductFeature").orderBy("description").queryIterator(); GenericValue productFeature = null; while ((productFeature = productFeatureEli.next()) != null) { String productFeatureTypeId = productFeature.getString("productFeatureTypeId"); List featuresByType = productFeaturesByTypeMap.get(productFeatureTypeId); if (featuresByType == null) { - featuresByType = FastList.newInstance(); + featuresByType = new LinkedList(); productFeaturesByTypeMap.put(productFeatureTypeId, featuresByType); } if (featuresByType.size() > perTypeMaxSize) { @@ -160,7 +159,7 @@ public class ParametricSearch { /** Handles parameters coming in prefixed with "pft_" where the text in the key following the prefix is a productFeatureTypeId and the value is a productFeatureId; meant to be used with drop-downs and such */ public static Map makeFeatureIdByTypeMap(Map parameters) { - Map featureIdByType = FastMap.newInstance(); + Map featureIdByType = new HashMap(); if (parameters == null) return featureIdByType; @@ -180,7 +179,7 @@ public class ParametricSearch { /** Handles parameters coming in prefixed with "SEARCH_FEAT" where the parameter value is a productFeatureId; meant to be used with text entry boxes or check-boxes and such */ public static List makeFeatureIdListFromPrefixed(Map parameters) { - List featureIdList = FastList.newInstance(); + List featureIdList = new LinkedList(); if (parameters == null) return featureIdList; for (Map.Entry entry: parameters.entrySet()) { @@ -222,7 +221,7 @@ public class ParametricSearch { * meant to be used with text entry boxes or check-boxes and such **/ public static List makeProductFeatureCategoryIdListFromPrefixed(Map parameters) { - List prodFeatureCategoryIdList = FastList.newInstance(); + List prodFeatureCategoryIdList = new LinkedList(); if (parameters == null) return prodFeatureCategoryIdList; for (Map.Entry entry: parameters.entrySet()) { diff --git a/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java b/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java index ea07130e60..2910b7e27f 100644 --- a/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java +++ b/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java @@ -18,16 +18,15 @@ *******************************************************************************/ package org.ofbiz.product.feature; +import java.util.HashMap; +import java.util.HashSet; import java.util.LinkedHashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilMisc; @@ -44,7 +43,6 @@ import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ModelService; import org.ofbiz.service.ServiceUtil; - /** * Services for product features */ @@ -62,7 +60,7 @@ public class ProductFeatureServices { * The optional productFeatureApplTypeId causes results to be filtered by this parameter--only used in conjunction with productId. */ public static Map getProductFeaturesByType(DispatchContext dctx, Map context) { - Map results = FastMap.newInstance(); + Map results = new HashMap(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); @@ -99,7 +97,7 @@ public class ProductFeatureServices { if (entityToSearch.equals("ProductFeatureAndAppl") && productFeatureApplTypeId != null) allFeatures = EntityUtil.filterByAnd(allFeatures, UtilMisc.toMap("productFeatureApplTypeId", productFeatureApplTypeId)); - List featureTypes = FastList.newInstance(); + List featureTypes = new LinkedList(); Map> featuresByType = new LinkedHashMap>(); for (GenericValue feature: allFeatures) { String featureType = feature.getString("productFeatureTypeId"); @@ -108,7 +106,7 @@ public class ProductFeatureServices { } List features = featuresByType.get(featureType); if (features == null) { - features = FastList.newInstance(); + features = new LinkedList(); featuresByType.put(featureType, features); } features.add(feature); @@ -129,12 +127,12 @@ public class ProductFeatureServices { * Result: variantProductIds: a List of productIds of variants with those features */ public static Map getAllExistingVariants(DispatchContext dctx, Map context) { - Map results = FastMap.newInstance(); + Map results = new HashMap(); Delegator delegator = dctx.getDelegator(); String productId = (String) context.get("productId"); List curProductFeatureAndAppls = UtilGenerics.checkList(context.get("productFeatureAppls")); - List existingVariantProductIds = FastList.newInstance(); + List existingVariantProductIds = new LinkedList(); try { /* @@ -184,7 +182,7 @@ public class ProductFeatureServices { * {defaultVariantProductId: id of this variant; curProductFeatureAndAppls: features applied to this variant; existingVariantProductIds: List of productIds which are already variants with these features } */ public static Map getVariantCombinations(DispatchContext dctx, Map context) { - Map results = FastMap.newInstance(); + Map results = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); String productId = (String) context.get("productId"); @@ -201,20 +199,20 @@ public class ProductFeatureServices { // need to keep 2 lists, oldCombinations and newCombinations, and keep swapping them after each looping. Otherwise, you'll get a // concurrent modification exception - List> oldCombinations = FastList.newInstance(); + List> oldCombinations = new LinkedList>(); // loop through each feature type for (Map.Entry> entry: features.entrySet()) { List currentFeatures = entry.getValue(); - List> newCombinations = FastList.newInstance(); + List> newCombinations = new LinkedList>(); List> combinations; // start with either existing combinations or from scratch if (oldCombinations.size() > 0) { combinations = oldCombinations; } else { - combinations = FastList.newInstance(); + combinations = new LinkedList>(); } // in both cases, use each feature of current feature type's idCode and @@ -224,9 +222,9 @@ public class ProductFeatureServices { if (combinations.size()==0) { for (GenericValue currentFeature: currentFeatures) { if (currentFeature.getString("productFeatureApplTypeId").equals("SELECTABLE_FEATURE")) { - Map newCombination = FastMap.newInstance(); - List newFeatures = FastList.newInstance(); - List newFeatureIds = FastList.newInstance(); + Map newCombination = new HashMap(); + List newFeatures = new LinkedList(); + List newFeatureIds = new LinkedList(); if (currentFeature.getString("idCode") != null) { newCombination.put("defaultVariantProductId", productId + currentFeature.getString("idCode")); } else { @@ -243,7 +241,7 @@ public class ProductFeatureServices { for (Map combination: combinations) { for (GenericValue currentFeature: currentFeatures) { if (currentFeature.getString("productFeatureApplTypeId").equals("SELECTABLE_FEATURE")) { - Map newCombination = FastMap.newInstance(); + Map newCombination = new HashMap(); // .clone() is important, or you'll keep adding to the same List for all the variants // have to cast twice: once from get() and once from clone() List newFeatures = UtilMisc.makeListWritable(UtilGenerics.checkList(combination.get("curProductFeatureAndAppls"))); @@ -268,7 +266,7 @@ public class ProductFeatureServices { } int defaultCodeCounter = 1; - Set defaultVariantProductIds = FastSet.newInstance(); // this map will contain the codes already used (as keys) + Set defaultVariantProductIds = new HashSet(); // this map will contain the codes already used (as keys) defaultVariantProductIds.add(productId); // now figure out which of these combinations already have productIds associated with them @@ -298,7 +296,7 @@ public class ProductFeatureServices { * Result: products (a List of Product GenericValues) */ public static Map getCategoryVariantProducts(DispatchContext dctx, Map context) { - Map results = FastMap.newInstance(); + Map results = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); List productFeatures = UtilGenerics.checkList(context.get("productFeatures")); @@ -317,12 +315,12 @@ public class ProductFeatureServices { List memberProducts = UtilGenerics.checkList(result.get("categoryMembers")); if ((memberProducts != null) && (memberProducts.size() > 0)) { // construct a Map of productFeatureTypeId -> productFeatureId from the productFeatures List - Map featuresByType = FastMap.newInstance(); + Map featuresByType = new HashMap(); for (GenericValue nextFeature: productFeatures) { featuresByType.put(nextFeature.getString("productFeatureTypeId"), nextFeature.getString("productFeatureId")); } - List products = FastList.newInstance(); // final list of variant products + List products = new LinkedList(); // final list of variant products for (GenericValue memberProduct: memberProducts) { // find variants for each member product of the category diff --git a/applications/product/src/org/ofbiz/product/image/ScaleImage.java b/applications/product/src/org/ofbiz/product/image/ScaleImage.java index 3b89aa5a72..e5cc041d77 100644 --- a/applications/product/src/org/ofbiz/product/image/ScaleImage.java +++ b/applications/product/src/org/ofbiz/product/image/ScaleImage.java @@ -22,14 +22,13 @@ import java.awt.image.BufferedImage; import java.awt.image.ImagingOpException; import java.io.File; import java.io.IOException; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import javax.imageio.ImageIO; -import javolution.util.FastMap; - import org.jdom.JDOMException; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; @@ -80,14 +79,14 @@ public class ScaleImage { Locale locale = (Locale) context.get("locale"); int index; - Map> imgPropertyMap = FastMap.newInstance(); + Map> imgPropertyMap = new HashMap>(); BufferedImage bufImg, bufNewImg; double imgHeight, imgWidth; - Map imgUrlMap = FastMap.newInstance(); - Map resultXMLMap = FastMap.newInstance(); - Map resultBufImgMap = FastMap.newInstance(); - Map resultScaleImgMap = FastMap.newInstance(); - Map result = FastMap.newInstance(); + Map imgUrlMap = new HashMap(); + Map resultXMLMap = new HashMap(); + Map resultBufImgMap = new HashMap(); + Map resultScaleImgMap = new HashMap(); + Map result = new HashMap(); /* ImageProperties.xml */ String imgPropertyFullPath = System.getProperty("ofbiz.home") + "/applications/product/config/ImageProperties.xml"; @@ -107,7 +106,7 @@ public class ScaleImage { String imgExtension = filenameToUse.substring(index + 1); // paths - MapimageContext = FastMap.newInstance(); + Map imageContext = new HashMap(); imageContext.putAll(context); imageContext.put("tenantId",((Delegator)context.get("delegator")).getDelegatorTenantId()); String imageServerPath = FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue("catalog", "image.server.path", (Delegator)context.get("delegator")), imageContext); @@ -260,14 +259,14 @@ public class ScaleImage { } int index; - Map> imgPropertyMap = FastMap.newInstance(); + Map> imgPropertyMap = new HashMap>(); BufferedImage bufImg, bufNewImg; double imgHeight, imgWidth; - Map imgUrlMap = FastMap.newInstance(); - Map resultXMLMap = FastMap.newInstance(); - Map resultBufImgMap = FastMap.newInstance(); - Map resultScaleImgMap = FastMap.newInstance(); - Map result = FastMap.newInstance(); + Map imgUrlMap = new HashMap(); + Map resultXMLMap = new HashMap(); + Map resultBufImgMap = new HashMap(); + Map resultScaleImgMap = new HashMap(); + Map result = new HashMap(); /* ImageProperties.xml */ String imgPropertyFullPath = System.getProperty("ofbiz.home") + "/applications/product/config/ImageProperties.xml"; @@ -287,7 +286,7 @@ public class ScaleImage { String imgName = filenameToUse.substring(0, index - 1); String imgExtension = filenameToUse.substring(index + 1); // paths - MapimageContext = FastMap.newInstance(); + Map imageContext = new HashMap(); imageContext.putAll(context); imageContext.put("tenantId",((Delegator)context.get("delegator")).getDelegatorTenantId()); String mainFilenameFormat = EntityUtilProperties.getPropertyValue("catalog", "image.filename.format", (Delegator) context.get("delegator")); diff --git a/applications/product/src/org/ofbiz/product/imagemanagement/CropImage.java b/applications/product/src/org/ofbiz/product/imagemanagement/CropImage.java index 5b2007eee7..25f1eedea6 100644 --- a/applications/product/src/org/ofbiz/product/imagemanagement/CropImage.java +++ b/applications/product/src/org/ofbiz/product/imagemanagement/CropImage.java @@ -22,12 +22,11 @@ import java.awt.image.BufferedImage; import java.awt.image.RenderedImage; import java.io.File; import java.io.IOException; +import java.util.HashMap; import java.util.Map; import javax.imageio.ImageIO; -import javolution.util.FastMap; - import org.jdom.JDOMException; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; @@ -62,10 +61,10 @@ public class CropImage { String imageH = (String) context.get("imageH"); if (UtilValidate.isNotEmpty(imageName)) { - Map contentCtx = FastMap.newInstance(); + Map contentCtx = new HashMap(); contentCtx.put("contentTypeId", "DOCUMENT"); contentCtx.put("userLogin", userLogin); - Map contentResult = FastMap.newInstance(); + Map contentResult = new HashMap(); try { contentResult = dispatcher.runSync("createContent", contentCtx); } catch (GenericServiceException e) { @@ -73,10 +72,10 @@ public class CropImage { return ServiceUtil.returnError(e.getMessage()); } - Map contentThumb = FastMap.newInstance(); + Map contentThumb = new HashMap(); contentThumb.put("contentTypeId", "DOCUMENT"); contentThumb.put("userLogin", userLogin); - Map contentThumbResult = FastMap.newInstance(); + Map contentThumbResult = new HashMap(); try { contentThumbResult = dispatcher.runSync("createContent", contentThumb); } catch (GenericServiceException e) { @@ -114,7 +113,7 @@ public class CropImage { ImageManagementServices.createContentAndDataResource(dctx, userLogin, filenameToUse, imageUrlResource, contentId, "image/jpeg"); ImageManagementServices.createContentAndDataResource(dctx, userLogin, filenameTouseThumb, imageUrlThumb, contentIdThumb, "image/jpeg"); - Map createContentAssocMap = FastMap.newInstance(); + Map createContentAssocMap = new HashMap(); createContentAssocMap.put("contentAssocTypeId", "IMAGE_THUMBNAIL"); createContentAssocMap.put("contentId", contentId); createContentAssocMap.put("contentIdTo", contentIdThumb); @@ -127,7 +126,7 @@ public class CropImage { return ServiceUtil.returnError(e.getMessage()); } - Map productContentCtx = FastMap.newInstance(); + Map productContentCtx = new HashMap(); productContentCtx.put("productId", productId); productContentCtx.put("productContentTypeId", "IMAGE"); productContentCtx.put("fromDate", UtilDateTime.nowTimestamp()); @@ -141,7 +140,7 @@ public class CropImage { return ServiceUtil.returnError(e.getMessage()); } - Map contentApprovalCtx = FastMap.newInstance(); + Map contentApprovalCtx = new HashMap(); contentApprovalCtx.put("contentId", contentId); contentApprovalCtx.put("userLogin", userLogin); try { diff --git a/applications/product/src/org/ofbiz/product/imagemanagement/FrameImage.java b/applications/product/src/org/ofbiz/product/imagemanagement/FrameImage.java index 1bc20a7e35..9a7f67688a 100644 --- a/applications/product/src/org/ofbiz/product/imagemanagement/FrameImage.java +++ b/applications/product/src/org/ofbiz/product/imagemanagement/FrameImage.java @@ -31,6 +31,8 @@ import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; import java.nio.ByteBuffer; +import java.util.HashMap; +import java.util.List; import java.util.Locale; import java.util.Map; @@ -40,8 +42,6 @@ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import javax.swing.ImageIcon; -import javolution.util.FastMap; - import org.jdom.JDOMException; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; @@ -66,7 +66,7 @@ public class FrameImage { public static Map addImageFrame(DispatchContext dctx, Map context) throws IOException, JDOMException { - Map result = FastMap.newInstance(); + Map result = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); Delegator delegator = dctx.getDelegator(); String imageServerPath = FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue("catalog", "image.management.path", delegator), context); @@ -120,10 +120,10 @@ public class FrameImage { int width = Integer.parseInt(imageWidth); int height= Integer.parseInt(imageHeight); - Map contentCtx = FastMap.newInstance(); + Map contentCtx = new HashMap(); contentCtx.put("contentTypeId", "DOCUMENT"); contentCtx.put("userLogin", userLogin); - Map contentResult = FastMap.newInstance(); + Map contentResult = new HashMap(); try { contentResult = dispatcher.runSync("createContent", contentCtx); } catch (GenericServiceException e) { @@ -132,10 +132,10 @@ public class FrameImage { result.putAll(context); } - Map contentThumb = FastMap.newInstance(); + Map contentThumb = new HashMap(); contentThumb.put("contentTypeId", "DOCUMENT"); contentThumb.put("userLogin", userLogin); - Map contentThumbResult = FastMap.newInstance(); + Map contentThumbResult = new HashMap(); try { contentThumbResult = dispatcher.runSync("createContent", contentThumb); } catch (GenericServiceException e) { @@ -167,7 +167,7 @@ public class FrameImage { ImageManagementServices.createContentAndDataResource(dctx, userLogin, filenameToUse, imageUrlResource, contentId, "image/jpeg"); ImageManagementServices.createContentAndDataResource(dctx, userLogin, filenameTouseThumb, imageUrlThumb, contentIdThumb, "image/jpeg"); - Map createContentAssocMap = FastMap.newInstance(); + Map createContentAssocMap = new HashMap(); createContentAssocMap.put("contentAssocTypeId", "IMAGE_THUMBNAIL"); createContentAssocMap.put("contentId", contentId); createContentAssocMap.put("contentIdTo", contentIdThumb); @@ -181,7 +181,7 @@ public class FrameImage { result.putAll(context); } - Map productContentCtx = FastMap.newInstance(); + Map productContentCtx = new HashMap(); productContentCtx.put("productId", productId); productContentCtx.put("productContentTypeId", "IMAGE"); productContentCtx.put("fromDate", UtilDateTime.nowTimestamp()); @@ -196,7 +196,7 @@ public class FrameImage { result.putAll(context); } - Map contentApprovalCtx = FastMap.newInstance(); + Map contentApprovalCtx = new HashMap(); contentApprovalCtx.put("contentId", contentId); contentApprovalCtx.put("userLogin", userLogin); try { @@ -293,7 +293,7 @@ public class FrameImage { out.close(); //create dataResource - Map dataResourceCtx = FastMap.newInstance(); + Map dataResourceCtx = new HashMap(); dataResourceCtx.put("objectInfo", imageServerUrl + imagePath); dataResourceCtx.put("dataResourceName", imageName); dataResourceCtx.put("userLogin", userLogin); @@ -303,7 +303,7 @@ public class FrameImage { Map dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx); dataResourceId = dataResourceResult.get("dataResourceId").toString(); //create content - Map contentCtx = FastMap.newInstance(); + Map contentCtx = new HashMap(); contentCtx.put("dataResourceId", dataResourceResult.get("dataResourceId").toString()); contentCtx.put("contentTypeId", "IMAGE_FRAME"); contentCtx.put("contentName", imageName); diff --git a/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java b/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java index ae6a9bfcc7..b29f9fa92d 100644 --- a/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java +++ b/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java @@ -27,15 +27,14 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; import java.nio.ByteBuffer; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import javax.imageio.ImageIO; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.jdom.JDOMException; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; @@ -69,7 +68,7 @@ public class ImageManagementServices { public static Map addMultipleuploadForProduct(DispatchContext dctx, Map context) throws IOException, JDOMException { - Map result = FastMap.newInstance(); + Map result = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); Delegator delegator = dctx.getDelegator(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -101,10 +100,10 @@ public class ImageManagementServices { sizeType = imageResize; } - Map contentCtx = FastMap.newInstance(); + Map contentCtx = new HashMap(); contentCtx.put("contentTypeId", "DOCUMENT"); contentCtx.put("userLogin", userLogin); - Map contentResult = FastMap.newInstance(); + Map contentResult = new HashMap(); try { contentResult = dispatcher.runSync("createContent", contentCtx); } catch (GenericServiceException e) { @@ -131,7 +130,7 @@ public class ImageManagementServices { fileContentType = "image/png"; } - List fileExtension = FastList.newInstance(); + List fileExtension = new LinkedList(); try { fileExtension = EntityQuery.use(delegator).from("FileExtension").where("mimeTypeId", fileContentType).queryList(); } catch (GenericEntityException e) { @@ -201,7 +200,7 @@ public class ImageManagementServices { "ProductImageViewUnableWriteBinaryData", UtilMisc.toMap("fileName", fileOriginal.getAbsolutePath()), locale)); } - Map resultResize = FastMap.newInstance(); + Map resultResize = new HashMap(); try { resultResize.putAll(ImageManagementServices.scaleImageMangementInAllSize(context, imageName, sizeType, productId)); } catch (IOException e) { @@ -225,7 +224,7 @@ public class ImageManagementServices { createContentAndDataResource(dctx, userLogin, imageName, imageUrl, contentId, fileContentType); createContentAndDataResource(dctx, userLogin, filenameToUseThumb, imageUrlThumb, contentIdThumb, fileContentType); - Map createContentAssocMap = FastMap.newInstance(); + Map createContentAssocMap = new HashMap(); createContentAssocMap.put("contentAssocTypeId", "IMAGE_THUMBNAIL"); createContentAssocMap.put("contentId", contentId); createContentAssocMap.put("contentIdTo", contentIdThumb); @@ -238,7 +237,7 @@ public class ImageManagementServices { return ServiceUtil.returnError(e.getMessage()); } - Map productContentCtx = FastMap.newInstance(); + Map productContentCtx = new HashMap(); productContentCtx.put("productId", productId); productContentCtx.put("productContentTypeId", productContentTypeId); productContentCtx.put("fromDate", UtilDateTime.nowTimestamp()); @@ -252,7 +251,7 @@ public class ImageManagementServices { return ServiceUtil.returnError(e.getMessage()); } - Map contentApprovalCtx = FastMap.newInstance(); + Map contentApprovalCtx = new HashMap(); contentApprovalCtx.put("contentId", contentId); contentApprovalCtx.put("userLogin", userLogin); try { @@ -264,7 +263,7 @@ public class ImageManagementServices { String autoApproveImage = EntityUtilProperties.getPropertyValue("catalog", "image.management.autoApproveImage", delegator); if (autoApproveImage.equals("Y")) { - Map autoApproveCtx = FastMap.newInstance(); + Map autoApproveCtx = new HashMap(); autoApproveCtx.put("contentId", contentId); autoApproveCtx.put("userLogin", userLogin); autoApproveCtx.put("checkStatusId", "IM_APPROVED"); @@ -310,14 +309,14 @@ public class ImageManagementServices { } int index; - Map> imgPropertyMap = FastMap.newInstance(); + Map> imgPropertyMap = new HashMap>(); BufferedImage bufImg, bufNewImg; double imgHeight, imgWidth; - Map imgUrlMap = FastMap.newInstance(); - Map resultXMLMap = FastMap.newInstance(); - Map resultBufImgMap = FastMap.newInstance(); - Map resultScaleImgMap = FastMap.newInstance(); - Map result = FastMap.newInstance(); + Map imgUrlMap = new HashMap(); + Map resultXMLMap = new HashMap(); + Map resultBufImgMap = new HashMap(); + Map resultScaleImgMap = new HashMap(); + Map result = new HashMap(); /* ImageProperties.xml */ String imgPropertyFullPath = System.getProperty("ofbiz.home") + "/applications/product/config/ImageProperties.xml"; @@ -416,11 +415,11 @@ public class ImageManagementServices { } public static Map createContentAndDataResource(DispatchContext dctx, GenericValue userLogin, String filenameToUse, String imageUrl, String contentId, String fileContentType){ - Map result = FastMap.newInstance(); + Map result = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); Delegator delegator = dctx.getDelegator(); - Map dataResourceCtx = FastMap.newInstance(); + Map dataResourceCtx = new HashMap(); dataResourceCtx.put("objectInfo", imageUrl); dataResourceCtx.put("dataResourceName", filenameToUse); @@ -429,7 +428,7 @@ public class ImageManagementServices { dataResourceCtx.put("mimeTypeId", fileContentType); dataResourceCtx.put("isPublic", "Y"); - Map dataResourceResult = FastMap.newInstance(); + Map dataResourceResult = new HashMap(); try { dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx); } catch (GenericServiceException e) { @@ -441,7 +440,7 @@ public class ImageManagementServices { result.put("dataResourceFrameId", dataResourceId); result.put("dataResourceId", dataResourceId); - Map contentUp = FastMap.newInstance(); + Map contentUp = new HashMap(); contentUp.put("contentId", contentId); contentUp.put("dataResourceId", dataResourceResult.get("dataResourceId")); contentUp.put("contentName", filenameToUse); @@ -484,7 +483,7 @@ public class ImageManagementServices { } public static Map createContentThumbnail(DispatchContext dctx, Map context, GenericValue userLogin, ByteBuffer imageData, String productId, String imageName){ - Map result = FastMap.newInstance(); + Map result = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); @@ -494,10 +493,10 @@ public class ImageManagementServices { String nameOfThumb = FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue("catalog", "image.management.nameofthumbnail", delegator), context); // Create content for thumbnail - Map contentThumb = FastMap.newInstance(); + Map contentThumb = new HashMap(); contentThumb.put("contentTypeId", "DOCUMENT"); contentThumb.put("userLogin", userLogin); - Map contentThumbResult = FastMap.newInstance(); + Map contentThumbResult = new HashMap(); try { contentThumbResult = dispatcher.runSync("createContent", contentThumb); } catch (GenericServiceException e) { @@ -523,7 +522,7 @@ public class ImageManagementServices { fileContentType = "image/png"; } - List fileExtensionThumb = FastList.newInstance(); + List fileExtensionThumb = new LinkedList(); try { fileExtensionThumb = delegator.findByAnd("FileExtension", UtilMisc.toMap("mimeTypeId", fileContentType), null, false); } catch (GenericEntityException e) { @@ -544,7 +543,7 @@ public class ImageManagementServices { fileContentType = "image/png"; } - List fileExtensionThumb = FastList.newInstance(); + List fileExtensionThumb = new LinkedList(); try { fileExtensionThumb = EntityQuery.use(delegator).from("FileExtension").where("mimeTypeId", fileContentType).queryList(); } catch (GenericEntityException e) { @@ -576,7 +575,7 @@ public class ImageManagementServices { UtilMisc.toMap("fileName", fileOriginalThumb.getAbsolutePath()), locale)); } - Map resultResizeThumb = FastMap.newInstance(); + Map resultResizeThumb = new HashMap(); try { resultResizeThumb.putAll(ImageManagementServices.scaleImageMangementInAllSize(context, filenameToUseThumb, "thumbnail", productId)); } catch (IOException e) { @@ -596,7 +595,7 @@ public class ImageManagementServices { /* VARIABLES */ BufferedImage bufNewImg; double defaultHeight, defaultWidth, scaleFactor; - Map result = FastMap.newInstance(); + Map result = new HashMap(); /* DIMENSIONS from ImageProperties */ defaultHeight = 100; @@ -655,7 +654,7 @@ public class ImageManagementServices { /* VARIABLES */ BufferedImage bufNewImg; double defaultHeight, defaultWidth, scaleFactor; - Map result = FastMap.newInstance(); + Map result = new HashMap(); /* DIMENSIONS from ImageProperties */ defaultHeight = resizeHeight; @@ -725,10 +724,10 @@ public class ImageManagementServices { Map resultResize = ImageManagementServices.resizeImage(bufImg, imgHeight, imgWidth, resizeHeight, resizeWidth); ImageIO.write((RenderedImage) resultResize.get("bufferedImage"), mimeType, new File(imageServerPath + "/" + productId + "/" + filenameToUse)); - Map contentThumb = FastMap.newInstance(); + Map contentThumb = new HashMap(); contentThumb.put("contentTypeId", "DOCUMENT"); contentThumb.put("userLogin", userLogin); - Map contentThumbResult = FastMap.newInstance(); + Map contentThumbResult = new HashMap(); try { contentThumbResult = dispatcher.runSync("createContent", contentThumb); } catch (GenericServiceException e) { @@ -740,7 +739,7 @@ public class ImageManagementServices { String imageUrlThumb = imageServerUrl + "/" + productId + "/" + filenameToUse; ImageManagementServices.createContentAndDataResource(dctx, userLogin, filenameToUse, imageUrlThumb, contentIdThumb, "image/jpeg"); - Map createContentAssocMap = FastMap.newInstance(); + Map createContentAssocMap = new HashMap(); createContentAssocMap.put("contentAssocTypeId", "IMAGE_THUMBNAIL"); createContentAssocMap.put("contentId", contentId); createContentAssocMap.put("contentIdTo", contentIdThumb); @@ -811,7 +810,7 @@ public class ImageManagementServices { File file = new File(imageServerPath + "/" + productId + "/" + dataResourceName); file.delete(); - Map contentUp = FastMap.newInstance(); + Map contentUp = new HashMap(); contentUp.put("contentId", contentId); contentUp.put("contentName", filenameToUse); contentUp.put("userLogin", userLogin); @@ -838,7 +837,7 @@ public class ImageManagementServices { } if (dataResource != null) { - Map dataResourceCtx = FastMap.newInstance(); + Map dataResourceCtx = new HashMap(); dataResourceCtx.put("dataResourceId", dataResource.getString("dataResourceId")); dataResourceCtx.put("objectInfo", imageUrl); dataResourceCtx.put("dataResourceName", filenameToUse); @@ -870,7 +869,7 @@ public class ImageManagementServices { File fileAssoc = new File(imageServerPath + "/" + productId + "/" + drDataResourceNameAssoc); fileAssoc.delete(); - Map contentAssocMap = FastMap.newInstance(); + Map contentAssocMap = new HashMap(); contentAssocMap.put("contentId", contentAssoc.get("contentIdTo")); contentAssocMap.put("contentName", filenameToUseAssoc); contentAssocMap.put("userLogin", userLogin); @@ -897,7 +896,7 @@ public class ImageManagementServices { } if (dataResourceAssocUp != null) { - Map dataResourceAssocMap = FastMap.newInstance(); + Map dataResourceAssocMap = new HashMap(); dataResourceAssocMap.put("dataResourceId", dataResourceAssocUp.getString("dataResourceId")); dataResourceAssocMap.put("objectInfo", imageUrlAssoc); dataResourceAssocMap.put("dataResourceName", filenameToUseAssoc); diff --git a/applications/product/src/org/ofbiz/product/imagemanagement/ImageUrlServlet.java b/applications/product/src/org/ofbiz/product/imagemanagement/ImageUrlServlet.java index 0c047eac12..4d5957c4cc 100644 --- a/applications/product/src/org/ofbiz/product/imagemanagement/ImageUrlServlet.java +++ b/applications/product/src/org/ofbiz/product/imagemanagement/ImageUrlServlet.java @@ -19,6 +19,7 @@ package org.ofbiz.product.imagemanagement; import java.io.IOException; +import java.util.LinkedList; import java.util.List; import javax.servlet.RequestDispatcher; @@ -28,8 +29,6 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.entity.Delegator; @@ -75,7 +74,7 @@ public class ImageUrlServlet extends HttpServlet { String pathInfo = request.getPathInfo(); List pathElements = StringUtil.split(pathInfo, "/"); - List tagElements = FastList.newInstance(); + List tagElements = new LinkedList(); for (String pathElement : pathElements) { tagElements.addAll(StringUtil.split(pathElement, "-")); } diff --git a/applications/product/src/org/ofbiz/product/imagemanagement/ReplaceImage.java b/applications/product/src/org/ofbiz/product/imagemanagement/ReplaceImage.java index 63c1dfce42..1cea37d778 100644 --- a/applications/product/src/org/ofbiz/product/imagemanagement/ReplaceImage.java +++ b/applications/product/src/org/ofbiz/product/imagemanagement/ReplaceImage.java @@ -20,13 +20,12 @@ package org.ofbiz.product.imagemanagement; import java.awt.image.BufferedImage; import java.io.File; +import java.util.HashMap; import java.util.List; import java.util.Map; import javax.imageio.ImageIO; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.base.util.string.FlexibleStringExpander; @@ -103,7 +102,7 @@ public class ReplaceImage{ GenericValue productContent = EntityQuery.use(delegator).from("ProductContent").where("productId", productId, "contentId", contentIdReplace, "productContentTypeId", "IMAGE").queryFirst(); if (productContent != null) { - Map productContentCtx = FastMap.newInstance(); + Map productContentCtx = new HashMap(); productContentCtx.put("productId", productId); productContentCtx.put("contentId", contentIdReplace); productContentCtx.put("productContentTypeId", "IMAGE"); diff --git a/applications/product/src/org/ofbiz/product/imagemanagement/RotateImage.java b/applications/product/src/org/ofbiz/product/imagemanagement/RotateImage.java index 34b2495ed5..00ee96ede2 100644 --- a/applications/product/src/org/ofbiz/product/imagemanagement/RotateImage.java +++ b/applications/product/src/org/ofbiz/product/imagemanagement/RotateImage.java @@ -23,12 +23,11 @@ import java.awt.image.BufferedImage; import java.awt.image.RenderedImage; import java.io.File; import java.io.IOException; +import java.util.HashMap; import java.util.Map; import javax.imageio.ImageIO; -import javolution.util.FastMap; - import org.jdom.JDOMException; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; @@ -60,10 +59,10 @@ public class RotateImage { String angle = (String) context.get("angle"); if (UtilValidate.isNotEmpty(imageName)) { - Map contentCtx = FastMap.newInstance(); + Map contentCtx = new HashMap(); contentCtx.put("contentTypeId", "DOCUMENT"); contentCtx.put("userLogin", userLogin); - Map contentResult = FastMap.newInstance(); + Map contentResult = new HashMap(); try { contentResult = dispatcher.runSync("createContent", contentCtx); } catch (GenericServiceException e) { @@ -71,10 +70,10 @@ public class RotateImage { return ServiceUtil.returnError(e.getMessage()); } - Map contentThumb = FastMap.newInstance(); + Map contentThumb = new HashMap(); contentThumb.put("contentTypeId", "DOCUMENT"); contentThumb.put("userLogin", userLogin); - Map contentThumbResult = FastMap.newInstance(); + Map contentThumbResult = new HashMap(); try { contentThumbResult = dispatcher.runSync("createContent", contentThumb); } catch (GenericServiceException e) { @@ -121,7 +120,7 @@ public class RotateImage { ImageManagementServices.createContentAndDataResource(dctx, userLogin, filenameToUse, imageUrlResource, contentId, "image/jpeg"); ImageManagementServices.createContentAndDataResource(dctx, userLogin, filenameTouseThumb, imageUrlThumb, contentIdThumb, "image/jpeg"); - Map createContentAssocMap = FastMap.newInstance(); + Map createContentAssocMap = new HashMap(); createContentAssocMap.put("contentAssocTypeId", "IMAGE_THUMBNAIL"); createContentAssocMap.put("contentId", contentId); createContentAssocMap.put("contentIdTo", contentIdThumb); @@ -134,7 +133,7 @@ public class RotateImage { return ServiceUtil.returnError(e.getMessage()); } - Map productContentCtx = FastMap.newInstance(); + Map productContentCtx = new HashMap(); productContentCtx.put("productId", productId); productContentCtx.put("productContentTypeId", "IMAGE"); productContentCtx.put("fromDate", UtilDateTime.nowTimestamp()); @@ -148,7 +147,7 @@ public class RotateImage { return ServiceUtil.returnError(e.getMessage()); } - Map contentApprovalCtx = FastMap.newInstance(); + Map contentApprovalCtx = new HashMap(); contentApprovalCtx.put("contentId", contentId); contentApprovalCtx.put("userLogin", userLogin); try { diff --git a/applications/product/src/org/ofbiz/product/imagemanagement/WatermarkImage.java b/applications/product/src/org/ofbiz/product/imagemanagement/WatermarkImage.java index 7cbb47020f..dc01963ac9 100644 --- a/applications/product/src/org/ofbiz/product/imagemanagement/WatermarkImage.java +++ b/applications/product/src/org/ofbiz/product/imagemanagement/WatermarkImage.java @@ -30,14 +30,13 @@ import java.io.OutputStream; import java.math.BigDecimal; import java.net.URL; import java.text.DecimalFormat; +import java.util.HashMap; import java.util.Map; import javax.imageio.ImageIO; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilGenerics; @@ -148,10 +147,10 @@ public class WatermarkImage{ if (UtilValidate.isNotEmpty(imageUrl)) { - Map contentCtx = FastMap.newInstance(); + Map contentCtx = new HashMap(); contentCtx.put("contentTypeId", "DOCUMENT"); contentCtx.put("userLogin", userLogin); - Map contentResult = FastMap.newInstance(); + Map contentResult = new HashMap(); try { contentResult = dispatcher.runSync("createContent", contentCtx); } catch (GenericServiceException e) { @@ -160,10 +159,10 @@ public class WatermarkImage{ return "error"; } - Map contentThumb = FastMap.newInstance(); + Map contentThumb = new HashMap(); contentThumb.put("contentTypeId", "DOCUMENT"); contentThumb.put("userLogin", userLogin); - Map contentThumbResult = FastMap.newInstance(); + Map contentThumbResult = new HashMap(); try { contentThumbResult = dispatcher.runSync("createContent", contentThumb); } catch (GenericServiceException e) { @@ -197,7 +196,7 @@ public class WatermarkImage{ createContentAndDataResourceWaterMark(request, userLogin, filenameToUse, imageUrlResource, contentId, "image/jpeg"); createContentAndDataResourceWaterMark(request, userLogin, filenameTouseThumb, imageUrlThumb, contentIdThumb, "image/jpeg"); - Map createContentAssocMap = FastMap.newInstance(); + Map createContentAssocMap = new HashMap(); createContentAssocMap.put("contentAssocTypeId", "IMAGE_THUMBNAIL"); createContentAssocMap.put("contentId", contentId); createContentAssocMap.put("contentIdTo", contentIdThumb); @@ -210,7 +209,7 @@ public class WatermarkImage{ return e.getMessage(); } - Map productContentCtx = FastMap.newInstance(); + Map productContentCtx = new HashMap(); productContentCtx.put("productId", productId); productContentCtx.put("productContentTypeId", "IMAGE"); productContentCtx.put("fromDate", UtilDateTime.nowTimestamp()); @@ -224,7 +223,7 @@ public class WatermarkImage{ request.setAttribute("_ERROR_MESSAGE_", e.getMessage());return "error"; } - Map contentApprovalCtx = FastMap.newInstance(); + Map contentApprovalCtx = new HashMap(); contentApprovalCtx.put("contentId", contentId); contentApprovalCtx.put("userLogin", userLogin); try { @@ -246,11 +245,11 @@ public class WatermarkImage{ } public static Map createContentAndDataResourceWaterMark(HttpServletRequest request, GenericValue userLogin, String filenameToUse, String imageUrl, String contentId, String mimeTypeId){ - Map result = FastMap.newInstance(); + Map result = new HashMap(); LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher"); Delegator delegator = (Delegator) request.getAttribute("delegator"); - Map dataResourceCtx = FastMap.newInstance(); + Map dataResourceCtx = new HashMap(); dataResourceCtx.put("objectInfo", imageUrl); dataResourceCtx.put("dataResourceName", filenameToUse); @@ -259,7 +258,7 @@ public class WatermarkImage{ dataResourceCtx.put("mimeTypeId", mimeTypeId); dataResourceCtx.put("isPublic", "Y"); - Map dataResourceResult = FastMap.newInstance(); + Map dataResourceResult = new HashMap(); try { dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx); } catch (GenericServiceException e) { @@ -267,7 +266,7 @@ public class WatermarkImage{ return ServiceUtil.returnError(e.getMessage()); } - Map contentUp = FastMap.newInstance(); + Map contentUp = new HashMap(); contentUp.put("contentId", contentId); contentUp.put("dataResourceId", dataResourceResult.get("dataResourceId")); contentUp.put("contentName", filenameToUse); diff --git a/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java b/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java index 18cf279395..31466e971c 100644 --- a/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java +++ b/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java @@ -22,14 +22,13 @@ import java.math.BigDecimal; import java.math.MathContext; import java.sql.Timestamp; import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilGenerics; @@ -420,8 +419,8 @@ public class InventoryServices { } */ - Map> ordersToUpdate = FastMap.newInstance(); - Map> ordersToCancel = FastMap.newInstance(); + Map> ordersToUpdate = new HashMap>(); + Map> ordersToCancel = new HashMap>(); // find all inventory items w/ a negative ATP List inventoryItems = null; @@ -528,7 +527,7 @@ public class InventoryServices { Debug.logInfo("We won't ship on time, getting notification info", module); Map notifyItems = ordersToUpdate.get(orderId); if (notifyItems == null) { - notifyItems = FastMap.newInstance(); + notifyItems = new HashMap(); } notifyItems.put(orderItemSeqId, nextShipDate); ordersToUpdate.put(orderId, notifyItems); @@ -556,7 +555,7 @@ public class InventoryServices { Debug.logInfo("Flagging the item to auto-cancel", module); Map cancelItems = ordersToCancel.get(orderId); if (cancelItems == null) { - cancelItems = FastMap.newInstance(); + cancelItems = new HashMap(); } cancelItems.put(orderItemSeqId, farPastPromised); ordersToCancel.put(orderId, cancelItems); @@ -578,7 +577,7 @@ public class InventoryServices { } // all items to cancel will also be in the notify list so start with that - List ordersToNotify = FastList.newInstance(); + List ordersToNotify = new LinkedList(); for (Map.Entry> entry: ordersToUpdate.entrySet()) { String orderId = entry.getKey(); Map backOrderedItems = entry.getValue(); @@ -594,7 +593,7 @@ public class InventoryServices { } for (GenericValue orderItemShipGroup: orderItemShipGroups) { - List orderItems = FastList.newInstance(); + List orderItems = new LinkedList(); List orderItemShipGroupAssoc = null; try { orderItemShipGroupAssoc = EntityQuery.use(delegator).from("OrderItemShipGroupAssoc").where("shipGroupSeqId", orderItemShipGroup.get("shipGroupSeqId"), "orderId", orderId).queryList(); @@ -625,11 +624,11 @@ public class InventoryServices { // if there are none to cancel just create an empty map if (cancelItems == null) { - cancelItems = FastMap.newInstance(); + cancelItems = new HashMap(); } if (orderItems != null) { - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); for (GenericValue orderItem: orderItems) { String orderItemSeqId = orderItem.getString("orderItemSeqId"); Timestamp shipDate = backOrderedItems.get(orderItemSeqId); @@ -763,10 +762,10 @@ public class InventoryServices { List orderItems = UtilGenerics.checkList(context.get("orderItems")); String facilityId = (String) context.get("facilityId"); Locale locale = (Locale) context.get(""); - Map atpMap = FastMap.newInstance(); - Map qohMap = FastMap.newInstance(); - Map mktgPkgAtpMap = FastMap.newInstance(); - Map mktgPkgQohMap = FastMap.newInstance(); + Map atpMap = new HashMap(); + Map qohMap = new HashMap(); + Map mktgPkgAtpMap = new HashMap(); + Map mktgPkgQohMap = new HashMap(); Map results = ServiceUtil.returnSuccess(); // get a list of all available facilities for looping @@ -859,8 +858,8 @@ public class InventoryServices { BigDecimal minimumStock = (BigDecimal)context.get("minimumStock"); String statusId = (String)context.get("statusId"); - Map result = FastMap.newInstance(); - Map resultOutput = FastMap.newInstance(); + Map result = new HashMap(); + Map resultOutput = new HashMap(); Map contextInput = UtilMisc.toMap("productId", productId, "facilityId", facilityId, "statusId", statusId); GenericValue product = null; diff --git a/applications/product/src/org/ofbiz/product/inventory/InventoryWorker.java b/applications/product/src/org/ofbiz/product/inventory/InventoryWorker.java index c8a121b838..25488385b8 100644 --- a/applications/product/src/org/ofbiz/product/inventory/InventoryWorker.java +++ b/applications/product/src/org/ofbiz/product/inventory/InventoryWorker.java @@ -21,12 +21,11 @@ package org.ofbiz.product.inventory; import java.math.BigDecimal; import java.util.Collection; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; @@ -124,7 +123,7 @@ public class InventoryWorker { condList.add(EntityCondition.makeCondition("orderItemStatusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED")); EntityConditionList conditions = EntityCondition.makeCondition(condList, EntityOperator.AND); - Map results = FastMap.newInstance(); + Map results = new HashMap(); try { List orderedProducts = EntityQuery.use(delegator).select(fieldsToSelect).from("OrderItemQuantityReportGroupByProduct").where(conditions).queryList(); for (GenericValue value: orderedProducts) { diff --git a/applications/product/src/org/ofbiz/product/price/PriceServices.java b/applications/product/src/org/ofbiz/product/price/PriceServices.java index 50f2ca2314..b303fbf70a 100644 --- a/applications/product/src/org/ofbiz/product/price/PriceServices.java +++ b/applications/product/src/org/ofbiz/product/price/PriceServices.java @@ -21,14 +21,13 @@ package org.ofbiz.product.price; import java.math.BigDecimal; import java.sql.Timestamp; import java.util.Collection; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.TreeSet; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilGenerics; @@ -86,7 +85,7 @@ public class PriceServices { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); GenericValue product = (GenericValue) context.get("product"); @@ -201,7 +200,7 @@ public class PriceServices { BigDecimal amount = (BigDecimal) context.get("amount"); - List productPriceEcList = FastList.newInstance(); + List productPriceEcList = new LinkedList(); productPriceEcList.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId)); // this funny statement is for backward compatibility purposes; the productPricePurposeId is a new pk field on the ProductPrice entity and in order databases may not be populated, until the pk is updated and such; this will ease the transition somewhat if ("PURCHASE".equals(productPricePurposeId)) { @@ -342,7 +341,7 @@ public class PriceServices { boolean validPriceFound = false; BigDecimal defaultPrice = BigDecimal.ZERO; - List orderItemPriceInfos = FastList.newInstance(); + List orderItemPriceInfos = new LinkedList(); if (defaultPriceValue != null) { // If a price calc formula (service) is specified, then use it to get the unit price if ("ProductPrice".equals(defaultPriceValue.getEntityName()) && UtilValidate.isNotEmpty(defaultPriceValue.getString("customPriceCalcService"))) { @@ -426,8 +425,8 @@ public class PriceServices { List nonQuantityProductPriceRules = null; if (findAllQuantityPrices) { // split into list with quantity conditions and list without, then iterate through each quantity cond one - quantityProductPriceRules = FastList.newInstance(); - nonQuantityProductPriceRules = FastList.newInstance(); + quantityProductPriceRules = new LinkedList(); + nonQuantityProductPriceRules = new LinkedList(); for (GenericValue productPriceRule: allProductPriceRules) { List productPriceCondList = EntityQuery.use(delegator).from("ProductPriceCond").where("productPriceRuleId", productPriceRule.get("productPriceRuleId")).cache(true).queryList(); @@ -453,12 +452,12 @@ public class PriceServices { } if (findAllQuantityPrices) { - List> allQuantityPrices = FastList.newInstance(); + List> allQuantityPrices = new LinkedList>(); // if findAllQuantityPrices then iterate through quantityProductPriceRules // foreach create an entry in the out list and eval that rule and all nonQuantityProductPriceRules rather than a single rule for (GenericValue quantityProductPriceRule: quantityProductPriceRules) { - List ruleListToUse = FastList.newInstance(); + List ruleListToUse = new LinkedList(); ruleListToUse.add(quantityProductPriceRule); ruleListToUse.addAll(nonQuantityProductPriceRules); @@ -525,7 +524,7 @@ public class PriceServices { if ("true".equals(EntityUtilProperties.getPropertyValue("catalog.properties", "convertProductPriceCurrency", delegator))) { if (UtilValidate.isNotEmpty(currencyDefaultUomId) && UtilValidate.isNotEmpty(currencyUomIdTo) && !currencyDefaultUomId.equals(currencyUomIdTo)) { if (UtilValidate.isNotEmpty(result)) { - Map convertPriceMap = FastMap.newInstance(); + Map convertPriceMap = new HashMap(); for (Map.Entry entry : result.entrySet()) { BigDecimal tempPrice = BigDecimal.ZERO; if(entry.getKey() == "basePrice") @@ -546,7 +545,7 @@ public class PriceServices { tempPrice = (BigDecimal) entry.getValue(); if (tempPrice != null && tempPrice != BigDecimal.ZERO) { - Map priceResults = FastMap.newInstance(); + Map priceResults = new HashMap(); try { priceResults = dispatcher.runSync("convertUom", UtilMisc. toMap("uomId", currencyDefaultUomId, "uomIdTo", currencyUomIdTo, "originalValue", tempPrice, "defaultDecimalScale", Long.valueOf(2), "defaultRoundingMode", "HalfUp")); @@ -767,7 +766,7 @@ public class PriceServices { } } - productPriceRules = FastList.newInstance(); + productPriceRules = new LinkedList(); for (String productPriceRuleId: productPriceRuleIds) { GenericValue productPriceRule = EntityQuery.use(delegator).from("ProductPriceRule").where("productPriceRuleId", productPriceRuleId).cache().queryOne(); if (productPriceRule == null) continue; @@ -780,7 +779,7 @@ public class PriceServices { // productPriceRules = delegator.findByOr("ProductPriceRule", pprExprs); productPriceRules = EntityQuery.use(delegator).from("ProductPriceRule").cache(true).queryList(); - if (productPriceRules == null) productPriceRules = FastList.newInstance(); + if (productPriceRules == null) productPriceRules = new LinkedList(); } return productPriceRules; @@ -792,9 +791,9 @@ public class PriceServices { String webSiteId, String partyId, BigDecimal quantity, String currencyUomId, Delegator delegator, Timestamp nowTimestamp, Locale locale) throws GenericEntityException { - Map calcResults = FastMap.newInstance(); + Map calcResults = new HashMap(); - List orderItemPriceInfos = FastList.newInstance(); + List orderItemPriceInfos = new LinkedList(); boolean isSale = false; // ========= go through each price rule by id and eval all conditions ========= @@ -1224,9 +1223,9 @@ public class PriceServices { public static Map calculatePurchasePrice(DispatchContext dctx, Map context) { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); - List orderItemPriceInfos = FastList.newInstance(); + List orderItemPriceInfos = new LinkedList(); boolean validPriceFound = false; BigDecimal price = BigDecimal.ZERO; diff --git a/applications/product/src/org/ofbiz/product/product/KeywordIndex.java b/applications/product/src/org/ofbiz/product/product/KeywordIndex.java index 3e82c76cff..826014faf2 100644 --- a/applications/product/src/org/ofbiz/product/product/KeywordIndex.java +++ b/applications/product/src/org/ofbiz/product/product/KeywordIndex.java @@ -20,13 +20,12 @@ package org.ofbiz.product.product; import java.io.IOException; import java.sql.Timestamp; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -85,7 +84,7 @@ public class KeywordIndex { Set stemSet = KeywordSearchUtil.getStemSet(); Map keywords = new TreeMap(); - List strings = FastList.newInstance(); + List strings = new LinkedList(); int pidWeight = 1; try { @@ -189,7 +188,7 @@ public class KeywordIndex { } } - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); int keywordMaxLength = Integer.parseInt(EntityUtilProperties.getPropertyValue("prodsearch", "product.keyword.max.length", delegator)); for (Map.Entry entry: keywords.entrySet()) { if (entry.getKey().length() <= keywordMaxLength) { diff --git a/applications/product/src/org/ofbiz/product/product/ProductContentWrapper.java b/applications/product/src/org/ofbiz/product/product/ProductContentWrapper.java index b87827210e..129c58bcf1 100644 --- a/applications/product/src/org/ofbiz/product/product/ProductContentWrapper.java +++ b/applications/product/src/org/ofbiz/product/product/ProductContentWrapper.java @@ -21,14 +21,13 @@ package org.ofbiz.product.product; import java.io.IOException; import java.io.StringWriter; import java.io.Writer; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.StringUtil; @@ -187,7 +186,7 @@ public class ProductContentWrapper implements ContentWrapper { GenericValue productContent = EntityUtil.getFirst(productContentList); if (productContent != null) { // when rendering the product content, always include the Product and ProductContent records that this comes from - Map inContext = FastMap.newInstance(); + Map inContext = new HashMap(); inContext.put("product", product); inContext.put("productContent", productContent); ContentWorker.renderContentAsText(dispatcher, delegator, productContent.getString("contentId"), outWriter, inContext, locale, mimeTypeId, partyId, roleTypeId, true); diff --git a/applications/product/src/org/ofbiz/product/product/ProductEvents.java b/applications/product/src/org/ofbiz/product/product/ProductEvents.java index 62309bf201..ddaf5e83ad 100644 --- a/applications/product/src/org/ofbiz/product/product/ProductEvents.java +++ b/applications/product/src/org/ofbiz/product/product/ProductEvents.java @@ -20,7 +20,10 @@ package org.ofbiz.product.product; import java.math.BigDecimal; import java.sql.Timestamp; +import java.util.HashSet; import java.util.Iterator; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; @@ -31,10 +34,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.ObjectType; import org.ofbiz.base.util.UtilDateTime; @@ -97,7 +96,7 @@ public class ProductEvents { EntityCondition condition = null; if (!"Y".equals(doAll)) { - List condList = FastList.newInstance(); + List condList = new LinkedList(); condList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("autoCreateKeywords", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("autoCreateKeywords", EntityOperator.NOT_EQUAL, "N"))); if ("true".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.ignore.variants", delegator))) { condList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("isVariant", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("isVariant", EntityOperator.NOT_EQUAL, "Y"))); @@ -204,7 +203,7 @@ public class ProductEvents { */ public static String updateProductAssoc(HttpServletRequest request, HttpServletResponse response) { String errMsg = ""; - List errMsgList = FastList.newInstance(); + List errMsgList = new LinkedList(); Delegator delegator = (Delegator) request.getAttribute("delegator"); Security security = (Security) request.getAttribute("security"); @@ -397,7 +396,7 @@ public class ProductEvents { // just store a new empty list in the session HttpSession session = request.getSession(); if (session != null) { - session.setAttribute("lastViewedCategories", FastList.newInstance()); + session.setAttribute("lastViewedCategories", new LinkedList()); } return "success"; } @@ -407,7 +406,7 @@ public class ProductEvents { // just store a new empty list in the session HttpSession session = request.getSession(); if (session != null) { - session.setAttribute("lastViewedProducts", FastList.newInstance()); + session.setAttribute("lastViewedProducts", new LinkedList()); } return "success"; } @@ -627,7 +626,7 @@ public class ProductEvents { description = null; } - Set variantDescRemoveToRemoveOnVirtual = FastSet.newInstance(); + Set variantDescRemoveToRemoveOnVirtual = new HashSet(); checkUpdateFeatureApplByDescription(variantProductId, variantProduct, description, productFeatureTypeId, productFeatureType, "STANDARD_FEATURE", nowTimestamp, delegator, null, variantDescRemoveToRemoveOnVirtual); checkUpdateFeatureApplByDescription(productId, product, description, productFeatureTypeId, productFeatureType, "SELECTABLE_FEATURE", nowTimestamp, delegator, variantDescRemoveToRemoveOnVirtual, null); @@ -670,7 +669,7 @@ public class ProductEvents { GenericValue productFeatureAndAppl = null; - Set descriptionsForThisType = FastSet.newInstance(); + Set descriptionsForThisType = new HashSet(); List productFeatureAndApplList = EntityQuery.use(delegator).from("ProductFeatureAndAppl").where("productId", productId, "productFeatureApplTypeId", productFeatureApplTypeId, "productFeatureTypeId", productFeatureTypeId).filterByDate().queryList(); if (productFeatureAndApplList.size() > 0) { Iterator productFeatureAndApplIter = productFeatureAndApplList.iterator(); @@ -1015,7 +1014,7 @@ public class ProductEvents { paramMap.put("locale", UtilHttp.getLocale(request)); paramMap.put("userLogin", session.getAttribute("userLogin")); - Map context = FastMap.newInstance(); + Map context = new HashMap(); context.put("bodyScreenUri", bodyScreenLocation); context.put("bodyParameters", paramMap); context.put("sendTo", paramMap.get("sendTo")); @@ -1055,10 +1054,10 @@ public class ProductEvents { Object compareListObj = session.getAttribute("productCompareList"); List compareList = null; if (compareListObj == null) { - compareList = FastList.newInstance(); + compareList = new LinkedList(); } else if (!(compareListObj instanceof List)) { Debug.logWarning("Session attribute productCompareList contains something other than the expected product list, overwriting.", module); - compareList = FastList.newInstance(); + compareList = new LinkedList(); } else { compareList = UtilGenerics.cast(compareListObj); } @@ -1142,7 +1141,7 @@ public class ProductEvents { public static String clearProductComparisonList(HttpServletRequest request, HttpServletResponse response) { HttpSession session = request.getSession(); - session.setAttribute("productCompareList", FastList.newInstance()); + session.setAttribute("productCompareList", new LinkedList()); String eventMsg = UtilProperties.getMessage("ProductUiLabels", "ProductClearCompareListSuccess", UtilHttp.getLocale(request)); request.setAttribute("_EVENT_MESSAGE_", eventMsg); return "success"; @@ -1174,7 +1173,7 @@ public class ProductEvents { String productTags = request.getParameter("productTags"); String statusId = request.getParameter("statusId"); if (UtilValidate.isNotEmpty(productId) && UtilValidate.isNotEmpty(productTags)) { - List matchList = FastList.newInstance(); + List matchList = new LinkedList(); Pattern regex = Pattern.compile("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'"); Matcher regexMatcher = regex.matcher(productTags); while (regexMatcher.find()) { diff --git a/applications/product/src/org/ofbiz/product/product/ProductPromoContentWrapper.java b/applications/product/src/org/ofbiz/product/product/ProductPromoContentWrapper.java index ace7299ee4..1d3c8d84c3 100644 --- a/applications/product/src/org/ofbiz/product/product/ProductPromoContentWrapper.java +++ b/applications/product/src/org/ofbiz/product/product/ProductPromoContentWrapper.java @@ -22,14 +22,13 @@ import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.GeneralRuntimeException; @@ -180,7 +179,7 @@ public class ProductPromoContentWrapper implements ContentWrapper { if (UtilValidate.isNotEmpty(productPromoContent)) { // when rendering the product promo content, always include the ProductPromo and ProductPromoContent records that this comes from - Map inContext = FastMap.newInstance(); + Map inContext = new HashMap(); inContext.put("productPromo", productPromo); inContext.put("productPromoContent", productPromoContent); ContentWorker.renderContentAsText(dispatcher, delegator, productPromoContent.getString("contentId"), outWriter, inContext, locale, mimeTypeId, partyId, roleTypeId, true); diff --git a/applications/product/src/org/ofbiz/product/product/ProductSearch.java b/applications/product/src/org/ofbiz/product/product/ProductSearch.java index 5bae2c7dc6..20f9550ba7 100644 --- a/applications/product/src/org/ofbiz/product/product/ProductSearch.java +++ b/applications/product/src/org/ofbiz/product/product/ProductSearch.java @@ -22,16 +22,15 @@ import java.math.BigDecimal; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Collection; +import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javolution.util.FastList; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilMisc; @@ -60,6 +59,8 @@ import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.party.party.PartyHelper; import org.ofbiz.product.category.CategoryContentWrapper; +import com.sun.syndication.feed.atom.Link; + /** * Utilities for product search based on various constraints including categories, features and keywords. @@ -71,7 +72,7 @@ public class ProductSearch { public static final String resourceCommon = "CommonUiLabels"; public static ArrayList parametricKeywordSearch(Map featureIdByType, String keywordsString, Delegator delegator, String productCategoryId, String visitId, boolean anyPrefix, boolean anySuffix, boolean isAnd) { - Set featureIdSet = FastSet.newInstance(); + Set featureIdSet = new HashSet(); if (featureIdByType != null) { featureIdSet.addAll(featureIdByType.values()); } @@ -80,7 +81,7 @@ public class ProductSearch { } public static ArrayList parametricKeywordSearch(Set featureIdSet, String keywordsString, Delegator delegator, String productCategoryId, boolean includeSubCategories, String visitId, boolean anyPrefix, boolean anySuffix, boolean isAnd) { - List productSearchConstraintList = FastList.newInstance(); + List productSearchConstraintList = new LinkedList(); if (UtilValidate.isNotEmpty(productCategoryId)) { productSearchConstraintList.add(new CategoryConstraint(productCategoryId, includeSubCategories, null)); @@ -141,17 +142,17 @@ public class ProductSearch { public static class ProductSearchContext { public int index = 1; - public List entityConditionList = FastList.newInstance(); - public List orderByList = FastList.newInstance(); + public List entityConditionList = new LinkedList(); + public List orderByList = new LinkedList(); public List fieldsToSelect = UtilMisc.toList("mainProductId"); public DynamicViewEntity dynamicViewEntity = new DynamicViewEntity(); public boolean productIdGroupBy = false; public boolean includedKeywordSearch = false; public Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); - public List> keywordFixedOrSetAndList = FastList.newInstance(); - public Set orKeywordFixedSet = FastSet.newInstance(); - public Set andKeywordFixedSet = FastSet.newInstance(); - public List productSearchConstraintList = FastList.newInstance(); + public List> keywordFixedOrSetAndList = new LinkedList>(); + public Set orKeywordFixedSet = new HashSet(); + public Set andKeywordFixedSet = new HashSet(); + public List productSearchConstraintList = new LinkedList(); public ResultSortOrder resultSortOrder = null; public Integer resultOffset = null; public Integer maxResults = null; @@ -159,29 +160,29 @@ public class ProductSearch { protected String visitId = null; protected Integer totalResults = null; - public Set includeCategoryIds = FastSet.newInstance(); - public Set excludeCategoryIds = FastSet.newInstance(); - public Set alwaysIncludeCategoryIds = FastSet.newInstance(); + public Set includeCategoryIds = new HashSet(); + public Set excludeCategoryIds = new HashSet(); + public Set alwaysIncludeCategoryIds = new HashSet(); - public List> includeCategoryIdOrSetAndList = FastList.newInstance(); - public List> alwaysIncludeCategoryIdOrSetAndList = FastList.newInstance(); + public List> includeCategoryIdOrSetAndList = new LinkedList>(); + public List> alwaysIncludeCategoryIdOrSetAndList = new LinkedList>(); - public Set includeFeatureIds = FastSet.newInstance(); - public Set excludeFeatureIds = FastSet.newInstance(); - public Set alwaysIncludeFeatureIds = FastSet.newInstance(); + public Set includeFeatureIds = new HashSet(); + public Set excludeFeatureIds = new HashSet(); + public Set alwaysIncludeFeatureIds = new HashSet(); - public List> includeFeatureIdOrSetAndList = FastList.newInstance(); - public List> alwaysIncludeFeatureIdOrSetAndList = FastList.newInstance(); + public List> includeFeatureIdOrSetAndList = new LinkedList>(); + public List> alwaysIncludeFeatureIdOrSetAndList = new LinkedList>(); - public Set includeFeatureCategoryIds = FastSet.newInstance(); - public Set excludeFeatureCategoryIds = FastSet.newInstance(); - public Set alwaysIncludeFeatureCategoryIds = FastSet.newInstance(); + public Set includeFeatureCategoryIds = new HashSet(); + public Set excludeFeatureCategoryIds = new HashSet(); + public Set alwaysIncludeFeatureCategoryIds = new HashSet(); - public Set includeFeatureGroupIds = FastSet.newInstance(); - public Set excludeFeatureGroupIds = FastSet.newInstance(); - public Set alwaysIncludeFeatureGroupIds = FastSet.newInstance(); + public Set includeFeatureGroupIds = new HashSet(); + public Set excludeFeatureGroupIds = new HashSet(); + public Set alwaysIncludeFeatureGroupIds = new HashSet(); - public List keywordTypeIds = FastList.newInstance(); + public List keywordTypeIds = new LinkedList(); public String statusId = null; public ProductSearchContext(Delegator delegator, String visitId) { @@ -301,7 +302,7 @@ public class ProductSearch { // keyword type filter if (UtilValidate.isNotEmpty(keywordTypeIds)) { - List keywordTypeCons = FastList.newInstance(); + List keywordTypeCons = new LinkedList(); for (String keywordTypeId : keywordTypeIds) { keywordTypeCons.add(EntityCondition.makeCondition("keywordTypeId", EntityOperator.EQUALS, keywordTypeId)); } @@ -337,7 +338,7 @@ public class ProductSearch { dynamicViewEntity.addMemberEntity(entityAlias, "ProductKeyword"); dynamicViewEntity.addAlias(entityAlias, prefix + "Keyword", "keyword", null, null, null, null); dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId")); - List keywordOrList = FastList.newInstance(); + List keywordOrList = new LinkedList(); for (String keyword: keywordFixedOrSet) { keywordOrList.add(EntityCondition.makeCondition(prefix + "Keyword", EntityOperator.LIKE, keyword)); } @@ -369,10 +370,10 @@ public class ProductSearch { // create new view members with logic: // ((each Id = category includes AND Id IN feature includes) AND (Id NOT IN category excludes AND Id NOT IN feature excludes)) // OR (each Id = category alwaysIncludes AND each Id = feature alwaysIncludes) - List incExcCondList = FastList.newInstance(); + List incExcCondList = new LinkedList(); EntityCondition incExcCond = null; - List alwIncCondList = FastList.newInstance(); + List alwIncCondList = new LinkedList(); EntityCondition alwIncCond = null; EntityCondition topCond = null; @@ -455,7 +456,7 @@ public class ProductSearch { } if (excludeCategoryIds.size() > 0) { - List idExcludeCondList = FastList.newInstance(); + List idExcludeCondList = new LinkedList(); idExcludeCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, this.nowTimestamp))); idExcludeCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN, this.nowTimestamp)); idExcludeCondList.add(EntityCondition.makeCondition("productCategoryId", EntityOperator.IN, excludeCategoryIds)); @@ -463,7 +464,7 @@ public class ProductSearch { incExcCondList.add(EntityCondition.makeCondition("mainProductId", EntityOperator.NOT_EQUAL, subSelCond)); } if (excludeFeatureIds.size() > 0) { - List idExcludeCondList = FastList.newInstance(); + List idExcludeCondList = new LinkedList(); idExcludeCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, this.nowTimestamp))); idExcludeCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN, this.nowTimestamp)); idExcludeCondList.add(EntityCondition.makeCondition("productFeatureId", EntityOperator.IN, excludeFeatureIds)); @@ -471,7 +472,7 @@ public class ProductSearch { incExcCondList.add(EntityCondition.makeCondition("mainProductId", EntityOperator.NOT_EQUAL, subSelCond)); } if (excludeFeatureCategoryIds.size() > 0) { - List idExcludeCondList = FastList.newInstance(); + List idExcludeCondList = new LinkedList(); idExcludeCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, this.nowTimestamp))); idExcludeCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN, this.nowTimestamp)); idExcludeCondList.add(EntityCondition.makeCondition("productFeatureCategoryId", EntityOperator.IN, excludeFeatureCategoryIds)); @@ -479,7 +480,7 @@ public class ProductSearch { incExcCondList.add(EntityCondition.makeCondition("mainProductId", EntityOperator.NOT_EQUAL, subSelCond)); } if (excludeFeatureGroupIds.size() > 0) { - List idExcludeCondList = FastList.newInstance(); + List idExcludeCondList = new LinkedList(); idExcludeCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, this.nowTimestamp))); idExcludeCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN, this.nowTimestamp)); idExcludeCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("groupThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("groupThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp))); @@ -647,7 +648,7 @@ public class ProductSearch { this.entityConditionList.add(topCond); - Debug.logInfo("topCond=" + topCond.makeWhereString(null, FastList.newInstance(), EntityConfig.getDatasource(delegator.getEntityHelperName("Product"))), module); + if (Debug.infoOn()) Debug.logInfo("topCond=" + topCond.makeWhereString(null, new LinkedList(), EntityConfig.getDatasource(delegator.getEntityHelperName("Product"))), module); } public EntityListIterator doQuery(Delegator delegator) { @@ -744,7 +745,7 @@ public class ProductSearch { int numRetreived = 1; int duplicatesFound = 0; - Set productIdSet = FastSet.newInstance(); + Set productIdSet = new HashSet(); productIds.add(searchResult.getString("mainProductId")); productIdSet.add(searchResult.getString("mainProductId")); @@ -862,7 +863,7 @@ public class ProductSearch { @Override public void addConstraint(ProductSearchContext productSearchContext) { - List productCategoryIds = FastList.newInstance(); + List productCategoryIds = new LinkedList(); for (GenericValue category: productCategories) { productCategoryIds.add(category.getString("productCategoryId")); } @@ -945,7 +946,7 @@ public class ProductSearch { @Override public void addConstraint(ProductSearchContext productSearchContext) { - Set productCategoryIdSet = FastSet.newInstance(); + Set productCategoryIdSet = new HashSet(); if (includeSubCategories) { // find all sub-categories recursively, make a Set of productCategoryId ProductSearch.getAllSubCategoryIds(productCategoryId, productCategoryIdSet, productSearchContext.getDelegator(), productSearchContext.nowTimestamp); @@ -1277,7 +1278,7 @@ public class ProductSearch { * @param exclude This is a tri-state variable: null = Include, true = Exclude, false = AlwaysInclude */ public FeatureSetConstraint(Collection productFeatureIdSet, Boolean exclude) { - this.productFeatureIdSet = FastSet.newInstance(); + this.productFeatureIdSet = new HashSet(); this.productFeatureIdSet.addAll(productFeatureIdSet); this.exclude = exclude; } @@ -1416,7 +1417,7 @@ public class ProductSearch { expandedSet.add(keyword); } Set fixedSet = KeywordSearchUtil.fixKeywordsForSearch(expandedSet, anyPrefix, anySuffix, removeStems, isAnd); - Set fixedKeywordSet = FastSet.newInstance(); + Set fixedKeywordSet = new HashSet(); fixedKeywordSet.addAll(fixedSet); productSearchContext.keywordFixedOrSetAndList.add(fixedKeywordSet); } @@ -2205,8 +2206,8 @@ public class ProductSearch { // make view-entity & EntityCondition int index = 1; - List entityConditionList = new FastList.newInstance(); - List orderByList = new FastList.newInstance(); + List entityConditionList = new LinkedList(); + List orderByList = new LinkedList(); List fieldsToSelect = UtilMisc.toList("productId"); DynamicViewEntity dynamicViewEntity = new DynamicViewEntity(); dynamicViewEntity.addMemberEntity("PROD", "Product"); @@ -2218,7 +2219,7 @@ public class ProductSearch { List productCategoryIdList = null; if (includeSubCategories) { // find all sub-categories recursively, make a Set of productCategoryId - Set productCategoryIdSet = Fast.newInstance(); + Set productCategoryIdSet = new HashSet(); getAllSubCategoryIds(productCategoryId, productCategoryIdSet, delegator, nowTimestamp); productCategoryIdList = UtilMisc.makeListWritable(productCategoryIdSet); } else { @@ -2278,7 +2279,7 @@ public class ProductSearch { dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId")); orderByList.add("-totalRelevancy"); fieldsToSelect.add("totalRelevancy"); - List keywordOrList = new FastList.newInstance(); + List keywordOrList = new LinkedList(); for (String keyword: keywordList) { keywordOrList.add(EntityCondition.makeCondition(prefix + "Keyword", EntityOperator.LIKE, keyword)); } @@ -2320,8 +2321,8 @@ public class ProductSearch { return null; } - ArrayList productIds = FastList.newInstance(); - Set productIdSet = Fast.newInstance(); + ArrayList productIds = new LinkedList(); + Set productIdSet = new HashSet(); GenericValue searchResult = null; while ((searchResult = (GenericValue) eli.next()) != null) { String productId = searchResult.getString("productId"); diff --git a/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java b/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java index a4c5d76c79..f7ec405d7b 100644 --- a/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java +++ b/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java @@ -20,6 +20,8 @@ package org.ofbiz.product.product; import java.math.BigDecimal; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -28,9 +30,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilMisc; @@ -395,7 +394,7 @@ public class ProductSearchEvents { public static String searchExportProductList(HttpServletRequest request, HttpServletResponse response) { Delegator delegator = (Delegator) request.getAttribute("delegator"); String errMsg = null; - List> productExportList = FastList.newInstance(); + List> productExportList = new LinkedList>(); try { boolean beganTransaction = TransactionUtil.begin(DEFAULT_TX_TIMEOUT); @@ -409,7 +408,7 @@ public class ProductSearchEvents { GenericValue searchResultView = null; while ((searchResultView = eli.next()) != null) { - Map productMap = FastMap.newInstance(); + Map productMap = new HashMap(); String productId = searchResultView.getString("mainProductId"); productMap.put("productId", productId); diff --git a/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java b/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java index cbade4a573..fba7cc5967 100644 --- a/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java +++ b/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java @@ -23,6 +23,9 @@ import java.math.BigDecimal; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -33,10 +36,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilGenerics; @@ -89,7 +88,7 @@ public class ProductSearchSession { /** Basic copy constructor */ public ProductSearchOptions(ProductSearchOptions productSearchOptions) { - this.constraintList = FastList.newInstance(); + this.constraintList = new LinkedList(); if (UtilValidate.isNotEmpty(productSearchOptions.constraintList)) { this.constraintList.addAll(productSearchOptions.constraintList); } @@ -111,7 +110,7 @@ public class ProductSearchSession { public static void addConstraint(ProductSearchConstraint productSearchConstraint, HttpSession session) { ProductSearchOptions productSearchOptions = getProductSearchOptions(session); if (productSearchOptions.constraintList == null) { - productSearchOptions.constraintList = FastList.newInstance(); + productSearchOptions.constraintList = new LinkedList(); } if (!productSearchOptions.constraintList.contains(productSearchConstraint)) { productSearchOptions.constraintList.add(productSearchConstraint); @@ -280,7 +279,7 @@ public class ProductSearchSession { public List searchGetConstraintStrings(boolean detailed, Delegator delegator, Locale locale) { List productSearchConstraintList = this.getConstraintList(); - List constraintStrings = FastList.newInstance(); + List constraintStrings = new LinkedList(); if (productSearchConstraintList == null) { return constraintStrings; } @@ -318,7 +317,7 @@ public class ProductSearchSession { public static List getSearchOptionsHistoryList(HttpSession session) { List optionsHistoryList = UtilGenerics.checkList(session.getAttribute("_PRODUCT_SEARCH_OPTIONS_HISTORY_")); if (optionsHistoryList == null) { - optionsHistoryList = FastList.newInstance(); + optionsHistoryList = new LinkedList(); session.setAttribute("_PRODUCT_SEARCH_OPTIONS_HISTORY_", optionsHistoryList); } return optionsHistoryList; @@ -384,7 +383,7 @@ public class ProductSearchSession { String productStoreId = ProductStoreWorker.getProductStoreId(request); if (productStoreId != null) { // get a Set of all keywords in the search, if there are any... - Set keywords = FastSet.newInstance(); + Set keywords = new HashSet(); List constraintList = ProductSearchOptions.getConstraintList(session); if (constraintList != null) { for (ProductSearchConstraint constraint: constraintList) { @@ -869,7 +868,7 @@ public class ProductSearchSession { String paging = "Y"; int previousViewSize = 20; Map requestParams = UtilHttp.getCombinedMap(request); - List keywordTypeIds = FastList.newInstance(); + List keywordTypeIds = new LinkedList(); if (requestParams.get("keywordTypeId") instanceof String) { keywordTypeIds.add((String) requestParams.get("keywordTypeId")); } else if (requestParams.get("keywordTypeId") instanceof List){ @@ -906,7 +905,7 @@ public class ProductSearchSession { highIndex = (viewIndex + 1) * viewSize; // ========== Do the actual search - List productIds = FastList.newInstance(); + List productIds = new LinkedList(); String visitId = VisitHandler.getVisitId(session); List productSearchConstraintList = ProductSearchOptions.getConstraintList(session); String noConditionFind = (String) requestParams.get("noConditionFind"); @@ -920,11 +919,11 @@ public class ProductSearchSession { int addOnTopTotalListSize = 0; int addOnTopListSize = 0; - List addOnTopProductCategoryMembers = FastList.newInstance(); + List addOnTopProductCategoryMembers = new LinkedList(); if (UtilValidate.isNotEmpty(addOnTopProdCategoryId)) { // always include the members of the addOnTopProdCategoryId Timestamp now = UtilDateTime.nowTimestamp(); - List addOnTopProdCondList = FastList.newInstance(); + List addOnTopProdCondList = new LinkedList(); addOnTopProdCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, now))); addOnTopProdCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN, now)); addOnTopProdCondList.add(EntityCondition.makeCondition("productCategoryId", EntityOperator.EQUALS, addOnTopProdCategoryId)); @@ -1007,7 +1006,7 @@ public class ProductSearchSession { String searchSortOrderString = searchGetSortOrderString(false, request); // ========== populate the result Map - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put("productIds", productIds); result.put("viewIndex", Integer.valueOf(viewIndex)); @@ -1252,7 +1251,7 @@ public class ProductSearchSession { return null; } - List> featureCountList = FastList.newInstance(); + List> featureCountList = new LinkedList>(); GenericValue searchResult = null; while ((searchResult = 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")))); @@ -1301,7 +1300,7 @@ public class ProductSearchSession { DynamicViewEntity dynamicViewEntity = productSearchContext.dynamicViewEntity; List entityConditionList = productSearchContext.entityConditionList; - List fieldsToSelect = FastList.newInstance(); + List fieldsToSelect = new LinkedList(); dynamicViewEntity.addMemberEntity("PPC", "ProductPrice"); dynamicViewEntity.addAlias("PPC", "ppcProductPriceTypeId", "productPriceTypeId", null, null, null, null); @@ -1367,7 +1366,7 @@ public class ProductSearchSession { DynamicViewEntity dynamicViewEntity = productSearchContext.dynamicViewEntity; List entityConditionList = productSearchContext.entityConditionList; - List fieldsToSelect = FastList.newInstance(); + List fieldsToSelect = new LinkedList(); dynamicViewEntity.addMemberEntity("PCMC", "ProductCategoryMember"); dynamicViewEntity.addAlias("PCMC", "pcmcProductCategoryId", "productCategoryId", null, null, null, null); @@ -1379,7 +1378,7 @@ public class ProductSearchSession { entityConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("pcmcThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("pcmcThruDate", EntityOperator.GREATER_THAN, productSearchContext.nowTimestamp))); entityConditionList.add(EntityCondition.makeCondition("pcmcFromDate", EntityOperator.LESS_THAN, productSearchContext.nowTimestamp)); - Set productCategoryIdSet = FastSet.newInstance(); + Set productCategoryIdSet = new HashSet(); ProductSearch.getAllSubCategoryIds(productCategoryId, productCategoryIdSet, delegator, productSearchContext.nowTimestamp); entityConditionList.add(EntityCondition.makeCondition("pcmcProductCategoryId", EntityOperator.IN, productCategoryIdSet)); diff --git a/applications/product/src/org/ofbiz/product/product/ProductServices.java b/applications/product/src/org/ofbiz/product/product/ProductServices.java index ca56a450bf..bca615f4ec 100644 --- a/applications/product/src/org/ofbiz/product/product/ProductServices.java +++ b/applications/product/src/org/ofbiz/product/product/ProductServices.java @@ -28,18 +28,16 @@ import java.math.BigDecimal; import java.nio.ByteBuffer; import java.sql.Timestamp; import java.util.Arrays; +import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.LinkedHashSet; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.jdom.JDOMException; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; @@ -94,13 +92,13 @@ public class ProductServices { Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); Map selectedFeatures = UtilGenerics.checkMap(context.get("selectedFeatures")); - List products = FastList.newInstance(); + List products = new LinkedList(); // All the variants for this products are retrieved Map resVariants = prodFindAllVariants(dctx, context); List variants = UtilGenerics.checkList(resVariants.get("assocProducts")); for (GenericValue oneVariant: variants) { // For every variant, all the standard features are retrieved - Map feaContext = FastMap.newInstance(); + Map feaContext = new HashMap(); feaContext.put("productId", oneVariant.getString("productIdTo")); feaContext.put("type", "STANDARD_FEATURE"); Map resFeatures = prodGetFeatures(dctx, feaContext); @@ -201,7 +199,7 @@ public class ProductServices { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); List featureOrder = UtilMisc.makeListWritable(UtilGenerics.checkCollection(context.get("featureOrder"))); if (UtilValidate.isEmpty(featureOrder)) { @@ -210,13 +208,13 @@ public class ProductServices { } List variants = UtilGenerics.checkList(prodFindAllVariants(dctx, context).get("assocProducts")); - List virtualVariant = FastList.newInstance(); + List virtualVariant = new LinkedList(); if (UtilValidate.isEmpty(variants)) { return ServiceUtil.returnSuccess(); } - List items = FastList.newInstance(); - List outOfStockItems = FastList.newInstance(); + List items = new LinkedList(); + List outOfStockItems = new LinkedList(); for (GenericValue variant: variants) { String productIdTo = variant.getString("productIdTo"); @@ -301,13 +299,13 @@ public class ProductServices { return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "productservices.empty_list_of_selectable_features_found", locale)); } - Map> features = FastMap.newInstance(); + Map> features = new HashMap>(); for (GenericValue v: selectableFeatures) { String featureType = v.getString("productFeatureTypeId"); String feature = v.getString("description"); if (!features.containsKey(featureType)) { - List featureList = FastList.newInstance(); + List featureList = new LinkedList(); featureList.add(feature); features.put(featureType, featureList); } else { @@ -358,7 +356,7 @@ public class ProductServices { // * String type -- Type of feature (STANDARD_FEATURE, SELECTABLE_FEATURE) // * String distinct -- Distinct feature (SIZE, COLOR) Delegator delegator = dctx.getDelegator(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); String productId = (String) context.get("productId"); String distinct = (String) context.get("distinct"); String type = (String) context.get("type"); @@ -390,7 +388,7 @@ public class ProductServices { public static Map prodFindProduct(DispatchContext dctx, Map context) { // * String productId -- Product ID to find Delegator delegator = dctx.getDelegator(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); String productId = (String) context.get("productId"); Locale locale = (Locale) context.get("locale"); String errMsg = null; @@ -441,7 +439,7 @@ public class ProductServices { // * String productId -- Current Product ID // * String type -- Type of association (ie PRODUCT_UPGRADE, PRODUCT_COMPLEMENT, PRODUCT_VARIANT) Delegator delegator = dctx.getDelegator(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); String productId = (String) context.get("productId"); String productIdTo = (String) context.get("productIdTo"); String type = (String) context.get("type"); @@ -497,7 +495,7 @@ public class ProductServices { try { List productAssocs = null; - List orderBy = FastList.newInstance(); + List orderBy = new LinkedList(); if (sortDescending) { orderBy.add("sequenceNum DESC"); } else { @@ -550,8 +548,8 @@ public class ProductServices { // Builds a product feature tree private static Map makeGroup(Delegator delegator, Map> featureList, List items, List order, int index) throws IllegalArgumentException, IllegalStateException { - //List featureKey = FastList.newInstance(); - Map> tempGroup = FastMap.newInstance(); + //List featureKey = new LinkedList(); + Map> tempGroup = new HashMap>(); Map group = new LinkedHashMap(); String orderKey = order.get(index); @@ -647,7 +645,7 @@ public class ProductServices { // builds a variant sample (a single sku for a featureType) private static Map makeVariantSample(Delegator delegator, Map> featureList, List items, String feature) { - Map tempSample = FastMap.newInstance(); + Map tempSample = new HashMap(); Map sample = new LinkedHashMap(); for (String productId: items) { List features = null; @@ -686,7 +684,7 @@ public class ProductServices { public static Map quickAddVariant(DispatchContext dctx, Map context) { Delegator delegator = dctx.getDelegator(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Locale locale = (Locale) context.get("locale"); String errMsg=null; String productId = (String) context.get("productId"); @@ -819,14 +817,14 @@ public class ProductServices { // separate variantProductIdsBag into a Set of variantProductIds //note: can be comma, tab, or white-space delimited - Set prelimVariantProductIds = FastSet.newInstance(); + Set prelimVariantProductIds = new HashSet(); List splitIds = Arrays.asList(variantProductIdsBag.split("[,\\p{Space}]")); Debug.logInfo("Variants: bag=" + variantProductIdsBag, module); Debug.logInfo("Variants: split=" + splitIds, module); prelimVariantProductIds.addAll(splitIds); //note: should support both direct productIds and GoodIdentification entries (what to do if more than one GoodID? Add all? - Map variantProductsById = FastMap.newInstance(); + Map variantProductsById = new HashMap(); for (String variantProductId: prelimVariantProductIds) { if (UtilValidate.isEmpty(variantProductId)) { // not sure why this happens, but seems to from time to time with the split method @@ -860,7 +858,7 @@ public class ProductServices { } // Attach productFeatureIdOne, Two, Three to the new virtual and all variant products as a standard feature - Set featureProductIds = FastSet.newInstance(); + Set featureProductIds = new HashSet(); featureProductIds.add(productId); featureProductIds.addAll(variantProductsById.keySet()); Set productFeatureIds = new HashSet(); @@ -975,7 +973,7 @@ public class ProductServices { Locale locale = (Locale) context.get("locale"); if (UtilValidate.isNotEmpty(context.get("_uploadedFile_fileName"))) { - MapimageContext = FastMap.newInstance(); + Map imageContext = new HashMap(); imageContext.putAll(context); imageContext.put("delegator", delegator); imageContext.put("tenantId",delegator.getDelegatorTenantId()); @@ -1001,7 +999,7 @@ public class ProductServices { filenameToUse = fileLocation.substring(fileLocation.lastIndexOf("/") + 1); } - List fileExtension = FastList.newInstance(); + List fileExtension = new LinkedList(); try { fileExtension = EntityQuery.use(delegator).from("FileExtension").where("mimeTypeId", (String) context.get("_uploadedFile_contentType")).queryList(); } catch (GenericEntityException e) { @@ -1072,7 +1070,7 @@ public class ProductServices { } /* scale Image in different sizes */ - Map resultResize = FastMap.newInstance(); + Map resultResize = new HashMap(); try { resultResize.putAll(ScaleImage.scaleImageInAllSize(imageContext, filenameToUse, "additional", viewNumber)); } catch (IOException e) { @@ -1126,12 +1124,12 @@ public class ProductServices { if (UtilValidate.isNotEmpty(imageUrl) && imageUrl.length() > 0) { String contentId = (String) context.get("contentId"); - Map dataResourceCtx = FastMap.newInstance(); + Map dataResourceCtx = new HashMap(); dataResourceCtx.put("objectInfo", imageUrl); dataResourceCtx.put("dataResourceName", context.get("_uploadedFile_fileName")); dataResourceCtx.put("userLogin", userLogin); - Map productContentCtx = FastMap.newInstance(); + Map productContentCtx = new HashMap(); productContentCtx.put("productId", productId); productContentCtx.put("productContentTypeId", productContentTypeId); productContentCtx.put("fromDate", context.get("fromDate")); @@ -1167,7 +1165,7 @@ public class ProductServices { } else { dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT"); dataResourceCtx.put("mimeTypeId", "text/html"); - Map dataResourceResult = FastMap.newInstance(); + Map dataResourceResult = new HashMap(); try { dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx); } catch (GenericServiceException e) { @@ -1175,7 +1173,7 @@ public class ProductServices { return ServiceUtil.returnError(e.getMessage()); } - Map contentCtx = FastMap.newInstance(); + Map contentCtx = new HashMap(); contentCtx.put("contentId", contentId); contentCtx.put("dataResourceId", dataResourceResult.get("dataResourceId")); contentCtx.put("userLogin", userLogin); @@ -1198,7 +1196,7 @@ public class ProductServices { } else { dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT"); dataResourceCtx.put("mimeTypeId", "text/html"); - Map dataResourceResult = FastMap.newInstance(); + Map dataResourceResult = new HashMap(); try { dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx); } catch (GenericServiceException e) { @@ -1206,11 +1204,11 @@ public class ProductServices { return ServiceUtil.returnError(e.getMessage()); } - Map contentCtx = FastMap.newInstance(); + Map contentCtx = new HashMap(); contentCtx.put("contentTypeId", "DOCUMENT"); contentCtx.put("dataResourceId", dataResourceResult.get("dataResourceId")); contentCtx.put("userLogin", userLogin); - Map contentResult = FastMap.newInstance(); + Map contentResult = new HashMap(); try { contentResult = dispatcher.runSync("createContent", contentCtx); } catch (GenericServiceException e) { @@ -1281,7 +1279,7 @@ public class ProductServices { Locale locale = (Locale) context.get("locale"); if (UtilValidate.isNotEmpty(context.get("_uploadedFile_fileName"))) { - MapimageContext = FastMap.newInstance(); + Map imageContext = new HashMap(); imageContext.putAll(context); imageContext.put("tenantId",delegator.getDelegatorTenantId()); String imageFilenameFormat = EntityUtilProperties.getPropertyValue("catalog", "image.filename.format", delegator); @@ -1300,7 +1298,7 @@ public class ProductServices { filenameToUse = fileLocation.substring(fileLocation.lastIndexOf("/") + 1); } - List fileExtension = FastList.newInstance(); + List fileExtension = new LinkedList(); try { fileExtension = EntityQuery.use(delegator).from("FileExtension").where("mimeTypeId", EntityOperator.EQUALS, (String) context.get("_uploadedFile_contentType")).queryList(); } catch (GenericEntityException e) { @@ -1337,12 +1335,12 @@ public class ProductServices { String imageUrl = imageUrlPrefix + "/" + filePathPrefix + filenameToUse; if (UtilValidate.isNotEmpty(imageUrl) && imageUrl.length() > 0) { - Map dataResourceCtx = FastMap.newInstance(); + Map dataResourceCtx = new HashMap(); dataResourceCtx.put("objectInfo", imageUrl); dataResourceCtx.put("dataResourceName", context.get("_uploadedFile_fileName")); dataResourceCtx.put("userLogin", userLogin); - Map productPromoContentCtx = FastMap.newInstance(); + Map productPromoContentCtx = new HashMap(); productPromoContentCtx.put("productPromoId", productPromoId); productPromoContentCtx.put("productPromoContentTypeId", productPromoContentTypeId); productPromoContentCtx.put("fromDate", context.get("fromDate")); @@ -1378,7 +1376,7 @@ public class ProductServices { } else { dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT"); dataResourceCtx.put("mimeTypeId", "text/html"); - Map dataResourceResult = FastMap.newInstance(); + Map dataResourceResult = new HashMap(); try { dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx); } catch (GenericServiceException e) { @@ -1386,7 +1384,7 @@ public class ProductServices { return ServiceUtil.returnError(e.getMessage()); } - Map contentCtx = FastMap.newInstance(); + Map contentCtx = new HashMap(); contentCtx.put("contentId", contentId); contentCtx.put("dataResourceId", dataResourceResult.get("dataResourceId")); contentCtx.put("userLogin", userLogin); @@ -1409,7 +1407,7 @@ public class ProductServices { } else { dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT"); dataResourceCtx.put("mimeTypeId", "text/html"); - Map dataResourceResult = FastMap.newInstance(); + Map dataResourceResult = new HashMap(); try { dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx); } catch (GenericServiceException e) { @@ -1417,11 +1415,11 @@ public class ProductServices { return ServiceUtil.returnError(e.getMessage()); } - Map contentCtx = FastMap.newInstance(); + Map contentCtx = new HashMap(); contentCtx.put("contentTypeId", "DOCUMENT"); contentCtx.put("dataResourceId", dataResourceResult.get("dataResourceId")); contentCtx.put("userLogin", userLogin); - Map contentResult = FastMap.newInstance(); + Map contentResult = new HashMap(); try { contentResult = dispatcher.runSync("createContent", contentCtx); } catch (GenericServiceException e) { @@ -1439,7 +1437,7 @@ public class ProductServices { } } } else { - Map productPromoContentCtx = FastMap.newInstance(); + Map productPromoContentCtx = new HashMap(); productPromoContentCtx.put("productPromoId", productPromoId); productPromoContentCtx.put("productPromoContentTypeId", productPromoContentTypeId); productPromoContentCtx.put("contentId", contentId); diff --git a/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java b/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java index 2ce4dfccf5..981a1c2e17 100644 --- a/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java +++ b/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java @@ -19,14 +19,13 @@ package org.ofbiz.product.product; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.Locale; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilDateTime; @@ -501,7 +500,7 @@ public class ProductUtilServices { String errMsg = null; if (UtilValidate.isEmpty(pattern)) { - MapimageContext = FastMap.newInstance(); + Map imageContext = new HashMap(); imageContext.putAll(context); imageContext.put("tenantId",delegator.getDelegatorTenantId()); String imageFilenameFormat = EntityUtilProperties.getPropertyValue("catalog", "image.filename.format", delegator); @@ -627,7 +626,7 @@ while (allCatIter.hasNext()) { boolean doSubCategories = !"N".equals(doSubCategoriesStr); Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); - Set productFeatureTypeIdsToExclude = FastSet.newInstance(); + Set productFeatureTypeIdsToExclude = new HashSet(); String excludeProp = EntityUtilProperties.getPropertyValue("prodsearch", "attach.feature.type.exclude", delegator); if (UtilValidate.isNotEmpty(excludeProp)) { List typeList = StringUtil.split(excludeProp, ","); @@ -672,7 +671,7 @@ while (allCatIter.hasNext()) { } // now get all features for this category and make associated feature groups - Map> productFeatureIdByTypeIdSetMap = FastMap.newInstance(); + Map> productFeatureIdByTypeIdSetMap = new HashMap>(); List productCategoryMemberList = EntityQuery.use(delegator).from("ProductCategoryMember").where("productCategoryId", productCategoryId).queryList(); for (GenericValue productCategoryMember: productCategoryMemberList) { String productId = productCategoryMember.getString("productId"); @@ -694,7 +693,7 @@ while (allCatIter.hasNext()) { } Set productFeatureIdSet = productFeatureIdByTypeIdSetMap.get(productFeatureTypeId); if (productFeatureIdSet == null) { - productFeatureIdSet = FastSet.newInstance(); + productFeatureIdSet = new HashSet(); productFeatureIdByTypeIdSetMap.put(productFeatureTypeId, productFeatureIdSet); } productFeatureIdSet.add(productFeatureId); diff --git a/applications/product/src/org/ofbiz/product/product/ProductWorker.java b/applications/product/src/org/ofbiz/product/product/ProductWorker.java index f59c5ae3c8..db553d84e5 100644 --- a/applications/product/src/org/ofbiz/product/product/ProductWorker.java +++ b/applications/product/src/org/ofbiz/product/product/ProductWorker.java @@ -22,16 +22,15 @@ import java.math.BigDecimal; import java.math.MathContext; import java.sql.Timestamp; import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; import java.util.LinkedHashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -269,7 +268,7 @@ public class ProductWorker { */ public static Set getVariantDistinguishingFeatures(GenericValue variantProduct) throws GenericEntityException { if (variantProduct == null) { - return FastSet.newInstance(); + return new HashSet(); } if (!"Y".equals(variantProduct.getString("isVariant"))) { throw new IllegalArgumentException("Cannot get distinguishing features for a product that is not a variant (ie isVariant!=Y)."); @@ -278,7 +277,7 @@ public class ProductWorker { String virtualProductId = getVariantVirtualId(variantProduct); // find all selectable features on the virtual product that are also standard features on the variant - Set distFeatures = FastSet.newInstance(); + Set distFeatures = new HashSet(); List variantDistinguishingFeatures = EntityQuery.use(delegator).from("ProductFeatureAndAppl").where("productId", variantProduct.get("productId"), "productFeatureApplTypeId", "DISTINGUISHING_FEAT").cache(true).queryList(); // Debug.logInfo("Found variantDistinguishingFeatures: " + variantDistinguishingFeatures, module); @@ -292,7 +291,7 @@ public class ProductWorker { List virtualSelectableFeatures = EntityQuery.use(delegator).from("ProductFeatureAndAppl").where("productId", virtualProductId, "productFeatureApplTypeId", "SELECTABLE_FEATURE").cache(true).queryList(); // Debug.logInfo("Found virtualSelectableFeatures: " + virtualSelectableFeatures, module); - Set virtualSelectableFeatureIds = FastSet.newInstance(); + Set virtualSelectableFeatureIds = new HashSet(); for (GenericValue virtualSelectableFeature: EntityUtil.filterByDate(virtualSelectableFeatures)) { virtualSelectableFeatureIds.add(virtualSelectableFeature.getString("productFeatureId")); } @@ -394,7 +393,7 @@ public class ProductWorker { features = EntityUtil.orderBy(features, UtilMisc.toList("description")); } catch (GenericEntityException e) { Debug.logError(e, module); - features = FastList.newInstance(); + features = new LinkedList(); } return features; } @@ -423,7 +422,7 @@ public class ProductWorker { if (product == null) { return null; } - List >> featureTypeFeatures = FastList.newInstance(); + List >> featureTypeFeatures = new LinkedList>>(); try { Delegator delegator = product.getDelegator(); //List features = delegator.findByAnd("ProductFeatureAndAppl", fields, order, true); @@ -435,13 +434,13 @@ public class ProductWorker { .cache(true) .queryList(); String oldType = null; - List> featureList = FastList.newInstance(); + List> featureList = new LinkedList>(); for (GenericValue productFeatureAppl: featuresSorted) { if (oldType == null || !oldType.equals(productFeatureAppl.getString("productFeatureTypeId"))) { // use first entry for type and description if (oldType != null) { featureTypeFeatures.add(featureList); - featureList = FastList.newInstance(); + featureList = new LinkedList>(); } GenericValue productFeatureType = EntityQuery.use(delegator).from("ProductFeatureType").where("productFeatureTypeId", productFeatureAppl.getString("productFeatureTypeId")).queryOne(); featureList.add(UtilMisc.toMap("productFeatureTypeId", productFeatureAppl.getString("productFeatureTypeId"), @@ -498,7 +497,7 @@ public class ProductWorker { List selectableTypes = EntityUtil.getFieldListFromEntityList(selectableFeatures, "productFeatureTypeId", true); // The standard features from the variant product List standardFeatures = ProductWorker.getProductFeaturesByApplTypeId(variantProduct, "STANDARD_FEATURE"); - List result = FastList.newInstance(); + List result = new LinkedList(); for (GenericValue standardFeature : standardFeatures) { // For each standard variant feature check it is also a virtual selectable feature and // if a feature of the same type hasn't already been added to the list @@ -525,7 +524,7 @@ public class ProductWorker { String featureType = appl.getString("productFeatureTypeId"); List features = featureMap.get(featureType); if (features == null) { - features = FastList.newInstance(); + features = new LinkedList(); } features.add(appl); featureMap.put(featureType, features); @@ -562,7 +561,7 @@ public class ProductWorker { } public static List filterOrderAdjustments(List adjustments, boolean includeOther, boolean includeTax, boolean includeShipping, boolean forTax, boolean forShipping) { - List newOrderAdjustmentsList = FastList.newInstance(); + List newOrderAdjustmentsList = new LinkedList(); if (UtilValidate.isNotEmpty(adjustments)) { for (GenericValue orderAdjustment: adjustments) { @@ -694,7 +693,7 @@ public class ProductWorker { if (product == null) { return null; } - List categories = FastList.newInstance(); + List categories = new LinkedList(); try { List categoryMembers = product.getRelated("ProductCategoryMember", null, null, false); categoryMembers = EntityUtil.filterByDate(categoryMembers); @@ -832,7 +831,7 @@ public class ProductWorker { } else { // attempt a conversion if necessary if (desiredUomId != null && product.get("weightUomId") != null && !desiredUomId.equals(product.get("weightUomId"))) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); try { result = dispatcher.runSync("convertUom", UtilMisc.toMap("uomId", weightUomId, "uomIdTo", desiredUomId, "originalValue", weight)); } catch (GenericServiceException e) { @@ -980,7 +979,7 @@ public class ProductWorker { } public static Set getRefurbishedProductIdSet(String productId, Delegator delegator) throws GenericEntityException { - Set productIdSet = FastSet.newInstance(); + Set productIdSet = new HashSet(); // find associated refurb items, we want serial number for main item or any refurb items too List refubProductAssocs = EntityQuery.use(delegator).from("ProductAssoc").where("productId", productId, "productAssocTypeId", "PRODUCT_REFURB").filterByDate().queryList(); @@ -1147,7 +1146,7 @@ nextProd: if(productId != null || virtualVariantId != null){ List alternativePackingProds = null; try { - List condList = FastList.newInstance(); + List condList = new LinkedList(); if (UtilValidate.isNotEmpty(productId)) { condList.add(EntityCondition.makeCondition("productIdTo", productId)); @@ -1232,7 +1231,7 @@ nextProd: Boolean isMarketingPackage = EntityTypeUtil.hasParentType(delegator, "ProductType", "productTypeId", product.getString("productTypeId"), "parentTypeId", "MARKETING_PKG"); if ( UtilValidate.isNotEmpty(isMarketingPackage) && isMarketingPackage) { - Map resultOutput = new FastMap(); + Map resultOutput = new HashMap(); resultOutput = dispatcher.runSync("getMktgPackagesAvailable", UtilMisc.toMap("productId" ,productId)); Debug.logWarning("Error getting available marketing package.", module); diff --git a/applications/product/src/org/ofbiz/product/promo/PromoServices.java b/applications/product/src/org/ofbiz/product/promo/PromoServices.java index d5da4df489..c4cd4d0160 100644 --- a/applications/product/src/org/ofbiz/product/promo/PromoServices.java +++ b/applications/product/src/org/ofbiz/product/promo/PromoServices.java @@ -24,13 +24,12 @@ import java.io.StringReader; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.apache.commons.lang.RandomStringUtils; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; @@ -131,7 +130,7 @@ public class PromoServices { Locale locale = (Locale) context.get("locale"); Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); - List condList = FastList.newInstance(); + List condList = new LinkedList(); if (UtilValidate.isEmpty(productStoreId)) { condList.add(EntityCondition.makeCondition("productStoreId", EntityOperator.EQUALS, productStoreId)); } @@ -184,7 +183,7 @@ public class PromoServices { // read the bytes into a reader BufferedReader reader = new BufferedReader(new StringReader(file)); - List errors = FastList.newInstance(); + List errors = new LinkedList(); int lines = 0; String line; @@ -195,7 +194,7 @@ public class PromoServices { if (line.length() > 0 && !line.startsWith("#")) { if (line.length() > 0 && line.length() <= 20) { // valid promo code - Map inContext = FastMap.newInstance(); + Map inContext = new HashMap(); inContext.putAll(invokeCtx); inContext.put("productPromoCodeId", line); Map result = dispatcher.runSync("createProductPromoCode", inContext); @@ -250,7 +249,7 @@ public class PromoServices { // read the bytes into a reader BufferedReader reader = new BufferedReader(new StringReader(new String(wrapper))); - List errors = FastList.newInstance(); + List errors = new LinkedList(); int lines = 0; String line; diff --git a/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductHelper.java b/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductHelper.java index aa96d7f159..cfb4825b47 100644 --- a/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductHelper.java +++ b/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductHelper.java @@ -20,10 +20,9 @@ package org.ofbiz.product.spreadsheetimport; import java.math.BigDecimal; +import java.util.HashMap; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntityException; @@ -36,7 +35,7 @@ public class ImportProductHelper { // prepare the product map public static Map prepareProduct(String productId) { - Map fields = FastMap.newInstance(); + Map fields = new HashMap(); fields.put("productId", productId); fields.put("productTypeId", "FINISHED_GOOD"); fields.put("internalName", "Product_" + productId); @@ -48,7 +47,7 @@ public class ImportProductHelper { // prepare the inventoryItem map public static Map prepareInventoryItem(String productId, BigDecimal quantityOnHand, String inventoryItemId) { - Map fields = FastMap.newInstance(); + Map fields = new HashMap(); fields.put("inventoryItemId", inventoryItemId); fields.put("inventoryItemTypeId", "NON_SERIAL_INV_ITEM"); fields.put("productId", productId); diff --git a/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductServices.java b/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductServices.java index 4dfa5e6a07..6cb4ffef47 100644 --- a/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductServices.java +++ b/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductServices.java @@ -23,12 +23,11 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.math.BigDecimal; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; - import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; @@ -67,7 +66,7 @@ public class ImportProductServices { // System.getProperty("user.dir") returns the path upto ofbiz home // directory String path = System.getProperty("user.dir") + "/spreadsheet"; - List fileItems = FastList.newInstance(); + List fileItems = new LinkedList(); if (UtilValidate.isNotEmpty(path)) { File importDir = new File(path); @@ -96,8 +95,8 @@ public class ImportProductServices { for (File item: fileItems) { // read all xls file and create workbook one by one. - List> products = FastList.newInstance(); - List> inventoryItems = FastList.newInstance(); + List> products = new LinkedList>(); + List> inventoryItems = new LinkedList>(); POIFSFileSystem fs = null; HSSFWorkbook wb = null; try { diff --git a/applications/product/src/org/ofbiz/product/store/ProductStoreEvents.java b/applications/product/src/org/ofbiz/product/store/ProductStoreEvents.java index 7f1bded2ce..1e41109d21 100644 --- a/applications/product/src/org/ofbiz/product/store/ProductStoreEvents.java +++ b/applications/product/src/org/ofbiz/product/store/ProductStoreEvents.java @@ -18,15 +18,14 @@ *******************************************************************************/ package org.ofbiz.product.store; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; @@ -45,7 +44,7 @@ public class ProductStoreEvents { String parentGroupId = request.getParameter("parentGroupId"); String onclickFunction = request.getParameter("onclickFunction"); - List productStoreGroupList = FastList.newInstance(); + List productStoreGroupList = new LinkedList(); List children; List sortList = org.ofbiz.base.util.UtilMisc.toList("sequenceNum"); @@ -56,7 +55,7 @@ public class ProductStoreEvents { if (UtilValidate.isNotEmpty(children)) { for (GenericValue child : children ) { String productStoreGroupId = child.getString("productStoreGroupId"); - Map josonMap = FastMap.newInstance(); + Map josonMap = new HashMap(); List childList = null; // Get the child list of chosen category childList = EntityQuery.use(delegator).from("ProductStoreGroupRollupAndChild").where("parentGroupId", productStoreGroupId).cache(true).filterByDate().queryList(); @@ -64,8 +63,8 @@ public class ProductStoreEvents { if (UtilValidate.isNotEmpty(childList)) { josonMap.put("state", "closed"); } - Map dataMap = FastMap.newInstance(); - Map dataAttrMap = FastMap.newInstance(); + Map dataMap = new HashMap(); + Map dataAttrMap = new HashMap(); dataAttrMap.put("onClick", onclickFunction + "('" + productStoreGroupId + "')"); String hrefStr = "EditProductStoreGroupAndAssoc"; @@ -74,7 +73,7 @@ public class ProductStoreEvents { dataMap.put("attr", dataAttrMap); dataMap.put("title", child.get("productStoreGroupName") + " [" + child.get("productStoreGroupId") + "]"); josonMap.put("data", dataMap); - Map attrMap = FastMap.newInstance(); + Map attrMap = new HashMap(); attrMap.put("parentGroupId", productStoreGroupId); josonMap.put("attr",attrMap); josonMap.put("sequenceNum",child.get("sequenceNum")); diff --git a/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java b/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java index e6e893ebfd..83dee919e6 100644 --- a/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java +++ b/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java @@ -19,6 +19,8 @@ package org.ofbiz.product.store; import java.math.BigDecimal; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -28,9 +30,6 @@ import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilMisc; @@ -220,7 +219,7 @@ public class ProductStoreWorker { public static List getAvailableStoreShippingMethods(Delegator delegator, String productStoreId, GenericValue shippingAddress, List itemSizes, Map featureIdMap, BigDecimal weight, BigDecimal orderTotal) { if (featureIdMap == null) { - featureIdMap = FastMap.newInstance(); + featureIdMap = new HashMap(); } List shippingMethods = null; try { @@ -462,7 +461,7 @@ public class ProductStoreWorker { } public static List getSurveys(Delegator delegator, String productStoreId, String groupName, String productId, String surveyApplTypeId, String parentProductId) { - List surveys = FastList.newInstance(); + List surveys = new LinkedList(); List storeSurveys = null; try { storeSurveys = EntityQuery.use(delegator).from("ProductStoreSurveyAppl").where("productStoreId", productStoreId, "surveyApplTypeId", surveyApplTypeId).orderBy("sequenceNum").cache(true).queryList(); @@ -700,7 +699,7 @@ public class ProductStoreWorker { } } - protected static Map defaultProductStoreEmailScreenLocation = FastMap.newInstance(); + protected static Map defaultProductStoreEmailScreenLocation = new HashMap(); static { defaultProductStoreEmailScreenLocation.put("PRDS_ODR_CONFIRM", "component://ecommerce/widget/EmailOrderScreens.xml#OrderConfirmNotice"); diff --git a/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java b/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java index 7485aff64f..8dff6284f0 100644 --- a/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java +++ b/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java @@ -25,8 +25,6 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilMisc; @@ -150,7 +148,7 @@ public class SubscriptionServices { null, null, updateSubscriptionResult); } } else { - Map createPartyRoleMap = FastMap.newInstance(); + Map createPartyRoleMap = new HashMap(); if (UtilValidate.isNotEmpty(roleTypeId)) { createPartyRoleMap.put("partyId", partyId); createPartyRoleMap.put("roleTypeId", roleTypeId); diff --git a/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java b/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java index 17a265be5a..88a267d366 100644 --- a/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java +++ b/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java @@ -21,11 +21,10 @@ package org.ofbiz.product.supplier; import java.math.BigDecimal; import java.util.Collection; +import java.util.HashMap; import java.util.List; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilGenerics; @@ -56,7 +55,7 @@ public class SupplierProductServices { * filtered by date and optionally by partyId, ordered with lowest price first */ public static Map getSuppliersForProduct(DispatchContext dctx, Map context) { - Map results = FastMap.newInstance(); + Map results = new HashMap(); Delegator delegator = dctx.getDelegator(); GenericValue product = null; @@ -128,7 +127,7 @@ public class SupplierProductServices { * SupplierProduct entity for that supplier party and feature, and return it as convertedProductFeatures */ public static Map convertFeaturesForSupplier(DispatchContext dctx, Map context) { - Map results = FastMap.newInstance(); + Map results = new HashMap(); String partyId = (String) context.get("partyId"); Collection features = UtilGenerics.checkList(context.get("productFeatures")); diff --git a/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java b/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java index 830143b979..9e41a0524f 100644 --- a/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java +++ b/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java @@ -20,10 +20,9 @@ package org.ofbiz.product.test; import java.math.BigDecimal; +import java.util.HashMap; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.util.EntityQuery; @@ -50,7 +49,7 @@ public class InventoryItemTransferTest extends OFBizTestCase { public void testCreateInventoryItemsTransfer() throws Exception { // create - Map ctx = FastMap.newInstance(); + Map ctx = new HashMap(); String inventoryItemId = "9005"; ctx.put("inventoryItemId", inventoryItemId); ctx.put("statusId", "IXF_REQUESTED"); @@ -64,7 +63,7 @@ public class InventoryItemTransferTest extends OFBizTestCase { assertNotNull(inventoryTransferId); // transfer - ctx = FastMap.newInstance(); + ctx = new HashMap(); ctx.put("inventoryTransferId", inventoryTransferId); ctx.put("inventoryItemId", inventoryItemId); ctx.put("statusId", "IXF_COMPLETE"); diff --git a/applications/product/src/org/ofbiz/product/test/StockMovesTest.java b/applications/product/src/org/ofbiz/product/test/StockMovesTest.java index b804fa3cee..aa6c5f9fc2 100644 --- a/applications/product/src/org/ofbiz/product/test/StockMovesTest.java +++ b/applications/product/src/org/ofbiz/product/test/StockMovesTest.java @@ -20,12 +20,11 @@ package org.ofbiz.product.test; import java.math.BigDecimal; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.util.EntityQuery; @@ -52,9 +51,9 @@ public class StockMovesTest extends OFBizTestCase { } public void testStockMoves() throws Exception { - Map fsmnCtx = FastMap.newInstance(); + Map fsmnCtx = new HashMap(); Map stockMoveHandled = null; - List warningList = FastList.newInstance(); + List warningList = new LinkedList(); fsmnCtx.put("facilityId", "WebStoreWarehouse"); fsmnCtx.put("userLogin", userLogin); @@ -70,7 +69,7 @@ public class StockMovesTest extends OFBizTestCase { warningList = UtilGenerics.checkList(respMap2.get("warningMessageList")); assertNull(warningList); - Map ppsmCtx = FastMap.newInstance(); + Map ppsmCtx = new HashMap(); ppsmCtx.put("productId", "GZ-2644"); ppsmCtx.put("facilityId", "WebStoreWarehouse"); ppsmCtx.put("locationSeqId","TLTLTLUL01"); diff --git a/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java b/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java index 873fc3083e..1b088b3caf 100644 --- a/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java +++ b/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java @@ -20,16 +20,15 @@ package org.ofbiz.shipment.packing; import java.math.BigDecimal; import java.util.AbstractMap; +import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilFormatOut; @@ -88,12 +87,12 @@ public class PackingSession implements java.io.Serializable { this.picklistBinId = binId; this.userLogin = userLogin; this.facilityId = facilityId; - this.packLines = FastList.newInstance(); - this.packEvents = FastList.newInstance(); - this.itemInfos = FastList.newInstance(); + this.packLines = new LinkedList(); + this.packEvents = new LinkedList(); + this.itemInfos = new LinkedList(); this.packageSeq = 1; - this.packageWeights = FastMap.newInstance(); - this.shipmentBoxTypes = FastMap.newInstance(); + this.packageWeights = new HashMap(); + this.shipmentBoxTypes = new HashMap(); } public PackingSession(LocalDispatcher dispatcher, GenericValue userLogin, String facilityId) { @@ -130,7 +129,7 @@ public class PackingSession implements java.io.Serializable { } // get the reservations for the item - Map invLookup = FastMap.newInstance(); + Map invLookup = new HashMap(); invLookup.put("orderId", orderId); invLookup.put("orderItemSeqId", orderItemSeqId); invLookup.put("shipGroupSeqId", shipGroupSeqId); @@ -148,7 +147,7 @@ public class PackingSession implements java.io.Serializable { this.createPackLineItem(checkCode, res, orderId, orderItemSeqId, shipGroupSeqId, productId, quantity, weight, packageSeqId); } else { // more than one reservation found - Map toCreateMap = FastMap.newInstance(); + Map toCreateMap = new HashMap(); Iterator i = reservations.iterator(); BigDecimal qtyRemain = quantity; @@ -250,7 +249,7 @@ public class PackingSession implements java.io.Serializable { } protected String findOrderItemSeqId(String productId, String orderId, String shipGroupSeqId, BigDecimal quantity) throws GeneralException { - Map lookupMap = FastMap.newInstance(); + Map lookupMap = new HashMap(); lookupMap.put("orderId", orderId); lookupMap.put("productId", productId); lookupMap.put("statusId", "ITEM_APPROVED"); @@ -263,7 +262,7 @@ public class PackingSession implements java.io.Serializable { if (orderItems != null) { for (GenericValue item: orderItems) { // get the reservations for the item - Map invLookup = FastMap.newInstance(); + Map invLookup = new HashMap(); invLookup.put("orderId", orderId); invLookup.put("orderItemSeqId", item.getString("orderItemSeqId")); invLookup.put("shipGroupSeqId", shipGroupSeqId); @@ -343,23 +342,23 @@ public class PackingSession implements java.io.Serializable { * @return result Map with packageMap and sortedKeys */ public Map getPackingSessionLinesByPackage() { - FastMap> packageMap = FastMap.newInstance(); + Map> packageMap = new HashMap>(); for (PackingSessionLine line : packLines) { int pSeq = line.getPackageSeq(); List packageLineList = packageMap.get(pSeq); if (packageLineList == null) { - packageLineList = FastList.newInstance(); + packageLineList = new LinkedList(); packageMap.put(pSeq, packageLineList); } packageLineList.add(line); } Object[] keys = packageMap.keySet().toArray(); java.util.Arrays.sort(keys); - List sortedKeys = FastList.newInstance(); + List sortedKeys = new LinkedList(); for (Object key : keys) { sortedKeys.add(key); } - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put("packageMap", packageMap); result.put("sortedKeys", sortedKeys); return result; @@ -474,7 +473,7 @@ public class PackingSession implements java.io.Serializable { } public List getCurrentShipmentIds(String orderId, String orderItemSeqId, String shipGroupSeqId) { - Set shipmentIds = FastSet.newInstance(); + Set shipmentIds = new HashSet(); List issues = this.getItemIssuances(orderId, orderItemSeqId, shipGroupSeqId); if (issues != null) { @@ -483,7 +482,7 @@ public class PackingSession implements java.io.Serializable { } } - List retList = FastList.newInstance(); + List retList = new LinkedList(); retList.addAll(shipmentIds); return retList; } @@ -655,7 +654,7 @@ public class PackingSession implements java.io.Serializable { } protected void checkReservations(boolean ignore) throws GeneralException { - List errors = FastList.newInstance(); + List errors = new LinkedList(); for (PackingSessionLine line: this.getLines()) { BigDecimal reservedQty = this.getCurrentReservedQuantity(line.getOrderId(), line.getOrderItemSeqId(), line.getShipGroupSeqId(), line.getProductId()); BigDecimal packedQty = this.getPackedQuantity(line.getOrderId(), line.getOrderItemSeqId(), line.getShipGroupSeqId(), line.getProductId()); @@ -675,7 +674,7 @@ public class PackingSession implements java.io.Serializable { } protected void checkEmptyLines() throws GeneralException { - List lines = FastList.newInstance(); + List lines = new LinkedList(); lines.addAll(this.getLines()); for (PackingSessionLine l: lines) { if (l.getQuantity().compareTo(BigDecimal.ZERO) == 0) { @@ -698,7 +697,7 @@ public class PackingSession implements java.io.Serializable { throw new IllegalArgumentException("Value for orderId is null"); } - Map lookupMap = FastMap.newInstance(); + Map lookupMap = new HashMap(); lookupMap.put("orderId", orderId); if (UtilValidate.isNotEmpty(orderItemSeqId)) { lookupMap.put("orderItemSeqId", orderItemSeqId); @@ -718,7 +717,7 @@ public class PackingSession implements java.io.Serializable { protected void createShipment() throws GeneralException { // first create the shipment Delegator delegator = this.getDelegator(); - Map newShipment = FastMap.newInstance(); + Map newShipment = new HashMap(); newShipment.put("originFacilityId", this.facilityId); newShipment.put("primaryShipGroupSeqId", primaryShipGrp); newShipment.put("primaryOrderId", primaryOrderId); @@ -770,7 +769,7 @@ public class PackingSession implements java.io.Serializable { } protected void issueItemsToShipment() throws GeneralException { - List processedLines = FastList.newInstance(); + List processedLines = new LinkedList(); for (PackingSessionLine line: this.getLines()) { if (this.checkLine(processedLines, line)) { BigDecimal totalPacked = this.getPackedQuantity(line.getOrderId(), line.getOrderItemSeqId(), @@ -797,7 +796,7 @@ public class PackingSession implements java.io.Serializable { for (int i = 0; i < packageSeq; i++) { String shipmentPackageSeqId = UtilFormatOut.formatPaddedNumber(i+1, 5); - Map pkgCtx = FastMap.newInstance(); + Map pkgCtx = new HashMap(); pkgCtx.put("shipmentId", shipmentId); pkgCtx.put("shipmentPackageSeqId", shipmentPackageSeqId); pkgCtx.put("shipmentBoxTypeId", getShipmentBoxType(i+1)); @@ -844,7 +843,7 @@ public class PackingSession implements java.io.Serializable { // first find the picklist id GenericValue bin = this.getDelegator().findOne("PicklistBin", UtilMisc.toMap("picklistBinId", picklistBinId), false); if (bin != null) { - Map ctx = FastMap.newInstance(); + Map ctx = new HashMap(); ctx.put("picklistId", bin.getString("picklistId")); ctx.put("partyId", pickerPartyId); ctx.put("roleTypeId", "PICKER"); @@ -901,7 +900,7 @@ public class PackingSession implements java.io.Serializable { BigDecimal shipmentCostEstimate = null; Map serviceResult = null; try { - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.put("shippingContactMechId", shippingContactMechId); serviceContext.put("shipmentMethodTypeId", shipmentMethodTypeId); serviceContext.put("carrierPartyId", carrierPartyId); @@ -909,7 +908,7 @@ public class PackingSession implements java.io.Serializable { serviceContext.put("productStoreId", productStoreId); if (UtilValidate.isEmpty(shippableItemInfo)) { - shippableItemInfo = FastList.newInstance(); + shippableItemInfo = new LinkedList(); for (PackingSessionLine line: getLines()) { List oiasgas = getDelegator().findByAnd("OrderItemAndShipGroupAssoc", UtilMisc.toMap("orderId", line.getOrderId(), "orderItemSeqId", line.getOrderItemSeqId(), "shipGroupSeqId", line.getShipGroupSeqId()), null, false); shippableItemInfo.addAll(oiasgas); diff --git a/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java b/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java index 2258a78afa..0ab2009c23 100644 --- a/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java +++ b/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java @@ -19,10 +19,9 @@ package org.ofbiz.shipment.packing; import java.math.BigDecimal; +import java.util.HashMap; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilFormatOut; import org.ofbiz.base.util.Debug; @@ -182,7 +181,7 @@ public class PackingSessionLine implements java.io.Serializable { quantity = this.getQuantity(); } - Map issueMap = FastMap.newInstance(); + Map issueMap = new HashMap(); issueMap.put("shipmentId", shipmentId); issueMap.put("orderId", this.getOrderId()); issueMap.put("orderItemSeqId", this.getOrderItemSeqId()); @@ -207,7 +206,7 @@ public class PackingSessionLine implements java.io.Serializable { // find the pick list item Debug.logInfo("Looking up picklist item for bin ID #" + picklistBinId, module); Delegator delegator = dispatcher.getDelegator(); - Map itemLookup = FastMap.newInstance(); + Map itemLookup = new HashMap(); itemLookup.put("picklistBinId", picklistBinId); itemLookup.put("orderId", this.getOrderId()); itemLookup.put("orderItemSeqId", this.getOrderItemSeqId()); @@ -244,7 +243,7 @@ public class PackingSessionLine implements java.io.Serializable { // assign item to package String shipmentPackageSeqId = UtilFormatOut.formatPaddedNumber(this.getPackageSeq(), 5); - Map packageMap = FastMap.newInstance(); + Map packageMap = new HashMap(); packageMap.put("shipmentId", shipmentId); packageMap.put("shipmentItemSeqId", this.getShipmentItemSeqId()); packageMap.put("quantity", this.getQuantity()); diff --git a/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java b/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java index 5d8caf7afc..efebba5e01 100644 --- a/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java +++ b/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java @@ -18,11 +18,10 @@ *******************************************************************************/ package org.ofbiz.shipment.picklist; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilGenerics; @@ -50,8 +49,8 @@ public class PickListServices { if (orderHeaderList == null) { // convert the ID list to headers if (orderIdList != null) { - List conditionList1 = FastList.newInstance(); - List conditionList2 = FastList.newInstance(); + List conditionList1 = new LinkedList(); + List conditionList2 = new LinkedList(); // we are only concerned about approved sales orders conditionList2.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "ORDER_APPROVED")); diff --git a/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java b/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java index aa4bbaaf23..424df3ba31 100644 --- a/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java +++ b/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java @@ -20,15 +20,14 @@ package org.ofbiz.shipment.shipment; import java.math.BigDecimal; import java.util.Collection; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.TreeMap; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilMisc; @@ -65,10 +64,10 @@ public class ShipmentServices { public static final BigDecimal ZERO = BigDecimal.ZERO.setScale(decimals, rounding); public static Map createShipmentEstimate(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); - List storeAll = FastList.newInstance(); + List storeAll = new LinkedList(); String productStoreShipMethId = (String)context.get("productStoreShipMethId"); GenericValue productStoreShipMeth = null; @@ -319,7 +318,7 @@ public class ShipmentServices { shipAddress.set("postalCodeGeoId", shippingPostalCode); } // Get the possible estimates. - List estimateList = FastList.newInstance(); + List estimateList = new LinkedList(); for (GenericValue thisEstimate: estimates) { String toGeo = thisEstimate.getString("geoIdTo"); @@ -426,8 +425,8 @@ public class ShipmentServices { } // make the shippable item size/feature objects - List shippableItemSizes = FastList.newInstance(); - Map shippableFeatureMap = FastMap.newInstance(); + List shippableItemSizes = new LinkedList(); + Map shippableFeatureMap = new HashMap(); if (shippableItemInfo != null) { for (Map itemMap: shippableItemInfo) { // add the item sizes @@ -676,7 +675,7 @@ public class ShipmentServices { GenericValue routeSeg = EntityUtil.getFirst(routeSegs); // to store list - List toStore = FastList.newInstance(); + List toStore = new LinkedList(); //String shipGroupSeqId = shipment.getString("primaryShipGroupSeqId"); //String orderId = shipment.getString("primaryOrderId"); @@ -732,7 +731,7 @@ public class ShipmentServices { Delegator delegator = dctx.getDelegator(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); - Map shipmentMap = FastMap.newInstance(); + Map shipmentMap = new HashMap(); EntityListIterator eli = null; try { @@ -778,7 +777,7 @@ public class ShipmentServices { } } - Map pkgCtx = FastMap.newInstance(); + Map pkgCtx = new HashMap(); pkgCtx.put("shipmentId", shipmentId); pkgCtx.put("shipmentPackageSeqId", packageSeqId); @@ -857,7 +856,7 @@ public class ShipmentServices { for (Map.Entry entry: shipmentMap.entrySet()) { String shipmentId = entry.getKey(); String voidInd = entry.getValue(); - Map shipCtx = FastMap.newInstance(); + Map shipCtx = new HashMap(); shipCtx.put("shipmentId", shipmentId); if ("Y".equals(voidInd)) { shipCtx.put("statusId", "SHIPMENT_CANCELLED"); @@ -938,7 +937,7 @@ public class ShipmentServices { } // store the quantity of each product shipped in a hashmap keyed to productId - Map shippedCountMap = FastMap.newInstance(); + Map shippedCountMap = new HashMap(); for (GenericValue item: shipmentAndItems) { BigDecimal shippedQuantity = item.getBigDecimal("quantity"); BigDecimal quantity = shippedCountMap.get(item.getString("productId")); @@ -947,7 +946,7 @@ public class ShipmentServices { } // store the quantity of each product received in a hashmap keyed to productId - Map receivedCountMap = FastMap.newInstance(); + Map receivedCountMap = new HashMap(); for (GenericValue item: shipmentReceipts) { BigDecimal receivedQuantity = item.getBigDecimal("quantityAccepted"); BigDecimal quantity = receivedCountMap.get(item.getString("productId")); @@ -1149,7 +1148,7 @@ public class ShipmentServices { Locale localePar = (Locale) context.get("locale"); // prepare the shipment information - Map sendMap = FastMap.newInstance(); + Map sendMap = new HashMap(); GenericValue shipment = null ; GenericValue orderHeader = null; try { diff --git a/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java b/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java index 028de76f81..bc58ada5c9 100644 --- a/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java +++ b/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java @@ -20,12 +20,11 @@ package org.ofbiz.shipment.shipment; import java.math.BigDecimal; import java.math.MathContext; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; @@ -106,7 +105,7 @@ public class ShipmentWorker { public static List> getPackageSplit(DispatchContext dctx, List> shippableItemInfo, BigDecimal maxWeight) { // create the package list w/ the first package - List> packages = FastList.newInstance(); + List> packages = new LinkedList>(); if (UtilValidate.isNotEmpty(shippableItemInfo)) { for (Map itemInfo: shippableItemInfo) { @@ -124,13 +123,13 @@ public class ShipmentWorker { BigDecimal partialQty = pieces > 1 ? BigDecimal.ONE.divide(BigDecimal.valueOf(pieces), generalRounding) : BigDecimal.ONE; for (long x = 0; x < pieces; x++) { if (weight.compareTo(maxWeight) >= 0) { - Map newPackage = FastMap.newInstance(); + Map newPackage = new HashMap(); newPackage.put(productId, partialQty); packages.add(newPackage); } else if (totalWeight.compareTo(BigDecimal.ZERO) > 0) { // create the first package if (packages.size() == 0) { - packages.add(FastMap.newInstance()); + packages.add(new HashMap()); } // package loop @@ -147,7 +146,7 @@ public class ShipmentWorker { } } if (!addedToPackage) { - Map packageMap = FastMap.newInstance(); + Map packageMap = new HashMap(); packageMap.put(productId, partialQty); packages.add(packageMap); } @@ -181,7 +180,7 @@ public class ShipmentWorker { } if (!"WT_lb".equals(weightUomId)) { // attempt a conversion to pounds - Map result = FastMap.newInstance(); + Map result = new HashMap(); try { result = dispatcher.runSync("convertUom", UtilMisc.toMap("uomId", weightUomId, "uomIdTo", "WT_lb", "originalValue", productWeight)); } catch (GenericServiceException ex) { diff --git a/applications/product/src/org/ofbiz/shipment/test/IssuanceTest.java b/applications/product/src/org/ofbiz/shipment/test/IssuanceTest.java index 493d7f644e..558c15af85 100644 --- a/applications/product/src/org/ofbiz/shipment/test/IssuanceTest.java +++ b/applications/product/src/org/ofbiz/shipment/test/IssuanceTest.java @@ -56,7 +56,7 @@ public class IssuanceTest extends OFBizTestCase { String orderItemSeqId="00001"; String shipGroupSeqId="00001"; String shipmentItemSeqId = "00001"; - + PackingSession packSession = new PackingSession(dispatcher, userLogin, facilityId, null, orderId, shipGroupSeqId); packSession.addOrIncreaseLine(orderId, orderItemSeqId, shipGroupSeqId, productId, BigDecimal.valueOf(6L), 1, BigDecimal.valueOf(1000L), false); @@ -66,10 +66,10 @@ public class IssuanceTest extends OFBizTestCase { // Test the OrderShipment is correct List orderShipments = orderHeader.getRelated("OrderShipment", null, null, false); - + assertFalse("No OrderShipment for order", UtilValidate.isEmpty(orderShipments)); assertEquals( "Incorrect number of OrderShipments for order", 1, orderShipments.size()); - + GenericValue orderShipment = orderShipments.get(0); assertEquals(orderItemSeqId, orderShipment.getString("orderItemSeqId")); assertEquals(shipGroupSeqId, orderShipment.getString("shipGroupSeqId")); @@ -79,10 +79,10 @@ public class IssuanceTest extends OFBizTestCase { assertTrue("Incorrect quantity in OrderShipment. Expected 6.00000 actual " + actual, actual.compareTo(BigDecimal.valueOf(6L))==0); // Test the ItemIssuances are correct - List itemIssuances = orderHeader.getRelated("ItemIssuance", null, UtilMisc.toList("itemIssuanceId"), false); + List itemIssuances = orderHeader.getRelated("ItemIssuance", null, UtilMisc.toList("inventoryItemId"), false); assertFalse("No ItemIssuances for order", UtilValidate.isEmpty(itemIssuances)); assertEquals( "Incorrect number of ItemIssuances for order", 2, itemIssuances.size()); - + GenericValue itemIssuance = itemIssuances.get(0); assertEquals(orderItemSeqId, itemIssuance.getString("orderItemSeqId")); assertEquals(shipGroupSeqId, itemIssuance.getString("shipGroupSeqId")); @@ -104,14 +104,15 @@ public class IssuanceTest extends OFBizTestCase { // Test reservations have been removed List reservations = orderHeader.getRelated("OrderItemShipGrpInvRes", null, null, false); assertTrue("Reservations exist for order - should have been deleted", UtilValidate.isEmpty(reservations)); - + // Test order header status is now ORDER_COMPLETED assertEquals(orderHeader.getString("statusId"), "ORDER_COMPLETED"); - + // Test order items status are now ITEM_COMPLETED List orderItems = orderHeader.getRelated("OrderItem", null, null, false); - - for ( GenericValue orderItem : orderItems ) + + for (GenericValue orderItem : orderItems) { assertEquals("ITEM_COMPLETED", orderItem.getString("statusId")); + } } } diff --git a/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java b/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java index 083dccd838..06f4448097 100644 --- a/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java +++ b/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java @@ -21,15 +21,14 @@ package org.ofbiz.shipment.thirdparty.dhl; import java.io.IOException; import java.io.StringWriter; import java.math.BigDecimal; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Base64; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; @@ -242,7 +241,7 @@ public class DhlServices { "FacilityShipmentDhlShipmentTemplateLocationNotFound", locale)); } StringWriter outWriter = new StringWriter(); - Map inContext = FastMap.newInstance(); + Map inContext = new HashMap(); inContext.put("action", "RateEstimate"); inContext.put("userid", userid); inContext.put("password", password); @@ -318,8 +317,8 @@ public class DhlServices { * Parses an XML document from DHL to get the rate estimate */ public static Map handleDhlRateResponse(Document rateResponseDocument, Locale locale) { - List errorList = FastList.newInstance(); - Map dhlRateCodeMap = FastMap.newInstance(); + List errorList = new LinkedList(); + Map dhlRateCodeMap = new HashMap(); // process RateResponse Element rateResponseElement = rateResponseDocument.getDocumentElement(); DhlServices.handleErrors(rateResponseElement, errorList, locale); @@ -360,10 +359,10 @@ public class DhlServices { List chargeNodeList = UtilXml.childElementList(responseChargesElement, "Charge"); - List> chargeList = FastList.newInstance(); + List> chargeList = new LinkedList>(); if (UtilValidate.isNotEmpty(chargeNodeList)) { for (Element responseChargeElement: chargeNodeList) { - Map charge = FastMap.newInstance(); + Map charge = new HashMap(); Element responseChargeTypeElement = UtilXml.firstChildElement( responseChargeElement, "Type"); @@ -402,7 +401,7 @@ public class DhlServices { String resource = (String) context.get("serviceConfigProps"); String shipmentGatewayConfigId = (String) context.get("shipmentGatewayConfigId"); Locale locale = (Locale) context.get("locale"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); String postalCode = (String) context.get("postalCode"); String accountNbr = getShipmentGatewayConfigValue(delegator, shipmentGatewayConfigId, "accessAccountNbr", resource, "shipment.dhl.access.accountNbr"); @@ -476,7 +475,7 @@ public class DhlServices { * Parse response from DHL registration request to get shipping key */ public static Map handleDhlRegisterResponse(Document registerResponseDocument, Locale locale) { - List errorList = FastList.newInstance(); + List errorList = new LinkedList(); // process RegisterResponse Element registerResponseElement = registerResponseDocument.getDocumentElement(); DhlServices.handleErrors(registerResponseElement, errorList, locale); @@ -752,7 +751,7 @@ public class DhlServices { "FacilityShipmentDhlRateEstimateTemplateNotConfigured", locale)); } StringWriter outWriter = new StringWriter(); - Map inContext = FastMap.newInstance(); + Map inContext = new HashMap(); inContext.put("action", "GenerateLabel"); inContext.put("userid", userid); inContext.put("password", password); diff --git a/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java b/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java index c1cae12160..a27258d28c 100644 --- a/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java +++ b/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java @@ -22,13 +22,12 @@ package org.ofbiz.shipment.thirdparty.fedex; import java.io.StringWriter; import java.math.BigDecimal; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Base64; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; @@ -147,7 +146,7 @@ public class FedexServices { String shipmentGatewayConfigId = (String) context.get("shipmentGatewayConfigId"); String resource = (String) context.get("configProps"); Locale locale = (Locale) context.get("locale"); - List errorList = FastList.newInstance(); + List errorList = new LinkedList (); Boolean replaceMeterNumber = (Boolean) context.get("replaceMeterNumber"); @@ -163,7 +162,7 @@ public class FedexServices { String companyPartyId = (String) context.get("companyPartyId"); String contactPartyName = (String) context.get("contactPartyName"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); String accountNumber = getShipmentGatewayConfigValue(delegator, shipmentGatewayConfigId, "accessAccountNbr", resource, "shipment.fedex.access.accountNbr"); if (UtilValidate.isEmpty(accountNumber)) { @@ -209,7 +208,7 @@ public class FedexServices { .queryList(); // Get the first valid postal address (address1, city, postalCode and countryGeoId are required by Fedex) - List postalAddressConditions = FastList.newInstance(); + List postalAddressConditions = new LinkedList(); postalAddressConditions.add(EntityCondition.makeCondition("contactMechTypeId", EntityOperator.EQUALS, "POSTAL_ADDRESS")); postalAddressConditions.add(EntityCondition.makeCondition("address1", EntityOperator.NOT_EQUAL, null)); postalAddressConditions.add(EntityCondition.makeCondition("address1", EntityOperator.NOT_EQUAL, "")); @@ -249,7 +248,7 @@ public class FedexServices { } // Get the first valid primary phone number (required by Fedex) - List phoneNumberConditions = FastList.newInstance(); + List phoneNumberConditions = new LinkedList(); phoneNumberConditions.add(EntityCondition.makeCondition("contactMechTypeId", EntityOperator.EQUALS, "TELECOM_NUMBER")); phoneNumberConditions.add(EntityCondition.makeCondition("contactMechPurposeTypeId", EntityOperator.EQUALS, "PRIMARY_PHONE")); phoneNumberConditions.add(EntityCondition.makeCondition("areaCode", EntityOperator.NOT_EQUAL, null)); @@ -273,7 +272,7 @@ public class FedexServices { phoneNumber = phoneNumber.replaceAll("[^+\\d]", ""); // Get the first valid fax number - List faxNumberConditions = FastList.newInstance(); + List faxNumberConditions = new LinkedList(); faxNumberConditions.add(EntityCondition.makeCondition("contactMechTypeId", EntityOperator.EQUALS, "TELECOM_NUMBER")); faxNumberConditions.add(EntityCondition.makeCondition("contactMechPurposeTypeId", EntityOperator.EQUALS, "FAX_NUMBER")); faxNumberConditions.add(EntityCondition.makeCondition("areaCode", EntityOperator.NOT_EQUAL, null)); @@ -292,7 +291,7 @@ public class FedexServices { } // Get the first valid email address - List emailConditions = FastList.newInstance(); + List emailConditions = new LinkedList(); emailConditions.add(EntityCondition.makeCondition("contactMechTypeId", EntityOperator.EQUALS, "EMAIL_ADDRESS")); emailConditions.add(EntityCondition.makeCondition("infoString", EntityOperator.NOT_EQUAL, null)); emailConditions.add(EntityCondition.makeCondition("infoString", EntityOperator.NOT_EQUAL, "")); @@ -311,7 +310,7 @@ public class FedexServices { } // Populate the Freemarker context - Map subscriptionRequestContext = FastMap.newInstance(); + Map subscriptionRequestContext = new HashMap(); subscriptionRequestContext.put("AccountNumber", accountNumber); subscriptionRequestContext.put("PersonName", contactPartyName); subscriptionRequestContext.put("CompanyName", companyName); @@ -469,7 +468,7 @@ public class FedexServices { } try { - Map shipRequestContext = FastMap.newInstance(); + Map shipRequestContext = new HashMap(); // Get the shipment and the shipmentRouteSegment GenericValue shipment = EntityQuery.use(delegator).from("Shipment").where("shipmentId", shipmentId).queryOne(); @@ -976,7 +975,7 @@ public class FedexServices { */ public static Map handleFedexShipReply(String fDXShipReplyString, GenericValue shipmentRouteSegment, List shipmentPackageRouteSegs, Locale locale) throws GenericEntityException { - List errorList = FastList.newInstance(); + List errorList = new LinkedList(); GenericValue shipmentPackageRouteSeg = shipmentPackageRouteSegs.get(0); Document fdxShipReplyDocument = null; diff --git a/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java b/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java index b11635895f..8381d6958c 100644 --- a/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java +++ b/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java @@ -24,7 +24,9 @@ import java.io.IOException; import java.math.BigDecimal; import java.math.MathContext; import java.text.SimpleDateFormat; +import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.ListIterator; import java.util.Locale; @@ -34,9 +36,6 @@ import java.util.TreeSet; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Base64; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; @@ -78,8 +77,8 @@ public class UpsServices { public final static String module = UpsServices.class.getName(); - public static Map unitsUpsToOfbiz = FastMap.newInstance(); - public static Map unitsOfbizToUps = FastMap.newInstance(); + public static Map unitsUpsToOfbiz = new HashMap(); + public static Map unitsOfbizToUps = new HashMap(); static { unitsUpsToOfbiz.put("LBS", "WT_lb"); unitsUpsToOfbiz.put("KGS", "WT_kg"); @@ -719,7 +718,7 @@ public class UpsServices { String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode"); //String responseStatusDescription = UtilXml.childElementValue(responseElement, "ResponseStatusDescription"); - List errorList = FastList.newInstance(); + List errorList = new LinkedList(); UpsServices.handleErrors(responseElement, errorList, locale); if ("1".equals(responseStatusCode)) { @@ -1003,7 +1002,7 @@ public class UpsServices { String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode"); //String responseStatusDescription = UtilXml.childElementValue(responseElement, "ResponseStatusDescription"); - List errorList = FastList.newInstance(); + List errorList = new LinkedList(); UpsServices.handleErrors(responseElement, errorList, locale); if ("1".equals(responseStatusCode)) { @@ -1421,7 +1420,7 @@ public class UpsServices { String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode"); //String responseStatusDescription = UtilXml.childElementValue(responseElement, "ResponseStatusDescription"); - List errorList = FastList.newInstance(); + List errorList = new LinkedList(); UpsServices.handleErrors(responseElement, errorList, locale); // handle other response elements @@ -1628,7 +1627,7 @@ public class UpsServices { String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode"); //String responseStatusDescription = UtilXml.childElementValue(responseElement, "ResponseStatusDescription"); - List errorList = FastList.newInstance(); + List errorList = new LinkedList(); UpsServices.handleErrors(responseElement, errorList, locale); if ("1".equals(responseStatusCode)) { @@ -1845,12 +1844,12 @@ public class UpsServices { String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode"); //String responseStatusDescription = UtilXml.childElementValue(responseElement, "ResponseStatusDescription"); - List errorList = FastList.newInstance(); + List errorList = new LinkedList(); UpsServices.handleErrors(responseElement, errorList, locale); if ("1".equals(responseStatusCode)) { List rates = UtilXml.childElementList(rateResponseElement, "RatedShipment"); - Map rateMap = FastMap.newInstance(); + Map rateMap = new HashMap(); BigDecimal firstRate = null; if (UtilValidate.isEmpty(rates)) { return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, @@ -2349,17 +2348,17 @@ public class UpsServices { Element responseElement = UtilXml.firstChildElement(avResponseElement, "Response"); String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode"); - List errorList = FastList.newInstance(); + List errorList = new LinkedList(); UpsServices.handleErrors(responseElement, errorList, locale); if ("1".equals(responseStatusCode)) { - List> matches = FastList.newInstance(); + List> matches = new LinkedList>(); List avResultList = UtilXml.childElementList(avResponseElement, "AddressValidationResult"); // TODO: return error if there are no matches? if (UtilValidate.isNotEmpty(avResultList)) { for (Element avResultElement: avResultList) { - Map match = FastMap.newInstance(); + Map match = new HashMap(); match.put("Rank", UtilXml.childElementValue(avResultElement, "Rank")); match.put("Quality", UtilXml.childElementValue(avResultElement, "Quality")); @@ -2680,7 +2679,7 @@ public class UpsServices { // handle Response element info Element responseElement = UtilXml.firstChildElement(shipmentConfirmResponseElement, "Response"); String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode"); - List errorList = FastList.newInstance(); + List errorList = new LinkedList(); UpsServices.handleErrors(responseElement, errorList, locale); if (!"1".equals(responseStatusCode)) { errorList.add(0, UtilProperties.getMessage(resourceError, "FacilityShipmentUpsShipmentConfirmFailedForReturnShippingLabel", locale)); @@ -2789,7 +2788,7 @@ public class UpsServices { Locale locale = (Locale) context.get("locale"); String rateResponseString = null; String productStoreId = (String) context.get("productStoreId"); - List> shippingRates = FastList.newInstance(); + List> shippingRates = new LinkedList>(); GenericValue shipmentRouteSegment = null; Map shipmentGatewayConfig = ShipmentServices.getShipmentGatewayConfigFromShipment(delegator, shipmentId, locale); String shipmentGatewayConfigId = (String) shipmentGatewayConfig.get("shipmentGatewayConfigId"); @@ -3100,7 +3099,7 @@ public class UpsServices { List productStoreShipmentMethods = EntityQuery.use(delegator).from("ProductStoreShipmentMethView").where("productStoreId", productStoreId).queryList(); for (GenericValue productStoreShipmentMethod :productStoreShipmentMethods) { if ("UPS".equals(productStoreShipmentMethod.get("partyId"))) { - Map thisUpsRateCodeMap = FastMap.newInstance(); + Map thisUpsRateCodeMap = new HashMap(); carrierShipmentMethod = EntityQuery.use(delegator).from("CarrierShipmentMethod") .where("shipmentMethodTypeId", productStoreShipmentMethod.getString("shipmentMethodTypeId"), "partyId", productStoreShipmentMethod.getString("partyId"), "roleTypeId", productStoreShipmentMethod.getString("roleTypeId")) .queryOne(); @@ -3141,13 +3140,13 @@ public class UpsServices { // handle Response element info Element responseElement = UtilXml.firstChildElement(rateResponseElement, "Response"); String responseStatusCode = UtilXml.childElementValue(responseElement, "ResponseStatusCode"); - List errorList = FastList.newInstance(); + List errorList = new LinkedList(); UpsServices.handleErrors(responseElement, errorList, locale); String totalRates = null; if ("1".equals(responseStatusCode)) { List rates = UtilXml.childElementList(rateResponseElement, "RatedShipment"); - Map rateMap = FastMap.newInstance(); + Map rateMap = new HashMap(); if (UtilValidate.isEmpty(rates)) { return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsNoRateAvailable", locale)); } else { diff --git a/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java b/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java index 176479d89e..ace90cc3ee 100644 --- a/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java +++ b/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java @@ -26,7 +26,9 @@ import java.io.OutputStream; import java.math.BigDecimal; import java.text.DecimalFormat; import java.util.Collections; +import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.ListIterator; import java.util.Locale; @@ -34,9 +36,6 @@ import java.util.Map; import javax.xml.transform.TransformerException; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.apache.commons.lang.StringUtils; import org.ofbiz.base.util.Base64; import org.ofbiz.base.util.Debug; @@ -77,7 +76,7 @@ public class UspsServices { public final static String module = UspsServices.class.getName(); public final static String resourceError = "ProductUiLabels"; - private static List domesticCountries = FastList.newInstance(); + private static List domesticCountries = new LinkedList(); // Countries treated as domestic for rate enquiries static { domesticCountries.add("USA"); @@ -480,7 +479,7 @@ public class UspsServices { List detailElementList = UtilXml.childElementList(trackInfoElement, "TrackDetail"); if (UtilValidate.isNotEmpty(detailElementList)) { - List trackingDetailList = FastList.newInstance(); + List trackingDetailList = new LinkedList(); for (Element detailElement: detailElementList) { trackingDetailList.add(UtilXml.elementValue(detailElement)); } @@ -1059,7 +1058,7 @@ public class UspsServices { } if (!"WT_lb".equals(weightUomId)) { // attempt a conversion to pounds - Map result = FastMap.newInstance(); + Map result = new HashMap(); try { result = dispatcher.runSync("convertUom", UtilMisc.toMap("uomId", weightUomId, "uomIdTo", "WT_lb", "originalValue", weight)); } catch (GenericServiceException ex) { diff --git a/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java b/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java index c1129af2a1..6913da62fd 100644 --- a/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java +++ b/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java @@ -19,11 +19,10 @@ package org.ofbiz.shipment.thirdparty.usps; +import java.util.HashMap; import java.util.List; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilMisc; @@ -168,7 +167,7 @@ public class UspsServicesTests extends OFBizTestCase { public void testUspsDomesticRate() throws Exception { // prepare the context - Map context = FastMap.newInstance(); + Map context = new HashMap(); context.put("service", "Priority"); context.put("originZip", "20770"); diff --git a/applications/product/src/org/ofbiz/shipment/verify/VerifyPickServices.java b/applications/product/src/org/ofbiz/shipment/verify/VerifyPickServices.java index 522ab63180..9c6a5a04c1 100644 --- a/applications/product/src/org/ofbiz/shipment/verify/VerifyPickServices.java +++ b/applications/product/src/org/ofbiz/shipment/verify/VerifyPickServices.java @@ -20,9 +20,9 @@ package org.ofbiz.shipment.verify; import java.math.BigDecimal; +import java.util.HashMap; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilGenerics; @@ -90,7 +90,7 @@ public class VerifyPickServices { String orderId = (String) context.get("orderId"); try { shipmentId = pickSession.complete(orderId, locale); - Map shipment = FastMap.newInstance(); + Map shipment = new HashMap(); shipment.put("shipmentId", shipmentId); pickSession.clearAllRows(); return shipment; diff --git a/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java b/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java index 61ecc499bc..37fd193a0d 100644 --- a/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java +++ b/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java @@ -21,11 +21,11 @@ package org.ofbiz.shipment.verify; import java.io.Serializable; import java.math.BigDecimal; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; @@ -67,7 +67,7 @@ public class VerifyPickSession implements Serializable { this._delegator = _dispatcher.getDelegator(); this.delegatorName = _delegator.getDelegatorName(); this.userLogin = userLogin; - this.pickRows = FastList.newInstance(); + this.pickRows = new LinkedList(); } public LocalDispatcher getDispatcher() { @@ -91,7 +91,7 @@ public class VerifyPickSession implements Serializable { } // get the reservations for the item - Map inventoryLookupMap = FastMap.newInstance(); + Map inventoryLookupMap = new HashMap(); inventoryLookupMap.put("orderId", orderId); inventoryLookupMap.put("orderItemSeqId", orderItemSeqId); inventoryLookupMap.put("shipGroupSeqId", shipGroupSeqId); @@ -108,7 +108,7 @@ public class VerifyPickSession implements Serializable { this.createVerifyPickRow(checkCode, reservation, orderId, orderItemSeqId, shipGroupSeqId, productId, originGeoId, quantity, locale); } else { // more than one reservation found - Map reserveQtyMap = FastMap.newInstance(); + Map reserveQtyMap = new HashMap(); BigDecimal qtyRemain = quantity; for (GenericValue reservation : reservations) { @@ -155,7 +155,7 @@ public class VerifyPickSession implements Serializable { protected String findOrderItemSeqId(String productId, String orderId, String shipGroupSeqId, BigDecimal quantity, Locale locale) throws GeneralException { - Map orderItemLookupMap = FastMap.newInstance(); + Map orderItemLookupMap = new HashMap(); orderItemLookupMap.put("orderId", orderId); orderItemLookupMap.put("productId", productId); orderItemLookupMap.put("statusId", "ITEM_APPROVED"); @@ -167,7 +167,7 @@ public class VerifyPickSession implements Serializable { if (orderItems != null) { for (GenericValue orderItem : orderItems) { // get the reservations for the item - Map inventoryLookupMap = FastMap.newInstance(); + Map inventoryLookupMap = new HashMap(); inventoryLookupMap.put("orderId", orderId); inventoryLookupMap.put("orderItemSeqId", orderItem.getString("orderItemSeqId")); inventoryLookupMap.put("shipGroupSeqId", shipGroupSeqId); @@ -254,7 +254,7 @@ public class VerifyPickSession implements Serializable { } public List getPickRows(String orderId) { - List pickVerifyRows = FastList.newInstance(); + List pickVerifyRows = new LinkedList(); for (VerifyPickSessionRow line: this.getPickRows()) { if (orderId.equals(line.getOrderId())) { pickVerifyRows.add(line); @@ -309,7 +309,7 @@ public class VerifyPickSession implements Serializable { this.updateProduct(); // Update the shipment status to Picked, this will trigger createInvoicesFromShipment and finally a invoice will be created - Map updateShipmentCtx = FastMap.newInstance(); + Map updateShipmentCtx = new HashMap(); updateShipmentCtx.put("shipmentId", shipmentId); updateShipmentCtx.put("statusId", "SHIPMENT_PICKED"); updateShipmentCtx.put("userLogin", this.getUserLogin()); @@ -319,7 +319,7 @@ public class VerifyPickSession implements Serializable { } protected void checkReservedQty(String orderId, Locale locale) throws GeneralException { - List errorList = FastList.newInstance(); + List errorList = new LinkedList(); for (VerifyPickSessionRow pickRow : this.getPickRows(orderId)) { BigDecimal reservedQty = this.getReservedQty(pickRow.getOrderId(), pickRow.getOrderItemSeqId(), pickRow.getShipGroupSeqId()); BigDecimal verifiedQty = this.getReadyToVerifyQuantity(pickRow.getOrderId(), pickRow.getOrderItemSeqId()); @@ -364,7 +364,7 @@ public class VerifyPickSession implements Serializable { } protected void issueItemsToShipment(String shipmentId, Locale locale) throws GeneralException { - List processedRows = FastList.newInstance(); + List processedRows = new LinkedList(); for (VerifyPickSessionRow pickRow : this.getPickRows()) { if (this.checkLine(processedRows, pickRow)) { BigDecimal totalVerifiedQty = this.getVerifiedQuantity(pickRow.getOrderId(), pickRow.getOrderItemSeqId(), pickRow.getShipGroupSeqId(), pickRow.getProductId(), pickRow.getInventoryItemId()); @@ -387,7 +387,7 @@ public class VerifyPickSession implements Serializable { protected String createShipment(VerifyPickSessionRow line) throws GeneralException { Delegator delegator = this.getDelegator(); String orderId = line.getOrderId(); - Map newShipment = FastMap.newInstance(); + Map newShipment = new HashMap(); newShipment.put("originFacilityId", facilityId); newShipment.put("primaryShipGroupSeqId", line.getShipGroupSeqId()); newShipment.put("primaryOrderId", orderId); @@ -429,7 +429,7 @@ public class VerifyPickSession implements Serializable { protected void updateProduct() throws GeneralException { for (VerifyPickSessionRow pickRow : this.getPickRows()) { if (UtilValidate.isNotEmpty(pickRow.getOriginGeoId())) { - Map updateProductCtx = FastMap.newInstance(); + Map updateProductCtx = new HashMap(); updateProductCtx.put("originGeoId", pickRow.getOriginGeoId()); updateProductCtx.put("productId", pickRow.getProductId()); updateProductCtx.put("userLogin", this.getUserLogin()); diff --git a/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSessionRow.java b/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSessionRow.java index 6b3102b034..ce1362a27e 100644 --- a/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSessionRow.java +++ b/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSessionRow.java @@ -21,11 +21,10 @@ package org.ofbiz.shipment.verify; import java.io.Serializable; import java.math.BigDecimal; +import java.util.HashMap; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilValidate; @@ -130,7 +129,7 @@ public class VerifyPickSessionRow implements Serializable { quantity = this.getReadyToVerifyQty(); } - Map issueOrderItemMap = FastMap.newInstance(); + Map issueOrderItemMap = new HashMap(); issueOrderItemMap.put("shipmentId", shipmentId); issueOrderItemMap.put("orderId", this.getOrderId()); issueOrderItemMap.put("orderItemSeqId", this.getOrderItemSeqId()); @@ -154,7 +153,7 @@ public class VerifyPickSessionRow implements Serializable { if (picklistBinId != null) { // find the pick list item Delegator delegator = dispatcher.getDelegator(); - Map picklistItemMap = FastMap.newInstance(); + Map picklistItemMap = new HashMap(); picklistItemMap.put("picklistBinId", picklistBinId); picklistItemMap.put("orderId", this.getOrderId()); picklistItemMap.put("orderItemSeqId", this.getOrderItemSeqId()); diff --git a/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java b/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java index 7b167be40b..bed7aef4bb 100644 --- a/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java +++ b/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java @@ -19,12 +19,11 @@ package org.ofbiz.shipment.weightPackage; import java.math.BigDecimal; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilValidate; @@ -150,7 +149,7 @@ public class WeightPackageServices { weightPackageSession.setEstimatedShipCost(estimatedShippingCost); weightPackageSession.setActualShipCost(newEstimatedShippingCost); - Map response = FastMap.newInstance(); + Map response = new HashMap(); try { String getActualShippingQuoteFromUps = EntityUtilProperties.getPropertyValue("shipment.properties", "shipment.ups.shipping", "N", delegator); String result = weightPackageSession.complete(orderId, locale, getActualShippingQuoteFromUps); @@ -175,7 +174,7 @@ public class WeightPackageServices { String shipmentId = (String) context.get("shipmentId"); String orderId = (String) context.get("orderId"); - Map response = FastMap.newInstance(); + Map response = new HashMap(); try { String getActualShippingQuoteFromUps = EntityUtilProperties.getPropertyValue("shipment.properties", "shipment.ups.shipping", "N", delegator); if (weightPackageSession.completeShipment(orderId, getActualShippingQuoteFromUps)) { diff --git a/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java b/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java index 8aaca7ba9c..751aee4943 100644 --- a/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java +++ b/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java @@ -20,13 +20,12 @@ package org.ofbiz.shipment.weightPackage; import java.io.Serializable; import java.math.BigDecimal; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilFormatOut; @@ -85,7 +84,7 @@ public class WeightPackageSession implements Serializable { this.picklistBinId = picklistBinId; this.userLogin = userLogin; this.facilityId = facilityId; - this.weightPackageLines = FastList.newInstance(); + this.weightPackageLines = new LinkedList(); } public WeightPackageSession(LocalDispatcher dispatcher, GenericValue userLogin, String facilityId) { @@ -216,7 +215,7 @@ public class WeightPackageSession implements Serializable { } public List getPackedLines(String orderId) { - List packedLines = FastList.newInstance(); + List packedLines = new LinkedList(); if (UtilValidate.isNotEmpty(orderId)) { for (WeightPackageSessionLine packedLine: this.getPackedLines()) { if (orderId.equals(packedLine.getOrderId())) @@ -356,7 +355,7 @@ public class WeightPackageSession implements Serializable { List shipmentRouteSegments = EntityQuery.use(delegator).from("ShipmentRouteSegment").where("shipmentId", shipmentId).queryList(); if (UtilValidate.isNotEmpty(shipmentRouteSegments)) { for (GenericValue shipmentRouteSegment : shipmentRouteSegments) { - Map shipmentRouteSegmentMap = FastMap.newInstance(); + Map shipmentRouteSegmentMap = new HashMap(); shipmentRouteSegmentMap.put("shipmentId", shipmentId); shipmentRouteSegmentMap.put("shipmentRouteSegmentId", shipmentRouteSegment.getString("shipmentRouteSegmentId")); shipmentRouteSegmentMap.put("userLogin", userLogin); @@ -375,7 +374,7 @@ public class WeightPackageSession implements Serializable { List shipmentRouteSegments = this.getDelegator().findByAnd("ShipmentRouteSegment", UtilMisc.toMap("shipmentId", shipmentId), null, false); if (UtilValidate.isNotEmpty(shipmentRouteSegments)) { for (GenericValue shipmentRouteSegment : shipmentRouteSegments) { - Map shipmentRouteSegmentMap = FastMap.newInstance(); + Map shipmentRouteSegmentMap = new HashMap(); shipmentRouteSegmentMap.put("shipmentId", shipmentId); shipmentRouteSegmentMap.put("shipmentRouteSegmentId", shipmentRouteSegment.getString("shipmentRouteSegmentId")); shipmentRouteSegmentMap.put("userLogin", userLogin); @@ -407,7 +406,7 @@ public class WeightPackageSession implements Serializable { for (WeightPackageSessionLine packedLine : this.getPackedLines(orderId)) { String shipmentPackageSeqId = UtilFormatOut.formatPaddedNumber(++shipPackSeqId, 5); - Map shipmentPackageMap = FastMap.newInstance(); + Map shipmentPackageMap = new HashMap(); shipmentPackageMap.put("shipmentId", shipmentId); shipmentPackageMap.put("shipmentPackageSeqId", shipmentPackageSeqId); shipmentPackageMap.put("weight", packedLine.getPackageWeight()); @@ -419,7 +418,7 @@ public class WeightPackageSession implements Serializable { shipmentPackageMap.put("weightUomId", getWeightUomId()); shipmentPackageMap.put("userLogin", userLogin); - Map shipmentPackageResult = FastMap.newInstance(); + Map shipmentPackageResult = new HashMap(); GenericValue shipmentPackage = this.getDelegator().findOne("ShipmentPackage", UtilMisc.toMap("shipmentId", shipmentId, "shipmentPackageSeqId", shipmentPackageSeqId), false); if (UtilValidate.isEmpty(shipmentPackage)) { shipmentPackageResult = this.getDispatcher().runSync("createShipmentPackage", shipmentPackageMap); @@ -443,7 +442,7 @@ public class WeightPackageSession implements Serializable { for (GenericValue orderItem : orderItems) { List orderItemShipGrpInvReserves = orderItem.getRelated("OrderItemShipGrpInvRes", null, null, false); if (UtilValidate.isEmpty(orderItemShipGrpInvReserves)) { - Map orderItemStatusMap = FastMap.newInstance(); + Map orderItemStatusMap = new HashMap(); orderItemStatusMap.put("orderId", orderId); orderItemStatusMap.put("orderItemSeqId", orderItem.getString("orderItemSeqId")); orderItemStatusMap.put("userLogin", userLogin); @@ -481,7 +480,7 @@ public class WeightPackageSession implements Serializable { } protected void setShipmentToPacked() throws GeneralException { - Map shipmentMap = FastMap.newInstance(); + Map shipmentMap = new HashMap(); shipmentMap.put("shipmentId", shipmentId); shipmentMap.put("statusId", "SHIPMENT_PACKED"); shipmentMap.put("userLogin", userLogin); @@ -501,7 +500,7 @@ public class WeightPackageSession implements Serializable { BigDecimal shipmentCostEstimate = ZERO; Map shipCostEstimateResult = null; try { - Map shipCostEstimateMap = FastMap.newInstance(); + Map shipCostEstimateMap = new HashMap(); shipCostEstimateMap.put("shippingContactMechId", shippingContactMechId); shipCostEstimateMap.put("shipmentMethodTypeId", shipmentMethodTypeId); shipCostEstimateMap.put("carrierPartyId", carrierPartyId); diff --git a/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSessionLine.java b/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSessionLine.java index a8554c6568..e53c26a354 100644 --- a/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSessionLine.java +++ b/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSessionLine.java @@ -19,10 +19,9 @@ package org.ofbiz.shipment.weightPackage; import java.math.BigDecimal; +import java.util.HashMap; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilFormatOut; import org.ofbiz.entity.GenericValue; @@ -118,7 +117,7 @@ public class WeightPackageSessionLine implements java.io.Serializable { protected void applyLineToPackage(String shipmentId, GenericValue userLogin, LocalDispatcher dispatcher, int shipPackSeqId) throws GeneralException { String shipmentPackageSeqId = UtilFormatOut.formatPaddedNumber(shipPackSeqId, 5); - Map packageMap = FastMap.newInstance(); + Map packageMap = new HashMap(); packageMap.put("shipmentId", shipmentId); packageMap.put("shipmentItemSeqId", this.getShipmentItemSeqId()); // quanity given, by defult one because it is a required field diff --git a/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy b/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy index 693d9013b2..0f1171b70a 100644 --- a/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy +++ b/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy @@ -22,8 +22,6 @@ * should not contain order component's specific code. */ import org.ofbiz.entity.util.EntityUtil; -import javolution.util.FastMap; -import javolution.util.FastList; // Put the result of CategoryWorker.getRelatedCategories into the separateRootType function as attribute. // The separateRootType function will return the list of category of given catalog. diff --git a/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStorePaySetup.groovy b/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStorePaySetup.groovy index 3b2d2479fa..fc1979904e 100644 --- a/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStorePaySetup.groovy +++ b/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStorePaySetup.groovy @@ -19,14 +19,12 @@ import org.ofbiz.entity.condition.*; import org.ofbiz.entity.util.*; -import javolution.util.FastList; paymentMethodTypeId = request.getParameter("paymentMethodTypeId"); paymentServiceTypeEnumId = request.getParameter("paymentServiceTypeEnumId"); customMethodsCond = null; if (paymentMethodTypeId && paymentServiceTypeEnumId) { - if (paymentMethodTypeId == "CREDIT_CARD" && paymentServiceTypeEnumId == "PRDS_PAY_AUTH" ) { customMethodsCond = EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_AUTH"); } else if (paymentMethodTypeId == "CREDIT_CARD" && paymentServiceTypeEnumId == "PRDS_PAY_CAPTURE" ) { @@ -61,7 +59,7 @@ if (paymentMethodTypeId && paymentServiceTypeEnumId) { } if (!paymentMethodTypeId || !paymentServiceTypeEnumId) { - customMethods = FastList.newInstance(); + customMethods = []; customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_AUTH")); customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_CAPTURE")); customMethods.add(EntityCondition.makeCondition("customMethodTypeId", EntityOperator.EQUALS, "CC_REAUTH")); diff --git a/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryAverageCosts.groovy b/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryAverageCosts.groovy index 1a5a9d0f9a..44691662b5 100644 --- a/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryAverageCosts.groovy +++ b/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryAverageCosts.groovy @@ -18,7 +18,6 @@ */ import java.util.*; -import javolution.util.FastList; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.condition.EntityCondition; @@ -31,7 +30,7 @@ EntityCondition whereConditions = EntityCondition.makeCondition("facilityId", En inventoryItems = select("productId").from("InventoryItem").where("facilityId", facilityId).orderBy("productId").queryList(); inventoryItemProducts = EntityUtil.getFieldListFromEntityList(inventoryItems, "productId", true); -inventoryAverageCosts = FastList.newInstance(); +inventoryAverageCosts = []; inventoryItemProducts.each { productId -> productFacility = from("ProductFacility").where("productId", productId, "facilityId", facilityId).queryOne(); if (UtilValidate.isNotEmpty(productFacility)) { diff --git a/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java b/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java index d6ad995f8a..d19fa8a087 100644 --- a/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java +++ b/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java @@ -19,6 +19,7 @@ package org.ofbiz.securityext.login; +import java.util.HashMap; import java.util.Iterator; import java.util.Map; @@ -27,10 +28,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastMap; - import org.apache.commons.lang.RandomStringUtils; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilFormatOut; import org.ofbiz.base.util.UtilHttp; @@ -274,14 +272,14 @@ public class LoginEvents { } // set the needed variables in new context - Map bodyParameters = FastMap.newInstance(); + Map bodyParameters = new HashMap(); bodyParameters.put("useEncryption", Boolean.valueOf(useEncryption)); bodyParameters.put("password", UtilFormatOut.checkNull(passwordToSend)); bodyParameters.put("locale", UtilHttp.getLocale(request)); bodyParameters.put("userLogin", supposedUserLogin); bodyParameters.put("productStoreId", productStoreId); - Map serviceContext = FastMap.newInstance(); + Map serviceContext = new HashMap(); serviceContext.put("bodyScreenUri", bodyScreenLocation); serviceContext.put("bodyParameters", bodyParameters); if (productStoreEmail != null) { diff --git a/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java b/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java index 24254967fa..e813c0a51a 100644 --- a/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java +++ b/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java @@ -23,6 +23,7 @@ import java.io.Writer; import java.io.IOException; import java.io.StringWriter; import java.sql.Timestamp; + import javax.servlet.http.HttpServletRequest; import org.ofbiz.content.content.ContentWrapper; @@ -40,8 +41,6 @@ import org.ofbiz.base.util.GeneralRuntimeException; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.cache.UtilCache; import org.ofbiz.service.LocalDispatcher; -import javolution.util.FastMap; -import javolution.util.FastList; /** * WorkEffortContentWrapper; gets work effort content for display @@ -304,7 +303,7 @@ public class WorkEffortContentWrapper implements ContentWrapper { } if (workEffortContent != null) { // when rendering the product content, always include the Product and ProductContent records that this comes from - Map inContext = FastMap.newInstance(); + Map inContext = new HashMap(); inContext.put("workEffort", workEffort); inContext.put("workEffortContent", workEffortContent); ContentWorker.renderContentAsText(dispatcher, delegator, workEffortContent.getString("contentId"), outWriter, inContext, locale, mimeTypeId, null, null, false); @@ -319,11 +318,11 @@ public class WorkEffortContentWrapper implements ContentWrapper { .filterByDate() .queryList(); - List contentList = FastList.newInstance(); + List contentList = new LinkedList(); if (partyContentList != null) { for (GenericValue workEffortContent: partyContentList) { StringWriter outWriter = new StringWriter(); - Map inContext = FastMap.newInstance(); + Map inContext = new HashMap(); inContext.put("workEffort", workEffort); inContext.put("workEffortContent", workEffortContent); ContentWorker.renderContentAsText(dispatcher, delegator, workEffortContent.getString("contentId"), outWriter, inContext, locale, mimeTypeId, null, null, false); diff --git a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java index bb3c9f1989..5dfdf1a2d3 100644 --- a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java +++ b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java @@ -25,15 +25,15 @@ import java.io.StringReader; import java.net.URISyntaxException; import java.sql.Timestamp; import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; import net.fortuna.ical4j.data.CalendarBuilder; import net.fortuna.ical4j.data.ParserException; import net.fortuna.ical4j.model.Calendar; @@ -149,7 +149,7 @@ public class ICalConverter { } protected static ResponseProperties createWorkEffort(Component component, Map context) { - Map serviceMap = FastMap.newInstance(); + Map serviceMap = new HashMap(); setWorkEffortServiceMap(component, serviceMap); serviceMap.put("workEffortTypeId", "VTODO".equals(component.getName()) ? "TASK" : "EVENT"); serviceMap.put("currentStatusId", "VTODO".equals(component.getName()) ? "CAL_NEEDS_ACTION" : "CAL_TENTATIVE"); @@ -463,7 +463,7 @@ public class ICalConverter { protected static Map invokeService(String serviceName, Map serviceMap, Map context) { LocalDispatcher dispatcher = (LocalDispatcher) context.get("dispatcher"); - Map localMap = FastMap.newInstance(); + Map localMap = new HashMap(); try { ModelService modelService = null; modelService = dispatcher.getDispatchContext().getModelService(serviceName); @@ -722,7 +722,7 @@ public class ICalConverter { } boolean hasCreatePermission = hasPermission(workEffortId, "CREATE", context); List workEfforts = getRelatedWorkEfforts(publishProperties, context); - Set validWorkEfforts = FastSet.newInstance(); + Set validWorkEfforts = new HashSet(); if (UtilValidate.isNotEmpty(workEfforts)) { // Security issue: make sure only related work efforts get updated for (GenericValue workEffort : workEfforts) { @@ -776,8 +776,8 @@ public class ICalConverter { protected static ResponseProperties storePartyAssignments(String workEffortId, Component component, Map context) { ResponseProperties responseProps = null; - Map serviceMap = FastMap.newInstance(); - List partyList = FastList.newInstance(); + Map serviceMap = new HashMap(); + List partyList = new LinkedList(); partyList.addAll(UtilGenerics.checkList(component.getProperties("ATTENDEE"), Property.class)); partyList.addAll(UtilGenerics.checkList(component.getProperties("CONTACT"), Property.class)); partyList.addAll(UtilGenerics.checkList(component.getProperties("ORGANIZER"), Property.class)); @@ -829,7 +829,7 @@ public class ICalConverter { if (!hasPermission(workEffortId, "UPDATE", context)) { return null; } - Map serviceMap = FastMap.newInstance(); + Map serviceMap = new HashMap(); serviceMap.put("workEffortId", workEffortId); setWorkEffortServiceMap(component, serviceMap); invokeService("updateWorkEffort", serviceMap, context); diff --git a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalHandlerFactory.java b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalHandlerFactory.java index 9fac44f3d9..992a94f2df 100644 --- a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalHandlerFactory.java +++ b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalHandlerFactory.java @@ -20,6 +20,7 @@ package org.ofbiz.workeffort.workeffort; import java.io.IOException; +import java.util.HashMap; import java.util.Map; import javax.servlet.ServletContext; @@ -27,8 +28,6 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.webapp.webdav.RequestHandler; import org.ofbiz.webapp.webdav.RequestHandlerFactory; @@ -45,7 +44,7 @@ public class ICalHandlerFactory implements RequestHandlerFactory { protected final RequestHandler doNothingHandler = new DoNothingHandler(); public ICalHandlerFactory() { - this.handlerMap = FastMap.newInstance(); + this.handlerMap = new HashMap(); this.handlerMap.put("COPY", doNothingHandler); this.handlerMap.put("DELETE", doNothingHandler); this.handlerMap.put("GET", new GetHandler()); diff --git a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java index f1e1acc1ae..b9c9500e11 100644 --- a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java +++ b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java @@ -19,13 +19,12 @@ package org.ofbiz.workeffort.workeffort; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Set; import java.util.Stack; -import javolution.util.FastList; -import javolution.util.FastSet; - import net.fortuna.ical4j.model.*; import net.fortuna.ical4j.model.property.*; @@ -70,10 +69,10 @@ public class ICalRecurConverter implements TemporalExpressionVisitor { } protected DtStart dateStart = null; - protected List incDateList = FastList.newInstance(); - protected List exDateList = FastList.newInstance(); - protected List incRuleList = FastList.newInstance(); - protected List exRuleList = FastList.newInstance(); + protected List incDateList = new LinkedList(); + protected List exDateList = new LinkedList(); + protected List incRuleList = new LinkedList(); + protected List exRuleList = new LinkedList(); protected VisitorState state = new VisitorState(); protected Stack stateStack = new Stack(); @@ -82,11 +81,11 @@ public class ICalRecurConverter implements TemporalExpressionVisitor { @SuppressWarnings("unchecked") protected Recur consolidateRecurs(List recurList) { // Try to consolidate a list of Recur instances into one instance - Set monthList = FastSet.newInstance(); - Set monthDayList = FastSet.newInstance(); - Set weekDayList = FastSet.newInstance(); - Set hourList = FastSet.newInstance(); - Set minuteList = FastSet.newInstance(); + Set monthList = new HashSet(); + Set monthDayList = new HashSet(); + Set weekDayList = new HashSet(); + Set hourList = new HashSet(); + Set minuteList = new HashSet(); String freq = null; int freqCount = 0; for (Recur recur : recurList) { @@ -302,8 +301,8 @@ public class ICalRecurConverter implements TemporalExpressionVisitor { protected class VisitorState { public boolean isExcluded = false; public boolean isIntersection = false; - public List inclRecurList = FastList.newInstance(); - public List exRecurList = FastList.newInstance(); + public List inclRecurList = new LinkedList(); + public List exRecurList = new LinkedList(); public void addRecur(Recur recur) { if (this.isIntersection) { if (this.isExcluded) { diff --git a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java index 250e04dfff..becc5c47ce 100644 --- a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java +++ b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java @@ -23,6 +23,8 @@ import java.io.IOException; import java.io.Writer; import java.util.Date; import java.util.Enumeration; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -32,9 +34,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilHttp; @@ -71,7 +70,7 @@ public class ICalWorker { } protected static Map createConversionContext(HttpServletRequest request) { - Map context = FastMap.newInstance(); + Map context = new HashMap(); Enumeration attributeEnum = UtilGenerics.cast(request.getAttributeNames()); while (attributeEnum.hasMoreElements()) { String attributeName = attributeEnum.nextElement(); @@ -173,8 +172,8 @@ public class ICalWorker { PropFindHelper helper = new PropFindHelper(requestDocument); if (!helper.isAllProp() && !helper.isPropName()) { Document responseDocument = helper.getResponseDocument(); - List supportedProps = FastList.newInstance(); - List unSupportedProps = FastList.newInstance(); + List supportedProps = new LinkedList(); + List unSupportedProps = new LinkedList(); List propElements = helper.getFindPropsList(ResponseHelper.DAV_NAMESPACE_URI); for (Element propElement : propElements) { if ("getetag".equals(propElement.getNodeName())) { diff --git a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java index 5ce1c15dd2..2b7da3f4de 100644 --- a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java +++ b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java @@ -20,13 +20,12 @@ package org.ofbiz.workeffort.workeffort; import java.io.IOException; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -55,7 +54,7 @@ public class WorkEffortKeywordIndex { Set stemSet = KeywordSearchUtil.getStemSet(); Map keywords = new TreeMap(); - List strings = FastList.newInstance(); + List strings = new LinkedList(); int widWeight = 1; try { widWeight = Integer.parseInt(EntityUtilProperties.getPropertyValue("workeffortsearch", "index.weight.WorkEffort.workEffortId", "1", delegator)); @@ -108,7 +107,7 @@ public class WorkEffortKeywordIndex { KeywordSearchUtil.processKeywordsForIndex(str, keywords, separators, stopWordBagAnd, stopWordBagOr, removeStems, stemSet); } - List toBeStored = FastList.newInstance(); + List toBeStored = new LinkedList(); for (Map.Entry entry: keywords.entrySet()) { if (entry.getKey().length() < 60) { // ignore very long strings, cannot be stored anyway GenericValue workEffortKeyword = delegator.makeValue("WorkEffortKeyword", UtilMisc.toMap("workEffortId", workEffort.getString("workEffortId"), "keyword", entry.getKey(), "relevancyWeight", entry.getValue())); diff --git a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java index fa2e989528..93fb144131 100644 --- a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java +++ b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java @@ -21,16 +21,15 @@ package org.ofbiz.workeffort.workeffort; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Collection; +import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javolution.util.FastList; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilMisc; @@ -134,17 +133,17 @@ public class WorkEffortSearch { public static class WorkEffortSearchContext { public int index = 1; - public List entityConditionList = FastList.newInstance(); - public List orderByList = FastList.newInstance(); + public List entityConditionList = new LinkedList(); + public List orderByList = new LinkedList(); public List fieldsToSelect = UtilMisc.toList("workEffortId"); public DynamicViewEntity dynamicViewEntity = new DynamicViewEntity(); public boolean workEffortIdGroupBy = false; public boolean includedKeywordSearch = false; public Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); - public List> keywordFixedOrSetAndList = FastList.newInstance(); - public Set orKeywordFixedSet = FastSet.newInstance(); - public Set andKeywordFixedSet = FastSet.newInstance(); - public List workEffortSearchConstraintList = FastList.newInstance(); + public List> keywordFixedOrSetAndList = new LinkedList>(); + public Set orKeywordFixedSet = new HashSet(); + public Set andKeywordFixedSet = new HashSet(); + public List workEffortSearchConstraintList = new LinkedList(); public ResultSortOrder resultSortOrder = null; public Integer resultOffset = null; public Integer maxResults = null; @@ -274,7 +273,7 @@ public class WorkEffortSearch { dynamicViewEntity.addMemberEntity(entityAlias, "WorkEffortKeyword"); dynamicViewEntity.addAlias(entityAlias, prefix + "Keyword", "keyword", null, null, null, null); dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("workEffortId")); - List keywordOrList = FastList.newInstance(); + List keywordOrList = new LinkedList(); for (String keyword: keywordFixedOrSet) { keywordOrList.add(EntityCondition.makeCondition(prefix + "Keyword", EntityOperator.LIKE, keyword)); } @@ -386,7 +385,7 @@ public class WorkEffortSearch { int numRetreived = 1; int duplicatesFound = 0; - Set workEffortIdSet = FastSet.newInstance(); + Set workEffortIdSet = new HashSet(); workEffortIds.add(searchResult.getString("workEffortId")); workEffortIdSet.add(searchResult.getString("workEffortId")); @@ -508,7 +507,7 @@ public class WorkEffortSearch { @Override public void addConstraint(WorkEffortSearchContext workEffortSearchContext) { - Set workEffortIdSet = FastSet.newInstance(); + Set workEffortIdSet = new HashSet(); if (includeSubWorkEfforts) { // find all sub-categories recursively, make a Set of workEffortId WorkEffortSearch.getAllSubWorkEffortIds(workEffortId, workEffortIdSet, workEffortSearchContext.getDelegator(), workEffortSearchContext.nowTimestamp); @@ -535,7 +534,7 @@ public class WorkEffortSearch { workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null); workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.TRUE, ModelKeyMap.makeKeyMapList("workEffortId","workEffortIdFrom")); - List assocConditionFromTo = FastList.newInstance(); + List assocConditionFromTo = new LinkedList(); assocConditionFromTo.add(EntityCondition.makeCondition(prefix + "WorkEffortIdTo", EntityOperator.IN, workEffortIdSet)); if (UtilValidate.isNotEmpty(workEffortAssocTypeId)) { assocConditionFromTo.add(EntityCondition.makeCondition(prefix + "WorkEffortAssocTypeId", EntityOperator.EQUALS, workEffortAssocTypeId)); @@ -556,7 +555,7 @@ public class WorkEffortSearch { workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null); workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.TRUE, ModelKeyMap.makeKeyMapList("workEffortId","workEffortIdTo")); - List assocConditionToFrom = FastList.newInstance(); + List assocConditionToFrom = new LinkedList(); assocConditionToFrom.add(EntityCondition.makeCondition(prefix + "WorkEffortIdFrom", EntityOperator.IN, workEffortIdSet)); if (UtilValidate.isNotEmpty(workEffortAssocTypeId)) { assocConditionToFrom.add(EntityCondition.makeCondition(prefix + "WorkEffortAssocTypeId", EntityOperator.EQUALS, workEffortAssocTypeId)); @@ -955,7 +954,7 @@ public class WorkEffortSearch { expandedSet.add(keyword); } Set fixedSet = KeywordSearchUtil.fixKeywordsForSearch(expandedSet, anyPrefix, anySuffix, removeStems, isAnd); - Set fixedKeywordSet = FastSet.newInstance(); + Set fixedKeywordSet = new HashSet(); fixedKeywordSet.addAll(fixedSet); workEffortSearchContext.keywordFixedOrSetAndList.add(fixedKeywordSet); } diff --git a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchEvents.java b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchEvents.java index c106d4762f..c1d6f4d819 100644 --- a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchEvents.java +++ b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchEvents.java @@ -19,14 +19,13 @@ package org.ofbiz.workeffort.workeffort; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import javolution.util.FastMap; - import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; import org.ofbiz.webapp.stats.VisitHandler; @@ -99,7 +98,7 @@ public class WorkEffortSearchEvents { String searchSortOrderString = WorkEffortSearchSession.searchGetSortOrderString(false, request); // ========== populate the result Map - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put("workEffortIds", workEffortIds); result.put("viewIndex", Integer.valueOf(viewIndex)); diff --git a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java index a521066c32..e0cd6e36e8 100644 --- a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java +++ b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java @@ -19,6 +19,7 @@ package org.ofbiz.workeffort.workeffort; import java.sql.Timestamp; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -26,8 +27,6 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilHttp; @@ -69,7 +68,7 @@ public class WorkEffortSearchSession { public static void addConstraint(WorkEffortSearchConstraint workEffortSearchConstraint, HttpSession session) { WorkEffortSearchOptions workEffortSearchOptions = getWorkEffortSearchOptions(session); if (workEffortSearchOptions.constraintList == null) { - workEffortSearchOptions.constraintList = FastList.newInstance(); + workEffortSearchOptions.constraintList = new LinkedList(); } if (!workEffortSearchOptions.constraintList.contains(workEffortSearchConstraint)) { workEffortSearchOptions.constraintList.add(workEffortSearchConstraint); @@ -132,7 +131,7 @@ public class WorkEffortSearchSession { public List searchGetConstraintStrings(boolean detailed, Delegator delegator, Locale locale) { List workEffortSearchConstraintList = this.getConstraintList(); - List constraintStrings = FastList.newInstance(); + List constraintStrings = new LinkedList(); if (workEffortSearchConstraintList == null) { return constraintStrings; } @@ -209,7 +208,7 @@ public class WorkEffortSearchSession { // add a Product Set to the search if (UtilValidate.isNotEmpty(parameters.get("productId_1"))) { - List productSet = FastList.newInstance(); + List productSet = new LinkedList(); productSet.add((String) parameters.get("productId_1")); if (UtilValidate.isNotEmpty(parameters.get("productId_2"))) { productSet.add((String) parameters.get("productId_2")); @@ -292,7 +291,7 @@ public class WorkEffortSearchSession { public static List getSearchOptionsHistoryList(HttpSession session) { List optionsHistoryList = UtilGenerics.checkList(session.getAttribute("_WORK_EFFORT_SEARCH_OPTIONS_HISTORY_")); if (optionsHistoryList == null) { - optionsHistoryList = FastList.newInstance(); + optionsHistoryList = new LinkedList(); session.setAttribute("_WORK_EFFORT_SEARCH_OPTIONS_HISTORY_", optionsHistoryList); } return optionsHistoryList; diff --git a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java index 4ffce9f4bb..fa6d68b665 100644 --- a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java +++ b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java @@ -22,6 +22,9 @@ package org.ofbiz.workeffort.workeffort; import java.sql.Timestamp; import java.util.Collection; import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -30,10 +33,6 @@ import java.util.TimeZone; import java.util.TreeMap; import java.util.TreeSet; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.DateRange; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.TimeDuration; @@ -100,9 +99,9 @@ public class WorkEffortServices { } } - Map result = FastMap.newInstance(); + Map result = new HashMap(); if (validWorkEfforts == null) { - validWorkEfforts = FastList.newInstance(); + validWorkEfforts = new LinkedList(); } result.put("events", validWorkEfforts); return result; @@ -116,7 +115,7 @@ public class WorkEffortServices { List validWorkEfforts = null; try { - List conditionList = FastList.newInstance(); + List conditionList = new LinkedList(); conditionList.add(EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, roleTypeId)); conditionList.add(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "EVENT")); conditionList.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.NOT_EQUAL, "CAL_DECLINED")); @@ -132,9 +131,9 @@ public class WorkEffortServices { "WorkEffortNotFound", UtilMisc.toMap("errorString", e.toString()), locale)); } - Map result = FastMap.newInstance(); + Map result = new HashMap(); if (validWorkEfforts == null) { - validWorkEfforts = FastList.newInstance(); + validWorkEfforts = new LinkedList(); } result.put("events", validWorkEfforts); return result; @@ -174,8 +173,8 @@ public class WorkEffortServices { } } - Map result = FastMap.newInstance(); - if (validWorkEfforts == null) validWorkEfforts = FastList.newInstance(); + Map result = new HashMap(); + if (validWorkEfforts == null) validWorkEfforts = new LinkedList(); validWorkEfforts = WorkEffortWorker.removeDuplicateWorkEfforts(validWorkEfforts); result.put("tasks", validWorkEfforts); return result; @@ -190,7 +189,7 @@ public class WorkEffortServices { if (userLogin != null && userLogin.get("partyId") != null) { try { - List constraints = FastList.newInstance(); + List constraints = new LinkedList(); constraints.add(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, userLogin.get("partyId"))); constraints.add(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "ACTIVITY")); @@ -211,8 +210,8 @@ public class WorkEffortServices { } } - Map result = FastMap.newInstance(); - if (validWorkEfforts == null) validWorkEfforts = FastList.newInstance(); + Map result = new HashMap(); + if (validWorkEfforts == null) validWorkEfforts = new LinkedList(); result.put("activities", validWorkEfforts); return result; } @@ -226,7 +225,7 @@ public class WorkEffortServices { if (userLogin != null && userLogin.get("partyId") != null) { try { - List constraints = FastList.newInstance(); + List constraints = new LinkedList(); constraints.add(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, userLogin.get("partyId"))); constraints.add(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "ACTIVITY")); @@ -247,8 +246,8 @@ public class WorkEffortServices { } } - Map result = FastMap.newInstance(); - if (roleWorkEfforts == null) roleWorkEfforts = FastList.newInstance(); + Map result = new HashMap(); + if (roleWorkEfforts == null) roleWorkEfforts = new LinkedList(); result.put("roleActivities", roleWorkEfforts); return result; } @@ -262,7 +261,7 @@ public class WorkEffortServices { if (userLogin != null && userLogin.get("partyId") != null) { try { - List constraints = FastList.newInstance(); + List constraints = new LinkedList(); constraints.add(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, userLogin.get("partyId"))); constraints.add(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "ACTIVITY")); @@ -283,8 +282,8 @@ public class WorkEffortServices { } } - Map result = FastMap.newInstance(); - if (groupWorkEfforts == null) groupWorkEfforts = FastList.newInstance(); + Map result = new HashMap(); + if (groupWorkEfforts == null) groupWorkEfforts = new LinkedList(); result.put("groupActivities", groupWorkEfforts); return result; } @@ -293,7 +292,7 @@ public class WorkEffortServices { Delegator delegator = ctx.getDelegator(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Security security = ctx.getSecurity(); - Map resultMap = FastMap.newInstance(); + Map resultMap = new HashMap(); String workEffortId = (String) context.get("workEffortId"); GenericValue workEffort = null; @@ -377,7 +376,7 @@ public class WorkEffortServices { if (calEntryRange.intersectsRange(dateRange) && !(calEntryRange.end().equals(dateRange.start()) || calEntryRange.start().equals(dateRange.end()))) { List> calendarEntryByDateRangeList = calendarEntriesByDateRange.get(dateRange); if (calendarEntryByDateRangeList == null) { - calendarEntryByDateRangeList = FastList.newInstance(); + calendarEntryByDateRangeList = new LinkedList(); } calendarEntryByDateRangeList.add(calendarEntry); calendarEntriesByDateRange.put(dateRange, calendarEntryByDateRangeList); @@ -390,11 +389,11 @@ public class WorkEffortServices { } private static List getDefaultWorkEffortExprList(String calendarType, Collection partyIds, String workEffortTypeId, List cancelledCheckAndList) { - List entityExprList = FastList.newInstance(); + List entityExprList = new LinkedList(); if (cancelledCheckAndList != null) { entityExprList.addAll(cancelledCheckAndList); } - List typesList = FastList.newInstance(); + List typesList = new LinkedList(); if (UtilValidate.isNotEmpty(workEffortTypeId)) { typesList.add(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, workEffortTypeId)); } @@ -540,7 +539,7 @@ public class WorkEffortServices { List validWorkEfforts = null; Collection partyIdsToUse = partyIds; if (partyIdsToUse == null) { - partyIdsToUse = FastSet.newInstance(); + partyIdsToUse = new HashSet(); } if (UtilValidate.isNotEmpty(partyId)) { if (partyId.equals(userLogin.getString("partyId")) || security.hasEntityPermission("WORKEFFORTMGR", "_VIEW", userLogin)) { @@ -642,9 +641,9 @@ public class WorkEffortServices { } // Split the WorkEffort list into a map with entries for each period, period start is the key - List> periods = FastList.newInstance(); + List> periods = new LinkedList>(); if (validWorkEfforts != null) { - List periodRanges = FastList.newInstance(); + List periodRanges = new LinkedList(); for (int i = 0; i < numPeriods; i++) { Timestamp curPeriodStart = UtilDateTime.adjustTimestamp(startStamp, periodType, i, timeZone, locale); Timestamp curPeriodEnd = UtilDateTime.adjustTimestamp(curPeriodStart, periodType, 1, timeZone, locale); @@ -653,8 +652,8 @@ public class WorkEffortServices { } try { // Process recurring work efforts - Set exclusions = FastSet.newInstance(); - Set inclusions = FastSet.newInstance(); + Set exclusions = new HashSet(); + Set inclusions = new HashSet(); DateRange range = new DateRange(startStamp, endStamp); Calendar cal = UtilDateTime.toCalendar(startStamp, timeZone, locale); for (GenericValue workEffort : validWorkEfforts) { @@ -695,8 +694,8 @@ public class WorkEffortServices { // For each period in the set we check all work efforts to see if they fall within range boolean firstEntry = true; for (DateRange periodRange : periodRanges) { - List> curWorkEfforts = FastList.newInstance(); - Map entry = FastMap.newInstance(); + List> curWorkEfforts = new LinkedList>(); + Map entry = new HashMap(); for (GenericValue workEffort : validWorkEfforts) { Timestamp startDate = workEffort.getTimestamp("estimatedStartDate"); if (workEffort.getTimestamp("actualStartDate") != null) { @@ -709,7 +708,7 @@ public class WorkEffortServices { if (endDate == null) endDate = startDate; DateRange weRange = new DateRange(startDate, endDate); if (periodRange.intersectsRange(weRange)) { - Map calEntry = FastMap.newInstance(); + Map calEntry = new HashMap(); calEntry.put("workEffort", workEffort); long length = ((weRange.end().after(endStamp) ? endStamp.getTime() : weRange.end().getTime()) - (weRange.start().before(startStamp) ? startStamp.getTime() : weRange.start().getTime())); int periodSpan = (int) Math.ceil((double) length / periodLen); @@ -741,7 +740,7 @@ public class WorkEffortServices { periods.add(entry); } } - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put("periods", periods); result.put("maxConcurrentEntries", Integer.valueOf(maxConcurrentEntries)); return result; @@ -753,14 +752,14 @@ public class WorkEffortServices { String facilityId = (String) context.get("facilityId"); // optional Locale locale = (Locale) context.get("locale"); - Map> summaryInByFacility = FastMap.newInstance(); - Map> summaryOutByFacility = FastMap.newInstance(); + Map> summaryInByFacility = new HashMap>(); + Map> summaryOutByFacility = new HashMap>(); try { // // Information about the running production runs that are going // to produce units of productId by facility. // - List findIncomingProductionRunsConds = FastList.newInstance(); + List findIncomingProductionRunsConds = new LinkedList(); findIncomingProductionRunsConds.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId)); findIncomingProductionRunsConds.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "WEGS_CREATED")); @@ -769,7 +768,7 @@ public class WorkEffortServices { findIncomingProductionRunsConds.add(EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId)); } - List findIncomingProductionRunsStatusConds = FastList.newInstance(); + List findIncomingProductionRunsStatusConds = new LinkedList(); findIncomingProductionRunsStatusConds.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, "PRUN_CREATED")); findIncomingProductionRunsStatusConds.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, "PRUN_SCHEDULED")); findIncomingProductionRunsStatusConds.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, "PRUN_DOC_PRINTED")); @@ -803,7 +802,7 @@ public class WorkEffortServices { Map quantitySummary = UtilGenerics.checkMap(summaryInByFacility.get(weFacilityId)); if (quantitySummary == null) { - quantitySummary = FastMap.newInstance(); + quantitySummary = new HashMap(); quantitySummary.put("facilityId", weFacilityId); summaryInByFacility.put(weFacilityId, quantitySummary); } @@ -816,7 +815,7 @@ public class WorkEffortServices { List incomingProductionRunList = UtilGenerics.checkList(quantitySummary.get("incomingProductionRunList")); if (incomingProductionRunList == null) { - incomingProductionRunList = FastList.newInstance(); + incomingProductionRunList = new LinkedList(); quantitySummary.put("incomingProductionRunList", incomingProductionRunList); } incomingProductionRunList.add(incomingProductionRun); @@ -825,7 +824,7 @@ public class WorkEffortServices { // Information about the running production runs that are going // to consume units of productId by facility. // - List findOutgoingProductionRunsConds = FastList.newInstance(); + List findOutgoingProductionRunsConds = new LinkedList(); findOutgoingProductionRunsConds.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId)); findOutgoingProductionRunsConds.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "WEGS_CREATED")); @@ -834,7 +833,7 @@ public class WorkEffortServices { findOutgoingProductionRunsConds.add(EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId)); } - List findOutgoingProductionRunsStatusConds = FastList.newInstance(); + List findOutgoingProductionRunsStatusConds = new LinkedList(); findOutgoingProductionRunsStatusConds.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, "PRUN_CREATED")); findOutgoingProductionRunsStatusConds.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, "PRUN_SCHEDULED")); findOutgoingProductionRunsStatusConds.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, "PRUN_DOC_PRINTED")); @@ -851,7 +850,7 @@ public class WorkEffortServices { Map quantitySummary = UtilGenerics.checkMap(summaryOutByFacility.get(weFacilityId)); if (quantitySummary == null) { - quantitySummary = FastMap.newInstance(); + quantitySummary = new HashMap(); quantitySummary.put("facilityId", weFacilityId); summaryOutByFacility.put(weFacilityId, quantitySummary); } @@ -864,7 +863,7 @@ public class WorkEffortServices { List outgoingProductionRunList = UtilGenerics.checkList(quantitySummary.get("outgoingProductionRunList")); if (outgoingProductionRunList == null) { - outgoingProductionRunList = FastList.newInstance(); + outgoingProductionRunList = new LinkedList(); quantitySummary.put("outgoingProductionRunList", outgoingProductionRunList); } outgoingProductionRunList.add(outgoingProductionRun); @@ -1121,8 +1120,8 @@ public class WorkEffortServices { EntityListIterator eli = (EntityListIterator) context.get("workEffortIterator"); if (eli != null) { try { - Set keys = FastSet.newInstance(); - resultList = FastList.newInstance(); + Set keys = new HashSet(); + resultList = new LinkedList(); GenericValue workEffort = eli.next(); while (workEffort != null) { String workEffortId = workEffort.getString("workEffortId"); diff --git a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortWorker.java b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortWorker.java index 6fc494822c..ced7b87d4e 100644 --- a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortWorker.java +++ b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortWorker.java @@ -19,12 +19,11 @@ package org.ofbiz.workeffort.workeffort; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; @@ -50,13 +49,13 @@ public class WorkEffortWorker { right = "workEffortIdTo"; } - List workEfforts = FastList.newInstance(); + List workEfforts = new LinkedList(); try { List childWEAssocsLevelFirst = EntityQuery.use(delegator).from("WorkEffortAssoc").where(left, workEffortId, "workEffortAssocTypeId", workEffortAssocTypeId).cache(true).queryList(); for (GenericValue childWEAssocLevelFirst : childWEAssocsLevelFirst) { List childWEAssocsLevelNext = EntityQuery.use(delegator).from("WorkEffortAssoc").where(left, childWEAssocLevelFirst.get(right), "workEffortAssocTypeId", workEffortAssocTypeId).cache(true).queryList(); while (UtilValidate.isNotEmpty(childWEAssocsLevelNext)) { - List tempWorkEffortList = FastList.newInstance(); + List tempWorkEffortList = new LinkedList(); for (GenericValue childWEAssocLevelNext : childWEAssocsLevelNext) { List childWEAssocsLevelNth = EntityQuery.use(delegator).from("WorkEffortAssoc").where(left, childWEAssocLevelNext.get(right), "workEffortAssocTypeId", workEffortAssocTypeId).cache(true).queryList(); if (UtilValidate.isNotEmpty(childWEAssocsLevelNth)) { @@ -75,8 +74,8 @@ public class WorkEffortWorker { } public static List removeDuplicateWorkEfforts(List workEfforts) { - Set keys = FastSet.newInstance(); - Set exclusions = FastSet.newInstance(); + Set keys = new HashSet(); + Set exclusions = new HashSet(); for (GenericValue workEffort : workEfforts) { String workEffortId = workEffort.getString("workEffortId"); if (keys.contains(workEffortId)) { diff --git a/framework/common/template/JsLanguageFilesMapping.ftl b/framework/common/template/JsLanguageFilesMapping.ftl index 3d94e1f415..d4e6487b4a 100644 --- a/framework/common/template/JsLanguageFilesMapping.ftl +++ b/framework/common/template/JsLanguageFilesMapping.ftl @@ -21,10 +21,9 @@ package org.ofbiz.common; +import java.util.HashMap; import java.util.Map; -import javolution.util.FastMap; - <#-- The comment in UPPERCASE below is dynamically put in the JsLanguageFilesMapping.java generated file, so please keep it... --> public final class JsLanguageFilesMapping { @@ -34,7 +33,7 @@ public final class JsLanguageFilesMapping { public static class datejs { - private static Map localeFiles = FastMap.newInstance(); + private static Map localeFiles = new HashMap(); private static String defaultDateJs = "/images/jquery/plugins/datejs/date-en-US.js"; static { @@ -54,7 +53,7 @@ public final class JsLanguageFilesMapping { } public static class jquery { - private static Map localeFiles = FastMap.newInstance(); + private static Map localeFiles = new HashMap(); private static String defaultDateJs = "/images/jquery/ui/i18n/jquery.ui.datepicker-en.js"; static { @@ -74,7 +73,7 @@ public final class JsLanguageFilesMapping { } public static class validation { - private static Map localeFiles = FastMap.newInstance(); + private static Map localeFiles = new HashMap(); private static String defaultValidation = "/images/webapp/images/jquery/plugins/validate/localization/messages_en.js"; static { @@ -93,7 +92,7 @@ public final class JsLanguageFilesMapping { } public static class dateTime { - private static Map localeFiles = FastMap.newInstance(); + private static Map localeFiles = new HashMap(); private static String defaultDateTime = "/images/webapp/images/jquery/ui/i18n/jquery.ui.datepicker-en.js"; static { diff --git a/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java b/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java index ef88c40497..744f2290ef 100644 --- a/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java +++ b/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java @@ -256,7 +256,7 @@ public class EntityPermissionChecker { // Get all the condition operations that could apply, rather than having to go thru // entire table each time. - //List condList = FastList.newInstance(); + //List condList = new LinkedList(); //Iterator iterType = targetOperationList.iterator(); //while (iterType.hasNext()) { // String op = (String)iterType.next(); diff --git a/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java b/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java index e59c5aba9c..30805edf13 100644 --- a/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java +++ b/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java @@ -34,7 +34,10 @@ import java.net.URL; import java.sql.Timestamp; import java.text.NumberFormat; import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -44,10 +47,6 @@ import java.util.TreeSet; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.location.FlexibleLocation; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; @@ -109,7 +108,7 @@ public class WebToolsServices { GenericValue userLogin = (GenericValue) context.get("userLogin"); LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); - List messages = FastList.newInstance(); + List messages = new LinkedList(); String filename = (String)context.get("filename"); String fmfilename = (String)context.get("fmfilename"); @@ -157,7 +156,7 @@ public class WebToolsServices { try { Configuration conf = org.ofbiz.base.util.template.FreeMarkerWorker.getDefaultOfbizConfig(); template = new Template("FMImportFilter", templateReader, conf); - Map fmcontext = FastMap.newInstance(); + Map fmcontext = new HashMap(); InputSource ins = url != null ? new InputSource(url.openStream()) : new InputSource(new StringReader(fulltext)); NodeModel nodeModel; @@ -221,7 +220,7 @@ public class WebToolsServices { GenericValue userLogin = (GenericValue) context.get("userLogin"); LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); - List messages = FastList.newInstance(); + List messages = new LinkedList(); String path = (String) context.get("path"); String mostlyInserts = (String) context.get("mostlyInserts"); @@ -246,7 +245,7 @@ public class WebToolsServices { if (baseDir.isDirectory() && baseDir.canRead()) { File[] fileArray = baseDir.listFiles(); - FastList files = FastList.newInstance(); + List files = new LinkedList(); for (File file: fileArray) { if (file.getName().toUpperCase().endsWith("XML")) { files.add(file); @@ -256,11 +255,11 @@ public class WebToolsServices { int passes=0; int initialListSize = files.size(); int lastUnprocessedFilesCount = 0; - FastList unprocessedFiles = FastList.newInstance(); + List unprocessedFiles = new LinkedList(); while (files.size()>0 && files.size() != lastUnprocessedFilesCount) { lastUnprocessedFilesCount = files.size(); - unprocessedFiles = FastList.newInstance(); + unprocessedFiles = new LinkedList(); for (File f: files) { Map parseEntityXmlFileArgs = UtilMisc.toMap("mostlyInserts", mostlyInserts, "createDummyFks", createDummyFks, @@ -330,13 +329,13 @@ public class WebToolsServices { Integer txTimeoutInt = (Integer) context.get("txTimeout"); int txTimeout = txTimeoutInt != null ? txTimeoutInt.intValue() : -1; - List messages = FastList.newInstance(); + List messages = new LinkedList(); // parse the pass in list of readers to use List readerNames = null; if (UtilValidate.isNotEmpty(readers) && !"none".equalsIgnoreCase(readers)) { if (readers.indexOf(",") == -1) { - readerNames = FastList.newInstance(); + readerNames = new LinkedList(); readerNames.add(readers); } else { readerNames = StringUtil.split(readers, ","); @@ -366,7 +365,7 @@ public class WebToolsServices { // need a list if it is empty if (urlList == null) { - urlList = FastList.newInstance(); + urlList = new LinkedList(); } // process the list of files @@ -374,8 +373,8 @@ public class WebToolsServices { changedFormat.setMinimumIntegerDigits(5); changedFormat.setGroupingUsed(false); - List errorMessages = FastList.newInstance(); - List infoMessages = FastList.newInstance(); + List errorMessages = new LinkedList(); + List infoMessages = new LinkedList(); int totalRowsChanged = 0; if (UtilValidate.isNotEmpty(urlList)) { messages.add("=-=-=-=-=-=-= Doing a data " + (checkDataOnly ? "check" : "load") + " with the following files:"); @@ -477,7 +476,7 @@ public class WebToolsServices { txTimeout = Integer.valueOf(7200); } - List results = FastList.newInstance(); + List results = new LinkedList(); if (UtilValidate.isNotEmpty(outpath)) { File outdir = new File(outpath); @@ -509,7 +508,7 @@ public class WebToolsServices { boolean beganTx = TransactionUtil.begin(); // some databases don't support cursors, or other problems may happen, so if there is an error here log it and move on to get as much as possible try { - List conds = FastList.newInstance(); + List conds = new LinkedList(); if (UtilValidate.isNotEmpty(fromDate)) { conds.add(EntityCondition.makeCondition("createdStamp", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate)); } @@ -624,7 +623,7 @@ public class WebToolsServices { Map resultMap = ServiceUtil.returnSuccess(); ModelReader reader = delegator.getModelReader(); - Map> entitiesByPackage = FastMap.newInstance(); + Map> entitiesByPackage = new HashMap>(); TreeSet packageNames = new TreeSet(); TreeSet tableNames = new TreeSet(); @@ -651,14 +650,14 @@ public class WebToolsServices { } String search = (String) context.get("search"); - List> packagesList = FastList.newInstance(); + List> packagesList = new LinkedList>(); try { for (String pName : packageNames) { - Map packageMap = FastMap.newInstance(); + Map packageMap = new HashMap(); TreeSet entities = entitiesByPackage.get(pName); - List> entitiesList = FastList.newInstance(); + List> entitiesList = new LinkedList>(); for (String entityName: entities) { - Map entityMap = FastMap.newInstance(); + Map entityMap = new HashMap(); String helperName = delegator.getEntityHelperName(entityName); String groupName = delegator.getEntityGroupName(entityName); if (search == null || entityName.toLowerCase().indexOf(search.toLowerCase()) != -1) { @@ -682,9 +681,9 @@ public class WebToolsServices { } // fields list - List> javaNameList = FastList.newInstance(); + List> javaNameList = new LinkedList>(); for (Iterator f = entity.getFieldsIterator(); f.hasNext();) { - Map javaNameMap = FastMap.newInstance(); + Map javaNameMap = new HashMap(); ModelField field = f.next(); ModelFieldType type = delegator.getEntityFieldType(entity, field.getType()); javaNameMap.put("isPk", field.getIsPk()); @@ -718,14 +717,14 @@ public class WebToolsServices { } // relations list - List> relationsList = FastList.newInstance(); + List> relationsList = new LinkedList>(); for (int r = 0; r < entity.getRelationsSize(); r++) { - Map relationMap = FastMap.newInstance(); + Map relationMap = new HashMap(); ModelRelation relation = entity.getRelation(r); - List> keysList = FastList.newInstance(); + List> keysList = new LinkedList>(); int row = 1; for (ModelKeyMap keyMap : relation.getKeyMaps()) { - Map keysMap = FastMap.newInstance(); + Map keysMap = new HashMap(); String fieldName = null; String relFieldName = null; if (keyMap.getFieldName().equals(keyMap.getRelFieldName())) { @@ -751,16 +750,16 @@ public class WebToolsServices { } // index list - List> indexList = FastList.newInstance(); + List> indexList = new LinkedList>(); for (int r = 0; r < entity.getIndexesSize(); r++) { - List fieldNameList = FastList.newInstance(); + List fieldNameList = new LinkedList(); ModelIndex index = entity.getIndex(r); for (Iterator fieldIterator = index.getFields().iterator(); fieldIterator.hasNext();) { fieldNameList.add(fieldIterator.next().getFieldName()); } - Map indexMap = FastMap.newInstance(); + Map indexMap = new HashMap(); indexMap.put("name", index.getName()); indexMap.put("description", index.getDescription()); indexMap.put("fieldNameList", fieldNameList); @@ -823,7 +822,7 @@ public class WebToolsServices { Set entityNames = new TreeSet(); if (UtilValidate.isNotEmpty(entityPackageNameOrig)) { - Set entityPackageNameSet = FastSet.newInstance(); + Set entityPackageNameSet = new HashSet(); entityPackageNameSet.addAll(StringUtil.split(entityPackageNameOrig, ",")); Debug.logInfo("Exporting with entityPackageNameSet: " + entityPackageNameSet, module); @@ -851,12 +850,12 @@ public class WebToolsServices { } // write the index.eomodeld file - Map topLevelMap = FastMap.newInstance(); + Map topLevelMap = new HashMap(); topLevelMap.put("EOModelVersion", "\"2.1\""); - List> entitiesMapList = FastList.newInstance(); + List> entitiesMapList = new LinkedList>(); topLevelMap.put("entities", entitiesMapList); for (String entityName: entityNames) { - Map entitiesMap = FastMap.newInstance(); + Map entitiesMap = new HashMap(); entitiesMapList.add(entitiesMap); entitiesMap.put("className", "EOGenericRecord"); entitiesMap.put("name", entityName); diff --git a/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java b/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java index 9c0b669985..ef94e3f65f 100644 --- a/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java +++ b/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java @@ -24,6 +24,7 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.Collection; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -33,8 +34,6 @@ import java.util.concurrent.Future; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastSet; - import org.ofbiz.base.component.ComponentConfig; import org.ofbiz.base.concurrent.ExecutionPool; import org.ofbiz.base.util.Debug; @@ -329,7 +328,7 @@ public class ArtifactInfoFactory { } public Set getAllArtifactInfosByNamePartial(String artifactNamePartial, String type) { - Set aiBaseSet = FastSet.newInstance(); + Set aiBaseSet = new HashSet(); if (UtilValidate.isEmpty(artifactNamePartial)) { return aiBaseSet; diff --git a/framework/webtools/src/org/ofbiz/webtools/artifactinfo/EntityArtifactInfo.java b/framework/webtools/src/org/ofbiz/webtools/artifactinfo/EntityArtifactInfo.java index f244ac45db..426b3810ed 100644 --- a/framework/webtools/src/org/ofbiz/webtools/artifactinfo/EntityArtifactInfo.java +++ b/framework/webtools/src/org/ofbiz/webtools/artifactinfo/EntityArtifactInfo.java @@ -20,12 +20,11 @@ package org.ofbiz.webtools.artifactinfo; import java.net.MalformedURLException; import java.net.URL; +import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.TreeSet; -import javolution.util.FastSet; - import org.ofbiz.base.location.FlexibleLocation; import org.ofbiz.base.util.GeneralException; import org.ofbiz.entity.GenericEntityException; @@ -112,13 +111,13 @@ public class EntityArtifactInfo extends ArtifactInfoBase { /** Get the Services called by Entity ECA */ public Set getServicesCalledByEntityEca() { - Set serviceSet = FastSet.newInstance(); + Set serviceSet = new HashSet(); // TODO: implement this return serviceSet; } public Set getEntityEcaRules() { - Set eecaSet = FastSet.newInstance(); + Set eecaSet = new HashSet(); // TODO: implement this return eecaSet; } diff --git a/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java b/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java index 2c2544fc7a..24316fd8fc 100644 --- a/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java +++ b/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java @@ -21,13 +21,12 @@ package org.ofbiz.webtools.artifactinfo; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; +import java.util.HashSet; import java.util.Set; import java.util.TreeSet; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastSet; - import org.ofbiz.base.location.FlexibleLocation; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; @@ -216,7 +215,7 @@ public class ScreenWidgetArtifactInfo extends ArtifactInfoBase { public Set getScreensIncludedInScreen() { // TODO: implement this - return FastSet.newInstance(); + return new HashSet(); } public Set getScreensIncludingThisScreen() { diff --git a/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java b/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java index 12e305a17c..f763c31793 100644 --- a/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java +++ b/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java @@ -23,15 +23,14 @@ import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.net.URL; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.location.FlexibleLocation; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.FileUtil; @@ -178,7 +177,7 @@ public class ServiceArtifactInfo extends ArtifactInfoBase { populateServicesFromNameSet(allServiceNameSet); } } else if ("group".equals(this.modelService.engineName)) { - Set allServiceNameSet = FastSet.newInstance(); + Set allServiceNameSet = new HashSet(); GroupModel groupModel = modelService.internalGroup; if (groupModel == null) { groupModel = ServiceGroupReader.getGroupModel(this.modelService.location); @@ -279,7 +278,7 @@ public class ServiceArtifactInfo extends ArtifactInfoBase { public Set getServicesCalledByServiceEcas() { // TODO: implement this sometime, not really necessary - return FastSet.newInstance(); + return new HashSet(); } public Set getServiceEcaRulesTriggeredByService() { @@ -288,7 +287,7 @@ public class ServiceArtifactInfo extends ArtifactInfoBase { public Set getServicesCallingServiceByEcas() { // TODO: implement this sometime, not really necessary - return FastSet.newInstance(); + return new HashSet(); } public Set getServiceEcaRulesCallingService() { @@ -316,9 +315,9 @@ public class ServiceArtifactInfo extends ArtifactInfoBase { Debug.logInfo("Writing Service Call Graph EO Model for service [" + this.modelService.name + "] to [" + eomodeldFullPath + "]", module); - Set allDiagramEntitiesWithPrefixes = FastSet.newInstance(); - List allServiceList = FastList.newInstance(); - List allServiceEcaList = FastList.newInstance(); + Set allDiagramEntitiesWithPrefixes = new HashSet(); + List allServiceList = new LinkedList(); + List allServiceEcaList = new LinkedList(); // make sure that any prefix that might have been set on this is cleared this.setDisplayPrefix(""); @@ -345,7 +344,7 @@ public class ServiceArtifactInfo extends ArtifactInfoBase { allServiceList.add(calledService); } - Map displaySuffixNumByEcaName = FastMap.newInstance(); + Map displaySuffixNumByEcaName = new HashMap(); // all SECAs and triggering services that call this service as an action Set callingServiceEcaSet = this.getServiceEcaRulesCallingService(); @@ -386,12 +385,12 @@ public class ServiceArtifactInfo extends ArtifactInfoBase { } // write index.eomodeld file - Map indexEoModelMap = FastMap.newInstance(); + Map indexEoModelMap = new HashMap(); indexEoModelMap.put("EOModelVersion", "\"2.1\""); - List> entitiesMapList = FastList.newInstance(); + List> entitiesMapList = new LinkedList>(); indexEoModelMap.put("entities", entitiesMapList); for (String entityName: allDiagramEntitiesWithPrefixes) { - Map entitiesMap = FastMap.newInstance(); + Map entitiesMap = new HashMap(); entitiesMapList.add(entitiesMap); entitiesMap.put("className", "EOGenericRecord"); entitiesMap.put("name", entityName); @@ -446,17 +445,17 @@ public class ServiceArtifactInfo extends ArtifactInfoBase { } public Map createEoModelMap(Set callingServiceSet, Set calledServiceSet, Set callingServiceEcaSet, Set calledServiceEcaSet, boolean useMoreDetailedNames) { - if (callingServiceSet == null) callingServiceSet = FastSet.newInstance(); - if (calledServiceSet == null) calledServiceSet = FastSet.newInstance(); - if (callingServiceEcaSet == null) callingServiceEcaSet = FastSet.newInstance(); - if (calledServiceEcaSet == null) calledServiceEcaSet = FastSet.newInstance(); - Map topLevelMap = FastMap.newInstance(); + if (callingServiceSet == null) callingServiceSet = new HashSet(); + if (calledServiceSet == null) calledServiceSet = new HashSet(); + if (callingServiceEcaSet == null) callingServiceEcaSet = new HashSet(); + if (calledServiceEcaSet == null) calledServiceEcaSet = new HashSet(); + Map topLevelMap = new HashMap(); topLevelMap.put("name", this.getDisplayPrefixedName()); topLevelMap.put("className", "EOGenericRecord"); // for classProperties add attribute names AND relationship names to get a nice, complete chart - List classPropertiesList = FastList.newInstance(); + List classPropertiesList = new LinkedList(); topLevelMap.put("classProperties", classPropertiesList); for (ModelParam param: this.modelService.getModelParamList()) { // skip the internal parameters, very redundant in the diagrams @@ -482,10 +481,10 @@ public class ServiceArtifactInfo extends ArtifactInfoBase { } // attributes - List> attributesList = FastList.newInstance(); + List> attributesList = new LinkedList>(); topLevelMap.put("attributes", attributesList); for (ModelParam param: this.modelService.getModelParamList()) { - Map attributeMap = FastMap.newInstance(); + Map attributeMap = new HashMap(); attributesList.add(attributeMap); if (useMoreDetailedNames) { @@ -498,10 +497,10 @@ public class ServiceArtifactInfo extends ArtifactInfoBase { } // relationships - List> relationshipsMapList = FastList.newInstance(); + List> relationshipsMapList = new LinkedList>(); for (ServiceArtifactInfo sai: callingServiceSet) { - Map relationshipMap = FastMap.newInstance(); + Map relationshipMap = new HashMap(); relationshipsMapList.add(relationshipMap); relationshipMap.put("name", sai.getDisplayPrefixedName()); @@ -516,7 +515,7 @@ public class ServiceArtifactInfo extends ArtifactInfoBase { //joinsMap.put("destinationAttribute", keyMap.getRelFieldName()); } for (ServiceArtifactInfo sai: calledServiceSet) { - Map relationshipMap = FastMap.newInstance(); + Map relationshipMap = new HashMap(); relationshipsMapList.add(relationshipMap); relationshipMap.put("name", sai.getDisplayPrefixedName()); @@ -532,7 +531,7 @@ public class ServiceArtifactInfo extends ArtifactInfoBase { } for (ServiceEcaArtifactInfo seai: callingServiceEcaSet) { - Map relationshipMap = FastMap.newInstance(); + Map relationshipMap = new HashMap(); relationshipsMapList.add(relationshipMap); relationshipMap.put("name", seai.getDisplayPrefixedName()); @@ -541,7 +540,7 @@ public class ServiceArtifactInfo extends ArtifactInfoBase { relationshipMap.put("isMandatory", "Y"); } for (ServiceEcaArtifactInfo seai: calledServiceEcaSet) { - Map relationshipMap = FastMap.newInstance(); + Map relationshipMap = new HashMap(); relationshipsMapList.add(relationshipMap); relationshipMap.put("name", seai.getDisplayPrefixedName()); diff --git a/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceEcaArtifactInfo.java b/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceEcaArtifactInfo.java index 27795a5e40..00b935cd5e 100644 --- a/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceEcaArtifactInfo.java +++ b/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceEcaArtifactInfo.java @@ -20,15 +20,14 @@ package org.ofbiz.webtools.artifactinfo; import java.net.MalformedURLException; import java.net.URL; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.location.FlexibleLocation; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilMisc; @@ -114,15 +113,15 @@ public class ServiceEcaArtifactInfo extends ArtifactInfoBase { } public Map createEoModelMap(Set triggeringServiceSet, Set triggeredServiceSet, boolean useMoreDetailedNames) { - if (triggeringServiceSet == null) triggeringServiceSet = FastSet.newInstance(); - if (triggeredServiceSet == null) triggeredServiceSet = FastSet.newInstance(); - Map topLevelMap = FastMap.newInstance(); + if (triggeringServiceSet == null) triggeringServiceSet = new HashSet(); + if (triggeredServiceSet == null) triggeredServiceSet = new HashSet(); + Map topLevelMap = new HashMap(); topLevelMap.put("name", this.getDisplayPrefixedName()); topLevelMap.put("className", "EOGenericRecord"); // for classProperties add attribute names AND relationship names to get a nice, complete chart - List classPropertiesList = FastList.newInstance(); + List classPropertiesList = new LinkedList(); topLevelMap.put("classProperties", classPropertiesList); // conditions for (ServiceEcaCondition ecaCondition: this.serviceEcaRule.getEcaConditionList()) { @@ -139,10 +138,10 @@ public class ServiceEcaArtifactInfo extends ArtifactInfoBase { /* going to try this without any attributes... // attributes - List> attributesList = FastList.newInstance(); + List> attributesList = new LinkedList(); topLevelMap.put("attributes", attributesList); for (ModelParam param: this.modelService.getModelParamList()) { - Map attributeMap = FastMap.newInstance(); + Map attributeMap = new HashMap(); attributesList.add(attributeMap); if (useMoreDetailedNames) { @@ -156,10 +155,10 @@ public class ServiceEcaArtifactInfo extends ArtifactInfoBase { */ // relationships - List> relationshipsMapList = FastList.newInstance(); + List> relationshipsMapList = new LinkedList>(); for (ServiceArtifactInfo sai: triggeringServiceSet) { - Map relationshipMap = FastMap.newInstance(); + Map relationshipMap = new HashMap(); relationshipsMapList.add(relationshipMap); relationshipMap.put("name", sai.getDisplayPrefixedName()); @@ -168,7 +167,7 @@ public class ServiceEcaArtifactInfo extends ArtifactInfoBase { relationshipMap.put("isMandatory", "Y"); } for (ServiceArtifactInfo sai: triggeredServiceSet) { - Map relationshipMap = FastMap.newInstance(); + Map relationshipMap = new HashMap(); relationshipsMapList.add(relationshipMap); relationshipMap.put("name", sai.getDisplayPrefixedName()); diff --git a/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelInfo.java b/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelInfo.java index 43e108e4df..f698792913 100644 --- a/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelInfo.java +++ b/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelInfo.java @@ -18,10 +18,9 @@ */ package org.ofbiz.webtools.labelmanager; +import java.util.LinkedHashMap; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilValidate; @@ -32,7 +31,7 @@ public class LabelInfo { protected String labelKey = ""; protected String labelKeyComment = ""; protected String fileName = ""; - protected Map labelValues = FastMap.newInstance(); + protected Map labelValues = new LinkedHashMap(); public LabelInfo(String labelKey, String labelKeyComment, String fileName, String localeStr, String labelValue, String labelComment) { this.labelKey = labelKey; diff --git a/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java b/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java index dde2baa9bd..72a5c11946 100644 --- a/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java +++ b/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java @@ -22,6 +22,7 @@ import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import java.util.Collection; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; @@ -30,8 +31,6 @@ import java.util.TreeSet; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastList; - import org.ofbiz.base.component.ComponentConfig; import org.ofbiz.base.component.ComponentConfig.ClasspathInfo; import org.ofbiz.base.util.Debug; @@ -57,7 +56,7 @@ public class LabelManagerFactory { protected Map labels = new TreeMap(); protected Set localesFound = new TreeSet(); - protected List duplicatedLocalesLabelsList = FastList.newInstance(); + protected List duplicatedLocalesLabelsList = new LinkedList(); public static synchronized LabelManagerFactory getInstance() throws IOException { if (componentNamesFound == null) { diff --git a/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java b/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java index 88c27ca009..1d5f053390 100644 --- a/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java +++ b/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java @@ -22,7 +22,9 @@ import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import java.util.Collection; +import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; @@ -30,9 +32,6 @@ import java.util.TreeMap; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastList; -import javolution.util.FastSet; - import org.ofbiz.base.component.ComponentConfig; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.FileUtil; @@ -65,8 +64,8 @@ public class LabelReferences { protected Delegator delegator; protected DispatchContext dispatchContext; protected Map labels; - protected Set labelSet = FastSet.newInstance(); - protected Set rootFolders = FastSet.newInstance(); + protected Set labelSet = new HashSet(); + protected Set rootFolders = new HashSet(); public LabelReferences(Delegator delegator, LabelManagerFactory factory) { this.delegator = delegator; @@ -113,7 +112,7 @@ public class LabelReferences { // get labels from simple method files getLabelsFromSimpleMethodFiles(); // get labels from widgets files - List fileList = FastList.newInstance(); + List fileList = new LinkedList(); for (String rootFolder : this.rootFolders) { fileList.addAll(FileUtil.findXmlFiles(rootFolder + "webapp", null, null, null)); fileList.addAll(FileUtil.findXmlFiles(rootFolder + "widget", null, null, null)); @@ -259,7 +258,7 @@ public class LabelReferences { } private void getLabelsFromFormWidgets(String inFile, File file) throws MalformedURLException, SAXException, ParserConfigurationException, IOException, GenericServiceException { - Set fieldNames = FastSet.newInstance(); + Set fieldNames = new HashSet(); findUiLabelMapInFile(inFile, file.getPath()); Document formDocument = UtilXml.readXmlDocument(file.toURI().toURL()); Element rootElem = formDocument.getDocumentElement(); diff --git a/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ArtifactInfo.groovy b/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ArtifactInfo.groovy index c40e063f2e..c267209564 100644 --- a/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ArtifactInfo.groovy +++ b/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ArtifactInfo.groovy @@ -20,7 +20,6 @@ import org.ofbiz.entity.Delegator; import org.ofbiz.webtools.artifactinfo.*; import org.ofbiz.base.util.*; -import javolution.util.FastList; name = parameters.name; location = parameters.location; @@ -56,7 +55,7 @@ if (artifactInfo) { // add to the recently viewed list recentArtifactInfoList = session.getAttribute("recentArtifactInfoList"); if (!recentArtifactInfoList) { - recentArtifactInfoList = FastList.newInstance(); + recentArtifactInfoList = []; session.setAttribute("recentArtifactInfoList", recentArtifactInfoList); } if (recentArtifactInfoList && recentArtifactInfoList.get(0).equals(artifactInfoMap)) { diff --git a/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ComponentList.groovy b/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ComponentList.groovy index 7dfca93fb3..9d93b7a1ce 100644 --- a/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ComponentList.groovy +++ b/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/ComponentList.groovy @@ -23,17 +23,15 @@ import java.util.List; import org.ofbiz.base.component.ComponentConfig; import org.ofbiz.base.component.ComponentConfig.WebappInfo; -import javolution.util.FastMap; -import javolution.util.FastList; import org.ofbiz.base.util.* Collection components = ComponentConfig.getAllComponents(); -List componentList = FastList.newInstance(); +List componentList = []; components.each { component -> List webApps = component.getWebappInfos(); webApps.each { webApp -> - componentMap = FastMap.newInstance(); + componentMap = [:]; componentMap.compName = component.getComponentName(); componentMap.rootLocation = component.getRootLocation(); componentMap.enabled = (component.enabled() == true? "Y" : "N"); @@ -46,7 +44,7 @@ components.each { component -> componentList.add(componentMap); } if (UtilValidate.isEmpty(webApps)) { - componentMap = FastMap.newInstance(); + componentMap = [:]; componentMap.compName = component.getComponentName(); componentMap.rootLocation = component.getRootLocation(); componentMap.enabled = (component.enabled() == true? "Y" : "N"); diff --git a/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/TestSuiteInfo.groovy b/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/TestSuiteInfo.groovy index 6df685661d..ca76e8d2fa 100644 --- a/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/TestSuiteInfo.groovy +++ b/framework/webtools/webapp/webtools/WEB-INF/actions/artifactinfo/TestSuiteInfo.groovy @@ -28,10 +28,7 @@ import org.w3c.dom.Element; import java.util.Collection; import java.util.List; -import javolution.util.FastMap; -import javolution.util.FastList; - -List testList = FastList.newInstance(); +List testList = []; for (ComponentConfig.TestSuiteInfo testSuiteInfo: ComponentConfig.getAllTestSuiteInfos(parameters.compName)) { String componentName = testSuiteInfo.componentConfig.getComponentName(); ResourceHandler testSuiteResource = testSuiteInfo.createResourceHandler(); @@ -42,7 +39,7 @@ for (ComponentConfig.TestSuiteInfo testSuiteInfo: ComponentConfig.getAllTestSuit suiteName = documentElement.getAttribute("suite-name") firstLine = true; for (Element testCaseElement : UtilXml.childElementList(documentElement, UtilMisc.toSet("test-case", "test-group"))) { - testMap = FastMap.newInstance(); + testMap = [:]; String caseName = testCaseElement.getAttribute("case-name"); if (firstLine == true) { testMap = UtilMisc.toMap("suiteName", suiteName, "suiteNameSave", suiteName, "caseName", caseName); diff --git a/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityMaint.groovy b/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityMaint.groovy index f50845477b..8e5725f2ac 100644 --- a/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityMaint.groovy +++ b/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityMaint.groovy @@ -16,8 +16,6 @@ * specific language governing permissions and limitations * under the License. */ -import javolution.util.FastList; - import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator import org.ofbiz.entity.DelegatorFactory diff --git a/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy b/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy index baf6c299c5..7b7fdf9960 100644 --- a/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy +++ b/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy @@ -44,18 +44,14 @@ import org.ofbiz.base.util.Debug; import java.sql.Timestamp; import java.sql.Date; import java.sql.Time; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - entityName = parameters.entityName; ModelReader reader = delegator.getModelReader(); ModelEntity modelEntity = reader.getModelEntity(entityName); -groupByFields = FastList.newInstance(); -functionFields = FastList.newInstance(); +groupByFields = []; +functionFields = []; if (modelEntity instanceof ModelViewEntity) { aliases = modelEntity.getAliasesCopy() @@ -89,7 +85,7 @@ if (find == null) { String curFindString = "entityName=" + entityName + "&find=" + find; GenericEntity findByEntity = delegator.makeValue(entityName); -List errMsgList = FastList.newInstance(); +List errMsgList = []; Iterator fieldIterator = modelEntity.getFieldsIterator(); while (fieldIterator.hasNext()) { ModelField field = fieldIterator.next(); @@ -143,7 +139,7 @@ if ("true".equals(find)) { //EntityCondition condition = EntityCondition.makeCondition(findByEntity, EntityOperator.AND); // small variation to support LIKE if a wildcard (%) is found in a String - conditionList = FastList.newInstance(); + conditionList = []; findByKeySet = findByEntity.keySet(); fbksIter = findByKeySet.iterator(); while (fbksIter.hasNext()) { @@ -168,7 +164,7 @@ if ("true".equals(find)) { fieldsToSelect = null; if (groupByFields || functionFields) { - fieldsToSelect = FastSet.newInstance(); + fieldsToSelect = []; for (String groupByField : groupByFields) { fieldsToSelect.add(groupByField); @@ -178,7 +174,7 @@ if ("true".equals(find)) { fieldsToSelect.add(functionField) } } - Collection pkNames = FastList.newInstance(); + Collection pkNames = []; Iterator iter = modelEntity.getPksIterator(); while (iter != null && iter.hasNext()) { ModelField curField = (ModelField) iter.next(); @@ -216,13 +212,13 @@ context.resultPartialList = resultPartialList; viewIndexLast = UtilMisc.getViewLastIndex(arraySize, viewSize); context.viewIndexLast = viewIndexLast; -List fieldList = FastList.newInstance(); +List fieldList = []; fieldIterator = modelEntity.getFieldsIterator(); while (fieldIterator.hasNext()) { ModelField field = fieldIterator.next(); ModelFieldType type = delegator.getEntityFieldType(modelEntity, field.getType()); - Map fieldMap = FastMap.newInstance(); + Map fieldMap = [:]; fieldMap.put("name", field.getName()); fieldMap.put("isPk", (field.getIsPk() == true) ? "Y" : "N"); fieldMap.put("javaType", type.getJavaType()); @@ -234,11 +230,11 @@ while (fieldIterator.hasNext()) { context.fieldList = fieldList; context.columnCount = fieldList.size()+2; -List records = FastList.newInstance(); +List records = []; if (resultPartialList != null) { Iterator resultPartialIter = resultPartialList.iterator(); while (resultPartialIter.hasNext()) { - Map record = FastMap.newInstance(); + Map record = [:]; GenericValue value = (GenericValue)resultPartialIter.next(); String findString = "entityName=" + entityName; diff --git a/framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy b/framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy index 791cdf6ac6..6ca57971df 100644 --- a/framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy +++ b/framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy @@ -32,8 +32,6 @@ import org.ofbiz.base.util.UtilValidate; import java.sql.Timestamp; import java.sql.Date; import java.sql.Time; -import javolution.util.FastList; -import javolution.util.FastMap; String entityName = parameters.get("entityName"); context.put("entityName", entityName); @@ -92,10 +90,10 @@ if (value == null) { } if (value != null) { - List fieldList = FastList.newInstance(); + List fieldList = []; Iterator fieldIterator = entity.getFieldsIterator(); while (fieldIterator.hasNext()) { - Map mapField = FastMap.newInstance(); + Map mapField = [:]; ModelField field = fieldIterator.next(); ModelFieldType type = delegator.getEntityFieldType(entity, field.getType()); @@ -146,10 +144,10 @@ if ((session.getAttribute("_ERROR_MESSAGE_") != null || request.getAttribute("_E } context.put("useValue", useValue); -List newFieldPkList = FastList.newInstance(); +List newFieldPkList = []; pkIterator = entity.getPksIterator(); while (pkIterator.hasNext()) { - Map mapField = FastMap.newInstance(); + Map mapField = [:]; ModelField field = pkIterator.next(); ModelFieldType type = delegator.getEntityFieldType(entity, field.getType()); @@ -223,10 +221,10 @@ while (pkIterator.hasNext()) { } context.put("newFieldPkList", newFieldPkList); -List newFieldNoPkList = FastList.newInstance(); +List newFieldNoPkList = []; Iterator noPkIterator = entity.getNopksIterator(); while (noPkIterator.hasNext()) { - Map mapField = FastMap.newInstance(); + Map mapField = [:]; ModelField field = noPkIterator.next(); ModelFieldType type = delegator.getEntityFieldType(entity, field.getType()); @@ -303,9 +301,9 @@ while (noPkIterator.hasNext()) { } context.put("newFieldNoPkList", newFieldNoPkList); -List relationFieldList = FastList.newInstance(); +List relationFieldList = []; for (int relIndex = 0; relIndex < entity.getRelationsSize(); relIndex++) { - Map mapRelation = FastMap.newInstance(); + Map mapRelation = [:]; ModelRelation relation = entity.getRelation(relIndex); ModelEntity relatedEntity = reader.getModelEntity(relation.getRelEntityName()); @@ -331,10 +329,10 @@ for (int relIndex = 0; relIndex < entity.getRelationsSize(); relIndex++) { valueRelated = (GenericValue) tempIter.next(); } - List relatedFieldsList = FastList.newInstance(); + List relatedFieldsList = []; Iterator relFieldIterator = relatedEntity.getFieldsIterator(); while (relFieldIterator.hasNext()) { - Map mapRelatedFields = FastMap.newInstance(); + Map mapRelatedFields = [:]; ModelField field = relFieldIterator.next(); ModelFieldType type = delegator.getEntityFieldType(entity, field.getType()); diff --git a/framework/webtools/webapp/webtools/WEB-INF/actions/service/ServiceResult.groovy b/framework/webtools/webapp/webtools/WEB-INF/actions/service/ServiceResult.groovy index 9e2839f1bc..f0d0b01338 100644 --- a/framework/webtools/webapp/webtools/WEB-INF/actions/service/ServiceResult.groovy +++ b/framework/webtools/webapp/webtools/WEB-INF/actions/service/ServiceResult.groovy @@ -29,11 +29,8 @@ import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.Debug; import org.ofbiz.webapp.event.CoreEvents; -import javolution.util.FastList; -import javolution.util.FastMap; - if (session.getAttribute("_RUN_SYNC_RESULT_")) { - serviceResultList = FastList.newInstance(); + serviceResultList = []; serviceResult = session.getAttribute("_RUN_SYNC_RESULT_"); if (parameters.servicePath) { diff --git a/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.groovy b/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.groovy index 6f63e61ada..8932dfcf02 100644 --- a/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.groovy +++ b/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.groovy @@ -22,8 +22,6 @@ import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.security.Security; import org.ofbiz.webapp.stats.*; -import javolution.util.FastList; -import javolution.util.FastMap; clearBins = parameters.clear; if ("true".equals(clearBins)) { @@ -34,9 +32,9 @@ if ("true".equals(clearBins)) { // Requests iterator = UtilMisc.toIterator(new TreeSet(ServerHitBin.requestSinceStarted.keySet())); -requestList = FastList.newInstance(); +requestList = []; while (iterator.hasNext()) { - requestIdMap = FastMap.newInstance(); + requestIdMap = [:]; statsId = iterator.next(); bin = ServerHitBin.requestSinceStarted.get(statsId); if (bin) { @@ -57,9 +55,9 @@ context.requestList = requestList; // Events iterator = UtilMisc.toIterator(new TreeSet(ServerHitBin.eventSinceStarted.keySet())); -eventList = FastList.newInstance(); +eventList = []; while (iterator.hasNext()) { - requestIdMap = FastMap.newInstance(); + requestIdMap = [:]; statsId = iterator.next(); bin = ServerHitBin.eventSinceStarted.get(statsId); if (bin) { @@ -81,9 +79,9 @@ context.eventList = eventList; // Views iterator = UtilMisc.toIterator(new TreeSet(ServerHitBin.viewSinceStarted.keySet())); -viewList = FastList.newInstance(); +viewList = []; while (iterator.hasNext()) { - requestIdMap = FastMap.newInstance(); + requestIdMap = [:]; statsId = iterator.next(); bin = ServerHitBin.viewSinceStarted.get(statsId); if (bin) { diff --git a/specialpurpose/assetmaint/src/org/ofbiz/assetmaint/FixedAssetMaintServices.java b/specialpurpose/assetmaint/src/org/ofbiz/assetmaint/FixedAssetMaintServices.java index 415779efcd..c694b19518 100644 --- a/specialpurpose/assetmaint/src/org/ofbiz/assetmaint/FixedAssetMaintServices.java +++ b/specialpurpose/assetmaint/src/org/ofbiz/assetmaint/FixedAssetMaintServices.java @@ -18,13 +18,12 @@ under the License. **/ package org.ofbiz.assetmaint; +import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilProperties; @@ -96,7 +95,7 @@ public class FixedAssetMaintServices { } else { issueQuantity = new Double(requestedQty); } - Map itemIssuanceCtx = FastMap.newInstance(); + Map itemIssuanceCtx = new HashMap(); itemIssuanceCtx.put("userLogin", userLogin); itemIssuanceCtx.put("inventoryItemId", inventoryItemId); itemIssuanceCtx.put("fixedAssetId", fixedAssetId); diff --git a/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/GetStarSchemaFields.groovy b/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/GetStarSchemaFields.groovy index a84890b31a..4c8b1f9437 100644 --- a/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/GetStarSchemaFields.groovy +++ b/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/GetStarSchemaFields.groovy @@ -29,12 +29,9 @@ import org.ofbiz.entity.model.ModelField; import org.ofbiz.entity.model.ModelViewEntity; import org.ofbiz.entity.model.ModelViewEntity.ModelAlias; -import javolution.util.FastList; -import javolution.util.FastMap; - starSchemaName = parameters.starSchemaName; -starSchemaFields = FastList.newInstance(); +starSchemaFields = []; if (starSchemaName) { reader = delegator.getModelReader(); starSchema = reader.getModelEntity(starSchemaName); @@ -42,7 +39,7 @@ if (starSchemaName) { fieldsIt = starSchema.getAliasesIterator(); while (fieldsIt.hasNext()) { field = fieldsIt.next(); - fieldMap = FastMap.newInstance(); + fieldMap = [:]; fieldMap.name = field.getName(); description = field.getDescription(); if (!description) { diff --git a/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/GetStarSchemas.groovy b/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/GetStarSchemas.groovy index c55024efb9..4e5fbab10b 100644 --- a/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/GetStarSchemas.groovy +++ b/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/GetStarSchemas.groovy @@ -26,15 +26,12 @@ import org.ofbiz.entity.model.ModelReader; import org.ofbiz.entity.model.ModelEntity; import org.ofbiz.entity.model.ModelViewEntity; -import javolution.util.FastList; -import javolution.util.FastMap; - reader = delegator.getModelReader(); ec = reader.getEntityNames(); entities = new TreeSet(ec); entitiesIt = entities.iterator(); -List starSchemas = FastList.newInstance(); +List starSchemas = []; while (entitiesIt.hasNext()) { entity = reader.getModelEntity(entitiesIt.next()); @@ -43,7 +40,7 @@ while (entitiesIt.hasNext()) { continue; } - entityMap = FastMap.newInstance(); + entityMap = [:]; entityMap.name = entity.getEntityName(); entityMap.title = entity.getTitle(); diff --git a/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/RunStarSchemaQuery.groovy b/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/RunStarSchemaQuery.groovy index 8650a8d7cd..66ba978395 100644 --- a/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/RunStarSchemaQuery.groovy +++ b/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/RunStarSchemaQuery.groovy @@ -29,19 +29,15 @@ import org.ofbiz.entity.model.ModelField; import org.ofbiz.entity.model.ModelViewEntity; import org.ofbiz.entity.model.ModelViewEntity.ModelAlias; -import javolution.util.FastSet; -import javolution.util.FastList; -import javolution.util.FastMap; - starSchemaName = parameters.starSchemaName; selectedFieldList = UtilHttp.parseMultiFormData(parameters); -columnNames = FastSet.newInstance(); +columnNames = []; selectedFieldList.each { selectedField -> columnNames.add(selectedField.selectedFieldName); } context.columnNames = columnNames; -List records = FastList.newInstance(); +List records = []; records = select(context.columnNames).from(starSchemaName).distinct(false).queryList(); context.records = records; diff --git a/specialpurpose/birt/src/org/ofbiz/birt/email/BirtEmailServices.java b/specialpurpose/birt/src/org/ofbiz/birt/email/BirtEmailServices.java index ee9082d6f1..917a9609be 100644 --- a/specialpurpose/birt/src/org/ofbiz/birt/email/BirtEmailServices.java +++ b/specialpurpose/birt/src/org/ofbiz/birt/email/BirtEmailServices.java @@ -24,15 +24,13 @@ import java.io.InputStream; import java.io.StringWriter; import java.sql.SQLException; import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.apache.fop.apps.FOPException; import org.eclipse.birt.report.engine.api.EngineException; import org.eclipse.birt.report.engine.api.IReportEngine; @@ -143,7 +141,7 @@ public class BirtEmailServices { // create the output stream for the generation ByteArrayOutputStream baos = new ByteArrayOutputStream(); - Map birtContext = FastMap.newInstance(); + Map birtContext = new HashMap(); if (birtLocale == null) { birtLocale = locale; } @@ -171,7 +169,7 @@ public class BirtEmailServices { baos.close(); // store in the list of maps for sendmail.... - List> bodyParts = FastList.newInstance(); + List> bodyParts = new LinkedList>(); if (bodyText != null) { bodyText = FlexibleStringExpander.expandString(bodyText, screenContext, locale); bodyParts.add(UtilMisc.toMap("content", bodyText, "type", "text/html")); diff --git a/specialpurpose/birt/src/org/ofbiz/birt/webapp/view/BirtViewHandler.java b/specialpurpose/birt/src/org/ofbiz/birt/webapp/view/BirtViewHandler.java index 37c25b3ebf..c2107565d8 100644 --- a/specialpurpose/birt/src/org/ofbiz/birt/webapp/view/BirtViewHandler.java +++ b/specialpurpose/birt/src/org/ofbiz/birt/webapp/view/BirtViewHandler.java @@ -21,6 +21,7 @@ package org.ofbiz.birt.webapp.view; import java.io.IOException; import java.io.InputStream; import java.sql.SQLException; +import java.util.HashMap; import java.util.Locale; import java.util.Map; @@ -29,8 +30,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastMap; - import org.eclipse.birt.core.exception.BirtException; import org.eclipse.birt.report.engine.api.IReportEngine; import org.eclipse.birt.report.engine.api.IReportRunnable; @@ -86,7 +85,7 @@ public class BirtViewHandler implements ViewHandler { Map appContext = UtilGenerics.cast(engine.getConfig().getAppContext()); BirtWorker.setWebContextObjects(appContext, request, response); - Map context = FastMap.newInstance(); + Map context = new HashMap(); // set parameters from request Map parameters = UtilGenerics.cast(request.getAttribute(BirtWorker.BIRT_PARAMETERS)); if (parameters != null) { diff --git a/specialpurpose/birt/webapp/accounting/reports/AcctgTransEntriesSearchResultsInvoiceAndPayment.rptdesign b/specialpurpose/birt/webapp/accounting/reports/AcctgTransEntriesSearchResultsInvoiceAndPayment.rptdesign index a68839bb51..19b8897b62 100644 --- a/specialpurpose/birt/webapp/accounting/reports/AcctgTransEntriesSearchResultsInvoiceAndPayment.rptdesign +++ b/specialpurpose/birt/webapp/accounting/reports/AcctgTransEntriesSearchResultsInvoiceAndPayment.rptdesign @@ -20,8 +20,7 @@ under the License. Eclipse BIRT Designer Version 2.6.0.v20100531 Build <2.6.0.v20100609-1613> in - countOfRow = 0;]]> = totalRows) return false; -var context = FastMap.newInstance(); -var parameters = FastMap.newInstance(); +var context = new HashMap(); +var parameters = new HashMap(); context.put("partyId", organizationPartyId); context.put("nowTimestamp", UtilDateTime.nowTimestamp()); context.put("locale", reportContext.getLocale()); diff --git a/specialpurpose/birt/webapp/accounting/reports/BalanceSheet.rptdesign b/specialpurpose/birt/webapp/accounting/reports/BalanceSheet.rptdesign index 2b062c2f5f..c6f3bd8291 100644 --- a/specialpurpose/birt/webapp/accounting/reports/BalanceSheet.rptdesign +++ b/specialpurpose/birt/webapp/accounting/reports/BalanceSheet.rptdesign @@ -20,7 +20,7 @@ under the License. Eclipse BIRT Designer Version 2.6.0.v20100531 Build <2.6.0.v20100609-1613> in - Eclipse BIRT Designer Version 2.6.0.v20100531 Build <2.6.0.v20100609-1613> in - Eclipse BIRT Designer Version 2.6.0.v20100531 Build <2.6.0.v20100609-1613> in - OFBiz - Eclipse BIRT Designer Version 2.6.0.v20100531 Build <2.6.0.v20100609-1613> in - OFBiz 80 in /templates/blank_report.gif @@ -331,8 +331,8 @@ try { } catch(e) { Debug.logError(e,""); } -input = FastMap.newInstance(); -inputFields = FastMap.newInstance(); +input = new HashMap(); +inputFields = new HashMap(); if(params!=null){ inputFields.put("partyIdTo", params["partyIdTo"]); inputFields.put("paymentId", params["paymentId"]); diff --git a/specialpurpose/birt/webapp/accounting/reports/TrialBalance.rptdesign b/specialpurpose/birt/webapp/accounting/reports/TrialBalance.rptdesign index d8f814570e..1e8d9fd922 100644 --- a/specialpurpose/birt/webapp/accounting/reports/TrialBalance.rptdesign +++ b/specialpurpose/birt/webapp/accounting/reports/TrialBalance.rptdesign @@ -20,7 +20,7 @@ under the License. Eclipse BIRT Designer Version 2.6.0.v20100531 Build <2.6.0.v20100609-1613> in - OFBiz 150 200 Blank Report @@ -179,8 +179,8 @@ try { Debug.logError(e,""); } -inputInvent = FastMap.newInstance(); -inputInventFields = FastMap.newInstance(); +inputInvent = new HashMap(); +inputInventFields = new HashMap(); if(params!=null){ inputInventFields.put("facilityId", params["facilityId"]); inputInventFields.put("noConditionFind", "Y"); @@ -274,14 +274,14 @@ if(inventory = inventories.next()){ OFBiz - Eclipse BIRT Designer Version 2.5.1.v20090903 Build <2.5.1.v20090917-1447> in 0){ amount = orderInfo.get("grandTotal"); totalOrdersAmount = totalOrdersAmount + amount; //Shipping Total - cond = FastList.newInstance(); + cond = new LinkedkList(); cond.add(EntityCondition.makeCondition("orderId", EntityOperator.EQUALS, orderId)); cond.add(EntityCondition.makeCondition("orderAdjustmentTypeId", EntityOperator.EQUALS, "SHIPPING_CHARGES")); orderAdjustments = delegator.findList("OrderAdjustment", EntityCondition.makeCondition(cond, EntityOperator.AND), null, null, null, false); diff --git a/specialpurpose/birt/webapp/ordermgr/reports/Last3MonthsSalesReport.rptdesign b/specialpurpose/birt/webapp/ordermgr/reports/Last3MonthsSalesReport.rptdesign index c8424fac53..c4ae14e8d1 100644 --- a/specialpurpose/birt/webapp/ordermgr/reports/Last3MonthsSalesReport.rptdesign +++ b/specialpurpose/birt/webapp/ordermgr/reports/Last3MonthsSalesReport.rptdesign @@ -21,7 +21,7 @@ under the License. Eclipse BIRT Designer Version 3.7.2.v20120213 Build <3.7.2.v20120214-1408> in userLogin = null; try { userLogin = delegator.findByPrimaryKey("UserLogin",UtilMisc.toMap("userLoginId","admin")); - months = FastList.newInstance(); + months = new LinkedkList(); thisMonth = 0; thisMonth = UtilDateTime.getMonth(UtilDateTime.nowTimestamp(), TimeZone.getDefault(), Locale.getDefault())+1; thisYear = UtilDateTime.getYear(UtilDateTime.nowTimestamp(), TimeZone.getDefault(), Locale.getDefault()) @@ -265,7 +265,7 @@ try { } month = month - 1 } - cond = FastList.newInstance(); + cond = new LinkedkList(); cond.add(EntityCondition.makeCondition("orderDateMonthOfYear", EntityOperator.IN, months)); cond.add(EntityCondition.makeCondition("orderDateYearName", EntityOperator.EQUALS, UtilMisc.toLongObject(thisYear))); salesOrderItemStarSchemas = delegator.findList("SalesOrderItemStarSchema", EntityCondition.makeCondition(cond, EntityOperator.AND), null, null, null, false); @@ -280,7 +280,7 @@ if (salesOrderItemStarSchemas) { ]]> Eclipse BIRT Designer Version 2.5.1.v20090903 Build <2.5.1.v20090917-1447> in /templates/blank_report.gif diff --git a/specialpurpose/birt/webapp/ordermgr/reports/OrderDiscountCodeReport.rptdesign b/specialpurpose/birt/webapp/ordermgr/reports/OrderDiscountCodeReport.rptdesign index 9abb1d59f2..3f61a1800f 100644 --- a/specialpurpose/birt/webapp/ordermgr/reports/OrderDiscountCodeReport.rptdesign +++ b/specialpurpose/birt/webapp/ordermgr/reports/OrderDiscountCodeReport.rptdesign @@ -23,7 +23,7 @@ under the License. Copyright (c) 2007 <<Your Company Name here>> Creates a blank report with no predefined content. Blank Report @@ -115,8 +115,8 @@ try { Debug.logError(e,""); } -input = FastMap.newInstance(); -inputFields = FastMap.newInstance(); +input = new HashMap(); +inputFields = new HashMap(); if(params!=null){ inputFields.put("noConditionFind", "Y"); } diff --git a/specialpurpose/birt/webapp/ordermgr/reports/OrdersByChannel.rptdesign b/specialpurpose/birt/webapp/ordermgr/reports/OrdersByChannel.rptdesign index 7c4127b9fb..576c95a362 100644 --- a/specialpurpose/birt/webapp/ordermgr/reports/OrdersByChannel.rptdesign +++ b/specialpurpose/birt/webapp/ordermgr/reports/OrdersByChannel.rptdesign @@ -154,7 +154,7 @@ under the License. 200 135 80 - diff --git a/specialpurpose/ebay/src/org/ofbiz/ebay/EbayHelper.java b/specialpurpose/ebay/src/org/ofbiz/ebay/EbayHelper.java index f605238326..3d8af656b6 100644 --- a/specialpurpose/ebay/src/org/ofbiz/ebay/EbayHelper.java +++ b/specialpurpose/ebay/src/org/ofbiz/ebay/EbayHelper.java @@ -32,13 +32,12 @@ import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.Collection; import java.util.Date; +import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilProperties; @@ -64,7 +63,7 @@ public class EbayHelper { public static final String resource = "EbayUiLabels"; public static Map buildEbayConfig(Map context, Delegator delegator) { - Map buildEbayConfigContext = FastMap.newInstance(); + Map buildEbayConfigContext = new HashMap(); Locale locale = (Locale) context.get("locale"); String productStoreId = (String) context.get("productStoreId"); if (UtilValidate.isNotEmpty(productStoreId)) { @@ -126,7 +125,7 @@ public class EbayHelper { int responseCode = connection.getResponseCode(); InputStream inputStream = null; - Map result = FastMap.newInstance(); + Map result = new HashMap(); String response = null; if (responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_OK) { @@ -324,7 +323,7 @@ public class EbayHelper { Debug.logInfo("Creating postal address with input map: " + address, module); String contactMechId = null; try { - Map context = FastMap.newInstance(); + Map context = new HashMap(); context.put("partyId", partyId); context.put("toName", address.get("buyerName")); context.put("address1", address.get("shippingAddressStreet1")); @@ -341,7 +340,7 @@ public class EbayHelper { Map summaryResult = dispatcher.runSync("createPartyPostalAddress", context); contactMechId = (String) summaryResult.get("contactMechId"); // Set also as a billing address - context = FastMap.newInstance(); + context = new HashMap(); context.put("partyId", partyId); context.put("contactMechId", contactMechId); context.put("contactMechPurposeTypeId", "BILLING_LOCATION"); @@ -392,8 +391,8 @@ public class EbayHelper { public static String createPartyPhone(LocalDispatcher dispatcher, String partyId, String phoneNumber, GenericValue userLogin) { - Map summaryResult = FastMap.newInstance(); - Map context = FastMap.newInstance(); + Map summaryResult = new HashMap(); + Map context = new HashMap(); String phoneContactMechId = null; try { @@ -410,8 +409,8 @@ public class EbayHelper { } public static String createPartyEmail(LocalDispatcher dispatcher, String partyId, String email, GenericValue userLogin) { - Map context = FastMap.newInstance(); - Map summaryResult = FastMap.newInstance(); + Map context = new HashMap(); + Map summaryResult = new HashMap(); String emailContactMechId = null; try { @@ -438,8 +437,8 @@ public class EbayHelper { public static void createEbayCustomer(LocalDispatcher dispatcher, String partyId, String ebayUserIdBuyer, String eias, GenericValue userLogin) { - Map context = FastMap.newInstance(); - Map summaryResult = FastMap.newInstance(); + Map context = new HashMap(); + Map summaryResult = new HashMap(); if (UtilValidate.isNotEmpty(eias)) { try { context.put("partyId", partyId); diff --git a/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java b/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java index 494b97834d..6c53bc9492 100644 --- a/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java +++ b/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java @@ -23,13 +23,11 @@ import java.math.BigDecimal; import java.sql.Timestamp; import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -64,10 +62,10 @@ public class EbayOrderServices { private static boolean isGetSellerTransactionsCall = false; private static boolean isGetOrdersCall = false; private static boolean isGetMyeBaySellingCall = false; - private static List> orderList = FastList.newInstance(); - private static List getSellerTransactionsContainingOrderList = FastList.newInstance(); - private static List orderImportSuccessMessageList = FastList.newInstance(); - private static List orderImportFailureMessageList = FastList.newInstance(); + private static List> orderList = new LinkedList>(); + private static List getSellerTransactionsContainingOrderList = new LinkedList(); + private static List orderImportSuccessMessageList = new LinkedList(); + private static List orderImportFailureMessageList = new LinkedList(); public static Map getEbayOrders(DispatchContext dctx, Map context) { Delegator delegator = dctx.getDelegator(); @@ -77,7 +75,7 @@ public class EbayOrderServices { orderImportFailureMessageList.clear(); getSellerTransactionsContainingOrderList.clear(); orderList.clear(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); try { Map eBayConfigResult = EbayHelper.buildEbayConfig(context, delegator); if (UtilValidate.isEmpty(eBayConfigResult)) { @@ -125,7 +123,7 @@ public class EbayOrderServices { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); String externalId = (String) context.get("externalId"); List> orderList = UtilGenerics.checkList(context.get("orderList")); try { @@ -263,7 +261,7 @@ public class EbayOrderServices { private static Map checkOrders(Delegator delegator, LocalDispatcher dispatcher, Locale locale, Map context, String responseMsg) { StringBuffer errorMessage = new StringBuffer(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); GenericValue userLogin = (GenericValue) context.get("userLogin"); if (isGetSellerTransactionsCall) { List> getSellerTransactionList = readGetSellerTransactionResponse(responseMsg, locale, (String) context.get("productStoreId"), delegator, dispatcher, errorMessage, userLogin); @@ -425,7 +423,7 @@ public class EbayOrderServices { private static List> readGetOrdersResponse(String responseMsg, Locale locale, String productStoreId, Delegator delegator, LocalDispatcher dispatcher, StringBuffer errorMessage, GenericValue userLogin) { - List> fetchedOrders = FastList.newInstance(); + List> fetchedOrders = new LinkedList>(); try { Document docResponse = UtilXml.readXmlDocument(responseMsg, true); //Debug.logInfo("The generated string is ======= " + UtilXml.writeXmlDocument(docResponse), module); @@ -450,7 +448,7 @@ public class EbayOrderServices { Iterator ordersElemIter = orders.iterator(); while (ordersElemIter.hasNext()) { - Map orderCtx = FastMap.newInstance(); + Map orderCtx = new HashMap(); Element ordersElement = ordersElemIter.next(); String externalOrderId = UtilXml.childElementValue(ordersElement, "OrderID"); orderCtx.put("externalId", "EBO_" + externalOrderId); @@ -473,7 +471,7 @@ public class EbayOrderServices { orderCtx.put("productStoreId", productStoreId); // Retrieve shipping address - Map shippingAddressCtx = FastMap.newInstance(); + Map shippingAddressCtx = new HashMap(); List shippingAddressList = UtilXml.childElementList(ordersElement, "ShippingAddress"); Iterator shippingAddressElemIter = shippingAddressList.iterator(); while (shippingAddressElemIter.hasNext()) { @@ -496,7 +494,7 @@ public class EbayOrderServices { } // Retrieve shipping service selected - Map shippingServiceSelectedCtx = FastMap.newInstance(); + Map shippingServiceSelectedCtx = new HashMap(); List shippingServiceSelectedList = UtilXml.childElementList(ordersElement, "ShippingServiceSelected"); Iterator shippingServiceSelectedElemIter = shippingServiceSelectedList.iterator(); while (shippingServiceSelectedElemIter.hasNext()) { @@ -516,7 +514,7 @@ public class EbayOrderServices { } // Retrieve shipping details - Map shippingDetailsCtx = FastMap.newInstance(); + Map shippingDetailsCtx = new HashMap(); List shippingDetailsList = UtilXml.childElementList(ordersElement, "ShippingDetails"); Iterator shippingDetailsElemIter = shippingDetailsList.iterator(); while (shippingDetailsElemIter.hasNext()) { @@ -539,7 +537,7 @@ public class EbayOrderServices { orderCtx.put("shippingDetailsCtx", shippingDetailsCtx); // Retrieve checkout status - Map checkoutStatusCtx = FastMap.newInstance(); + Map checkoutStatusCtx = new HashMap(); List checkoutStatusList = UtilXml.childElementList(ordersElement, "CheckoutStatus"); Iterator checkoutStatusElemIter = checkoutStatusList.iterator(); while (checkoutStatusElemIter.hasNext()) { @@ -551,7 +549,7 @@ public class EbayOrderServices { orderCtx.put("checkoutStatusCtx", checkoutStatusCtx); // Retrieve external transaction - Map externalTransactionCtx = FastMap.newInstance(); + Map externalTransactionCtx = new HashMap(); List externalTransactionList = UtilXml.childElementList(ordersElement, "ExternalTransaction"); Iterator externalTransactionElemIter = externalTransactionList.iterator(); while (externalTransactionElemIter.hasNext()) { @@ -564,7 +562,7 @@ public class EbayOrderServices { orderCtx.put("externalTransactionCtx", externalTransactionCtx); // Retrieve Transactions Array --> Transactions | Order Items - List> orderItemList = FastList.newInstance(); + List> orderItemList = new LinkedList>(); String buyersEmailId = null; List transactionArrayList = UtilXml.childElementList(ordersElement, "TransactionArray"); Iterator transactionArrayElemIter = transactionArrayList.iterator(); @@ -575,7 +573,7 @@ public class EbayOrderServices { List transactionList = UtilXml.childElementList(transactionArrayElement, "Transaction"); Iterator transactionElemIter = transactionList.iterator(); while (transactionElemIter.hasNext()) { - Map transactionCtx = FastMap.newInstance(); + Map transactionCtx = new HashMap(); Element transactionElement = transactionElemIter.next(); // Retrieve Buyer email @@ -634,7 +632,7 @@ public class EbayOrderServices { } private static List> readGetSellerTransactionResponse(String responseMsg, Locale locale, String productStoreId, Delegator delegator, LocalDispatcher dispatcher, StringBuffer errorMessage, GenericValue userLogin) { - List> fetchedOrders = FastList.newInstance(); + List> fetchedOrders = new LinkedList>(); try { Document docResponse = UtilXml.readXmlDocument(responseMsg, true); //Debug.logInfo("The generated string is ======= " + UtilXml.writeXmlDocument(docResponse), module); @@ -663,7 +661,7 @@ public class EbayOrderServices { Iterator transactionElemIter = transaction.iterator(); while (transactionElemIter.hasNext()) { Element transactionElement = transactionElemIter.next(); - Map orderCtx = FastMap.newInstance(); + Map orderCtx = new HashMap(); orderCtx.put("amountPaid", UtilXml.childElementValue(transactionElement, "AmountPaid", "0")); String createdDate = UtilXml.childElementValue(transactionElement, "CreatedDate"); @@ -690,8 +688,8 @@ public class EbayOrderServices { } // retrieve buyer - Map shippingAddressCtx = FastMap.newInstance(); - Map buyerCtx = FastMap.newInstance(); + Map shippingAddressCtx = new HashMap(); + Map buyerCtx = new HashMap(); List buyer = UtilXml.childElementList(transactionElement, "Buyer"); Iterator buyerElemIter = buyer.iterator(); while (buyerElemIter.hasNext()) { @@ -728,7 +726,7 @@ public class EbayOrderServices { orderCtx.put("shippingAddressCtx", shippingAddressCtx); // retrieve shipping service selected - Map shippingServiceSelectedCtx = FastMap.newInstance(); + Map shippingServiceSelectedCtx = new HashMap(); List shippingServiceSelected = UtilXml.childElementList(transactionElement, "ShippingServiceSelected"); Iterator shippingServiceSelectedElemIter = shippingServiceSelected.iterator(); while (shippingServiceSelectedElemIter.hasNext()) { @@ -760,7 +758,7 @@ public class EbayOrderServices { orderCtx.put("shippingServiceSelectedCtx", shippingServiceSelectedCtx); // retrieve shipping details - Map shippingDetailsCtx = FastMap.newInstance(); + Map shippingDetailsCtx = new HashMap(); List shippingDetails = UtilXml.childElementList(transactionElement, "ShippingDetails"); Iterator shippingDetailsElemIter = shippingDetails.iterator(); while (shippingDetailsElemIter.hasNext()) { @@ -800,7 +798,7 @@ public class EbayOrderServices { orderCtx.put("shippingDetailsCtx", shippingDetailsCtx); // retrieve status - Map checkoutStatusCtx = FastMap.newInstance(); + Map checkoutStatusCtx = new HashMap(); List status = UtilXml.childElementList(transactionElement, "Status"); Iterator statusElemIter = status.iterator(); while (statusElemIter.hasNext()) { @@ -814,7 +812,7 @@ public class EbayOrderServices { orderCtx.put("checkoutStatusCtx", checkoutStatusCtx); // retrieve external transaction - Map externalTransactionCtx = FastMap.newInstance(); + Map externalTransactionCtx = new HashMap(); List externalTransaction = UtilXml.childElementList(transactionElement, "ExternalTransaction"); Iterator externalTransactionElemIter = externalTransaction.iterator(); while (externalTransactionElemIter.hasNext()) { @@ -828,12 +826,12 @@ public class EbayOrderServices { String quantityPurchased = UtilXml.childElementValue(transactionElement, "QuantityPurchased", ""); // retrieve item - List> orderItemList = FastList.newInstance(); + List> orderItemList = new LinkedList>(); String itemId = ""; List item = UtilXml.childElementList(transactionElement, "Item"); Iterator itemElemIter = item.iterator(); while (itemElemIter.hasNext()) { - Map orderItemCtx = FastMap.newInstance(); + Map orderItemCtx = new HashMap(); Element itemElement = itemElemIter.next(); itemId = UtilXml.childElementValue(itemElement, "ItemID", ""); orderItemCtx.put("paymentMethods", UtilXml.childElementValue(itemElement, "PaymentMethods", "")); @@ -917,7 +915,7 @@ public class EbayOrderServices { } private static List readGetMyeBaySellingResponse(String responseMsg, Locale locale, String productStoreId, Delegator delegator, LocalDispatcher dispatcher, StringBuffer errorMessage, GenericValue userLogin) { - List fetchDeletedOrdersAndTransactions = FastList.newInstance(); + List fetchDeletedOrdersAndTransactions = new LinkedList(); try { Document docResponse = UtilXml.readXmlDocument(responseMsg, true); //Debug.logInfo("The generated string is ======= " + UtilXml.writeXmlDocument(docResponse), module); diff --git a/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java b/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java index 661268860e..b87013042b 100755 --- a/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java +++ b/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java @@ -22,14 +22,13 @@ import java.math.BigDecimal; import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilMisc; @@ -61,7 +60,7 @@ public class ImportOrdersFromEbay { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); try { Map eBayConfigResult = EbayHelper.buildEbayConfig(context, delegator); StringBuffer sellerTransactionsItemsXml = new StringBuffer(); @@ -85,8 +84,8 @@ public class ImportOrdersFromEbay { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); - Map order = FastMap.newInstance(); - Map result = FastMap.newInstance(); + Map order = new HashMap(); + Map result = new HashMap(); try { order.put("productStoreId", context.get("productStoreId")); order.put("userLogin", context.get("userLogin")); @@ -130,7 +129,7 @@ public class ImportOrdersFromEbay { String orderId = (String) context.get("orderId"); String externalId = (String) context.get("externalId"); String transactionId = ""; - Map result = FastMap.newInstance(); + Map result = new HashMap(); try { if (orderId == null && externalId == null) { Debug.logError("orderId or externalId must be filled", module); @@ -205,7 +204,7 @@ public class ImportOrdersFromEbay { order.put("errorMessage", ""); } } - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put("responseMessage", ModelService.RESPOND_SUCCESS); result.put("orderList", orders); return result; @@ -353,7 +352,7 @@ public class ImportOrdersFromEbay { } if (ack != null && "Success".equals(ack)) { - orders = FastList.newInstance(); + orders = new LinkedList>(); if (totalOrders > 0) { // retrieve transaction array List transactions = UtilXml.childElementList(elemResponse, "TransactionArray"); @@ -365,7 +364,7 @@ public class ImportOrdersFromEbay { List transaction = UtilXml.childElementList(transactionsElement, "Transaction"); Iterator transactionElemIter = transaction.iterator(); while (transactionElemIter.hasNext()) { - Map order = FastMap.newInstance(); + Map order = new HashMap(); String itemId = ""; Element transactionElement = transactionElemIter.next(); diff --git a/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java b/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java index 390c284a2d..c53899664c 100755 --- a/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java +++ b/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java @@ -25,13 +25,12 @@ import java.io.InputStreamReader; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilCodec; @@ -60,8 +59,8 @@ public class ProductsExportToEbay { private static final String resource = "EbayUiLabels"; private static final String configFileName = "ebayExport.properties"; private static final String module = ProductsExportToEbay.class.getName(); - private static List productExportSuccessMessageList = FastList.newInstance(); - private static List productExportFailureMessageList = FastList.newInstance(); + private static List productExportSuccessMessageList = new LinkedList(); + private static List productExportFailureMessageList = new LinkedList(); public static Map exportToEbay(DispatchContext dctx, Map context) { @@ -69,7 +68,7 @@ public class ProductsExportToEbay { Delegator delegator = dctx.getDelegator(); productExportSuccessMessageList.clear(); productExportFailureMessageList.clear(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Map response = null; try { List selectResult = UtilGenerics.checkList(context.get("selectResult"), String.class); @@ -153,7 +152,7 @@ public class ProductsExportToEbay { outputStream.close(); int responseCode = connection.getResponseCode(); InputStream inputStream; - Map result = FastMap.newInstance(); + Map result = new HashMap(); String response = null; if (responseCode == HttpURLConnection.HTTP_CREATED || @@ -549,7 +548,7 @@ public class ProductsExportToEbay { private static Map readEbayCategoriesResponse(String msg, Locale locale) { Map results = null; - List> categories = FastList.newInstance(); + List> categories = new LinkedList>(); try { Document docResponse = UtilXml.readXmlDocument(msg, true); Element elemResponse = docResponse.getDocumentElement(); @@ -565,7 +564,7 @@ public class ProductsExportToEbay { for (Element categoryArrayElement : UtilXml.childElementList(elemResponse, "CategoryArray")) { // retrieve Category for (Element categoryElement : UtilXml.childElementList(categoryArrayElement, "Category")) { - Map categ = FastMap.newInstance(); + Map categ = new HashMap(); String categoryCode = ("true".equalsIgnoreCase((UtilXml.childElementValue(categoryElement, "LeafCategory", "").trim())) ? "Y" : "N") + "_" + UtilXml.childElementValue(categoryElement, "CategoryID", "").trim() + "_" + diff --git a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayAccount.java b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayAccount.java index e1d01f9283..75e801aa3e 100644 --- a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayAccount.java +++ b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayAccount.java @@ -18,11 +18,10 @@ */ package org.ofbiz.ebaystore; +import java.util.HashMap; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.entity.Delegator; import org.ofbiz.service.DispatchContext; import org.ofbiz.service.ServiceUtil; @@ -36,7 +35,7 @@ import com.ebay.soap.eBLBaseComponents.UserType; public class EbayAccount { public static Map getEbayUser(DispatchContext dctx, Map context) { - Mapresult = FastMap.newInstance(); + Mapresult = new HashMap(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); String productStoreId = (String) context.get("productStoreId"); @@ -56,7 +55,7 @@ public class EbayAccount { street1 = null, street2 = null, status = null; - MapregistrationAddress = FastMap.newInstance(); + MapregistrationAddress = new HashMap(); try { ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator); diff --git a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayBestOfferAutoPref.java b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayBestOfferAutoPref.java index dcceaa3c90..78460cad1b 100644 --- a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayBestOfferAutoPref.java +++ b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayBestOfferAutoPref.java @@ -18,11 +18,10 @@ */ package org.ofbiz.ebaystore; +import java.util.HashMap; import java.util.List; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; @@ -40,7 +39,7 @@ public class EbayBestOfferAutoPref { public static Map ebayBestOfferPrefCond(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Delegator delegator = dctx.getDelegator(); diff --git a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayEvents.java b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayEvents.java index 474bfa3f7c..79f455acfd 100644 --- a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayEvents.java +++ b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayEvents.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -31,9 +32,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilHttp; @@ -118,7 +116,7 @@ public class EbayEvents { String ratingShipHand = (String)requestParams.get("ratingShipHand"+i); String AqItemAsDescribedId = (String)requestParams.get("AqItemAsDescribedId"+i); - Map leavefeedback = FastMap.newInstance(); + Map leavefeedback = new HashMap(); leavefeedback.put("productStoreId", productStoreId); leavefeedback.put("userLogin", userLogin); leavefeedback.put("itemId", itemId); @@ -162,7 +160,7 @@ public class EbayEvents { try { productIds = UtilGenerics.checkList(requestParams.get("selectResult")); } catch (ClassCastException e) { - if (UtilValidate.isEmpty(productIds)) productIds = FastList.newInstance(); + if (UtilValidate.isEmpty(productIds)) productIds = new LinkedList(); productIds.add((String) requestParams.get("selectResult")); } } else { @@ -179,7 +177,7 @@ public class EbayEvents { if (UtilValidate.isNotEmpty(addItemObject.get("itemListings"))) { itemObjs = UtilGenerics.checkList(addItemObject.get("itemListings")); } else { - itemObjs = FastList.newInstance(); + itemObjs = new LinkedList>(); } if (UtilValidate.isNotEmpty(productIds)) { @@ -251,7 +249,7 @@ public class EbayEvents { } } if (UtilValidate.isEmpty(itemListing)) { - itemListing = FastMap.newInstance(); + itemListing = new HashMap(); itemListing.put("addItemCall", addItemCall); itemListing.put("productId", productId); } @@ -360,7 +358,7 @@ public class EbayEvents { session.setAttribute("itemListings_".concat(siteCode), addItemObject); } if (addItemObject == null) { - addItemObject = FastMap.newInstance(); + addItemObject = new HashMap(); session.setAttribute("itemListings_".concat(siteCode), addItemObject); } return addItemObject; @@ -368,7 +366,7 @@ public class EbayEvents { // make ebay category list public static List getChildCategories(HttpServletRequest request) throws ApiException, SdkException, Exception{ - List categories = FastList.newInstance(); + List categories = new LinkedList(); EbayStoreSiteFacade sf = null; String categoryId = null; @@ -426,8 +424,8 @@ public class EbayEvents { } public static List getStoreChildCategories(HttpServletRequest request) throws ApiException, SdkException, Exception { - List categories = FastList.newInstance(); - List csCateList = FastList.newInstance(); + List categories = new LinkedList(); + List csCateList = new LinkedList(); EbayStoreSiteFacade sf = null; String categoryId = null; @@ -645,8 +643,8 @@ public class EbayEvents { // initialize request parameter. Map paramMap = UtilHttp.getParameterMap(request); - List nameSpecificList = FastList.newInstance(); - List valueSpecificList = FastList.newInstance(); + List nameSpecificList = new LinkedList(); + List valueSpecificList = new LinkedList(); String nameValueListType = null; String valueListType = null; int rowCount = UtilHttp.getMultiFormRowCount(paramMap); @@ -676,7 +674,7 @@ public class EbayEvents { if (UtilValidate.isNotEmpty(addItemObject.get("itemListing"))) { listAddItem = UtilGenerics.checkList(addItemObject.get("itemListing")); } else { - listAddItem = FastList.newInstance(); + listAddItem = new LinkedList>(); } for (Map itemObj : listAddItem) { @@ -871,7 +869,7 @@ public class EbayEvents { int intAtp = atp.intValue(); if ((facilityId != "") && (intAtp != 0)) { int newAtp = intAtp - 1; - Map inMap = FastMap.newInstance(); + Map inMap = new HashMap(); inMap.put("productStoreId", productStoreId); inMap.put("facilityId", facilityId); inMap.put("productId", productId); @@ -891,7 +889,7 @@ public class EbayEvents { addItemCall.setItem(item); // create/update EbayProductListing entity - Map prodMap = FastMap.newInstance(); + Map prodMap = new HashMap(); prodMap.put("productStoreId", productStoreId); prodMap.put("productId", productId); prodMap.put("userLogin", userLogin); @@ -942,7 +940,7 @@ public class EbayEvents { // create/update EbayProductListingAttribute if (UtilValidate.isNotEmpty(productListingId)) { attributeMapList.put("productListingId", productListingId); - Map ebayProdAttrMap = FastMap.newInstance(); + Map ebayProdAttrMap = new HashMap(); ebayProdAttrMap.put("productListingId", productListingId); ebayProdAttrMap.put("userLogin", userLogin); ebayProdAttrMap.put("attributeMapList", attributeMapList); @@ -988,7 +986,7 @@ public class EbayEvents { if (UtilValidate.isNotEmpty(addItemObject.get("itemListing"))) { listAddItem = UtilGenerics.checkList(addItemObject.get("itemListing")); } else { - listAddItem = FastList.newInstance(); + listAddItem = new LinkedList>(); } double feesummary = 0.0; for (Map itemObj : listAddItem) { @@ -1043,7 +1041,7 @@ public class EbayEvents { if (UtilValidate.isNotEmpty(addItemObject.get("itemListing"))) { listAddItem = UtilGenerics.checkList(addItemObject.get("itemListing")); } else { - listAddItem = FastList.newInstance(); + listAddItem = new LinkedList>(); } int i = 0; for (Map itemObj : listAddItem) { @@ -1085,7 +1083,7 @@ public class EbayEvents { if (UtilValidate.isNotEmpty(addItemObject.get("itemListing"))) { listAddItem = UtilGenerics.checkList(addItemObject.get("itemListing")); } else { - listAddItem = FastList.newInstance(); + listAddItem = new LinkedList>(); } for (Map itemObj : listAddItem) { updateQuantityInventoryProduct(itemObj, productStoreId, locale, delegator, dispatcher, userLogin); @@ -1143,7 +1141,7 @@ public class EbayEvents { } public static Map>> categorySpecifics(String categoryId, HttpServletRequest request) { - Map>> recommendationMap = FastMap.newInstance(); + Map>> recommendationMap = new HashMap>>(); Delegator delegator = (Delegator) request.getAttribute("delegator"); Map requestParams = UtilHttp.getParameterMap(request); Locale locale = UtilHttp.getLocale(request); @@ -1164,10 +1162,10 @@ public class EbayEvents { for (int i = 0; i < recommend.length; i++) { NameRecommendationType[] nameRecommend = recommend[i].getNameRecommendation(); - Map> nameRecommendationMap = FastMap.newInstance(); + Map> nameRecommendationMap = new HashMap>(); for (int j = 0; j < nameRecommend.length; j++) { String name = nameRecommend[j].getName(); - List valueList = FastList.newInstance(); + List valueList = new LinkedList(); ValueRecommendationType[] valueRecommend = nameRecommend[j].getValueRecommendation(); for (int k = 0; k < valueRecommend.length; k++) { String value = valueRecommend[k].getValue(); diff --git a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayFeedback.java b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayFeedback.java index ee30a8ccad..70ce5e365d 100644 --- a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayFeedback.java +++ b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayFeedback.java @@ -48,15 +48,12 @@ import com.ebay.soap.eBLBaseComponents.SiteCodeType; import com.ebay.soap.eBLBaseComponents.TransactionArrayType; import com.ebay.soap.eBLBaseComponents.TransactionType; -import javolution.util.FastList; -import javolution.util.FastMap; - public class EbayFeedback { public static final String resource = "EbayUiLabels"; public static Map loadFeedback(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Delegator delegator = dctx.getDelegator(); @@ -65,7 +62,7 @@ public class EbayFeedback { ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator); try { - Map inMap = FastMap.newInstance(); + Map inMap = new HashMap(); inMap.put("productStoreId", productStoreId); inMap.put("userLogin", userLogin); Map resultUser = dispatcher.runSync("getEbayStoreUser", inMap); @@ -212,12 +209,12 @@ public class EbayFeedback { } public static Map getItemsAwaitingFeedback(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map 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> itemsResult = FastList.newInstance(); + List> itemsResult = new LinkedList>(); try { GetItemsAwaitingFeedbackCall awaitingFeedbackCall = new GetItemsAwaitingFeedbackCall(); awaitingFeedbackCall.setApiContext(apiContext); @@ -227,7 +224,7 @@ public class EbayFeedback { GetUserCall getUserCall = new GetUserCall(apiContext); String commentingUser = getUserCall.getUser().getUserID(); for (int i = 0;i < items.getTransactionLength(); i++) { - Map entry = FastMap.newInstance(); + Map entry = new HashMap(); TransactionType transection = items.getTransaction(i); entry.put("itemID", transection.getItem().getItemID()); entry.put("commentingUser", commentingUser); @@ -267,7 +264,7 @@ public class EbayFeedback { } public static Map leaveFeedback(DispatchContext dctx, Map context) { - Mapresult = FastMap.newInstance(); + Mapresult = new HashMap(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); String productStoreId = (String) context.get("productStoreId"); diff --git a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java index b5065eefa9..9b0e2a6063 100644 --- a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java +++ b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java @@ -32,7 +32,10 @@ import java.nio.ByteBuffer; import java.nio.channels.FileChannel; import java.util.Calendar; import java.util.Date; +import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -40,9 +43,6 @@ import java.util.Map; import javax.swing.table.AbstractTableModel; import javax.swing.table.TableModel; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilGenerics; @@ -184,7 +184,7 @@ public class EbayStore { outputStream.close(); int responseCode = connection.getResponseCode(); InputStream inputStream; - Map result = FastMap.newInstance(); + Map result = new HashMap(); String response = null; if (responseCode == HttpURLConnection.HTTP_CREATED || @@ -221,7 +221,7 @@ public class EbayStore { public static Map exportCategoriesSelectedToEbayStore(DispatchContext dctx, Map context) { Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); SetStoreCategoriesRequestType req = null; StoreCustomCategoryArrayType categoryArrayType = null; @@ -238,8 +238,8 @@ public class EbayStore { catalogCategories = EntityQuery.use(delegator).from("ProdCatalogCategory").where("prodCatalogId", context.get("prodCatalogId").toString(),"prodCatalogCategoryTypeId","PCCT_EBAY_ROOT").orderBy("sequenceNum ASC").queryList(); if (catalogCategories != null && catalogCategories.size() > 0) { - List listAdd = FastList.newInstance(); - List listEdit = FastList.newInstance(); + List listAdd = new LinkedList(); + List listEdit = new LinkedList(); //start at level 0 of categories for (GenericValue catalogCategory : catalogCategories) { GenericValue productCategory = catalogCategory.getRelatedOne("ProductCategory", false); @@ -272,8 +272,8 @@ public class EbayStore { } //start at level 1 of categories - listAdd = FastList.newInstance(); - listEdit = FastList.newInstance(); + listAdd = new LinkedList(); + listEdit = new LinkedList(); for (GenericValue catalogCategory : catalogCategories) { GenericValue productCategory = catalogCategory.getRelatedOne("ProductCategory", false); if (productCategory != null) { @@ -313,8 +313,8 @@ public class EbayStore { } } //start at level 2 of categories - listAdd = FastList.newInstance(); - listEdit = FastList.newInstance(); + listAdd = new LinkedList(); + listEdit = new LinkedList(); for (GenericValue catalogCategory : catalogCategories) { GenericValue productCategory = catalogCategory.getRelatedOne("ProductCategory", false); if (productCategory != null) { @@ -385,7 +385,7 @@ public class EbayStore { } public static Map excuteExportCategoryToEbayStore(SetStoreCategoriesCall call, SetStoreCategoriesRequestType req, StoreCategoryUpdateActionCodeType actionCode,Delegator delegator, String partyId,List catalogCategories, Locale locale) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); SetStoreCategoriesResponseType resp = null; try { if (req != null && actionCode != null) { @@ -544,7 +544,7 @@ public class EbayStore { public static Map readEbayGetStoreCategoriesResponse(String msg, Locale locale) { Map results = null; - List> categories = FastList.newInstance(); + List> categories = new LinkedList>(); try { Document docResponse = UtilXml.readXmlDocument(msg, true); Element elemResponse = docResponse.getDocumentElement(); @@ -575,7 +575,7 @@ public class EbayStore { List customCategory = UtilGenerics.checkList(UtilXml.childElementList(customCategoriesElemIterElement, "CustomCategory")); Iterator customCategoryElemIter = customCategory.iterator(); while (customCategoryElemIter.hasNext()) { - Map categ = FastMap.newInstance(); + Map categ = new HashMap(); Element categoryElement = customCategoryElemIter.next(); categ.put("CategoryID", UtilXml.childElementValue(categoryElement, "CategoryID")); categ.put("CategoryName", UtilXml.childElementValue(categoryElement, "Name")); @@ -594,7 +594,7 @@ public class EbayStore { } public static Map getEbayStoreUser(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); String productStoreId = (String) context.get("productStoreId"); try { @@ -619,7 +619,7 @@ public class EbayStore { Locale locale = (Locale) context.get("locale"); GenericValue userLogin = (GenericValue) context.get("userLogin"); Delegator delegator = dctx.getDelegator(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); StoreType returnedStoreType = null; GetStoreRequestType req = new GetStoreRequestType(); GetStoreResponseType resp = null; @@ -654,7 +654,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 ebayResp = FastMap.newInstance(); + Map ebayResp = new HashMap(); ebayResp.put("storeName", returnedStoreType.getName()); ebayResp.put("storeUrl", returnedStoreType.getURL()); ebayResp.put("storeUrlPath", returnedStoreType.getURLPath()); @@ -707,10 +707,10 @@ public class EbayStore { ebayResp.put("storeHeaderStyle", storeHeaderStyleCodeType.value()); StoreHeaderStyleCodeType[] storeHeaderStyleCodeList = StoreHeaderStyleCodeType.values(); if (storeHeaderStyleCodeList != null) { - List> storeHeaderStyleList = FastList.newInstance(); + List> storeHeaderStyleList = new LinkedList>(); int i=0; while (i storeHeaderStyleMap = FastMap.newInstance(); + Map storeHeaderStyleMap = new HashMap(); StoreHeaderStyleCodeType storeHeaderStyleCode = storeHeaderStyleCodeList[i]; storeHeaderStyleMap.put("storeHeaderStyleName", storeHeaderStyleCode.name()); storeHeaderStyleMap.put("storeHeaderStyleValue", storeHeaderStyleCode.value()); @@ -726,10 +726,10 @@ public class EbayStore { ebayResp.put("storeItemLayoutSelected", storeItemListLayoutCodeType.value()); StoreItemListLayoutCodeType[] storeItemListLayoutCodeTypeList = StoreItemListLayoutCodeType.values(); if (storeItemListLayoutCodeTypeList != null) { - List> storeItemListLayoutCodeList = FastList.newInstance(); + List> storeItemListLayoutCodeList = new LinkedList>(); int i = 0; while (i < storeItemListLayoutCodeTypeList.length) { - Map storeItemListLayoutCodeMap = FastMap.newInstance(); + Map storeItemListLayoutCodeMap = new HashMap(); StoreItemListLayoutCodeType storeItemListLayoutCode = storeItemListLayoutCodeTypeList[i]; storeItemListLayoutCodeMap.put("storeItemLayoutName", storeItemListLayoutCode.name()); storeItemListLayoutCodeMap.put("storeItemLayoutValue", storeItemListLayoutCode.value()); @@ -742,10 +742,10 @@ public class EbayStore { ebayResp.put("storeItemSortOrderSelected", storeItemListSortOrderCodeType.value()); StoreItemListSortOrderCodeType[] storeItemListSortOrderCodeTypeList = StoreItemListSortOrderCodeType.values(); if (storeItemListSortOrderCodeTypeList != null) { - List> storeItemSortOrderCodeList = FastList.newInstance(); + List> storeItemSortOrderCodeList = new LinkedList>(); int i = 0; while (i < storeItemListSortOrderCodeTypeList.length) { - Map storeItemSortOrderCodeMap = FastMap.newInstance(); + Map storeItemSortOrderCodeMap = new HashMap(); StoreItemListSortOrderCodeType storeItemListLayoutCode = storeItemListSortOrderCodeTypeList[i]; storeItemSortOrderCodeMap.put("storeItemSortLayoutName", storeItemListLayoutCode.name()); storeItemSortOrderCodeMap.put("storeItemSortLayoutValue", storeItemListLayoutCode.value()); @@ -760,10 +760,10 @@ public class EbayStore { ebayResp.put("storeCustomHeaderLayout", storeCustomHeaderLayoutCodeType.value()); StoreCustomHeaderLayoutCodeType[] storeCustomHeaderLayoutCodeTypeList = StoreCustomHeaderLayoutCodeType.values(); if (storeCustomHeaderLayoutCodeTypeList != null) { - List> storeCustomHeaderLayoutList = FastList.newInstance(); + List> storeCustomHeaderLayoutList = new LinkedList>(); int i = 0; while (i < storeCustomHeaderLayoutCodeTypeList.length) { - Map storeCustomHeaderLayoutMap = FastMap.newInstance(); + Map storeCustomHeaderLayoutMap = new HashMap(); StoreCustomHeaderLayoutCodeType StoreCustomHeaderLayoutCode = storeCustomHeaderLayoutCodeTypeList[i]; storeCustomHeaderLayoutMap.put("storeCustomHeaderLayoutName", StoreCustomHeaderLayoutCode.name()); storeCustomHeaderLayoutMap.put("storeCustomHeaderLayoutValue", StoreCustomHeaderLayoutCode.value()); @@ -785,10 +785,10 @@ public class EbayStore { ebayResp.put("storeCustomListingHeaderDisplayValue", storeCustomListingHeaderDisplayCodeType.value()); StoreCustomListingHeaderDisplayCodeType[] storeCustomListingHeaderDisplayCodeTypeList = StoreCustomListingHeaderDisplayCodeType.values(); if (storeCustomListingHeaderDisplayCodeTypeList != null) { - List> storeCustomListingHeaderDisplayCodeList = FastList.newInstance(); + List> storeCustomListingHeaderDisplayCodeList = new LinkedList>(); int i = 0; while (i < storeCustomListingHeaderDisplayCodeTypeList.length) { - Map storeCustomListingHeaderDisplayCodeMap = FastMap.newInstance(); + Map storeCustomListingHeaderDisplayCodeMap = new HashMap(); StoreCustomListingHeaderDisplayCodeType storeCustomListingHeaderDisplayCode = storeCustomListingHeaderDisplayCodeTypeList[i]; storeCustomListingHeaderDisplayCodeMap.put("storeCustomHeaderLayoutName", storeCustomListingHeaderDisplayCode.name()); storeCustomListingHeaderDisplayCodeMap.put("storeCustomHeaderLayoutValue", storeCustomListingHeaderDisplayCode.value()); @@ -804,10 +804,10 @@ public class EbayStore { ebayResp.put("storeMerchDisplay",merchDisplayCodeType.value()); MerchDisplayCodeType[] merchDisplayCodeTypeList = MerchDisplayCodeType.values(); if (merchDisplayCodeTypeList != null) { - List> merchDisplayCodeList = FastList.newInstance(); + List> merchDisplayCodeList = new LinkedList>(); int i = 0; while (i < merchDisplayCodeTypeList.length) { - Map merchDisplayCodeMap = FastMap.newInstance(); + Map merchDisplayCodeMap = new HashMap(); MerchDisplayCodeType merchDisplayCode = merchDisplayCodeTypeList[i]; merchDisplayCodeMap.put("merchDisplayCodeName", merchDisplayCode.name()); merchDisplayCodeMap.put("merchDisplayCodeValue", merchDisplayCode.value()); @@ -823,10 +823,10 @@ public class EbayStore { returnedStoreType.getSubscriptionLevel(); StoreSubscriptionLevelCodeType[] storeSubscriptionlevelList = StoreSubscriptionLevelCodeType.values(); if (storeSubscriptionlevelList != null) { - List> storeSubscriptionLevelCodeList = FastList.newInstance(); + List> storeSubscriptionLevelCodeList = new LinkedList>(); int i = 0; while (i < storeSubscriptionlevelList.length) { - Map storeSubscriptionLevelCodeMap = FastMap.newInstance(); + Map storeSubscriptionLevelCodeMap = new HashMap(); StoreSubscriptionLevelCodeType storeSubscriptionLevelCode= storeSubscriptionlevelList[i]; storeSubscriptionLevelCodeMap.put("storeSubscriptionLevelCodeName", storeSubscriptionLevelCode.name()); storeSubscriptionLevelCodeMap.put("storeSubscriptionLevelCodeValue", storeSubscriptionLevelCode.value()); @@ -859,7 +859,7 @@ public class EbayStore { public static void updateProductStore(DispatchContext dctx, Map context, StoreType returnStoreType, String productStoreId) { LocalDispatcher dispatcher = dctx.getDispatcher(); try { - Map inMap = FastMap.newInstance(); + Map inMap = new HashMap(); if (returnStoreType != null) { inMap.put("productStoreId", productStoreId); inMap.put("storeName", returnStoreType.getName()); @@ -877,7 +877,7 @@ public class EbayStore { GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); GetStoreOptionsRequestType req = null; GetStoreOptionsResponseType resp = null; StoreThemeArrayType returnedBasicThemeArray = null; @@ -907,7 +907,7 @@ public class EbayStore { if (colorSchemeType != null) { if (colorSchemeId.equals(colorSchemeType.getColorSchemeID().toString())) { // get font,size and color - storeColorSchemeMap = FastMap.newInstance(); + storeColorSchemeMap = new HashMap(); StoreFontType storeFontType = colorSchemeType.getFont(); storeColorSchemeMap.put("storeFontTypeFontFaceValue", storeFontType.getNameFace().value()); storeColorSchemeMap.put("storeFontTypeSizeFaceValue", storeFontType.getNameSize().value()); @@ -940,7 +940,7 @@ public class EbayStore { public static Map retrievePredesignedLogoOption(DispatchContext dctx, Map context) { GenericValue userLogin = (GenericValue) context.get("userLogin"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); GetStoreOptionsRequestType req = null; @@ -957,9 +957,9 @@ public class EbayStore { returnedLogoArray = resp.getLogoArray(); int i = 0; - List> logoList = FastList.newInstance(); + List> logoList = new LinkedList>(); while (i < returnedLogoArray.getLogoLength()) { - Map logo = FastMap.newInstance(); + Map logo = new HashMap(); StoreLogoType storeLogoType = returnedLogoArray.getLogo(i); logo.put("storeLogoId", storeLogoType.getLogoID()); logo.put("storeLogoName", storeLogoType.getName()); @@ -984,7 +984,7 @@ public class EbayStore { } public static Map retrieveBasicThemeArray(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); @@ -1002,9 +1002,9 @@ public class EbayStore { if (resp != null && "SUCCESS".equals(resp.getAck().toString())) { returnedBasicThemeArray = resp.getBasicThemeArray(); int i = 0; - List> themeList = FastList.newInstance(); + List> themeList = new LinkedList>(); while (i < returnedBasicThemeArray.getThemeLength()) { - Map basictheme = FastMap.newInstance(); + Map basictheme = new HashMap(); StoreThemeType storeBasicThemeType = returnedBasicThemeArray.getTheme(i); basictheme.put("storeThemeId", storeBasicThemeType.getThemeID()); basictheme.put("storeThemeName", storeBasicThemeType.getName()); @@ -1036,7 +1036,7 @@ public class EbayStore { } public static Map retrieveAdvancedThemeArray(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); @@ -1056,9 +1056,9 @@ public class EbayStore { returnedAdvancedThemeArray = resp.getAdvancedThemeArray(); int i = 0; - List> themeList = FastList.newInstance(); + List> themeList = new LinkedList>(); while (i < returnedAdvancedThemeArray.getThemeLength()) { - Map advanceTheme = FastMap.newInstance(); + Map advanceTheme = new HashMap(); StoreThemeType storeThemeType = returnedAdvancedThemeArray.getTheme(i); advanceTheme.put("storeThemeId",storeThemeType.getThemeID()); advanceTheme.put("storeThemeName",storeThemeType.getName()); @@ -1068,9 +1068,9 @@ public class EbayStore { result.put("storeThemeList", themeList); int j = 0; StoreColorSchemeType[] storeColorSchemeTypes = returnedAdvancedThemeArray.getGenericColorSchemeArray().getColorScheme(); - List> themeColorList = FastList.newInstance(); + List> themeColorList = new LinkedList>(); while (j < storeColorSchemeTypes.length) { - Map advanceColorTheme = FastMap.newInstance(); + Map advanceColorTheme = new HashMap(); StoreColorSchemeType storeColorSchemeType = storeColorSchemeTypes[j]; advanceColorTheme.put("storeColorSchemeId", storeColorSchemeType.getColorSchemeID()); advanceColorTheme.put("storeColorName", storeColorSchemeType.getName()); @@ -1094,7 +1094,7 @@ public class EbayStore { } public static Map retrieveStoreFontTheme(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); @@ -1108,7 +1108,7 @@ public class EbayStore { resp = (GetStoreOptionsResponseType) call.execute(req); - Map advanceFontTheme = FastMap.newInstance(); + Map advanceFontTheme = new HashMap(); if (resp != null && "SUCCESS".equals(resp.getAck().toString())) { returnedThemeArray = resp.getAdvancedThemeArray(); int i = 0; @@ -1121,9 +1121,9 @@ public class EbayStore { int j = 0; storeFontType.getNameFace(); StoreFontFaceCodeType[] storeFontNameFaceCodeTypes = StoreFontFaceCodeType.values(); - List> nameFaces = FastList.newInstance(); + List> nameFaces = new LinkedList>(); while (j < storeFontNameFaceCodeTypes.length) { - Map storeFontNameFaceCodeTypeMap = FastMap.newInstance(); + Map storeFontNameFaceCodeTypeMap = new HashMap(); StoreFontFaceCodeType storeFontNameFaceCodeType = storeFontNameFaceCodeTypes[j]; storeFontNameFaceCodeTypeMap.put("storeFontValue", storeFontNameFaceCodeType.value()); storeFontNameFaceCodeTypeMap.put("storeFontName", storeFontNameFaceCodeType.name()); @@ -1134,9 +1134,9 @@ public class EbayStore { j = 0; storeFontType.getNameSize(); StoreFontSizeCodeType[] storeFontSizeCodeTypes = StoreFontSizeCodeType.values(); - List> sizeFaces = FastList.newInstance(); + List> sizeFaces = new LinkedList>(); while (j < storeFontSizeCodeTypes.length) { - Map storeFontSizeCodeTypeMap = FastMap.newInstance(); + Map storeFontSizeCodeTypeMap = new HashMap(); StoreFontSizeCodeType storeFontSizeCodeType = storeFontSizeCodeTypes[j]; storeFontSizeCodeTypeMap.put("storeFontSizeValue", storeFontSizeCodeType.value()); storeFontSizeCodeTypeMap.put("storeFontSizeName", storeFontSizeCodeType.name()); @@ -1149,9 +1149,9 @@ public class EbayStore { j = 0; storeFontType.getTitleFace(); StoreFontFaceCodeType[] storeFontTypeTitleFaces = StoreFontFaceCodeType.values(); - List> titleFaces = FastList.newInstance(); + List> titleFaces = new LinkedList>(); while (j < storeFontTypeTitleFaces.length) { - Map storeFontTypeTitleFaceMap = FastMap.newInstance(); + Map storeFontTypeTitleFaceMap = new HashMap(); StoreFontFaceCodeType storeFontTypeTitleFace = storeFontTypeTitleFaces[j]; storeFontTypeTitleFaceMap.put("storeFontValue", storeFontTypeTitleFace.value()); storeFontTypeTitleFaceMap.put("storeFontName", storeFontTypeTitleFace.name()); @@ -1163,9 +1163,9 @@ public class EbayStore { j = 0; storeFontType.getTitleSize(); StoreFontSizeCodeType[] storeTitleSizeCodeTypes = StoreFontSizeCodeType.values(); - List> titleSizes = FastList.newInstance(); + List> titleSizes = new LinkedList>(); while (j < storeTitleSizeCodeTypes.length) { - Map storeFontSizeCodeTypeMap = FastMap.newInstance(); + Map storeFontSizeCodeTypeMap = new HashMap(); StoreFontSizeCodeType storeFontSizeCodeType = storeTitleSizeCodeTypes[j]; storeFontSizeCodeTypeMap.put("storeFontSizeValue", storeFontSizeCodeType.value()); storeFontSizeCodeTypeMap.put("storeFontSizeName", storeFontSizeCodeType.name()); @@ -1179,9 +1179,9 @@ public class EbayStore { j = 0; storeFontType.getDescFace(); StoreFontFaceCodeType[] storeFontTypeDescFaces = StoreFontFaceCodeType.values(); - List> descFaces = FastList.newInstance(); + List> descFaces = new LinkedList>(); while (j < storeFontTypeDescFaces.length) { - Map storeFontTypeDescFaceMap = FastMap.newInstance(); + Map storeFontTypeDescFaceMap = new HashMap(); StoreFontFaceCodeType storeFontTypeDescFace = storeFontTypeDescFaces[j]; storeFontTypeDescFaceMap.put("storeFontValue", storeFontTypeDescFace.value()); storeFontTypeDescFaceMap.put("storeFontName", storeFontTypeDescFace.name()); @@ -1193,9 +1193,9 @@ public class EbayStore { j = 0; storeFontType.getDescSize(); StoreFontSizeCodeType[] storeDescSizeCodeTypes = StoreFontSizeCodeType.values(); - List> descSizes = FastList.newInstance(); + List> descSizes = new LinkedList>(); while (j < storeDescSizeCodeTypes.length) { - Map storeFontSizeCodeTypeMap = FastMap.newInstance(); + Map storeFontSizeCodeTypeMap = new HashMap(); StoreFontSizeCodeType storeFontSizeCodeType = storeDescSizeCodeTypes[j]; storeFontSizeCodeTypeMap.put("storeFontSizeValue", storeFontSizeCodeType.value()); storeFontSizeCodeTypeMap.put("storeFontSizeName", storeFontSizeCodeType.name()); @@ -1222,7 +1222,7 @@ public class EbayStore { } public static Map setEbayStoreInput(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); SetStoreRequestType req = null; @@ -1338,11 +1338,11 @@ public class EbayStore { } public static Map getEbayActiveItems(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); String productStoreId = (String) context.get("productStoreId"); - List> activeItems = FastList.newInstance(); + List> activeItems = new LinkedList>(); try { ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator); GetMyeBaySellingCall getMyeBaySellingCall = new GetMyeBaySellingCall(apiContext); @@ -1357,7 +1357,7 @@ public class EbayStore { ItemArrayType itemArrayType = itemListCustomizationType.getItemArray(); int itemArrayTypeSize = itemArrayType.getItemLength(); for (int i = 0; i < itemArrayTypeSize; i++) { - Map entry = FastMap.newInstance(); + Map entry = new HashMap(); ItemType item = itemArrayType.getItem(i); entry.put("itemId", item.getItemID()); entry.put("title", item.getTitle()); @@ -1404,14 +1404,14 @@ public class EbayStore { } public static Map getEbaySoldItems(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map 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> soldItems = FastList.newInstance(); + List> soldItems = new LinkedList>(); double reservPrice = 0; try { ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator); @@ -1443,7 +1443,7 @@ public class EbayStore { SellingManagerSoldTransactionType[] sellingManagerSoldTransactions = sellingManagerSoldOrder.getSellingManagerSoldTransaction(); int sellingManagerSoldTransactionLength = sellingManagerSoldTransactions.length; for (int j = 0; j < sellingManagerSoldTransactionLength; j++) { - Map entry = FastMap.newInstance(); + Map entry = new HashMap(); SellingManagerSoldTransactionType sellingManagerSoldTransaction = sellingManagerSoldTransactions[j]; entry.put("itemId", sellingManagerSoldTransaction.getItemID()); entry.put("title", sellingManagerSoldTransaction.getItemTitle()); @@ -1539,7 +1539,7 @@ public class EbayStore { } public static Map exportProductsFromEbayStore(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Map eBayConfigResult = EbayHelper.buildEbayConfig(context, delegator); @@ -1633,7 +1633,7 @@ public class EbayStore { if (UtilValidate.isNotEmpty(ProductsExportToEbay.getProductExportSuccessMessageList())) { if ((facilityId != "") && (intAtp != 0)) { int newAtp = intAtp - 1; - Map inMap = FastMap.newInstance(); + Map inMap = new HashMap(); inMap.put("productStoreId", context.get("productStoreId").toString()); inMap.put("facilityId", facilityId); inMap.put("productId", context.get("productId")); @@ -1700,7 +1700,7 @@ public class EbayStore { } public static Map addEbayDispute(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); String productStoreId = (String) context.get("productStoreId"); @@ -1731,7 +1731,7 @@ public class EbayStore { } public static Map verifyEbayAddSecondChanceItem(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); boolean checkVerify = false; GenericValue userLogin = (GenericValue) context.get("userLogin"); Delegator delegator = dctx.getDelegator(); @@ -1750,7 +1750,7 @@ public class EbayStore { verify.setDetailLevel(detailLevels); verify.setDuration(SecondChanceOfferDurationCodeType.DAYS_1); - Map serviceMap = FastMap.newInstance(); + Map serviceMap = new HashMap(); serviceMap.put("itemId", itemID); serviceMap.put("productStoreId", productStoreId); serviceMap.put("locale", locale); @@ -1771,8 +1771,8 @@ public class EbayStore { } public static Map getEbayAllBidders(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); - List> allBidders = FastList.newInstance(); + Map result = new HashMap(); + List> allBidders = new LinkedList>(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); String productStoreId = (String) context.get("productStoreId"); @@ -1791,7 +1791,7 @@ public class EbayStore { OfferType[] bidders = api.getAllBidders(); for (int count = 0; count < bidders.length; count++) { - Map entry = FastMap.newInstance(); + Map entry = new HashMap(); OfferType offer = bidders[count]; entry.put("userId", offer.getUser().getUserID()); entry.put("bidder", offer.getUser()); @@ -1837,7 +1837,7 @@ public class EbayStore { @SuppressWarnings("serial") public Map getMyeBaySelling(DispatchContext dctx, Map context) { - Mapresult = FastMap.newInstance(); + Mapresult = new HashMap(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); String productStoreId = (String) context.get("productStoreId"); @@ -1916,7 +1916,7 @@ public class EbayStore { OrderTransactionType[] tempSoldItems = null; if (UtilValidate.isNotEmpty(api.getReturnedSoldList())) tempSoldItems = (api.getReturnedSoldList().getOrderTransactionArray()).getOrderTransaction(); // add to list - List> soldList = FastList.newInstance(); + List> soldList = new LinkedList>(); if (UtilValidate.isNotEmpty(tempSoldItems)) { soldList = EbayStore.getOrderTransactions(tempSoldItems); } @@ -1956,14 +1956,14 @@ public class EbayStore { } // set output data list (MyeBaySelling) public List> getDataModelToList(TableModel dataModel) { - List> list = FastList.newInstance(); + List> list = new LinkedList>(); for (int rowIndex = 0; rowIndex < dataModel.getRowCount(); rowIndex++) { list.add(UtilGenerics.checkMap(dataModel.getValueAt(rowIndex, 0))); } return list; } static Map itemToColumns(ItemType item) { - Map cols = FastMap.newInstance(); + Map cols = new HashMap(); cols.put("itemId", item.getItemID() != null ? item.getItemID() : ""); cols.put("title", item.getTitle() != null ? item.getTitle() : ""); @@ -1997,7 +1997,7 @@ public class EbayStore { } static Map schItemToColumns(ItemType item) { - Map cols = FastMap.newInstance(); + Map cols = new HashMap(); double reservPrice = 0; cols.put("itemId", item.getItemID() != null ? item.getItemID() : ""); cols.put("title", item.getTitle() != null ? item.getTitle() : ""); @@ -2022,7 +2022,7 @@ public class EbayStore { } static Map unsoldItemToColumns(ItemType item) { - Map cols = FastMap.newInstance(); + Map cols = new HashMap(); double reservPrice = 0; cols.put("itemId", item.getItemID() != null ? item.getItemID() : ""); cols.put("title", item.getTitle() != null ? item.getTitle() : ""); @@ -2051,7 +2051,7 @@ public class EbayStore { } public static List> getOrderTransactions(OrderTransactionType[] orderTrans) { - List> colsList = FastList.newInstance(); + List> colsList = new LinkedList>(); OrderTransactionType orderTran = null; OrderType order = null; TransactionType transaction= null; @@ -2075,7 +2075,7 @@ public class EbayStore { } public static Map getTransaction(TransactionType transaction){ - Map cols = FastMap.newInstance(); + Map cols = new HashMap(); ItemType item = transaction.getItem(); String itemId = null; String title = null; @@ -2173,7 +2173,7 @@ public class EbayStore { } public Map getEbayStoreProductItem(DispatchContext dctx, Map context) { - Mapresult = FastMap.newInstance(); + Mapresult = new HashMap(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); String productStoreId = (String) context.get("productStoreId"); @@ -2286,11 +2286,11 @@ public class EbayStore { return ServiceUtil.returnSuccess(UtilProperties.getMessage(resource, "EbayStoreUpdateItemSuccessfully", locale)); } public Map geteBayClosedItem(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); String productStoreId = (String) context.get("productStoreId"); - List > closedItems = FastList.newInstance(); + List > closedItems = new LinkedList>(); try { ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator); ItemListCustomizationType itemListType = new ItemListCustomizationType(); @@ -2353,7 +2353,7 @@ public class EbayStore { } public static Map getClosedItem(ItemType tempItems) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); if(UtilValidate.isNotEmpty(tempItems)) { double hitCount = 0; int quantity = 0; @@ -2408,7 +2408,7 @@ public class EbayStore { if(UtilValidate.isEmpty(shippingAddress)) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "EbayStoreRequiredShippingAddressParameter", locale)); } - Map result = FastMap.newInstance(); + Map result = new HashMap(); String buyerName = null; String street = null; String street1 = null; @@ -2474,7 +2474,7 @@ public class EbayStore { return checkResult; } public static Map getTransactionHelper(TransactionType transaction, Locale locale) { - Map orderMap = FastMap.newInstance(); + Map orderMap = new HashMap(); if(UtilValidate.isNotEmpty(transaction)) { String orderId = null; String externalId = null; @@ -2501,8 +2501,8 @@ public class EbayStore { String paidTime = null; double salesTaxAmount = 0.0; float salesTaxPercent = 0; - Map itemSold = FastMap.newInstance(); - Map address = FastMap.newInstance(); + Map itemSold = new HashMap(); + Map address = new HashMap(); if(UtilValidate.isNotEmpty(transaction.getItem())) { ItemType item = transaction.getItem(); @@ -2627,11 +2627,11 @@ public class EbayStore { return orderMap; } public Map getEbayStoreTransaction(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); - List> transactionList = FastList.newInstance(); - List orderIdList = FastList.newInstance(); + List> transactionList = new LinkedList>(); + List orderIdList = new LinkedList(); String productStoreId = (String) context.get("productStoreId"); try { Calendar fromDate = Calendar.getInstance(); @@ -2687,10 +2687,10 @@ public class EbayStore { } public Map getEbayStoreOrder(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); - List> orderList = FastList.newInstance(); + List> orderList = new LinkedList>(); String productStoreId = (String) context.get("productStoreId"); ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator); try { @@ -2739,7 +2739,7 @@ public class EbayStore { } private static Map getOrderHelper(OrderType order, Locale locale) { - FastMap orderCtx = FastMap.newInstance(); + LinkedHashMap orderCtx = new LinkedHashMap(); String externalOrderId = "EBS_"+order.getOrderID(); double amountPaid = 0.0; String emailBuyer = null; @@ -2764,11 +2764,11 @@ public class EbayStore { String externalTransactionTime = null; double feeOrCreditAmount = 0.0; double paymentOrRefundAmount = 0.0; - Map shippingServiceSelectedCtx = FastMap.newInstance(); - Map shippingDetailsCtx = FastMap.newInstance(); - Map shippingAddressMap = FastMap.newInstance(); - Map checkoutStatusCtx = FastMap.newInstance(); - Map externalTransactionCtx = FastMap.newInstance(); + Map shippingServiceSelectedCtx = new HashMap(); + Map shippingDetailsCtx = new HashMap(); + Map shippingAddressMap = new HashMap(); + Map checkoutStatusCtx = new HashMap(); + Map externalTransactionCtx = new HashMap(); if (UtilValidate.isNotEmpty(order.getTotal())) { amountPaid = order.getTotal().getValue(); } @@ -2878,11 +2878,11 @@ public class EbayStore { externalTransactionCtx.put("feeOrCreditAmount", feeOrCreditAmount); externalTransactionCtx.put("paymentOrRefundAmount", paymentOrRefundAmount); - List> orderItemList = FastList.newInstance(); + List> orderItemList = new LinkedList>(); if (UtilValidate.isNotEmpty(order.getTransactionArray().getTransaction())) { TransactionType[] transactions = order.getTransactionArray().getTransaction(); for (int tranCount = 0; tranCount < transactions.length; tranCount++) { - Map orderItemCtx = FastMap.newInstance(); + Map orderItemCtx = new HashMap(); TransactionType transaction = transactions[tranCount]; int quantityPurchased = 0; double transactionPrice = 0.0; diff --git a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java index a9ec1f6c09..babe392a17 100644 --- a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java +++ b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java @@ -18,14 +18,13 @@ */ package org.ofbiz.ebaystore; +import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilValidate; @@ -86,7 +85,7 @@ public class EbayStoreAutoPrefEvents{ } } - Map bestOfferCondition = FastMap.newInstance(); + Map bestOfferCondition = new HashMap(); bestOfferCondition.put("productStoreId", productStoreId); bestOfferCondition.put("userLogin", userLogin); bestOfferCondition.put("enabled", enabled); diff --git a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java index 94a301a600..8afeddb0d1 100644 --- a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java +++ b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java @@ -25,7 +25,9 @@ import java.util.Calendar; import java.util.Collections; import java.util.Date; import java.util.Enumeration; +import java.util.HashMap; import java.util.Hashtable; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -36,9 +38,6 @@ import java.util.TreeMap; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilGenerics; @@ -139,7 +138,7 @@ public class EbayStoreAutoPreferences { String isAutoPositiveFeedback = "N"; String feedbackEventCode = null; GenericValue ebayProductStorePref = null; - List list = FastList.newInstance(); + List list = new LinkedList(); try { ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator); @@ -162,7 +161,7 @@ public class EbayStoreAutoPreferences { // start getting sold item list from ebay follow your site GetSellingManagerSoldListingsCall sellingManagerSoldListings = new GetSellingManagerSoldListingsCall(apiContext); - List items = FastList.newInstance(); + List items = new LinkedList(); SellingManagerSoldOrderType[] sellingManagerSoldOrders = sellingManagerSoldListings.getSellingManagerSoldListings(); if (UtilValidate.isNotEmpty(sellingManagerSoldOrders)) { for (SellingManagerSoldOrderType solditem : sellingManagerSoldOrders) { @@ -325,7 +324,7 @@ public class EbayStoreAutoPreferences { // start getting sold item list from ebay follow your site GetSellingManagerSoldListingsCall sellingManagerSoldListings = new GetSellingManagerSoldListingsCall(apiContext); - List items = FastList.newInstance(); + List items = new LinkedList(); SellingManagerSoldOrderType[] sellingManagerSoldOrders = sellingManagerSoldListings.getSellingManagerSoldListings(); if (UtilValidate.isNotEmpty(sellingManagerSoldOrders)) { for (SellingManagerSoldOrderType solditem : sellingManagerSoldOrders) { @@ -353,7 +352,7 @@ public class EbayStoreAutoPreferences { // call service send email (get template follow productStoreId) for (SellingManagerSoldOrderType item : items) { // call send - Map sendMap = FastMap.newInstance(); + Map 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); @@ -366,7 +365,7 @@ public class EbayStoreAutoPreferences { sendMap.put("sendBcc", productStoreEmail.get("bccAddress")); sendMap.put("sendTo", item.getBuyerEmail()); - Map bodyParameters = FastMap.newInstance(); + Map bodyParameters = new HashMap(); bodyParameters.put("buyerUserId", item.getBuyerID()); sendMap.put("bodyParameters", bodyParameters); @@ -394,7 +393,7 @@ public class EbayStoreAutoPreferences { String jobId = (String) context.get("jobId"); try { GenericValue userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", "system").queryOne(); - Map serviceMap = FastMap.newInstance(); + Map serviceMap = new HashMap(); serviceMap.put("userLogin", userLogin); //ProductStore List productStores = EntityQuery.use(delegator).from("EbayProductStorePref").where("autoPrefJobId", jobId).queryList(); @@ -422,7 +421,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 inMap = FastMap.newInstance(); + Map inMap = new HashMap(); inMap.put("productId", soldItemMap.get("itemId")); inMap.put("productTypeId", "EBAY_ITEM"); inMap.put("internalName", "eBay Item " + soldItemMap.get("title")); @@ -431,7 +430,7 @@ public class EbayStoreAutoPreferences { // ProductRole (VENDOR) List productRole = EntityQuery.use(delegator).from("ProductRole").where("partyId", partyId, "productId", soldItemMap.get("itemId"), "roleTypeId", "VENDOR").queryList(); if (productRole.size() == 0) { - Map addRole = FastMap.newInstance(); + Map addRole = new HashMap(); addRole.put("productId", soldItemMap.get("itemId")); addRole.put("roleTypeId", "VENDOR"); addRole.put("partyId", partyId); @@ -444,12 +443,12 @@ public class EbayStoreAutoPreferences { } } //check active items - serviceMap = FastMap.newInstance(); + serviceMap = new HashMap(); serviceMap.put("userLogin", userLogin); serviceMap.put("productStoreId", productStoreId); resultService = dispatcher.runSync("getEbayActiveItems", serviceMap); List> activeItems = UtilGenerics.checkList(resultService.get("activeItems")); - List activeItemMaps = FastList.newInstance(); + List activeItemMaps = new LinkedList(); if (activeItems.size() != 0) { for (int itemCount = 0; itemCount < activeItems.size(); itemCount++) { Map activeItemMap = UtilGenerics.checkMap(activeItems.get(itemCount)); @@ -460,14 +459,14 @@ public class EbayStoreAutoPreferences { } //check product role List productRoles = EntityQuery.use(delegator).from("ProductRole").where("partyId", partyId, "roleTypeId", "VENDOR").queryList(); - List productRoleIds = FastList.newInstance(); + List productRoleIds = new LinkedList(); if (productRoles.size() != 0) { for (int itemCount = 0; itemCount < productRoles.size(); itemCount++) { String productId = productRoles.get(itemCount).getString("productId"); productRoleIds.add(productId); } } - List andExpr = FastList.newInstance(); + List andExpr = new LinkedList(); EntityCondition activeItemCond = EntityCondition.makeCondition("productId", EntityOperator.NOT_IN, activeItemMaps); andExpr.add(activeItemCond); EntityCondition productTypeCond = EntityCondition.makeCondition("productTypeId", EntityOperator.EQUALS, "EBAY_ITEM"); @@ -529,13 +528,13 @@ public class EbayStoreAutoPreferences { disputeExplanation = DisputeExplanationCodeType.valueOf(condition3); } // get sold items - Map serviceMap = FastMap.newInstance(); + Map serviceMap = new HashMap(); serviceMap.put("productStoreId", productStoreId); serviceMap.put("userLogin", userLogin); Map resultService = dispatcher.runSync("getEbaySoldItems", serviceMap); List> soldItems = UtilGenerics.checkList(resultService.get("soldItems")); // check items to dispute - List> itemsToDispute = FastList.newInstance(); + List> itemsToDispute = new LinkedList>(); for (int itemCount = 0; itemCount < soldItems.size(); itemCount++) { Map item = UtilGenerics.checkMap(soldItems.get(itemCount)); String checkoutStatus = (String) item.get("checkoutStatus"); @@ -600,13 +599,13 @@ public class EbayStoreAutoPreferences { disputeExplanation = DisputeExplanationCodeType.valueOf(condition3); } // get sold items - Map serviceMap = FastMap.newInstance(); + Map serviceMap = new HashMap(); serviceMap.put("productStoreId", productStoreId); serviceMap.put("userLogin", userLogin); Map resultService = dispatcher.runSync("getEbaySoldItems", serviceMap); List> soldItems = UtilGenerics.checkList(resultService.get("soldItems")); // check items to dispute - List> itemsToDispute = FastList.newInstance(); + List> itemsToDispute = new LinkedList>(); for (int itemCount = 0; itemCount < soldItems.size(); itemCount++) { Map item = UtilGenerics.checkMap(soldItems.get(itemCount)); String checkoutStatus = (String) item.get("checkoutStatus"); @@ -669,7 +668,7 @@ public class EbayStoreAutoPreferences { if ("Y".equals(isAutoSendEmail) && jobId.equals(ebayProductStorePref.getString("autoPrefJobId"))) { // start getting sold item list from ebay follow your site GetSellingManagerSoldListingsCall sellingManagerSoldListings = new GetSellingManagerSoldListingsCall(apiContext); - List items = FastList.newInstance(); + List items = new LinkedList(); SellingManagerSoldOrderType[] sellingManagerSoldOrders = sellingManagerSoldListings.getSellingManagerSoldListings(); if (UtilValidate.isNotEmpty(sellingManagerSoldOrders)) { for (SellingManagerSoldOrderType solditem : sellingManagerSoldOrders) { @@ -686,7 +685,7 @@ public class EbayStoreAutoPreferences { // call service send email (get template follow productStoreId) for (SellingManagerSoldOrderType item : items) { // call send - Map sendMap = FastMap.newInstance(); + Map 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); @@ -699,7 +698,7 @@ public class EbayStoreAutoPreferences { sendMap.put("sendBcc", productStoreEmail.get("bccAddress")); sendMap.put("sendTo", item.getBuyerEmail()); - Map bodyParameters = FastMap.newInstance(); + Map bodyParameters = new HashMap(); bodyParameters.put("buyerUserId", item.getBuyerID()); sendMap.put("bodyParameters", bodyParameters); @@ -722,7 +721,7 @@ public class EbayStoreAutoPreferences { public static Map runCombineOrders(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); @@ -744,8 +743,8 @@ public class EbayStoreAutoPreferences { for (int i = 0; i < soldOrderLength; i++) { SellingManagerSoldOrderType sellingManagerSoldOrder = sellingManagerSoldOrders[i]; String buyerId = sellingManagerSoldOrder.getBuyerID().toString(); - List> soldGroupList = FastList.newInstance(); - Map mymap = FastMap.newInstance(); + List> soldGroupList = new LinkedList>(); + Map mymap = new HashMap(); mymap.put("group", ""); mymap.put("soldorder", sellingManagerSoldOrder); if (h.size() > 0) { @@ -799,7 +798,7 @@ public class EbayStoreAutoPreferences { buyerPayment[0] = BuyerPaymentMethodCodeType.CASH_ON_PICKUP; order.setPaymentMethods(buyerPayment); TransactionArrayType transactionArr = new TransactionArrayType(); - List translist = FastList.newInstance(); + List translist = new LinkedList(); AmountType total = new AmountType(); double totalAmt = 0.0; @@ -908,7 +907,7 @@ public class EbayStoreAutoPreferences { } public static Map autoSendWinningBuyerNotification(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); @@ -925,7 +924,7 @@ public class EbayStoreAutoPreferences { Timestamp creationTime = UtilDateTime.toTimestamp(creationDate); if (creationTime.equals(lastestTime) && (item.get("listingType").toString().equals("Chinese"))) { - Map serviceMap = FastMap.newInstance(); + Map serviceMap = new HashMap(); serviceMap.put("userLogin", userLogin); serviceMap.put("locale", locale); serviceMap.put("productStoreId", productStoreId); @@ -940,7 +939,7 @@ public class EbayStoreAutoPreferences { UserType user = (UserType) bidder.get("bidder"); String buyerUserId = bidder.get("userId").toString(); - Map sendMap = FastMap.newInstance(); + Map 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); @@ -953,7 +952,7 @@ public class EbayStoreAutoPreferences { sendMap.put("sendBcc", productStoreEmail.get("bccAddress")); sendMap.put("sendTo", user.getEmail()); - Map bodyParameters = FastMap.newInstance(); + Map bodyParameters = new HashMap(); bodyParameters.put("buyerUserId", buyerUserId); sendMap.put("bodyParameters", bodyParameters); @@ -978,7 +977,7 @@ public class EbayStoreAutoPreferences { } public static Map autoSendItemDispatchedNotification(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); Delegator delegator = dctx.getDelegator(); String productStoreId = (String) context.get("productStoreId"); @@ -1000,7 +999,7 @@ public class EbayStoreAutoPreferences { String buyerUserId = item.get("buyerUserId").toString(); String buyerEmail = item.get("buyerEmail").toString(); - Map sendMap = FastMap.newInstance(); + Map 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); @@ -1013,7 +1012,7 @@ public class EbayStoreAutoPreferences { sendMap.put("sendBcc", productStoreEmail.get("bccAddress")); sendMap.put("sendTo", buyerEmail); - Map bodyParameters = FastMap.newInstance(); + Map bodyParameters = new HashMap(); bodyParameters.put("buyerUserId", buyerUserId); sendMap.put("bodyParameters", bodyParameters); @@ -1040,7 +1039,7 @@ public class EbayStoreAutoPreferences { Locale locale = (Locale) context.get("locale"); GenericValue userLogin = (GenericValue) context.get("userLogin"); Delegator delegator = dctx.getDelegator(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); GetSellingManagerInventoryRequestType req = new GetSellingManagerInventoryRequestType(); GetSellingManagerInventoryResponseType resp = null; @@ -1098,7 +1097,7 @@ public class EbayStoreAutoPreferences { } public static Map autoRelistingItems(DispatchContext dctx, Map context) { - Map itemObject = FastMap.newInstance(); + Map itemObject = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); @@ -1107,14 +1106,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 expressions = FastList.newInstance(); + List expressions = new LinkedList(); expressions.add(expression1); expressions.add(expression2); expressions.add(expression3); EntityCondition cond = EntityCondition.makeCondition(expressions, EntityOperator.AND); List ebayProductListings = EntityQuery.use(delegator).from("EbayProductListing").where(expressions).queryList(); for (int index = 0; index < ebayProductListings.size(); index++) { - Map inMap = FastMap.newInstance(); + Map inMap = new HashMap(); AddItemCall addItemCall = new AddItemCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"), locale, delegator)); GenericValue ebayProductListing = ebayProductListings.get(index); ItemType item = EbayStoreHelper.prepareAddItem(delegator, ebayProductListing); @@ -1263,7 +1262,7 @@ public class EbayStoreAutoPreferences { getBestOfferCall.setBestOfferStatus(BestOfferStatusCodeType.ALL); getBestOfferCall.getBestOffers(); BestOfferType[] bestOffers = getBestOfferCall.getReturnedBestOffers(); - List acceptBestOfferIndexId = FastList.newInstance(); + List acceptBestOfferIndexId = new LinkedList(); SortedMap acceptBestOfferIDs = new TreeMap(); //Loop for get data best offer from buyer RespondToBestOfferCall respondToBestOfferCall = new RespondToBestOfferCall(apiContext); diff --git a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreCategoryFacade.java b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreCategoryFacade.java index 28c05b92a7..0a172af913 100644 --- a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreCategoryFacade.java +++ b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreCategoryFacade.java @@ -19,12 +19,11 @@ package org.ofbiz.ebaystore; import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; @@ -130,7 +129,7 @@ public class EbayStoreCategoryFacade { //get listing durations ListingDurationDefinitionsType listDuration = featureDefinition.getListingDurations(); ListingDurationDefinitionType[] durationArray = listDuration.getListingDuration(); - listingDurationMap = FastMap.newInstance(); + listingDurationMap = new HashMap(); for (int i = 0; i < durationArray.length; i++) { listingDurationMap.put(durationArray[i].getDurationSetID(), durationArray[i].getDuration()); } @@ -140,7 +139,7 @@ public class EbayStoreCategoryFacade { if (listingDuration == null || listingDuration.length == 0) { listingDuration = siteDefaults.getListingDuration(); } - listingDurationReferenceMap = FastMap.newInstance(); + listingDurationReferenceMap = new HashMap(); for (int i = 0; i < listingDuration.length; i++) { listingDurationReferenceMap.put(listingDuration[i].getType().value(),listingDuration[i].getValue()); } @@ -222,7 +221,7 @@ public class EbayStoreCategoryFacade { public List> syncAdItemTemplates() throws ApiException, SdkSoapException, SdkException { GetDescriptionTemplatesRequestType req = null; GetDescriptionTemplatesResponseType resp = null; - List> temGroupList = FastList.newInstance(); + List> temGroupList = new LinkedList>(); GetDescriptionTemplatesCall call = new GetDescriptionTemplatesCall(this.apiContext); req = new GetDescriptionTemplatesRequestType(); @@ -235,7 +234,7 @@ public class EbayStoreCategoryFacade { List> templateList = null; Map templateGroup = null; if ("THEME".equals(String.valueOf(descTemplateType.getType()))) { - Map template = FastMap.newInstance(); + Map template = new HashMap(); template.put("TemplateId", String.valueOf(descTemplateType.getID())); template.put("TemplateImageURL", descTemplateType.getImageURL()); template.put("TemplateName", descTemplateType.getName()); @@ -249,8 +248,8 @@ public class EbayStoreCategoryFacade { } } if (templateGroup == null) { - templateGroup = FastMap.newInstance(); - templateList = FastList.newInstance(); + templateGroup = new HashMap(); + templateList = new LinkedList>(); templateGroup.put("TemplateGroupId", descTemplateType.getGroupID().toString()); templateList.add(template); templateGroup.put("Templates", templateList); @@ -282,7 +281,7 @@ public class EbayStoreCategoryFacade { } public List> getAdItemTemplates(String temGroupId) { - List> themes = FastList.newInstance(); + List> themes = new LinkedList>(); for (Map temp : this.adItemTemplates) { if (temp.get("TemplateGroupId").equals(temGroupId)) { themes = UtilGenerics.checkList(temp.get("Templates")); diff --git a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreCustomerService.java b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreCustomerService.java index bd66626cd5..7691d228ee 100644 --- a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreCustomerService.java +++ b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreCustomerService.java @@ -18,11 +18,10 @@ */ package org.ofbiz.ebaystore; +import java.util.HashMap; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; @@ -53,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 result = FastMap.newInstance(); + Map result = new HashMap(); try { String itemId = (String) context.get("itemId"); String bestOfferId = (String) context.get("bestOfferId"); @@ -112,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 result = FastMap.newInstance(); + Map result = new HashMap(); try { ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator); String[] bestOfferIDs = {offerId}; @@ -148,11 +147,12 @@ public class EbayStoreCustomerService { } return result; } + public static Map deleteContactAlert(DispatchContext dctx, Map context) { Delegator delegator = dctx.getDelegator(); String productStoreId = (String) context.get("productStoreId"); Locale locale = (Locale) context.get("locale"); - Map result = FastMap.newInstance(); + Map 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/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreHelper.java b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreHelper.java index 2dd57b9d2d..6c87562d46 100644 --- a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreHelper.java +++ b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreHelper.java @@ -30,8 +30,6 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastMap; - import org.ofbiz.base.config.GenericConfigException; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; @@ -97,7 +95,7 @@ public class EbayStoreHelper { public static final String resource = "EbayStoreUiLabels"; public static ApiContext getApiContext(String productStoreId,Locale locale, Delegator delegator) { - Map context = FastMap.newInstance(); + Map context = new HashMap(); context.put("locale", locale); context.put("productStoreId", productStoreId); Map config = EbayHelper.buildEbayConfig(context, delegator); @@ -131,7 +129,7 @@ public class EbayStoreHelper { } public static SiteCodeType getSiteCodeType(String productStoreId, Locale locale, Delegator delegator) { - Map context = FastMap.newInstance(); + Map context = new HashMap(); context.put("locale", locale); context.put("productStoreId", productStoreId); Map config = EbayHelper.buildEbayConfig(context, delegator); @@ -264,7 +262,7 @@ public class EbayStoreHelper { } public static Map startEbayAutoPreference(DispatchContext dctx, Map context) { - Mapresult = FastMap.newInstance(); + Mapresult = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Delegator delegator = dctx.getDelegator(); @@ -278,7 +276,7 @@ public class EbayStoreHelper { if (UtilValidate.isNotEmpty(jobId)) { List jobs = EntityQuery.use(delegator).from("JobSandbox").where("parentJobId", jobId, "statusId", "SERVICE_PENDING").queryList(); if (jobs.size() == 0) { - MapinMap = FastMap.newInstance(); + MapinMap = new HashMap(); inMap.put("jobId", jobId); inMap.put("userLogin", userLogin); dispatcher.runSync("resetScheduledJob", inMap); @@ -325,7 +323,7 @@ public class EbayStoreHelper { ebayProductPref.set("autoPrefJobId", jobSandbox.getString("jobId")); ebayProductPref.store(); - MapinfoData = FastMap.newInstance(); + MapinfoData = new HashMap(); infoData.put("jobId", jobSandbox.getString("jobId")); infoData.put("productStoreId", ebayProductPref.getString("productStoreId")); runtimeData.set("runtimeInfo", XmlSerializer.serialize(infoData)); @@ -348,7 +346,7 @@ public class EbayStoreHelper { } public static Map stopEbayAutoPreference(DispatchContext dctx, Map context) { - Mapresult = FastMap.newInstance(); + Mapresult = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Delegator delegator = dctx.getDelegator(); @@ -359,7 +357,7 @@ public class EbayStoreHelper { String jobId = ebayProductPref.getString("autoPrefJobId"); List jobs = EntityQuery.use(delegator).from("JobSandbox").where("parentJobId", jobId ,"statusId", "SERVICE_PENDING").queryList(); - MapinMap = FastMap.newInstance(); + MapinMap = new HashMap(); inMap.put("userLogin", userLogin); for (int index = 0; index < jobs.size(); index++) { inMap.put("jobId", jobs.get(index).getString("jobId")); @@ -429,7 +427,7 @@ public class EbayStoreHelper { } public static Map exportProductEachItem(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); Delegator delegator = dctx.getDelegator(); Map itemObject = UtilGenerics.checkMap(context.get("itemObject")); @@ -445,7 +443,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 updateItemMap = FastMap.newInstance(); + Map updateItemMap = new HashMap(); updateItemMap.put("productListingId", productListingId); updateItemMap.put("itemId", itemId); updateItemMap.put("listingXml", listingXml); @@ -700,7 +698,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 newMap = FastMap.newInstance(); + Map newMap = new HashMap(); newMap.put("productStoreId", productStoreId); newMap.put("logAck", ack.toLowerCase()); newMap.put("functionName", fuction); diff --git a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreInventoryServices.java b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreInventoryServices.java index 6c670f8a23..ed044907c5 100644 --- a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreInventoryServices.java +++ b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreInventoryServices.java @@ -19,10 +19,11 @@ package org.ofbiz.ebaystore; import java.math.BigDecimal; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; + import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilProperties; @@ -34,6 +35,7 @@ import org.ofbiz.service.DispatchContext; import org.ofbiz.service.GenericServiceException; import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ServiceUtil; + import com.ebay.sdk.ApiException; import com.ebay.sdk.SdkException; import com.ebay.sdk.SdkSoapException; @@ -67,7 +69,7 @@ public class EbayStoreInventoryServices { } /*update inventory on ebay site*/ public static Map updateEbayStoreInventory(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); @@ -239,7 +241,7 @@ public class EbayStoreInventoryServices { } public static Map getFolderInEbayStoreInventory(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); @@ -322,7 +324,7 @@ public class EbayStoreInventoryServices { public static Map updateEbayInventoryStatusByProductId(DispatchContext dctx, Map context) { Locale locale = (Locale) context.get("locale"); GenericValue userLogin = (GenericValue) context.get("userLogin"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); String productStoreId = (String)context.get("productStoreId"); String facilityId = (String)context.get("facilityId"); @@ -380,7 +382,7 @@ public class EbayStoreInventoryServices { public static Map updateEbayInventoryStatus(DispatchContext dctx, Map context) { LocalDispatcher dispatcher = dctx.getDispatcher(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); Delegator delegator = dctx.getDelegator(); List ebayProductStoreInventoryList = null; diff --git a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOptions.java b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOptions.java index 5f1c90943f..3b74ce17e1 100644 --- a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOptions.java +++ b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOptions.java @@ -18,6 +18,8 @@ */ package org.ofbiz.ebaystore; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -26,9 +28,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilValidate; @@ -85,7 +84,7 @@ public class EbayStoreOptions { String colorSchemeId = themeId.substring(themeId.indexOf("-")+1); themeId = themeId.substring(0,themeId.indexOf("-")); - Map storeColorSchemeMap = FastMap.newInstance(); + Map storeColorSchemeMap = new HashMap(); while (i < storeBasicTheme.length) { StoreThemeType storeThemeType = storeBasicTheme[i]; @@ -178,9 +177,9 @@ public class EbayStoreOptions { request.setAttribute("categoryId", ebayCategoryId); results = EbayEvents.getChildCategories(request); if (UtilValidate.isNotEmpty(results)) { - List> categories = FastList.newInstance(); + List> categories = new LinkedList>(); for (CategoryType category : results) { - Map context = FastMap.newInstance(); + Map context = new HashMap(); context.put("CategoryCode", category.getCategoryID()); context.put("CategoryName", category.getCategoryName()); String isLeaf = String.valueOf(category.isLeafCategory()!= null ? category.isLeafCategory() : "false"); @@ -229,9 +228,9 @@ public class EbayStoreOptions { request.setAttribute("categoryId", ebayStoreCategory); results = EbayEvents.getStoreChildCategories(request); if (UtilValidate.isNotEmpty(results)) { - List> categories = FastList.newInstance(); + List> categories = new LinkedList>(); for (StoreCustomCategoryType category : results) { - Map context = FastMap.newInstance(); + Map context = new HashMap(); context.put("CategoryCode", category.getCategoryID()); context.put("CategoryName", category.getName()); String isLeaf = "false"; diff --git a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOrder.java b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOrder.java index 8006a575d2..97266411a9 100644 --- a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOrder.java +++ b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOrder.java @@ -29,8 +29,6 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -57,7 +55,7 @@ public class EbayStoreOrder { private static final String module = EbayStoreOrder.class.getName(); public static Map EbayStoreImportTransaction(DispatchContext dctx, Map context) { - Map result = FastMap.newInstance(); + Map result = new HashMap(); LocalDispatcher dispatcher = dctx.getDispatcher(); try { if ("Complete".equals(context.get("checkoutStatus").toString()) && "NOT_IMPORT".equals(context.get("importStatus").toString())) { @@ -75,7 +73,7 @@ public class EbayStoreOrder { } public static Map EbayStoreImportOrder(DispatchContext dctx, Map context) { LocalDispatcher dispatcher = dctx.getDispatcher(); - Map result = FastMap.newInstance(); + Map result = new HashMap(); if (UtilValidate.isEmpty(context.get("orderId"))) { try { result = dispatcher.runSync("EbayStoreCreateOrderShoppingCart", context); @@ -93,7 +91,7 @@ public class EbayStoreOrder { LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); GenericValue userLogin = (GenericValue) context.get("userLogin"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); String productStoreId = context.get("productStoreId").toString(); String defaultCurrencyUomId = ""; @@ -305,7 +303,7 @@ public class EbayStoreOrder { LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); GenericValue userLogin = (GenericValue) context.get("userLogin"); - Map result = FastMap.newInstance(); + Map result = new HashMap(); String productStoreId = context.get("productStoreId").toString(); String defaultCurrencyUomId = null; diff --git a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreSiteFacade.java b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreSiteFacade.java index 97b3233949..5af2652ca5 100644 --- a/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreSiteFacade.java +++ b/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreSiteFacade.java @@ -19,11 +19,10 @@ package org.ofbiz.ebaystore; import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import javolution.util.FastList; - import com.ebay.sdk.ApiContext; import com.ebay.sdk.ApiException; import com.ebay.sdk.SdkException; @@ -149,7 +148,7 @@ public class EbayStoreSiteFacade { } //convert the map to list - List catsList = FastList.newInstance(); + List catsList = new LinkedList(); for (CategoryType cat : csCatsMap.values()) { catsList.add(cat); } @@ -180,7 +179,7 @@ public class EbayStoreSiteFacade { //get all categories from ebay store depend on siteId private List getEbayStoreCategories() { Map catsMap = new HashMap(30000); - List catsList = FastList.newInstance(); + List catsList = new LinkedList(); try { GetStoreCall call = new GetStoreCall(this.apiContext); GetStoreRequestType req = new GetStoreRequestType(); diff --git a/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/automationPreferences/GetDisputeInfo.groovy b/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/automationPreferences/GetDisputeInfo.groovy index 7148f5fdc9..bdd61b4342 100644 --- a/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/automationPreferences/GetDisputeInfo.groovy +++ b/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/automationPreferences/GetDisputeInfo.groovy @@ -21,8 +21,6 @@ import org.ofbiz.base.util.*; import com.ebay.soap.eBLBaseComponents.DisputeReasonCodeType; import com.ebay.soap.eBLBaseComponents.DisputeExplanationCodeType; -import javolution.util.FastList; -import javolution.util.FastMap; public static String makeSpace(String text){ String result = ""; @@ -39,59 +37,59 @@ public static String makeSpace(String text){ } return result; } -reasons = FastList.newInstance(); -explanations = FastList.newInstance(); +reasons = []; +explanations = []; -entry = FastMap.newInstance(); +entry = [:]; entry.put("reasonCode", DisputeReasonCodeType.BUYER_HAS_NOT_PAID.toString()); entry.put("value", makeSpace(DisputeReasonCodeType.BUYER_HAS_NOT_PAID.value())); reasons.add(entry); -entry = FastMap.newInstance(); +entry = [:]; entry.put("reasonCode", DisputeReasonCodeType.TRANSACTION_MUTUALLY_CANCELED.toString()); entry.put("value", makeSpace(DisputeReasonCodeType.TRANSACTION_MUTUALLY_CANCELED.value())); reasons.add(entry); -entry = FastMap.newInstance(); +entry = [:]; entry.put("explanationCode", DisputeExplanationCodeType.BUYER_HAS_NOT_RESPONDED.toString()); entry.put("value", makeSpace(DisputeExplanationCodeType.BUYER_HAS_NOT_RESPONDED.value())); explanations.add(entry); -entry = FastMap.newInstance(); +entry = [:]; entry.put("explanationCode", DisputeExplanationCodeType.BUYER_REFUSED_TO_PAY.toString()); entry.put("value", makeSpace(DisputeExplanationCodeType.BUYER_REFUSED_TO_PAY.value())); explanations.add(entry); -entry = FastMap.newInstance(); +entry = [:]; entry.put("explanationCode", DisputeExplanationCodeType.BUYER_RETURNED_ITEM_FOR_REFUND.toString()); entry.put("value", makeSpace(DisputeExplanationCodeType.BUYER_RETURNED_ITEM_FOR_REFUND.value())); explanations.add(entry); -entry = FastMap.newInstance(); +entry = [:]; entry.put("explanationCode", DisputeExplanationCodeType.UNABLE_TO_RESOLVE_TERMS.toString()); entry.put("value", makeSpace(DisputeExplanationCodeType.UNABLE_TO_RESOLVE_TERMS.value())); explanations.add(entry); -entry = FastMap.newInstance(); +entry = [:]; entry.put("explanationCode", DisputeExplanationCodeType.BUYER_PURCHASING_MISTAKE.toString()); entry.put("value", makeSpace(DisputeExplanationCodeType.BUYER_PURCHASING_MISTAKE.value())); explanations.add(entry); -entry = FastMap.newInstance(); +entry = [:]; entry.put("explanationCode", DisputeExplanationCodeType.SHIP_COUNTRY_NOT_SUPPORTED.toString()); entry.put("value", makeSpace(DisputeExplanationCodeType.SHIP_COUNTRY_NOT_SUPPORTED.value())); explanations.add(entry); -entry = FastMap.newInstance(); +entry = [:]; entry.put("explanationCode", DisputeExplanationCodeType.SHIPPING_ADDRESS_NOT_CONFIRMED.toString()); entry.put("value", makeSpace(DisputeExplanationCodeType.SHIPPING_ADDRESS_NOT_CONFIRMED.value())); explanations.add(entry); -entry = FastMap.newInstance(); +entry = [:]; entry.put("explanationCode", DisputeExplanationCodeType.PAYMENT_METHOD_NOT_SUPPORTED.toString()); entry.put("value", makeSpace(DisputeExplanationCodeType.PAYMENT_METHOD_NOT_SUPPORTED.value())); explanations.add(entry); -entry = FastMap.newInstance(); +entry = [:]; entry.put("explanationCode", DisputeExplanationCodeType.BUYER_NO_LONGER_REGISTERED.toString()); entry.put("value", makeSpace(DisputeExplanationCodeType.BUYER_NO_LONGER_REGISTERED.value())); explanations.add(entry); -entry = FastMap.newInstance(); +entry = [:]; entry.put("explanationCode", DisputeExplanationCodeType.BUYER_NO_LONGER_REGISTERED.toString()); entry.put("value", makeSpace(DisputeExplanationCodeType.BUYER_NO_LONGER_REGISTERED.value())); explanations.add(entry); -entry = FastMap.newInstance(); +entry = [:]; entry.put("explanationCode", DisputeExplanationCodeType.OTHER_EXPLANATION.toString()); entry.put("value", makeSpace(DisputeExplanationCodeType.OTHER_EXPLANATION.value())); explanations.add(entry); diff --git a/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/feedback/FeedbackList.groovy b/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/feedback/FeedbackList.groovy index f0c8546358..6d5f3f3fb7 100644 --- a/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/feedback/FeedbackList.groovy +++ b/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/feedback/FeedbackList.groovy @@ -22,8 +22,6 @@ import org.ofbiz.entity.condition.*; import java.sql.Timestamp; import java.util.Map; -import javolution.util.FastMap; - partyId = null resultUser = runService('getEbayStoreUser', ["productStoreId": parameters.productStoreId, "userLogin": context.get("userLogin")]); ownerUser = resultUser.get("userLoginId"); @@ -31,7 +29,7 @@ userLogin = from("UserLogin").where("userLoginId", ownerUser).queryOne(); if (userLogin) { partyId = userLogin.get("partyId"); } -expr = [] +expr = []; cond = null; contentId = request.getParameter("contentId"); diff --git a/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/OrderListPrepare.groovy b/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/OrderListPrepare.groovy index 458f58cf6f..d2f6fe1466 100644 --- a/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/OrderListPrepare.groovy +++ b/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/OrderListPrepare.groovy @@ -19,11 +19,9 @@ import org.ofbiz.entity.util.EntityUtil; -import javolution.util.FastList; -import javolution.util.FastMap; import org.ofbiz.entity.util.EntityUtil; -orderLists = FastList.newInstance(); +orderLists = []; if (orderList) { for (orderCount = 0; orderCount < orderList.size(); orderCount++) { orderItem = orderList[orderCount]; @@ -47,7 +45,7 @@ if (orderList) { product = from("Product").where("productId", item.get("productId")).cache(true).queryOne(); title = product.get("internalName"); } - orderMap = FastMap.newInstance(); + orderMap = [:]; orderMap.put("orderId", orderId); orderMap.put("externalId", orderItem.get("externalId")); orderMap.put("amountPaid", orderItem.get("amountPaid")); diff --git a/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/SoldAction.groovy b/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/SoldAction.groovy index fb01f1cacd..ef69817f7b 100644 --- a/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/SoldAction.groovy +++ b/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/SoldAction.groovy @@ -18,21 +18,19 @@ */ import org.ofbiz.base.util.*; -import javolution.util.FastList; -import javolution.util.FastMap; -actionList = FastList.newInstance(); +actionList = []; hasAction = false; //Unpaid Item Dispute if (unpaidItemStatus == null && paidTime == null && checkoutStatus != "CheckoutComplete") { - inMap = FastMap.newInstance(); + inMap = [:]; inMap.put("action","openUnpaid"); inMap.put("actionName","Open Unpaid"); actionList.add(inMap); hasAction = true; } //Second Chance Offer -inMap = FastMap.newInstance(); +inMap = [:]; inMap.put("action","makeSecondChanceOffer"); inMap.put("actionName","Make Second Chance Offer"); actionList.add(inMap); diff --git a/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/StoreAccount.groovy b/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/StoreAccount.groovy index a10e9d5715..c5688e4e63 100644 --- a/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/StoreAccount.groovy +++ b/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/StoreAccount.groovy @@ -18,10 +18,8 @@ */ import org.ofbiz.base.util.*; -import javolution.util.FastList; -import javolution.util.FastMap; -results = FastList.newInstance(); +results = []; ebayAccountList = from("PartyRoleAndPartyDetail").where("roleTypeId", "EBAY_ACCOUNT").queryList(); productStoreRoles = from("ProductStoreRole").where("roleTypeId", "EBAY_ACCOUNT").queryList(); @@ -30,7 +28,7 @@ if (productStoreRoles != null && ebayAccountList != null) { partyId = ebayAccount.partyId; productStoreRoles.each{productStoreRole -> if(partyId.equals(productStoreRole.partyId)){ - storeMap = FastMap.newInstance(); + storeMap = [:]; storeMap.partyId = ebayAccount.partyId; storeMap.firstName = ebayAccount.firstName; storeMap.lastName = ebayAccount.lastName; diff --git a/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java b/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java index ab06ac792d..38eae14762 100644 --- a/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java +++ b/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java @@ -41,8 +41,6 @@ import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilProperties; @@ -218,7 +216,7 @@ public class JanrainHelper { return "error"; } - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put("displayName", displayName); result.put("email", email); result.put("identifier", identifier); diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/BestSellingCategory.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/BestSellingCategory.groovy index ea7f7933be..461b5b7073 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/BestSellingCategory.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/BestSellingCategory.groovy @@ -21,10 +21,9 @@ import org.ofbiz.base.util.UtilValidate; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.product.catalog.*; import org.ofbiz.product.category.*; -import javolution.util.FastList; catalogId = CatalogWorker.getCurrentCatalogId(request); -bestSellerCates = FastList.newInstance(); +bestSellerCates = []; if (UtilValidate.isNotEmpty(catalogId)) { prodCatalogCategoryList = CatalogWorker.getProdCatalogCategories(request, catalogId, "PCCT_BEST_SELL"); diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ProductCategories.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ProductCategories.groovy index b7546e7207..dfd00e7e14 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ProductCategories.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ProductCategories.groovy @@ -26,19 +26,16 @@ import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.base.util.*; import org.ofbiz.product.catalog.*; import org.ofbiz.product.category.*; -import javolution.util.FastMap; -import javolution.util.FastList; -import javolution.util.FastList.*; import org.ofbiz.entity.*; List fillTree(rootCat ,CatLvl, parentCategoryId) { if(rootCat) { rootCat.sort{ it.productCategoryId } - def listTree = FastList.newInstance(); + def listTree = []; for(root in rootCat) { preCatChilds = from("ProductCategoryRollup").where("parentProductCategoryId", root.productCategoryId).queryList(); catChilds = EntityUtil.getRelated("CurrentProductCategory",null,preCatChilds,false); - def childList = FastList.newInstance(); + def childList = []; // CatLvl uses for identify the Category level for display different css class if(catChilds) { @@ -55,7 +52,7 @@ List fillTree(rootCat ,CatLvl, parentCategoryId) { // Display the category if this category containing products or contain the category that's containing products if(productsInCat || childList) { - def rootMap = FastMap.newInstance(); + def rootMap = [:]; category = from("ProductCategory").where("productCategoryId", root.productCategoryId).queryOne(); categoryContentWrapper = new CategoryContentWrapper(category, request); context.title = categoryContentWrapper.CATEGORY_NAME; @@ -89,9 +86,9 @@ CategoryWorker.setTrail(request, curCategoryId); categoryList = request.getAttribute("topLevelList"); if (categoryList) { - catContentWrappers = FastMap.newInstance(); + catContentWrappers = [:]; CategoryWorker.getCategoryContentWrappers(catContentWrappers, categoryList, request); context.catContentWrappers = catContentWrappers; - completedTree = fillTree(categoryList,1,""); + completedTree = fillTree(categoryList, 1, ""); context.completedTree = completedTree; } diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ajaxbreadcrumbs.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ajaxbreadcrumbs.groovy index 8a6efcbf7b..1c205b29aa 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ajaxbreadcrumbs.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ajaxbreadcrumbs.groovy @@ -18,17 +18,15 @@ */ import org.ofbiz.product.product.ProductContentWrapper; import org.ofbiz.product.category.*; -import javolution.util.FastMap; -import javolution.util.FastList; import org.ofbiz.base.util.UtilValidate; parentCategoryStr = parameters.parentCategoryStr; if(!UtilValidate.isEmpty(parentCategoryStr)) { pathList = parentCategoryStr.split('/'); - cateList = FastList.newInstance(); + cateList = []; pathTemp = ''; for(path in pathList) { - cateMap = FastMap.newInstance(); + cateMap = [:]; category = from("ProductCategory").where("productCategoryId", path).queryOne(); categoryContentWrapper = new CategoryContentWrapper(category, request); diff --git a/specialpurpose/example/src/org/ofbiz/example/ExamplePrintServices.java b/specialpurpose/example/src/org/ofbiz/example/ExamplePrintServices.java index 50b49736cb..0f01db7272 100644 --- a/specialpurpose/example/src/org/ofbiz/example/ExamplePrintServices.java +++ b/specialpurpose/example/src/org/ofbiz/example/ExamplePrintServices.java @@ -23,6 +23,7 @@ import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; import java.io.Writer; +import java.util.HashMap; import java.util.Map; import javax.print.Doc; @@ -39,8 +40,6 @@ import javax.print.attribute.standard.Sides; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.stream.StreamSource; -import javolution.util.FastMap; - import org.apache.fop.apps.FOPException; import org.apache.fop.apps.Fop; import org.apache.fop.apps.MimeConstants; @@ -61,7 +60,7 @@ public class ExamplePrintServices { public static Map printReportPdf(DispatchContext dctx, Map context) { String screenLocation = "component://example/widget/example/ExampleReportScreens.xml"; String reportScreenName = "ExampleReport"; - Map workContext = FastMap.newInstance(); + Map workContext = new HashMap(); workContext.putAll(context); // render a screen to get the XML document diff --git a/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java b/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java index d407a3edb3..316098b4ee 100644 --- a/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java +++ b/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java @@ -18,6 +18,7 @@ *******************************************************************************/ package org.ofbiz.googlebase; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -25,8 +26,6 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilGenerics; @@ -56,7 +55,7 @@ public class GoogleBaseSearchEvents { Locale locale = UtilHttp.getLocale(request); GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin"); String selectResult = request.getParameter("selectResult"); - List productExportList = FastList.newInstance(); + List productExportList = new LinkedList(); String errMsg = null; try { @@ -84,7 +83,7 @@ public class GoogleBaseSearchEvents { if(!selectResult.startsWith("{")){ productExportList.add(selectResult); }else { - List listTemp = FastList.newInstance(); + List listTemp = new LinkedList(); String temp = selectResult.substring(1, selectResult.length()-1); String arrayTemp[] = temp.split(","); for (int i=0; i productsList = FastList.newInstance(); + List productsList = new LinkedList(); Map result = dispatcher.runSync("getProductCategoryMembers", UtilMisc.toMap("categoryId", productCategoryId)); if (result.get("categoryMembers") != null) { @@ -142,7 +141,7 @@ public class ProductsExportToGoogle { if (productsList.size() == 0) { return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "productsExportToGoogle.noProductsAvailableInProductCategory", locale)); } else { - Map paramIn = FastMap.newInstance(); + Map paramIn = new HashMap(); paramIn.put("selectResult", productsList); paramIn.put("webSiteUrl", webSiteUrl); paramIn.put("imageUrl", imageUrl); @@ -276,7 +275,7 @@ public class ProductsExportToGoogle { int responseCode = connection.getResponseCode(); InputStream inputStream; - Map result = FastMap.newInstance(); + Map result = new HashMap(); String response = ""; if (responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_OK) { inputStream = connection.getInputStream(); @@ -304,8 +303,8 @@ public class ProductsExportToGoogle { private static Map buildDataItemsXml(DispatchContext dctx, Map context, StringBuffer dataItemsXml) { Locale locale = (Locale)context.get("locale"); - List newProductsInGoogle = FastList.newInstance(); - List productsRemovedFromGoogle = FastList.newInstance(); + List newProductsInGoogle = new LinkedList(); + List productsRemovedFromGoogle = new LinkedList(); String localeString = null; String productStoreId = (String) context.get("productStoreId"); @@ -641,7 +640,7 @@ public class ProductsExportToGoogle { private static String getProductPrice(LocalDispatcher dispatcher, GenericValue product) { String priceString = null; - Map map = FastMap.newInstance(); + Map map = new HashMap(); try { map = dispatcher.runSync("calculateProductPrice", UtilMisc.toMap("product", product)); boolean validPriceFound = ((Boolean)map.get("validPriceFound")).booleanValue(); @@ -656,7 +655,7 @@ public class ProductsExportToGoogle { private static Map readResponseFromGoogle(String msg, List newProductsInGoogle, List productsRemovedFromGoogle, LocalDispatcher dispatcher, Delegator delegator, Locale locale, String localeString) { - List message = FastList.newInstance(); + List message = new LinkedList(); // Debug.logInfo("====get xml response from google: " + msg, module); try { Document docResponse = UtilXml.readXmlDocument(msg, true); @@ -721,7 +720,7 @@ public class ProductsExportToGoogle { private static Map buildGoogleBaseConfig(Map context, Delegator delegator) { String productStoreId = (String) context.get("productStoreId"); - Map buildGoogleBaseConfigContext = FastMap.newInstance(); + Map buildGoogleBaseConfigContext = new HashMap(); if (UtilValidate.isNotEmpty(productStoreId)) { GenericValue googleBaseConfig = null; diff --git a/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/FilterProducts.groovy b/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/FilterProducts.groovy index 149128bc46..5c9216cdfe 100644 --- a/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/FilterProducts.groovy +++ b/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/FilterProducts.groovy @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import javolution.util.FastList; + import org.ofbiz.base.util.UtilMisc; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.base.util.UtilValidate; @@ -33,7 +33,7 @@ if (parameters.productStoreId) { active = parameters.ACTIVE_PRODUCT; notSynced = parameters.GOOGLE_SYNCED; -productList = FastList.newInstance(); +productList = []; if (UtilValidate.isNotEmpty(productIds) && ("Y".equals(active) || "Y".equals(notSynced))) { for (int i = 0; i < productIds.size(); i++) { productId = productIds[i]; diff --git a/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/autoUpdateConfig.groovy b/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/autoUpdateConfig.groovy index b60c431744..3f8162d8e4 100644 --- a/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/autoUpdateConfig.groovy +++ b/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/autoUpdateConfig.groovy @@ -16,7 +16,6 @@ * specific language governing permissions and limitations * under the License. */ -import javolution.util.FastList import org.ofbiz.entity.util.EntityUtilProperties configList = [] diff --git a/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java b/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java index e547c85101..c5afbb2c27 100644 --- a/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java +++ b/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java @@ -25,7 +25,6 @@ import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; @@ -383,14 +382,14 @@ public class GoogleCheckoutHelper { // handle shipping Shipping shipping = adjustment.getShipping(); BigDecimal shipAmount = new BigDecimal(shipping.getShippingCost()); - GenericValue shipAdj = delegator.makeValue("OrderAdjustment", FastMap.newInstance()); + GenericValue shipAdj = delegator.makeValue("OrderAdjustment"); shipAdj.set("orderAdjustmentTypeId", "SHIPPING_CHARGES"); shipAdj.set("amount", shipAmount); cart.addAdjustment(shipAdj); // handle tax BigDecimal taxAmount = new BigDecimal(adjustment.getTotalTax()); - GenericValue taxAdj = delegator.makeValue("OrderAdjustment", FastMap.newInstance()); + GenericValue taxAdj = delegator.makeValue("OrderAdjustment"); taxAdj.set("orderAdjustmentTypeId", "SALES_TAX"); taxAdj.set("amount", taxAmount); cart.addAdjustment(taxAdj); @@ -398,7 +397,7 @@ public class GoogleCheckoutHelper { // handle promotions Collection merchantCodes = UtilGenerics.checkCollection(adjustment.getMerchantCodes()); for (MerchantCodes codes : merchantCodes) { - GenericValue promoAdj = delegator.makeValue("OrderAdjustment", FastMap.newInstance()); + GenericValue promoAdj = delegator.makeValue("OrderAdjustment"); promoAdj.set("orderAdjustmentTypeId", "PROMOTION_ADJUSTMENT"); promoAdj.set("description", "Promotion Code: " + codes.getCode()); promoAdj.set("comments", "Google Promotion: " + codes.getMessage()); @@ -500,7 +499,7 @@ public class GoogleCheckoutHelper { } protected String createPerson(StructuredName name) throws GeneralException { - Map personMap = FastMap.newInstance(); + Map personMap = new HashMap(); personMap.put("firstName", name.getFirstName()); personMap.put("lastName", name.getLastName()); personMap.put("userLogin", system); @@ -526,7 +525,7 @@ public class GoogleCheckoutHelper { } // prepare the create address map - Map addrMap = FastMap.newInstance(); + Map addrMap = new HashMap(); addrMap.put("partyId", partyId); addrMap.put("toName", addr.getContactName()); addrMap.put("address1", addr.getAddress1()); @@ -563,7 +562,7 @@ public class GoogleCheckoutHelper { .queryList(); if (UtilValidate.isEmpty(values)) { - Map addPurposeMap = FastMap.newInstance(); + Map addPurposeMap = new HashMap(); addPurposeMap.put("contactMechId", contactMechId); addPurposeMap.put("partyId", partyId); addPurposeMap.put("contactMechPurposeTypeId", contactMechPurposeTypeId); @@ -590,7 +589,7 @@ public class GoogleCheckoutHelper { } protected void setContactInfo(ShoppingCart cart, String contactMechPurposeTypeId, String infoString) throws GeneralException { - Map lookupMap = FastMap.newInstance(); + Map lookupMap = new HashMap(); String cmId = null; String entityName = "PartyAndContactMech"; diff --git a/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java b/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java index 3c970f07fd..44c1a6dfa7 100644 --- a/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java +++ b/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java @@ -20,13 +20,12 @@ under the License. package org.ofbiz.googlecheckout; import java.math.BigDecimal; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilNumber; @@ -297,8 +296,8 @@ public class GoogleRequestServices { String returnId = (String) context.get("returnId"); // sort by order - Map toRefund = FastMap.newInstance(); - Map> toReturn = FastMap.newInstance(); + Map toRefund = new HashMap(); + Map> toReturn = new HashMap>(); BigDecimal refundTotal = new BigDecimal(0.0); List returnItems = null; @@ -321,7 +320,7 @@ public class GoogleRequestServices { } List items = toReturn.get(orderId); if (items == null) { - items = FastList.newInstance(); + items = new LinkedList(); } // get the values from the return item diff --git a/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy b/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy index 929fa52d7b..f4523f2312 100644 --- a/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy +++ b/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy @@ -19,7 +19,6 @@ import org.ofbiz.entity.*; import org.ofbiz.entity.condition.*; -import javolution.util.FastMap; productId = request.getParameter("productId"); if (!productId) { @@ -32,7 +31,7 @@ if (productId) { facilityId = request.getParameter("facilityId"); resultOutput = runService('getInventoryAvailableByFacility', [productId : productId, facilityId : facilityId]); - quantitySummary = FastMap.newInstance(); + quantitySummary = [:]; quantitySummary.facilityId = facilityId; quantitySummary.atp_qoh = ((Double)resultOutput.availableToPromiseTotal).intValue() + " / " + ((Double)resultOutput.quantityOnHandTotal).intValue(); @@ -56,7 +55,7 @@ if (productId) { // todo: change this to a select from inv_items where productId and facilityId matches distinct (locationSeqId). invItemList = from("InventoryItem").where("productId", productId, "facilityId", facilityId).queryList(); - locations = FastMap.newInstance(); + locations = [:]; boolean negativeQOH = false; invItemList.each { invItem -> @@ -79,7 +78,7 @@ if (productId) { while (locationsIter.hasNext()) { location = locationsIter.next(); resultOutput = runService('getInventoryAvailableByLocation', [productId : productId, facilityId : facilityId, locationSeqId : location]); - quantitySummary = FastMap.newInstance(); + quantitySummary = [:]; quantitySummary.productId = productId; quantitySummary.facilityId = facilityId; if ("nullField".equals( location ) == true) { diff --git a/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java b/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java index 23a60c9bdd..5dfdbbb6a5 100644 --- a/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java +++ b/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java @@ -20,14 +20,13 @@ package org.ofbiz.oagis; import java.io.IOException; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilFormatOut; @@ -67,8 +66,8 @@ public class OagisInventoryServices { Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); - List> errorMapList = FastList.newInstance(); - List> inventoryMapList = FastList.newInstance(); + List> errorMapList = new LinkedList>(); + List> inventoryMapList = new LinkedList>(); final String syncInventoryFacilityId = EntityUtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.SyncInventoryFacilityId", delegator); GenericValue userLogin = null; try { @@ -97,7 +96,7 @@ public class OagisInventoryServices { String authId = UtilXml.childElementValue(docSenderElement, "of:AUTHID"); // create oagis message info - Map comiCtx = FastMap.newInstance(); + Map comiCtx = new HashMap(); comiCtx.put("logicalId", logicalId); comiCtx.put("component", component); comiCtx.put("task", task); @@ -218,7 +217,7 @@ public class OagisInventoryServices { if (errorMapList.size() == 0 && inventoryMapList.size() > 0) { try { // prepare information to send mail - Map sendMap = FastMap.newInstance(); + Map sendMap = new HashMap(); String sendToEmail = EntityUtilProperties.getPropertyValue("oagis.properties", "oagis.notification.email.sendTo", delegator); @@ -291,7 +290,7 @@ public class OagisInventoryServices { } } - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put("logicalId", logicalId); result.put("component", component); result.put("task", task); @@ -308,7 +307,7 @@ public class OagisInventoryServices { } // call services createOagisMsgErrInfosFromErrMapList and for incoming messages oagisSendConfirmBod - Map saveErrorMapListCtx = FastMap.newInstance(); + Map saveErrorMapListCtx = new HashMap(); saveErrorMapListCtx.put("logicalId", logicalId); saveErrorMapListCtx.put("component", component); saveErrorMapListCtx.put("task", task); @@ -323,7 +322,7 @@ public class OagisInventoryServices { } try { - Map sendConfirmBodCtx = FastMap.newInstance(); + Map sendConfirmBodCtx = new HashMap(); sendConfirmBodCtx.putAll(saveErrorMapListCtx); // NOTE: this is different for each service, should be shipmentId or returnId or PO orderId or etc // for sync inventory no such ID: sendConfirmBodCtx.put("origRefId", shipmentId); @@ -359,8 +358,8 @@ public class OagisInventoryServices { Locale locale = (Locale) context.get("locale"); LocalDispatcher dispatcher = ctx.getDispatcher(); Delegator delegator = ctx.getDelegator(); - List> errorMapList = FastList.newInstance(); - Map comiCtx = FastMap.newInstance(); + List> errorMapList = new LinkedList>(); + Map comiCtx = new HashMap(); GenericValue userLogin = null; try { @@ -459,7 +458,7 @@ public class OagisInventoryServices { if (UtilValidate.isNotEmpty(acknowledgeElementList)) { try { for (Element receiptLnElement : acknowledgeElementList) { - Map ripCtx = FastMap.newInstance(); + Map ripCtx = new HashMap(); Element qtyElement = UtilXml.firstChildElement(receiptLnElement, "os:QUANTITY"); String itemQtyStr = UtilXml.childElementValue(qtyElement, "of:VALUE"); @@ -490,7 +489,7 @@ public class OagisInventoryServices { // Check reference to PO number, if exists GenericValue orderHeader = null; if (orderId != null) { - List toStore = FastList.newInstance(); + List toStore = new LinkedList(); orderHeader = EntityQuery.use(delegator).from("OrderHeader").where("orderId", orderId).queryOne(); if (orderHeader != null) { // Case : update the record @@ -556,7 +555,7 @@ public class OagisInventoryServices { comiCtx.put("processingStatusId", "OAGMP_SYS_ERROR"); dispatcher.runSync("updateOagisMessageInfo", comiCtx, 60, true); - Map saveErrorMapListCtx = FastMap.newInstance(); + Map saveErrorMapListCtx = new HashMap(); saveErrorMapListCtx.putAll(omiPkMap); saveErrorMapListCtx.put("errorMapList", errorMapList); saveErrorMapListCtx.put("userLogin", userLogin); @@ -572,7 +571,7 @@ public class OagisInventoryServices { } } - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put("logicalId", logicalId); result.put("component", component); result.put("task", task); @@ -589,7 +588,7 @@ public class OagisInventoryServices { } // call services createOagisMsgErrInfosFromErrMapList and for incoming messages oagisSendConfirmBod - Map saveErrorMapListCtx = FastMap.newInstance(); + Map saveErrorMapListCtx = new HashMap(); saveErrorMapListCtx.put("logicalId", logicalId); saveErrorMapListCtx.put("component", component); saveErrorMapListCtx.put("task", task); @@ -604,7 +603,7 @@ public class OagisInventoryServices { } try { - Map sendConfirmBodCtx = FastMap.newInstance(); + Map sendConfirmBodCtx = new HashMap(); sendConfirmBodCtx.putAll(saveErrorMapListCtx); // NOTE: this is different for each service, should be shipmentId or returnId or PO orderId or etc sendConfirmBodCtx.put("origRefId", orderId); @@ -649,7 +648,7 @@ public class OagisInventoryServices { Locale locale = (Locale) context.get("locale"); LocalDispatcher dispatcher = ctx.getDispatcher(); Delegator delegator = ctx.getDelegator(); - List> errorMapList = FastList.newInstance(); + List> errorMapList = new LinkedList>(); GenericValue userLogin = null; try { @@ -691,7 +690,7 @@ public class OagisInventoryServices { String locationSeqId = EntityUtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.ReturnReceiptLocationSeqId", delegator); Timestamp timestamp = UtilDateTime.nowTimestamp(); - Map comiCtx = FastMap.newInstance(); + Map comiCtx = new HashMap(); Map omiPkMap = UtilMisc.toMap("logicalId", (Object) logicalId, "component", component, "task", task, "referenceId", referenceId); @@ -752,15 +751,15 @@ public class OagisInventoryServices { String lastReturnId = null; //String inventoryItemId = null; - List invItemIds = FastList.newInstance(); + List invItemIds = new LinkedList(); // get RECEIPTLN elements from message List receiptLineElementList = UtilXml.childElementList(acknowledgeDeliveryElement, "ns:RECEIPTLN"); if (UtilValidate.isNotEmpty(receiptLineElementList)) { try { - Map processedStatusIdByReturnIdMap = FastMap.newInstance(); + Map processedStatusIdByReturnIdMap = new HashMap(); for (Element receiptLnElement : receiptLineElementList) { - Map ripCtx = FastMap.newInstance(); + Map ripCtx = new HashMap(); Element qtyElement = UtilXml.firstChildElement(receiptLnElement, "os:QUANTITY"); String itemQtyStr = UtilXml.childElementValue(qtyElement, "of:VALUE"); @@ -840,7 +839,7 @@ public class OagisInventoryServices { processedStatusIdByReturnIdMap.put(returnId, statusId); // getting the serial number(s) - List serialNumsList = FastList.newInstance(); + List serialNumsList = new LinkedList(); List invDetailList = UtilXml.childElementList(receiptLnElement, "ns:INVDETAIL"); if (UtilValidate.isNotEmpty(invDetailList)) { for (Element invDetailElement : invDetailList) { @@ -922,7 +921,7 @@ public class OagisInventoryServices { // TODOLATER: another fun thing to check: see if the serial number matches a serial number attached to the original return (if possible!) //clone the context as it may be changed in the call - Map localRipCtx = FastMap.newInstance(); + Map localRipCtx = new HashMap(); localRipCtx.putAll(ripCtx); localRipCtx.put("quantityAccepted", new Double(1.0)); // always set this to 0, if needed we'll handle the rejected quantity separately @@ -950,7 +949,7 @@ public class OagisInventoryServices { // no serial numbers, just receive the quantity // clone the context as it may be changted in the call - Map localRipCtx = FastMap.newInstance(); + Map localRipCtx = new HashMap(); localRipCtx.putAll(ripCtx); localRipCtx.put("quantityAccepted", new Double(quantityAccepted)); // always set this to 0, if needed we'll handle the rejected quantity separately @@ -969,7 +968,7 @@ public class OagisInventoryServices { invItemIds.add(inventoryItemId); if (("INV_ON_HOLD").equals(invItemStatusId)) { - Map createPhysicalInvAndVarCtx = FastMap.newInstance(); + Map createPhysicalInvAndVarCtx = new HashMap(); createPhysicalInvAndVarCtx.put("inventoryItemId", inventoryItemId); createPhysicalInvAndVarCtx.put("physicalInventoryDate", UtilDateTime.nowTimestamp()); // NOTE DEJ20070815: calling damaged for now as the only option so that all will feed into a check/repair process and go into the ON_HOLD status; we should at some point change OFBiz so these can go into the ON_HOLD status without having to call them damaged @@ -1010,7 +1009,7 @@ public class OagisInventoryServices { //so we _could_ possibly move to that method if needed // loop through ReturnItem records, get totals for each productId - Map returnQuantityByProductIdMap = FastMap.newInstance(); + Map returnQuantityByProductIdMap = new HashMap(); List returnItemList = delegator.findByAnd("ReturnItem", UtilMisc.toMap("returnId", returnId), null, false); for (GenericValue returnItem : returnItemList) { String productId = returnItem.getString("productId"); @@ -1068,7 +1067,7 @@ public class OagisInventoryServices { comiCtx.put("processingStatusId", "OAGMP_SYS_ERROR"); dispatcher.runSync("updateOagisMessageInfo", comiCtx, 60, true); - Map saveErrorMapListCtx = FastMap.newInstance(); + Map saveErrorMapListCtx = new HashMap(); saveErrorMapListCtx.putAll(omiPkMap); saveErrorMapListCtx.put("errorMapList", errorMapList); saveErrorMapListCtx.put("userLogin", userLogin); @@ -1084,7 +1083,7 @@ public class OagisInventoryServices { } } - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put("logicalId", logicalId); result.put("component", component); result.put("task", task); @@ -1101,7 +1100,7 @@ public class OagisInventoryServices { } // call services createOagisMsgErrInfosFromErrMapList and for incoming messages oagisSendConfirmBod - Map saveErrorMapListCtx = FastMap.newInstance(); + Map saveErrorMapListCtx = new HashMap(); saveErrorMapListCtx.put("logicalId", logicalId); saveErrorMapListCtx.put("component", component); saveErrorMapListCtx.put("task", task); @@ -1116,7 +1115,7 @@ public class OagisInventoryServices { } try { - Map sendConfirmBodCtx = FastMap.newInstance(); + Map sendConfirmBodCtx = new HashMap(); sendConfirmBodCtx.putAll(saveErrorMapListCtx); // NOTE: this is different for each service, should be shipmentId or returnId or PO orderId or etc // TODO: unfortunately there could be multiple returnIds for the message, so what to do...? @@ -1163,7 +1162,7 @@ public class OagisInventoryServices { Locale locale = (Locale) context.get("locale"); LocalDispatcher dispatcher = ctx.getDispatcher(); Delegator delegator = ctx.getDelegator(); - List> errorMapList = FastList.newInstance(); + List> errorMapList = new LinkedList>(); GenericValue userLogin = null; try { @@ -1201,7 +1200,7 @@ public class OagisInventoryServices { String locationSeqId = EntityUtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.ReturnReceiptLocationSeqId", delegator); Timestamp timestamp = UtilDateTime.nowTimestamp(); - Map comiCtx = FastMap.newInstance(); + Map comiCtx = new HashMap(); Map omiPkMap = UtilMisc.toMap("logicalId", (Object) logicalId, "component", component, "task", task, "referenceId", referenceId); @@ -1260,13 +1259,13 @@ public class OagisInventoryServices { } //String inventoryItemId = null; - List invItemIds = FastList.newInstance(); + List invItemIds = new LinkedList(); // get RECEIPTLN elements from message List receiptLineElementList = UtilXml.childElementList(acknowledgeDeliveryElement, "ns:RECEIPTLN"); if (UtilValidate.isNotEmpty(receiptLineElementList)) { try { for (Element receiptLnElement : receiptLineElementList) { - Map uiiCtx = FastMap.newInstance(); + Map uiiCtx = new HashMap(); Element qtyElement = UtilXml.firstChildElement(receiptLnElement, "os:QUANTITY"); String itemQtyStr = UtilXml.childElementValue(qtyElement, "of:VALUE"); @@ -1311,7 +1310,7 @@ public class OagisInventoryServices { uiiCtx.put("statusId", invItemStatusId); // geting the serial number(s) - List serialNumsList = FastList.newInstance(); + List serialNumsList = new LinkedList(); List invDetailList = UtilXml.childElementList(receiptLnElement, "ns:INVDETAIL"); if (UtilValidate.isNotEmpty(invDetailList)) { for (Element invDetailElement : invDetailList) { @@ -1371,7 +1370,7 @@ public class OagisInventoryServices { continue; } - Map updateInvItmMap = FastMap.newInstance(); + Map updateInvItmMap = new HashMap(); updateInvItmMap.put("inventoryItemId", inventoryItem.getString("inventoryItemId")); updateInvItmMap.put("userLogin", userLogin); updateInvItmMap.put("statusId", invItemStatusId); @@ -1402,7 +1401,7 @@ public class OagisInventoryServices { comiCtx.put("processingStatusId", "OAGMP_SYS_ERROR"); dispatcher.runSync("updateOagisMessageInfo", comiCtx, 60, true); - Map saveErrorMapListCtx = FastMap.newInstance(); + Map saveErrorMapListCtx = new HashMap(); saveErrorMapListCtx.putAll(omiPkMap); saveErrorMapListCtx.put("errorMapList", errorMapList); saveErrorMapListCtx.put("userLogin", userLogin); @@ -1418,7 +1417,7 @@ public class OagisInventoryServices { } } - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.putAll(omiPkMap); result.put("userLogin", userLogin); @@ -1432,7 +1431,7 @@ public class OagisInventoryServices { } // call services createOagisMsgErrInfosFromErrMapList and for incoming messages oagisSendConfirmBod - Map saveErrorMapListCtx = FastMap.newInstance(); + Map saveErrorMapListCtx = new HashMap(); saveErrorMapListCtx.putAll(omiPkMap); saveErrorMapListCtx.put("errorMapList", errorMapList); saveErrorMapListCtx.put("userLogin", userLogin); @@ -1444,7 +1443,7 @@ public class OagisInventoryServices { } try { - Map sendConfirmBodCtx = FastMap.newInstance(); + Map sendConfirmBodCtx = new HashMap(); sendConfirmBodCtx.putAll(saveErrorMapListCtx); // run async because this will send a message back to the other server and may take some time, and/or fail diff --git a/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java b/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java index 8bef31b850..7de1dc6f6b 100644 --- a/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java +++ b/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java @@ -35,15 +35,14 @@ import java.sql.Timestamp; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import javax.xml.parsers.ParserConfigurationException; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.HttpClient; import org.ofbiz.base.util.SSLUtil; @@ -145,13 +144,13 @@ public class OagisServices { String sentDate = isoDateFormat.format(timestamp); bodyParameters.put("sentDate", sentDate); - Map omiPkMap = FastMap.newInstance(); + Map omiPkMap = new HashMap(); omiPkMap.put("logicalId", logicalId); omiPkMap.put("component", "EXCEPTION"); omiPkMap.put("task", "RECIEPT"); omiPkMap.put("referenceId", referenceId); - Map oagisMsgInfoContext = FastMap.newInstance(); + Map oagisMsgInfoContext = new HashMap(); oagisMsgInfoContext.putAll(omiPkMap); oagisMsgInfoContext.put("authId", authId); oagisMsgInfoContext.put("sentDate", timestamp); @@ -170,7 +169,7 @@ public class OagisServices { try { // call services createOagisMsgErrInfosFromErrMapList and for incoming messages oagisSendConfirmBod - Map saveErrorMapListCtx = FastMap.newInstance(); + Map saveErrorMapListCtx = new HashMap(); saveErrorMapListCtx.putAll(omiPkMap); saveErrorMapListCtx.put("errorMapList", errorMapList); saveErrorMapListCtx.put("userLogin", userLogin); @@ -235,7 +234,7 @@ public class OagisServices { Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); Document doc = (Document) context.get("document"); - List> errorMapList = FastList.newInstance(); + List> errorMapList = new LinkedList>(); Locale locale = (Locale) context.get("locale"); GenericValue userLogin = null; try { @@ -281,7 +280,7 @@ public class OagisServices { Map omiPkMap = UtilMisc.toMap("logicalId", (Object) logicalId, "component", component, "task", task, "referenceId", referenceId); - Map oagisMsgInfoCtx = FastMap.newInstance(); + Map oagisMsgInfoCtx = new HashMap(); oagisMsgInfoCtx.putAll(omiPkMap); oagisMsgInfoCtx.put("authId", authId); oagisMsgInfoCtx.put("receivedDate", receivedTimestamp); @@ -328,7 +327,7 @@ public class OagisServices { String description = UtilXml.childElementValue(dataAreaConfirmMsgElement, "of:DESCRIPTN"); String reasonCode = UtilXml.childElementValue(dataAreaConfirmMsgElement, "of:REASONCODE"); - Map createOagisMessageErrorInfoForOriginal = FastMap.newInstance(); + Map createOagisMessageErrorInfoForOriginal = new HashMap(); createOagisMessageErrorInfoForOriginal.putAll(originalOmiPkMap); createOagisMessageErrorInfoForOriginal.put("reasonCode", reasonCode); createOagisMessageErrorInfoForOriginal.put("description", description); @@ -353,7 +352,7 @@ public class OagisServices { String description = UtilXml.childElementValue(dataAreaConfirmMsgElement, "of:DESCRIPTN"); String reasonCode = UtilXml.childElementValue(dataAreaConfirmMsgElement, "of:REASONCODE"); - Map createOagisMessageErrorInfoForCbod = FastMap.newInstance(); + Map createOagisMessageErrorInfoForCbod = new HashMap(); createOagisMessageErrorInfoForCbod.putAll(omiPkMap); createOagisMessageErrorInfoForCbod.put("reasonCode", reasonCode); createOagisMessageErrorInfoForCbod.put("description", description); @@ -372,7 +371,7 @@ public class OagisServices { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "OagisErrorProcessingConfirmBOD", UtilMisc.toMap("errorString", t.toString()), locale)); } - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.put("logicalId", logicalId); result.put("component", component); result.put("task", task); @@ -381,7 +380,7 @@ public class OagisServices { if (errorMapList.size() > 0) { // call services createOagisMsgErrInfosFromErrMapList and for incoming messages oagisSendConfirmBod - Map saveErrorMapListCtx = FastMap.newInstance(); + Map saveErrorMapListCtx = new HashMap(); saveErrorMapListCtx.put("logicalId", logicalId); saveErrorMapListCtx.put("component", component); saveErrorMapListCtx.put("task", task); @@ -397,7 +396,7 @@ public class OagisServices { // TODO and NOTE DEJ20070813: should we really send back a Confirm BOD if there is an error with the Confirm BOD they send us? probably so... will do for now... try { - Map sendConfirmBodCtx = FastMap.newInstance(); + Map sendConfirmBodCtx = new HashMap(); sendConfirmBodCtx.putAll(saveErrorMapListCtx); // NOTE: this is different for each service, should be shipmentId or returnId or PO orderId or etc // no such thing for confirm bod: sendConfirmBodCtx.put("origRefId", shipmentId); @@ -479,7 +478,7 @@ public class OagisServices { Delegator delegator = ctx.getDelegator(); LocalDispatcher dispatcher = ctx.getDispatcher(); InputStream in = (InputStream) context.get("inputStream"); - List> errorList = FastList.newInstance(); + List> errorList = new LinkedList>(); Boolean isErrorRetry = (Boolean) context.get("isErrorRetry"); Locale locale = (Locale) context.get("locale"); GenericValue userLogin = null; @@ -552,7 +551,7 @@ public class OagisServices { Map messageProcessContext = UtilMisc.toMap("document", doc, "userLogin", userLogin); - // call async, no additional results to return: Map subServiceResult = FastMap.newInstance(); + // call async, no additional results to return: Map subServiceResult = new HashMap(); if (UtilValidate.isNotEmpty(oagisMessageInfo)) { if (Boolean.TRUE.equals(isErrorRetry) || "OAGMP_SYS_ERROR".equals(oagisMessageInfo.getString("processingStatusId"))) { // there was an error last time, tell the service this is a retry @@ -563,7 +562,7 @@ public class OagisServices { List> errorMapList = UtilMisc.toList(UtilMisc.toMap("reasonCode", "MessageAlreadyReceived", "description", responseMsg)); - Map sendConfirmBodCtx = FastMap.newInstance(); + Map sendConfirmBodCtx = new HashMap(); sendConfirmBodCtx.put("logicalId", logicalId); sendConfirmBodCtx.put("component", component); sendConfirmBodCtx.put("task", task); diff --git a/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java b/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java index 158dc4a78b..9ffb8546f3 100644 --- a/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java +++ b/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java @@ -24,15 +24,14 @@ import java.io.OutputStream; import java.io.StringWriter; import java.io.Writer; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.StringUtil; @@ -91,7 +90,7 @@ public class OagisShipmentServices { LocalDispatcher dispatcher = ctx.getDispatcher(); Delegator delegator = ctx.getDelegator(); Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); - List> errorMapList = FastList.newInstance(); + List> errorMapList = new LinkedList>(); GenericValue userLogin = null; try { @@ -244,7 +243,7 @@ public class OagisShipmentServices { if (UtilValidate.isNotEmpty(invItemElementList)) { // sort the INVITEM elements by ITEM so that all shipments are processed in the same order, avoids deadlocking problems we've seen with concurrently processed orders - List> invitemMapList = FastList.newInstance(); + List> invitemMapList = new LinkedList>(); boolean foundBadProductId = false; for (Element invItemElement : invItemElementList) { String productId = UtilXml.childElementValue(invItemElement, "of:ITEM"); // of @@ -259,7 +258,7 @@ public class OagisShipmentServices { continue; } - Map invitemMap = FastMap.newInstance(); + Map invitemMap = new HashMap(); invitemMap.put("productId", productId); // support multiple INVITEM elements for a given productId UtilMisc.addToListInMap(invItemElement, invitemMap, "invItemElementList"); @@ -368,7 +367,7 @@ public class OagisShipmentServices { } } - List serialNumberList = FastList.newInstance(); + List serialNumberList = new LinkedList(); List invDetailElementList = UtilXml.childElementList(invItemElement, "ns:INVDETAIL"); //n for (Element invDetailElement : invDetailElementList) { String serialNumber = UtilXml.childElementValue(invDetailElement, "of:SERIALNUM"); // os @@ -531,7 +530,7 @@ public class OagisShipmentServices { oagisMsgInfoCtx.put("processingStatusId", "OAGMP_SYS_ERROR"); dispatcher.runSync("updateOagisMessageInfo", oagisMsgInfoCtx, 60, true); - Map saveErrorMapListCtx = FastMap.newInstance(); + Map saveErrorMapListCtx = new HashMap(); saveErrorMapListCtx.putAll(omiPkMap); saveErrorMapListCtx.put("errorMapList", errorMapList); saveErrorMapListCtx.put("userLogin", userLogin); @@ -547,7 +546,7 @@ public class OagisShipmentServices { } } - Map result = FastMap.newInstance(); + Map result = new HashMap(); result.putAll(omiPkMap); result.put("userLogin", userLogin); @@ -562,7 +561,7 @@ public class OagisShipmentServices { try { // call services createOagisMsgErrInfosFromErrMapList and for incoming messages oagisSendConfirmBod - Map saveErrorMapListCtx = FastMap.newInstance(); + Map saveErrorMapListCtx = new HashMap(); saveErrorMapListCtx.putAll(omiPkMap); saveErrorMapListCtx.put("errorMapList", errorMapList); saveErrorMapListCtx.put("userLogin", userLogin); @@ -573,7 +572,7 @@ public class OagisShipmentServices { } try { - Map sendConfirmBodCtx = FastMap.newInstance(); + Map sendConfirmBodCtx = new HashMap(); sendConfirmBodCtx.putAll(omiPkMap); sendConfirmBodCtx.put("errorMapList", errorMapList); sendConfirmBodCtx.put("userLogin", userLogin); @@ -737,7 +736,7 @@ public class OagisShipmentServices { } // check payment authorization - Map authServiceContext = FastMap.newInstance(); + Map authServiceContext = new HashMap(); authServiceContext.put("orderId", orderId); authServiceContext.put("userLogin", userLogin); authServiceContext.put("reAuth", true); @@ -759,7 +758,7 @@ public class OagisShipmentServices { // prepare map to Create Oagis Message Info try { - Map comiCtx = FastMap.newInstance(); + Map comiCtx = new HashMap(); comiCtx.putAll(omiPkMap); comiCtx.put("processingStatusId", "OAGMP_TRIGGERED"); comiCtx.put("outgoingMessage", "Y"); @@ -816,7 +815,7 @@ public class OagisShipmentServices { orderItemShipGroup = EntityQuery.use(delegator).from("OrderItemShipGroup").where("orderId", orderId).queryFirst(); bodyParameters.put("orderItemShipGroup", orderItemShipGroup); - Set correspondingPoIdSet = FastSet.newInstance(); + Set correspondingPoIdSet = new HashSet(); List orderItems = orderReadHelper.getOrderItems(); for (GenericValue orderItem : orderItems) { @@ -827,7 +826,7 @@ public class OagisShipmentServices { } bodyParameters.put("correspondingPoIdSet", correspondingPoIdSet); if (orderHeader.get("externalId") != null) { - Set externalIdSet = FastSet.newInstance(); + Set externalIdSet = new HashSet(); externalIdSet.add(orderHeader.getString("externalId")); bodyParameters.put("externalIdSet", externalIdSet); } @@ -888,7 +887,7 @@ public class OagisShipmentServices { if (Debug.infoOn()) Debug.logInfo("Finished rendering oagisSendProcessShipment message for orderId [" + orderId + "]", module); try { - Map uomiCtx = FastMap.newInstance(); + Map uomiCtx = new HashMap(); uomiCtx.putAll(omiPkMap); uomiCtx.put("processingStatusId", "OAGMP_OGEN_SUCCESS"); uomiCtx.put("shipmentId", shipmentId); @@ -905,7 +904,7 @@ public class OagisShipmentServices { Map sendMessageReturn = OagisServices.sendMessageText(outText, out, sendToUrl, saveToDirectory, saveToFilename, locale, delegator); if (sendMessageReturn != null && ServiceUtil.isError(sendMessageReturn)) { try { - Map uomiCtx = FastMap.newInstance(); + Map uomiCtx = new HashMap(); uomiCtx.putAll(omiPkMap); uomiCtx.put("processingStatusId", "OAGMP_SEND_ERROR"); uomiCtx.put("userLogin", userLogin); @@ -919,7 +918,7 @@ public class OagisShipmentServices { if (Debug.infoOn()) Debug.logInfo("Message send done for oagisSendProcessShipment for orderId [" + orderId + "], sendToUrl=[" + sendToUrl + "], saveToDirectory=[" + saveToDirectory + "], saveToFilename=[" + saveToFilename + "]", module); try { - Map uomiCtx = FastMap.newInstance(); + Map uomiCtx = new HashMap(); uomiCtx.putAll(omiPkMap); uomiCtx.put("processingStatusId", "OAGMP_SENT"); uomiCtx.put("userLogin", userLogin); @@ -940,7 +939,7 @@ public class OagisShipmentServices { return ServiceUtil.returnError(errMsg); } - Map uomiCtx = FastMap.newInstance(); + Map uomiCtx = new HashMap(); uomiCtx.putAll(omiPkMap); uomiCtx.put("processingStatusId", "OAGMP_SYS_ERROR"); uomiCtx.put("bsrVerb", "PROCESS"); @@ -951,7 +950,7 @@ public class OagisShipmentServices { dispatcher.runSync("updateOagisMessageInfo", uomiCtx, 60, true); List> errorMapList = UtilMisc.toList(UtilMisc.toMap("description", errMsg, "reasonCode", "SystemError")); - Map saveErrorMapListCtx = FastMap.newInstance(); + Map saveErrorMapListCtx = new HashMap(); saveErrorMapListCtx.putAll(omiPkMap); saveErrorMapListCtx.put("errorMapList", errorMapList); saveErrorMapListCtx.put("userLogin", userLogin); @@ -1049,7 +1048,7 @@ public class OagisShipmentServices { // prepare map to Create Oagis Message Info try { - Map comiCtx = FastMap.newInstance(); + Map comiCtx = new HashMap(); comiCtx.putAll(omiPkMap); comiCtx.put("outgoingMessage", "Y"); comiCtx.put("confirmation", "1"); @@ -1080,7 +1079,7 @@ public class OagisShipmentServices { // calculate total qty of return items in a shipping unit received, order associated with return double totalQty = 0.0; - Map> serialNumberListByReturnItemSeqIdMap = FastMap.newInstance(); + Map> serialNumberListByReturnItemSeqIdMap = new HashMap>(); bodyParameters.put("serialNumberListByReturnItemSeqIdMap", serialNumberListByReturnItemSeqIdMap); for (GenericValue returnItem : returnItems) { double itemQty = returnItem.getDouble("returnQuantity").doubleValue(); @@ -1095,7 +1094,7 @@ public class OagisShipmentServices { .where("orderId", orderItem.get("orderId"), "orderItemSeqId", orderItem.get("orderItemSeqId"), "inventoryItemTypeId", "SERIALIZED_INV_ITEM") .queryList(); if (itemIssuanceAndInventoryItemList.size() == itemQty) { - List serialNumberList = FastList.newInstance(); + List serialNumberList = new LinkedList(); serialNumberListByReturnItemSeqIdMap.put(returnItem.getString("returnItemSeqId"), serialNumberList); for (GenericValue itemIssuanceAndInventoryItem : itemIssuanceAndInventoryItemList) { serialNumberList.add(itemIssuanceAndInventoryItem.getString("serialNumber")); @@ -1132,7 +1131,7 @@ public class OagisShipmentServices { String outText = writer.toString(); try { - Map uomiCtx = FastMap.newInstance(); + Map uomiCtx = new HashMap(); uomiCtx.putAll(omiPkMap); uomiCtx.put("processingStatusId", "OAGMP_OGEN_SUCCESS"); uomiCtx.put("userLogin", userLogin); @@ -1148,7 +1147,7 @@ public class OagisShipmentServices { Map sendMessageReturn = OagisServices.sendMessageText(outText, out, sendToUrl, saveToDirectory, saveToFilename, locale, delegator); if (sendMessageReturn != null && ServiceUtil.isError(sendMessageReturn)) { try { - Map uomiCtx = FastMap.newInstance(); + Map uomiCtx = new HashMap(); uomiCtx.putAll(omiPkMap); uomiCtx.put("processingStatusId", "OAGMP_SEND_ERROR"); uomiCtx.put("userLogin", userLogin); @@ -1161,7 +1160,7 @@ public class OagisShipmentServices { } try { - Map uomiCtx = FastMap.newInstance(); + Map uomiCtx = new HashMap(); uomiCtx.putAll(omiPkMap); uomiCtx.put("processingStatusId", "OAGMP_SENT"); uomiCtx.put("userLogin", userLogin); @@ -1182,7 +1181,7 @@ public class OagisShipmentServices { return ServiceUtil.returnError(errMsg); } - Map uomiCtx = FastMap.newInstance(); + Map uomiCtx = new HashMap(); uomiCtx.putAll(omiPkMap); uomiCtx.put("processingStatusId", "OAGMP_SYS_ERROR"); uomiCtx.put("bsrVerb", "RECEIVE"); @@ -1193,7 +1192,7 @@ public class OagisShipmentServices { dispatcher.runSync("updateOagisMessageInfo", uomiCtx, 60, true); List> errorMapList = UtilMisc.toList(UtilMisc.toMap("description", errMsg, "reasonCode", "SystemError")); - Map saveErrorMapListCtx = FastMap.newInstance(); + Map saveErrorMapListCtx = new HashMap(); saveErrorMapListCtx.putAll(omiPkMap); saveErrorMapListCtx.put("errorMapList", errorMapList); saveErrorMapListCtx.put("userLogin", userLogin); diff --git a/specialpurpose/pos/src/org/ofbiz/guiapp/xui/XuiSession.java b/specialpurpose/pos/src/org/ofbiz/guiapp/xui/XuiSession.java index 28334bf722..81c4e9303a 100644 --- a/specialpurpose/pos/src/org/ofbiz/guiapp/xui/XuiSession.java +++ b/specialpurpose/pos/src/org/ofbiz/guiapp/xui/XuiSession.java @@ -18,11 +18,10 @@ *******************************************************************************/ package org.ofbiz.guiapp.xui; +import java.util.HashMap; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilMisc; @@ -45,7 +44,7 @@ public class XuiSession { protected LocalDispatcher dispatcher = null; protected GenericValue userLogin = null; protected XuiContainer container = null; - protected Map attributes = FastMap.newInstance(); + protected Map attributes = new HashMap(); protected String id = null; protected final boolean IS_SAME_LOGIN = UtilProperties.propertyValueEqualsIgnoreCase("xui.properties", "isSameLogin", "true"); private Locale locale = Locale.getDefault(); diff --git a/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java b/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java index e49351fd89..eb2f644059 100644 --- a/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java +++ b/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java @@ -22,14 +22,14 @@ import java.io.PrintWriter; import java.io.Serializable; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.ListIterator; import java.util.Locale; import java.util.Map; -import javolution.util.FastList; -import javolution.util.FastMap; import net.xoetrope.xui.data.XModel; import net.xoetrope.xui.helper.SwingWorker; @@ -259,7 +259,7 @@ public class PosTransaction implements Serializable { public Map getItemInfo(int index) { ShoppingCartItem item = cart.findCartItem(index); - Map itemInfo = FastMap.newInstance(); + Map itemInfo = new HashMap(); itemInfo.put("productId", item.getProductId()); String description = item.getDescription(); if (UtilValidate.isEmpty(description)) { @@ -300,7 +300,7 @@ public class PosTransaction implements Serializable { pcw = item.getConfigWrapper(); List selected = pcw.getSelectedOptions(); for (ConfigOption configoption : selected) { - Map itemInfo = FastMap.newInstance(); + Map itemInfo = new HashMap(); if (configoption.isSelected() && !configoption.isDefault()) { itemInfo.put("productId", ""); itemInfo.put("sku", ""); @@ -320,7 +320,7 @@ public class PosTransaction implements Serializable { GenericValue infValue = inf.getValueObject(session.getDelegator()); GenericValue paymentPref = null; try { - Map fields = FastMap.newInstance(); + Map fields = new HashMap(); fields.put("paymentMethodTypeId", inf.paymentMethodTypeId); if (inf.paymentMethodId != null) { fields.put("paymentMethodId", inf.paymentMethodId); @@ -345,7 +345,7 @@ public class PosTransaction implements Serializable { } //Debug.logInfo("PaymentPref - " + paymentPref, module); - Map payInfo = FastMap.newInstance(); + Map payInfo = new HashMap(); // locate the auth info GenericValue authTrans = null; @@ -845,7 +845,7 @@ public class PosTransaction implements Serializable { UtilMisc.toMap("reasonEnumId", "EnumIdHere"), // TODO: where does this come from? "itemCommentMap", UtilMisc.toMap("changeComments", "change Comments here")); //TODO - Map svcCtx = FastMap.newInstance(); + Map svcCtx = new HashMap(); svcCtx.put("userLogin", session.getUserLogin()); svcCtx.put("orderId", orderId); svcCtx.put("shoppingCart", cart); @@ -1139,7 +1139,7 @@ public class PosTransaction implements Serializable { expYear = "20" + expYear; } - Map svcCtx = FastMap.newInstance(); + Map svcCtx = new HashMap(); svcCtx.put("userLogin", session.getUserLogin()); svcCtx.put("partyId", partyId); svcCtx.put("cardNumber", cardNumber); @@ -1249,10 +1249,10 @@ public class PosTransaction implements Serializable { private List findOrders() { LocalDispatcher dispatcher = session.getDispatcher(); - Map svcCtx = FastMap.newInstance(); + Map svcCtx = new HashMap(); svcCtx.put("userLogin", session.getUserLogin()); svcCtx.put("partyId", partyId); - List orderStatusIds = FastList.newInstance(); + List orderStatusIds = new LinkedList(); orderStatusIds.add("ORDER_CREATED"); svcCtx.put("orderStatusId", orderStatusIds); svcCtx.put("viewIndex", 1); @@ -1318,7 +1318,7 @@ public class PosTransaction implements Serializable { } public Map createSalesMap(List shoppingLists) { - Map salesMap = FastMap.newInstance(); + Map salesMap = new HashMap(); for (GenericValue shoppingList : shoppingLists) { List items = null; try { @@ -1336,7 +1336,7 @@ public class PosTransaction implements Serializable { } public Map createOrderHash(List orders) { - Map hash = FastMap.newInstance(); + Map hash = new HashMap(); for (GenericValue order : orders) { String orderName = order.getString("orderName"); String orderId = order.getString("orderId"); @@ -1369,7 +1369,7 @@ public class PosTransaction implements Serializable { LocalDispatcher dispatcher = session.getDispatcher(); - Map svcCtx = FastMap.newInstance(); + Map svcCtx = new HashMap(); svcCtx.put("userLogin", session.getUserLogin()); svcCtx.put("orderId", orderId); svcCtx.put("skipInventoryChecks", Boolean.TRUE); @@ -1548,7 +1548,7 @@ public class PosTransaction implements Serializable { party.put(key, keyTypeValue); partyListIt.set(party); } else { - Map partyClone = FastMap.newInstance(); + Map partyClone = new HashMap(); partyClone.putAll(party); partyClone.put(key, keyTypeValue); partyListIt.add(partyClone); @@ -1602,11 +1602,11 @@ public class PosTransaction implements Serializable { } // define the main condition & expression list - List andExprs = FastList.newInstance(); + List andExprs = new LinkedList(); EntityCondition mainCond = null; - List orderBy = FastList.newInstance(); - List fieldsToSelect = FastList.newInstance(); + List orderBy = new LinkedList(); + List fieldsToSelect = new LinkedList(); // fields we need to select; will be used to set distinct fieldsToSelect.add("partyId"); fieldsToSelect.add("lastName"); @@ -1692,9 +1692,9 @@ public class PosTransaction implements Serializable { } if (partyList != null) { - resultList = FastList.newInstance(); + resultList = new LinkedList>(); for (GenericValue party : partyList) { - Map partyMap = FastMap.newInstance(); + Map partyMap = new HashMap(); partyMap.put("partyId", party.getString("partyId")); partyMap.put("lastName", party.getString("lastName")); partyMap.put("cardId", party.getString("cardId")); @@ -1721,7 +1721,7 @@ public class PosTransaction implements Serializable { resultList = searchContactMechs(delegator, pos, resultList, "", "EMAIL_ADDRESS"); } } else { - resultList = FastList.newInstance(); + resultList = new LinkedList>(); } return resultList; } @@ -1737,8 +1737,8 @@ public class PosTransaction implements Serializable { GenericValue partyUserLogin = null; String result = null; - Map svcCtx = FastMap.newInstance(); - Map svcRes = null; + Map svcCtx = new HashMap(); + Map svcRes = null; // Create if ("create".equals(editType)) { diff --git a/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java b/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java index ce08e77121..d80a0dc2c0 100644 --- a/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java +++ b/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java @@ -26,10 +26,10 @@ import java.math.BigDecimal; import java.net.URL; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.HashMap; import java.util.List; import java.util.Map; -import javolution.util.FastMap; import jpos.JposException; import jpos.POSPrinter; import jpos.POSPrinterConst; @@ -64,7 +64,7 @@ public class Receipt extends GenericDevice implements DialogCallback { protected SimpleDateFormat[] dateFormat = null; protected String[] storeReceiptTmpl = null; protected String[] custReceiptTmpl = null; - protected Map reportTmpl = FastMap.newInstance(); + protected Map reportTmpl = new HashMap(); protected static final String[] dateFmtStr = { "EEE, d MMM yyyy HH:mm:ss z", "EEE, d MMM yyyy HH:mm:ss z", "EEE, d MMM yyyy HH:mm:ss z" }; protected static final int[] priceLength = { 7, 7, 7 }; @@ -458,7 +458,7 @@ public class Receipt extends GenericDevice implements DialogCallback { } private Map makeCodeExpandMap(PosTransaction trans, int type) { - Map expandMap = FastMap.newInstance(); + Map expandMap = new HashMap(); SimpleDateFormat fmt = this.getDateFormat(type); String dateString = fmt.format(new Date()); diff --git a/specialpurpose/pos/src/org/ofbiz/pos/event/ManagerEvents.java b/specialpurpose/pos/src/org/ofbiz/pos/event/ManagerEvents.java index 682fbd1603..6e37609435 100644 --- a/specialpurpose/pos/src/org/ofbiz/pos/event/ManagerEvents.java +++ b/specialpurpose/pos/src/org/ofbiz/pos/event/ManagerEvents.java @@ -21,10 +21,10 @@ package org.ofbiz.pos.event; import java.math.BigDecimal; import java.sql.Timestamp; import java.text.DecimalFormat; +import java.util.HashMap; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; import net.xoetrope.xui.XProjectManager; import org.ofbiz.base.util.Debug; @@ -545,7 +545,7 @@ public class ManagerEvents { } - Map reportMap = FastMap.newInstance(); + Map reportMap = new HashMap(); String reportTemplate = "totals.txt"; // miscellaneous diff --git a/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/BaseService.java b/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/BaseService.java index 2c4ecf0c35..6bad15b72b 100644 --- a/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/BaseService.java +++ b/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/BaseService.java @@ -18,10 +18,9 @@ *******************************************************************************/ package org.ofbiz.pos.jpos.service; +import java.util.LinkedList; import java.util.List; -import javolution.util.FastList; - import jpos.services.EventCallbacks; import jpos.JposException; import jpos.JposConst; @@ -37,7 +36,7 @@ public class BaseService implements jpos.services.BaseService, jpos.loader.JposS public static final String module = BaseService.class.getName(); protected static boolean claimed = false; - protected List eventQueue = FastList.newInstance(); + protected List eventQueue = new LinkedList(); protected JposEntry entry = null; protected boolean freezeEvents = false; @@ -184,8 +183,8 @@ public class BaseService implements jpos.services.BaseService, jpos.loader.JposS } private void fireQueuedEvents() { - List queuedList = new FastList(eventQueue); - this.eventQueue = FastList.newInstance(); + List queuedList = new LinkedList(eventQueue); + this.eventQueue = new LinkedList(); for (Object obj : queuedList) { this.fireEvent(obj); } diff --git a/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java b/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java index 02ad01f2f1..811a0491f3 100644 --- a/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java +++ b/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java @@ -20,13 +20,13 @@ package org.ofbiz.pos.screen; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import javax.swing.DefaultComboBoxModel; -import javolution.util.FastList; import net.xoetrope.swing.XButton; import net.xoetrope.swing.XComboBox; import net.xoetrope.swing.XDialog; @@ -67,7 +67,7 @@ public class ClientProfile extends XPage implements ActionListener { protected XEdit m_cardEdit = null; protected XLabel m_clientListLabel = null; protected XComboBox m_clientListCombo = null; - protected List m_clientListBidingCombo = FastList.newInstance(); + protected List m_clientListBidingCombo = new LinkedList(); protected XLabel m_tipLoginPwdLabel = null; protected XButton m_search = null; protected XButton m_create = null; diff --git a/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java b/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java index 0214d8f079..b06d6be1bf 100644 --- a/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java +++ b/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java @@ -20,6 +20,7 @@ package org.ofbiz.pos.screen; import java.util.ArrayList; import java.util.EventObject; +import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Locale; @@ -31,7 +32,6 @@ import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; -import javolution.util.FastMap; import net.xoetrope.swing.XButton; import net.xoetrope.swing.XDialog; import net.xoetrope.swing.XList; @@ -176,7 +176,7 @@ public class ConfigureItem extends XPage { private void displayQuestions() { QuestionFactory qf = new QuestionFactory(); - questionHashMap = FastMap.newInstance(); + questionHashMap = new HashMap(); List questions = m_pcw.getQuestions(); diff --git a/specialpurpose/pos/src/org/ofbiz/pos/screen/LoadSale.java b/specialpurpose/pos/src/org/ofbiz/pos/screen/LoadSale.java index c8f5039056..bf6c7fab96 100644 --- a/specialpurpose/pos/src/org/ofbiz/pos/screen/LoadSale.java +++ b/specialpurpose/pos/src/org/ofbiz/pos/screen/LoadSale.java @@ -18,6 +18,7 @@ *******************************************************************************/ package org.ofbiz.pos.screen; +import java.util.HashMap; import java.util.Iterator; import java.util.Locale; import java.util.Map; @@ -25,7 +26,6 @@ import java.util.Map; import javax.swing.DefaultListModel; import javax.swing.ListSelectionModel; -import javolution.util.FastMap; import net.xoetrope.swing.XButton; import net.xoetrope.swing.XDialog; import net.xoetrope.swing.XList; @@ -47,7 +47,7 @@ public class LoadSale extends XPage { public static final String module = LoadSale.class.getName(); protected static PosScreen m_pos = null; protected XDialog m_dialog = null; - static protected Map m_saleMap = FastMap.newInstance(); + static protected Map m_saleMap = new HashMap(); protected XList m_salesList = null; protected XButton m_cancel = null; protected XButton m_add = null; diff --git a/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java b/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java index f2875fac8b..8a3b8396fa 100644 --- a/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java +++ b/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java @@ -19,13 +19,13 @@ package org.ofbiz.pos.screen; import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import javax.swing.DefaultComboBoxModel; -import javolution.util.FastList; import net.xoetrope.swing.XButton; import net.xoetrope.swing.XComboBox; import net.xoetrope.swing.XDialog; @@ -94,7 +94,7 @@ public class PaidInOut extends XPage { XEventHelper.addMouseHandler(this, m_amountEdit, "editAmount"); m_comboModel = new DefaultComboBoxModel(); - List posPaidReasons = FastList.newInstance(); + List posPaidReasons = new LinkedList(); if (m_type.equals("IN")) { m_dialog.setCaption(UtilProperties.getMessage(PosTransaction.resource, "PosPaidInTitle", locale)); try { diff --git a/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListResourceBillingHours.groovy b/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListResourceBillingHours.groovy index fd5b29696b..f3af564bbd 100644 --- a/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListResourceBillingHours.groovy +++ b/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListResourceBillingHours.groovy @@ -23,9 +23,6 @@ import org.ofbiz.entity.*; import org.ofbiz.entity.condition.*; import org.ofbiz.entity.util.*; import org.ofbiz.base.util.*; -import javolution.util.FastMap; -import javolution.util.FastList; - allProjects = select("workEffortId").from("WorkEffortAndPartyAssign").where("workEffortTypeId", "PROJECT", "partyId", parameters.partyId).orderBy("workEffortName").cache(true).queryList(); diff --git a/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/getProjectId.groovy b/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/getProjectId.groovy index 180a8645f0..91f82bb393 100644 --- a/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/getProjectId.groovy +++ b/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/getProjectId.groovy @@ -21,7 +21,6 @@ import java.util.*; import java.lang.*; import org.ofbiz.entity.*; import org.ofbiz.base.util.*; -import javolution.util.FastMap; if (parameters.workEffortId) { workEffortId = parameters.workEffortId; diff --git a/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumServices.xml b/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumServices.xml index bb3ba2457f..fcf02ad87c 100644 --- a/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumServices.xml +++ b/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumServices.xml @@ -1301,8 +1301,7 @@ - - + diff --git a/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java b/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java index 605e8f657a..1da871e823 100644 --- a/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java +++ b/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java @@ -20,6 +20,8 @@ package org.ofbiz.scrum; import java.io.IOException; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -28,9 +30,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javolution.util.FastList; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilHttp; @@ -57,7 +56,7 @@ public class ScrumEvents { HttpSession session = request.getSession(); Delegator delegator = (Delegator) session.getAttribute("delegator"); GenericValue userLogin = (GenericValue) session.getAttribute("userLogin"); - List> noTimeEntryList = FastList.newInstance(); + List> noTimeEntryList = new LinkedList>(); String partyId = userLogin.getString("partyId"); Timestamp now = UtilDateTime.nowTimestamp(); Timestamp weekStart = UtilDateTime.getWeekStart(now); @@ -88,7 +87,7 @@ public class ScrumEvents { //check EmplLeave List emplLeaveList = EntityQuery.use(delegator).from("EmplLeave").where("partyId", partyId, "fromDate", realTimeDate).cache(true).queryList(); if (UtilValidate.isEmpty(timeEntryList) && UtilValidate.isEmpty(emplLeaveList)) { - Map noEntryMap = FastMap.newInstance(); + Map noEntryMap = new HashMap(); noEntryMap.put("timesheetId", timesheetId); noTimeEntryList.add(noEntryMap); break; diff --git a/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java b/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java index fd951744e3..53037f7836 100644 --- a/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java +++ b/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java @@ -21,14 +21,13 @@ package org.ofbiz.scrum; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; -import javolution.util.FastList; -import javolution.util.FastMap; -import javolution.util.FastSet; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; @@ -173,7 +172,7 @@ public class ScrumServices { Integer revision = Integer.parseInt(latestRevision.trim()); for (int i = 1; i <= revision; i++) { String logline = null; - List logMessageList = FastList.newInstance(); + List logMessageList = new LinkedList(); String logCommand = "svn log -r" + i + " " + repositoryRoot; Process logProcess = Runtime.getRuntime().exec(logCommand); BufferedReader logIn = new BufferedReader(new InputStreamReader(logProcess.getInputStream())); @@ -205,10 +204,10 @@ public class ScrumServices { if (UtilValidate.isNotEmpty(taskId)) { String version = "R" + i; List workeffContentList = EntityQuery.use(delegator).from("WorkEffortAndContentDataResource").where("contentName",version.trim() ,"drObjectInfo", revisionLink.trim()).queryList(); - List exprsAnd = FastList.newInstance(); + List exprsAnd = new LinkedList(); exprsAnd.add(EntityCondition.makeCondition("workEffortId", EntityOperator.EQUALS, taskId)); - List exprsOr = FastList.newInstance(); + List exprsOr = new LinkedList(); exprsOr.add(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "SCRUM_TASK_ERROR")); exprsOr.add(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "SCRUM_TASK_TEST")); exprsOr.add(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "SCRUM_TASK_IMPL")); @@ -217,7 +216,7 @@ public class ScrumServices { List workEffortList = EntityQuery.use(delegator).from("WorkEffort").where(exprsAnd).queryList(); if (UtilValidate.isEmpty(workeffContentList) && UtilValidate.isNotEmpty(workEffortList)) { - Map inputMap = FastMap.newInstance(); + Map inputMap = new HashMap(); inputMap.put("taskId", taskId); inputMap.put("user", user); inputMap.put("revisionNumber", Integer.toString(i)); @@ -260,7 +259,7 @@ public class ScrumServices { String repositoryRoot = (String) context.get("repositoryRoot"); Map result = ServiceUtil.returnSuccess(); try { - List exprsAnd = FastList.newInstance(); + List exprsAnd = new LinkedList(); String revisionLink = repositoryRoot.substring(repositoryRoot.lastIndexOf("svn/") + 4, repositoryRoot.length()) + "&revision="; exprsAnd.add(EntityCondition.makeCondition("workEffortContentTypeId", EntityOperator.EQUALS, "TASK_SUB_INFO")); exprsAnd.add(EntityCondition.makeCondition("contentTypeId", EntityOperator.EQUALS, "DOCUMENT")); @@ -268,8 +267,8 @@ public class ScrumServices { List workEffortDataResourceList = EntityQuery.use(delegator).from("WorkEffortAndContentDataResource").where(exprsAnd).queryList(); if (UtilValidate.isNotEmpty(workEffortDataResourceList)) { Debug.logInfo("Total Content Size ============== >>>>>>>>>>> "+ workEffortDataResourceList.size(), module); - Set keys = FastSet.newInstance(); - Set exclusions = FastSet.newInstance(); + Set keys = new HashSet(); + Set exclusions = new HashSet(); for (GenericValue workEffort : workEffortDataResourceList) { String drObjectInfo = workEffort.getString("drObjectInfo"); if (keys.contains(drObjectInfo)) { diff --git a/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/FindBacklogItem.groovy b/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/FindBacklogItem.groovy index e33a7028a0..fd896208e1 100644 --- a/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/FindBacklogItem.groovy +++ b/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/FindBacklogItem.groovy @@ -19,7 +19,6 @@ import java.util.*; import java.lang.*; -import javolution.util.FastList; import org.ofbiz.base.util.*; import org.ofbiz.entity.*; import org.ofbiz.base.util.UtilMisc; @@ -35,10 +34,10 @@ backlogList=[]; custRequestList = from("CustRequestItem").where("productId", productId).queryList(); custRequestList.each { custRequestListMap -> custRequestId=custRequestListMap.custRequestId; - exprBldr = FastList.newInstance(); + exprBldr = []; exprBldr.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "CRQ_REOPENED")); exprBldr.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "CRQ_REVIEWED")); - andExprs = FastList.newInstance(); + andExprs = []; andExprs.add(EntityCondition.makeCondition("custRequestId", EntityOperator.EQUALS, custRequestId)); andExprs.add(EntityCondition.makeCondition(exprBldr, EntityOperator.OR)); custRequestTypeCond = EntityCondition.makeCondition(andExprs, EntityOperator.AND); diff --git a/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/FindTaskList.groovy b/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/FindTaskList.groovy index 53746bab34..35d02763d3 100644 --- a/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/FindTaskList.groovy +++ b/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/FindTaskList.groovy @@ -19,7 +19,6 @@ import java.util.*; import java.lang.*; -import javolution.util.FastList; import org.apache.tools.ant.taskdefs.Parallel.TaskList; import org.ofbiz.base.util.*; import org.ofbiz.entity.*; @@ -56,7 +55,7 @@ if ((taskId != null)||(taskName != null)||(taskTypeId != null)||(sprintId != nul ||(partyId != null)||(viewIndex_1 > 0)||(viewIndex_2 > 0)||(viewIndex_3 > 0)||(viewIndex_4 > 0) ||(viewIndexNo_1 > 0)||(viewIndexNo_2 > 0)||(viewIndexNo_3 > 0)||(viewIndexNo_4 > 0)){ if ((taskId != null)||(taskName != null)||(taskTypeId != null)){ - exprBldr = FastList.newInstance(); + exprBldr = []; if (taskId) { exprBldr.add(EntityCondition.makeCondition("workEffortId", EntityOperator.EQUALS, taskId)); } @@ -75,7 +74,7 @@ if ((taskId != null)||(taskName != null)||(taskTypeId != null)||(sprintId != nul unplannedTaskList = from("UnPlannedBacklogsAndTasks").orderBy("-createdDate").queryList(); } - exprBldr2 = FastList.newInstance(); + exprBldr2 = []; if (taskId) { exprBldr2.add(EntityCondition.makeCondition("taskId", EntityOperator.EQUALS, taskId)); } diff --git a/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListScrumPreferenceSecurityGroup.groovy b/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListScrumPreferenceSecurityGroup.groovy index 45b60fd605..58a96a1b20 100644 --- a/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListScrumPreferenceSecurityGroup.groovy +++ b/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListScrumPreferenceSecurityGroup.groovy @@ -22,13 +22,12 @@ import org.ofbiz.base.util.*; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.condition.EntityOperator; -import javolution.util.FastList; partyId = parameters.partyId; -andCond = FastList.newInstance(); -orCond = FastList.newInstance(); -combinedCondList = FastList.newInstance(); +andCond = []; +orCond = []; +combinedCondList = []; andCond.add(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId)); andCond.add(EntityCondition.makeCondition("partyStatusId", EntityOperator.EQUALS, "PARTY_ENABLED")); @@ -53,19 +52,19 @@ userPreferenceOutList = []; if (scrumUserLoginSecurityGroupList) { scrumUserLoginSecurityGroupList.each { scrumUserLoginSecurityGroupMap -> if (scrumUserLoginSecurityGroupMap.groupId == "SCRUM_PRODUCT_OWNER") { - ownerCond = FastList.newInstance(); + ownerCond = []; ownerCond.add(EntityCondition.makeCondition("enumTypeId", EntityOperator.EQUALS, "SCRUM_PREFERENCE")); ownerCond.add(EntityCondition.makeCondition("enumId", EntityOperator.NOT_EQUAL, "MASTER_NOTIFY")); ownerConds = EntityCondition.makeCondition(ownerCond, EntityOperator.AND); userPreferenceList = from("Enumeration").where(ownerConds).queryList(); } else if (scrumUserLoginSecurityGroupMap.groupId == "SCRUM_MASTER") { - masterCond = FastList.newInstance(); + masterCond = []; masterCond.add(EntityCondition.makeCondition("enumTypeId", EntityOperator.EQUALS, "SCRUM_PREFERENCE")); masterCond.add(EntityCondition.makeCondition("enumId", EntityOperator.EQUALS, "MASTER_NOTIFY")); masterConds = EntityCondition.makeCondition(masterCond, EntityOperator.AND); userPreferenceList = from("Enumeration").where(masterConds).queryList(); } /*else if (scrumUserLoginSecurityGroupMap.groupId == "SCRUM_TEAM") { - teamCond = FastList.newInstance(); + teamCond = []; teamCond.add(EntityCondition.makeCondition("enumTypeId", EntityOperator.EQUALS, "SCRUM_PREFERENCE")); teamCond.add(EntityCondition.makeCondition("enumId", EntityOperator.EQUALS, "INVITE_NOTIFI")); teamConds = EntityCondition.makeCondition(teamCond, EntityOperator.AND); diff --git a/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListScrumResource.groovy b/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListScrumResource.groovy index 18836f2e25..ceed9c5b88 100644 --- a/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListScrumResource.groovy +++ b/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListScrumResource.groovy @@ -23,8 +23,6 @@ import org.ofbiz.entity.*; import org.ofbiz.entity.condition.*; import org.ofbiz.entity.util.*; import org.ofbiz.base.util.*; -import javolution.util.FastMap; -import javolution.util.FastList; import org.ofbiz.entity.condition.EntityFunction; def module = "ListScrumResource.groovy"; diff --git a/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListUnplanBacklog.groovy b/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListUnplanBacklog.groovy index 39ac177f2e..012272e53e 100644 --- a/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListUnplanBacklog.groovy +++ b/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListUnplanBacklog.groovy @@ -17,14 +17,13 @@ * under the License. */ -import javolution.util.FastList; import org.ofbiz.entity.condition.*; import org.ofbiz.base.util.*; taskStatusId = null; paraBacklogStatusId = backlogStatusId; -orStsExprs = FastList.newInstance(); +orStsExprs = []; if (backlogStatusId != "Any") { taskStatusId = "STS_CREATED"; orStsExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "CRQ_REVIEWED")); @@ -32,12 +31,12 @@ orStsExprs = FastList.newInstance(); orStsExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "CRQ_REVIEWED")); orStsExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "CRQ_COMPLETED")); } -orCurentExprs = FastList.newInstance(); +orCurentExprs = []; if (taskStatusId) { orCurentExprs.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, taskStatusId)); orCurentExprs.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, null)); } -andExprs = FastList.newInstance(); +andExprs = []; andExprs.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, parameters.productId)); andExprs.add(EntityCondition.makeCondition("custRequestTypeId", EntityOperator.EQUALS, "RF_UNPLAN_BACKLOG")); andExprs.add(EntityCondition.makeCondition(orStsExprs, EntityOperator.OR)); diff --git a/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/SprintBacklogListItems.groovy b/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/SprintBacklogListItems.groovy index bd47c62bd8..2370f10152 100644 --- a/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/SprintBacklogListItems.groovy +++ b/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/SprintBacklogListItems.groovy @@ -17,7 +17,6 @@ * under the License. */ -import javolution.util.FastList; import org.ofbiz.entity.condition.*; import org.ofbiz.base.util.*; @@ -39,19 +38,19 @@ if ("SPRINT_CLOSED".equals(currentStatus)) { taskStatusId = "STS_CREATED"; } } -orCurentExprs = FastList.newInstance(); +orCurentExprs = []; if (taskStatusId) { orCurentExprs.add(EntityCondition.makeCondition("taskCurrentStatusId", EntityOperator.EQUALS, taskStatusId)); orCurentExprs.add(EntityCondition.makeCondition("taskCurrentStatusId", EntityOperator.EQUALS, "SPRINT_ACTIVE")); } -orBacklogExprs = FastList.newInstance(); +orBacklogExprs = []; if (backlogStatusId) { orBacklogExprs.add(EntityCondition.makeCondition("backlogStatusId", EntityOperator.EQUALS, backlogStatusId)); } if (reopenedStatusId) { orBacklogExprs.add(EntityCondition.makeCondition("backlogStatusId", EntityOperator.EQUALS, reopenedStatusId)); } -andExprs = FastList.newInstance(); +andExprs = []; if (parameters.projectId) { andExprs.add(EntityCondition.makeCondition("projectId", EntityOperator.EQUALS, parameters.projectId)); } else { diff --git a/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/TaskList.groovy b/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/TaskList.groovy index b7fc22623d..186775d732 100644 --- a/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/TaskList.groovy +++ b/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/TaskList.groovy @@ -19,7 +19,6 @@ import java.util.*; import java.lang.*; -import javolution.util.FastList; import org.apache.tools.ant.taskdefs.Parallel.TaskList; import org.ofbiz.base.util.*; import org.ofbiz.entity.*; @@ -63,10 +62,10 @@ taskUnplanList.each { taskUnplanMap -> taskListDropdown.add(unplanMap); } -exprBldr = FastList.newInstance(); +exprBldr = []; exprBldr.add(EntityCondition.makeCondition("custRequestTypeId", EntityOperator.EQUALS, "RF_PROD_BACKLOG")); exprBldr.add(EntityCondition.makeCondition("custRequestTypeId", EntityOperator.EQUALS, "RF_SCRUM_MEETINGS")); -andExprs = FastList.newInstance(); +andExprs = []; andExprs.add(EntityCondition.makeCondition("taskCurrentStatusId", EntityOperator.EQUALS, "STS_CREATED")); andExprs.add(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId)); andExprs.add(EntityCondition.makeCondition(exprBldr, EntityOperator.OR)); diff --git a/specialpurpose/scrum/webapp/scrum/reports/BacklogByStatusChart.rptdesign b/specialpurpose/scrum/webapp/scrum/reports/BacklogByStatusChart.rptdesign index 7680a2b8ab..25da643814 100644 --- a/specialpurpose/scrum/webapp/scrum/reports/BacklogByStatusChart.rptdesign +++ b/specialpurpose/scrum/webapp/scrum/reports/BacklogByStatusChart.rptdesign @@ -22,7 +22,7 @@ under the License. in in in = dayNumber || currentDay >= 0) return false; @@ -251,7 +251,7 @@ if (nowTimestamp.getTime() >= conditionTimestampFrom.getTime() && nowTim } // get public holiday -var holidayConds = FastList.newInstance(); +var holidayConds = new LinkedkList(); holidayConds.add(EntityCondition.makeCondition("workEffortTypeId",EntityOperator.EQUALS, "PUBLIC_HOLIDAY")); holidayConds.add(EntityCondition.makeCondition("estimatedStartDate", EntityOperator.EQUALS, conditionTimestampFrom)); var fieldsToSelect = UtilMisc.toSet("workEffortId","estimatedStartDate"); @@ -268,7 +268,7 @@ if (isHoliday) { holidays.add(sprintDay + ""); reportContext.getAppContext().put("holidays", holidays); } -input = FastMap.newInstance(); +input = new HashMap(); var plannedHours = BigDecimal.ZERO; var actualHours = BigDecimal.ZERO; @@ -279,7 +279,7 @@ for (i=0; i Data Source - in in in featureMap = null; Map variantTreeMap = null; - Map featureTypes = FastMap.newInstance(); + Map featureTypes = new HashMap(); WebPosSession webPosSession = getWebPosSession(request, null); if (webPosSession != null) { Delegator delegator = webPosSession.getDelegator(); @@ -184,7 +183,7 @@ public class WebPosEvents { if (UtilValidate.isNotEmpty(variantTree)) { request.setAttribute("variantTree", variantTree); request.setAttribute("variantTreeSize", variantTree.size()); - List featureOrder = FastList.newInstance(); + List featureOrder = new LinkedList(); featureOrder = UtilMisc.toList(featureSet); for (int i=0; i < featureOrder.size(); i++) { String featureKey = featureOrder.get(i); @@ -204,7 +203,7 @@ public class WebPosEvents { } Map imageMap = UtilGenerics.cast(variantTreeMap.get("variantSample")); if (UtilValidate.isNotEmpty(imageMap)) { - List variantSampleList = FastList.newInstance(); + List variantSampleList = new LinkedList(); variantSampleList = UtilMisc.toList(imageMap.keySet()); request.setAttribute("variantSample", imageMap); request.setAttribute("variantSampleList", variantSampleList); diff --git a/specialpurpose/webpos/src/org/ofbiz/webpos/search/WebPosSearch.java b/specialpurpose/webpos/src/org/ofbiz/webpos/search/WebPosSearch.java index 32c2424819..4dedd4769e 100644 --- a/specialpurpose/webpos/src/org/ofbiz/webpos/search/WebPosSearch.java +++ b/specialpurpose/webpos/src/org/ofbiz/webpos/search/WebPosSearch.java @@ -18,11 +18,10 @@ *******************************************************************************/ package org.ofbiz.webpos.search; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import javolution.util.FastList; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; @@ -51,7 +50,7 @@ public class WebPosSearch { String goodIdentificationTypeId = (String) context.get("goodIdentificationTypeId"); Map result = ServiceUtil.returnSuccess(); - List andExprs = FastList.newInstance(); + List andExprs = new LinkedList(); EntityCondition mainCond = null; String entityName = "Product"; @@ -95,10 +94,10 @@ public class WebPosSearch { String shippingLocation = (String) context.get("shippingLocation"); Map result = ServiceUtil.returnSuccess(); - List andExprs = FastList.newInstance(); - List orExprs = FastList.newInstance(); + List andExprs = new LinkedList(); + List orExprs = new LinkedList(); EntityCondition mainCond = null; - List orderBy = FastList.newInstance(); + List orderBy = new LinkedList(); // default view settings DynamicViewEntity dynamicView = new DynamicViewEntity(); diff --git a/specialpurpose/webpos/src/org/ofbiz/webpos/session/WebPosSession.java b/specialpurpose/webpos/src/org/ofbiz/webpos/session/WebPosSession.java index 9eef9d34b4..23a3067921 100755 --- a/specialpurpose/webpos/src/org/ofbiz/webpos/session/WebPosSession.java +++ b/specialpurpose/webpos/src/org/ofbiz/webpos/session/WebPosSession.java @@ -18,11 +18,10 @@ *******************************************************************************/ package org.ofbiz.webpos.session; +import java.util.HashMap; import java.util.Locale; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilMisc; @@ -44,7 +43,7 @@ public class WebPosSession { public static final String module = WebPosSession.class.getName(); private String id = null; - private Map attributes = FastMap.newInstance(); + private Map attributes = new HashMap(); private GenericValue userLogin = null; private Locale locale = null; private String productStoreId = null; diff --git a/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java b/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java index 9f5026a7ba..d82cce7f4f 100755 --- a/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java +++ b/specialpurpose/webpos/src/org/ofbiz/webpos/transaction/WebPosTransaction.java @@ -19,12 +19,11 @@ package org.ofbiz.webpos.transaction; import java.math.BigDecimal; +import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; -import javolution.util.FastMap; - import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; @@ -419,7 +418,7 @@ public class WebPosTransaction { expYear = "20" + expYear; } - Map svcCtx = FastMap.newInstance(); + Map svcCtx = new HashMap(); svcCtx.put("userLogin", webPosSession.getUserLogin()); svcCtx.put("partyId", partyId); svcCtx.put("cardNumber", cardNumber); diff --git a/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/catalog/SideDeepCategory.groovy b/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/catalog/SideDeepCategory.groovy index 92592e319e..326e777d80 100644 --- a/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/catalog/SideDeepCategory.groovy +++ b/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/catalog/SideDeepCategory.groovy @@ -19,7 +19,6 @@ import org.ofbiz.base.util.*; import org.ofbiz.product.catalog.*; import org.ofbiz.product.category.*; -import javolution.util.FastMap; CategoryWorker.getRelatedCategories(request, "topLevelList", CatalogWorker.getCatalogTopCategoryId(request, CatalogWorker.getCurrentCatalogId(request)), true); curCategoryId = parameters.category_id ?: parameters.CATEGORY_ID ?: ""; @@ -28,7 +27,7 @@ CategoryWorker.setTrail(request, curCategoryId); categoryList = request.getAttribute("topLevelList"); if (categoryList) { - catContentWrappers = FastMap.newInstance(); + catContentWrappers = [:]; CategoryWorker.getCategoryContentWrappers(catContentWrappers, categoryList, request); context.catContentWrappers = catContentWrappers; }