You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by nm...@apache.org on 2015/04/10 22:22:59 UTC
svn commit: r1672752 [12/18] - in /ofbiz/trunk:
applications/accounting/src/org/ofbiz/accounting/agreement/
applications/accounting/src/org/ofbiz/accounting/finaccount/
applications/accounting/src/org/ofbiz/accounting/invoice/
applications/accounting/s...
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java Fri Apr 10 20:22:54 2015
@@ -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 j
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<PackingSessionLine>();
+ this.packEvents = new LinkedList<PackingEvent>();
+ this.itemInfos = new LinkedList<PackingSession.ItemDisplay>();
this.packageSeq = 1;
- this.packageWeights = FastMap.newInstance();
- this.shipmentBoxTypes = FastMap.newInstance();
+ this.packageWeights = new HashMap<Integer, BigDecimal>();
+ this.shipmentBoxTypes = new HashMap<Integer, String>();
}
public PackingSession(LocalDispatcher dispatcher, GenericValue userLogin, String facilityId) {
@@ -130,7 +129,7 @@ public class PackingSession implements j
}
// get the reservations for the item
- Map<String, Object> invLookup = FastMap.newInstance();
+ Map<String, Object> invLookup = new HashMap<String, Object>();
invLookup.put("orderId", orderId);
invLookup.put("orderItemSeqId", orderItemSeqId);
invLookup.put("shipGroupSeqId", shipGroupSeqId);
@@ -148,7 +147,7 @@ public class PackingSession implements j
this.createPackLineItem(checkCode, res, orderId, orderItemSeqId, shipGroupSeqId, productId, quantity, weight, packageSeqId);
} else {
// more than one reservation found
- Map<GenericValue, BigDecimal> toCreateMap = FastMap.newInstance();
+ Map<GenericValue, BigDecimal> toCreateMap = new HashMap<GenericValue, BigDecimal>();
Iterator<GenericValue> i = reservations.iterator();
BigDecimal qtyRemain = quantity;
@@ -250,7 +249,7 @@ public class PackingSession implements j
}
protected String findOrderItemSeqId(String productId, String orderId, String shipGroupSeqId, BigDecimal quantity) throws GeneralException {
- Map<String, Object> lookupMap = FastMap.newInstance();
+ Map<String, Object> lookupMap = new HashMap<String, Object>();
lookupMap.put("orderId", orderId);
lookupMap.put("productId", productId);
lookupMap.put("statusId", "ITEM_APPROVED");
@@ -263,7 +262,7 @@ public class PackingSession implements j
if (orderItems != null) {
for (GenericValue item: orderItems) {
// get the reservations for the item
- Map<String, Object> invLookup = FastMap.newInstance();
+ Map<String, Object> invLookup = new HashMap<String, Object>();
invLookup.put("orderId", orderId);
invLookup.put("orderItemSeqId", item.getString("orderItemSeqId"));
invLookup.put("shipGroupSeqId", shipGroupSeqId);
@@ -343,23 +342,23 @@ public class PackingSession implements j
* @return result Map with packageMap and sortedKeys
*/
public Map<Object, Object> getPackingSessionLinesByPackage() {
- FastMap<Integer, List<PackingSessionLine>> packageMap = FastMap.newInstance();
+ Map<Integer, List<PackingSessionLine>> packageMap = new HashMap<Integer, List<PackingSessionLine>>();
for (PackingSessionLine line : packLines) {
int pSeq = line.getPackageSeq();
List<PackingSessionLine> packageLineList = packageMap.get(pSeq);
if (packageLineList == null) {
- packageLineList = FastList.newInstance();
+ packageLineList = new LinkedList<PackingSessionLine>();
packageMap.put(pSeq, packageLineList);
}
packageLineList.add(line);
}
Object[] keys = packageMap.keySet().toArray();
java.util.Arrays.sort(keys);
- List<Object> sortedKeys = FastList.newInstance();
+ List<Object> sortedKeys = new LinkedList<Object>();
for (Object key : keys) {
sortedKeys.add(key);
}
- Map<Object, Object> result = FastMap.newInstance();
+ Map<Object, Object> result = new HashMap<Object, Object>();
result.put("packageMap", packageMap);
result.put("sortedKeys", sortedKeys);
return result;
@@ -474,7 +473,7 @@ public class PackingSession implements j
}
public List<String> getCurrentShipmentIds(String orderId, String orderItemSeqId, String shipGroupSeqId) {
- Set<String> shipmentIds = FastSet.newInstance();
+ Set<String> shipmentIds = new HashSet<String>();
List<GenericValue> issues = this.getItemIssuances(orderId, orderItemSeqId, shipGroupSeqId);
if (issues != null) {
@@ -483,7 +482,7 @@ public class PackingSession implements j
}
}
- List<String> retList = FastList.newInstance();
+ List<String> retList = new LinkedList<String>();
retList.addAll(shipmentIds);
return retList;
}
@@ -655,7 +654,7 @@ public class PackingSession implements j
}
protected void checkReservations(boolean ignore) throws GeneralException {
- List<String> errors = FastList.newInstance();
+ List<String> errors = new LinkedList<String>();
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 j
}
protected void checkEmptyLines() throws GeneralException {
- List<PackingSessionLine> lines = FastList.newInstance();
+ List<PackingSessionLine> lines = new LinkedList<PackingSessionLine>();
lines.addAll(this.getLines());
for (PackingSessionLine l: lines) {
if (l.getQuantity().compareTo(BigDecimal.ZERO) == 0) {
@@ -698,7 +697,7 @@ public class PackingSession implements j
throw new IllegalArgumentException("Value for orderId is null");
}
- Map<String, Object> lookupMap = FastMap.newInstance();
+ Map<String, Object> lookupMap = new HashMap<String, Object>();
lookupMap.put("orderId", orderId);
if (UtilValidate.isNotEmpty(orderItemSeqId)) {
lookupMap.put("orderItemSeqId", orderItemSeqId);
@@ -718,7 +717,7 @@ public class PackingSession implements j
protected void createShipment() throws GeneralException {
// first create the shipment
Delegator delegator = this.getDelegator();
- Map<String, Object> newShipment = FastMap.newInstance();
+ Map<String, Object> newShipment = new HashMap<String, Object>();
newShipment.put("originFacilityId", this.facilityId);
newShipment.put("primaryShipGroupSeqId", primaryShipGrp);
newShipment.put("primaryOrderId", primaryOrderId);
@@ -770,7 +769,7 @@ public class PackingSession implements j
}
protected void issueItemsToShipment() throws GeneralException {
- List<PackingSessionLine> processedLines = FastList.newInstance();
+ List<PackingSessionLine> processedLines = new LinkedList<PackingSessionLine>();
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 j
for (int i = 0; i < packageSeq; i++) {
String shipmentPackageSeqId = UtilFormatOut.formatPaddedNumber(i+1, 5);
- Map<String, Object> pkgCtx = FastMap.newInstance();
+ Map<String, Object> pkgCtx = new HashMap<String, Object>();
pkgCtx.put("shipmentId", shipmentId);
pkgCtx.put("shipmentPackageSeqId", shipmentPackageSeqId);
pkgCtx.put("shipmentBoxTypeId", getShipmentBoxType(i+1));
@@ -844,7 +843,7 @@ public class PackingSession implements j
// first find the picklist id
GenericValue bin = this.getDelegator().findOne("PicklistBin", UtilMisc.toMap("picklistBinId", picklistBinId), false);
if (bin != null) {
- Map<String, Object> ctx = FastMap.newInstance();
+ Map<String, Object> ctx = new HashMap<String, Object>();
ctx.put("picklistId", bin.getString("picklistId"));
ctx.put("partyId", pickerPartyId);
ctx.put("roleTypeId", "PICKER");
@@ -901,7 +900,7 @@ public class PackingSession implements j
BigDecimal shipmentCostEstimate = null;
Map<String, Object> serviceResult = null;
try {
- Map<String, Object> serviceContext = FastMap.newInstance();
+ Map<String, Object> serviceContext = new HashMap<String, Object>();
serviceContext.put("shippingContactMechId", shippingContactMechId);
serviceContext.put("shipmentMethodTypeId", shipmentMethodTypeId);
serviceContext.put("carrierPartyId", carrierPartyId);
@@ -909,7 +908,7 @@ public class PackingSession implements j
serviceContext.put("productStoreId", productStoreId);
if (UtilValidate.isEmpty(shippableItemInfo)) {
- shippableItemInfo = FastList.newInstance();
+ shippableItemInfo = new LinkedList<GenericValue>();
for (PackingSessionLine line: getLines()) {
List<GenericValue> oiasgas = getDelegator().findByAnd("OrderItemAndShipGroupAssoc", UtilMisc.toMap("orderId", line.getOrderId(), "orderItemSeqId", line.getOrderItemSeqId(), "shipGroupSeqId", line.getShipGroupSeqId()), null, false);
shippableItemInfo.addAll(oiasgas);
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java Fri Apr 10 20:22:54 2015
@@ -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 implemen
quantity = this.getQuantity();
}
- Map<String, Object> issueMap = FastMap.newInstance();
+ Map<String, Object> issueMap = new HashMap<String, Object>();
issueMap.put("shipmentId", shipmentId);
issueMap.put("orderId", this.getOrderId());
issueMap.put("orderItemSeqId", this.getOrderItemSeqId());
@@ -207,7 +206,7 @@ public class PackingSessionLine implemen
// find the pick list item
Debug.logInfo("Looking up picklist item for bin ID #" + picklistBinId, module);
Delegator delegator = dispatcher.getDelegator();
- Map<String, Object> itemLookup = FastMap.newInstance();
+ Map<String, Object> itemLookup = new HashMap<String, Object>();
itemLookup.put("picklistBinId", picklistBinId);
itemLookup.put("orderId", this.getOrderId());
itemLookup.put("orderItemSeqId", this.getOrderItemSeqId());
@@ -244,7 +243,7 @@ public class PackingSessionLine implemen
// assign item to package
String shipmentPackageSeqId = UtilFormatOut.formatPaddedNumber(this.getPackageSeq(), 5);
- Map<String, Object> packageMap = FastMap.newInstance();
+ Map<String, Object> packageMap = new HashMap<String, Object>();
packageMap.put("shipmentId", shipmentId);
packageMap.put("shipmentItemSeqId", this.getShipmentItemSeqId());
packageMap.put("quantity", this.getQuantity());
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java Fri Apr 10 20:22:54 2015
@@ -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<EntityCondition> conditionList1 = FastList.newInstance();
- List<EntityCondition> conditionList2 = FastList.newInstance();
+ List<EntityCondition> conditionList1 = new LinkedList<EntityCondition>();
+ List<EntityCondition> conditionList2 = new LinkedList<EntityCondition>();
// we are only concerned about approved sales orders
conditionList2.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "ORDER_APPROVED"));
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Fri Apr 10 20:22:54 2015
@@ -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<String, Object> createShipmentEstimate(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
- List<GenericValue> storeAll = FastList.newInstance();
+ List<GenericValue> storeAll = new LinkedList<GenericValue>();
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<GenericValue> estimateList = FastList.newInstance();
+ List<GenericValue> estimateList = new LinkedList<GenericValue>();
for (GenericValue thisEstimate: estimates) {
String toGeo = thisEstimate.getString("geoIdTo");
@@ -426,8 +425,8 @@ public class ShipmentServices {
}
// make the shippable item size/feature objects
- List<BigDecimal> shippableItemSizes = FastList.newInstance();
- Map<String, BigDecimal> shippableFeatureMap = FastMap.newInstance();
+ List<BigDecimal> shippableItemSizes = new LinkedList<BigDecimal>();
+ Map<String, BigDecimal> shippableFeatureMap = new HashMap<String, BigDecimal>();
if (shippableItemInfo != null) {
for (Map<String, Object> itemMap: shippableItemInfo) {
// add the item sizes
@@ -676,7 +675,7 @@ public class ShipmentServices {
GenericValue routeSeg = EntityUtil.getFirst(routeSegs);
// to store list
- List<GenericValue> toStore = FastList.newInstance();
+ List<GenericValue> toStore = new LinkedList<GenericValue>();
//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<String, String> shipmentMap = FastMap.newInstance();
+ Map<String, String> shipmentMap = new HashMap<String, String>();
EntityListIterator eli = null;
try {
@@ -778,7 +777,7 @@ public class ShipmentServices {
}
}
- Map<String, Object> pkgCtx = FastMap.newInstance();
+ Map<String, Object> pkgCtx = new HashMap<String, Object>();
pkgCtx.put("shipmentId", shipmentId);
pkgCtx.put("shipmentPackageSeqId", packageSeqId);
@@ -857,7 +856,7 @@ public class ShipmentServices {
for (Map.Entry<String, String> entry: shipmentMap.entrySet()) {
String shipmentId = entry.getKey();
String voidInd = entry.getValue();
- Map<String, Object> shipCtx = FastMap.newInstance();
+ Map<String, Object> shipCtx = new HashMap<String, Object>();
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<String, BigDecimal> shippedCountMap = FastMap.newInstance();
+ Map<String, BigDecimal> shippedCountMap = new HashMap<String, BigDecimal>();
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<String, BigDecimal> receivedCountMap = FastMap.newInstance();
+ Map<String, BigDecimal> receivedCountMap = new HashMap<String, BigDecimal>();
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<String, Object> sendMap = FastMap.newInstance();
+ Map<String, Object> sendMap = new HashMap<String, Object>();
GenericValue shipment = null ;
GenericValue orderHeader = null;
try {
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java Fri Apr 10 20:22:54 2015
@@ -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<Map<String, BigDecimal>> getPackageSplit(DispatchContext dctx, List<Map<String, Object>> shippableItemInfo, BigDecimal maxWeight) {
// create the package list w/ the first package
- List<Map<String, BigDecimal>> packages = FastList.newInstance();
+ List<Map<String, BigDecimal>> packages = new LinkedList<Map<String,BigDecimal>>();
if (UtilValidate.isNotEmpty(shippableItemInfo)) {
for (Map<String, Object> 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<String, BigDecimal> newPackage = FastMap.newInstance();
+ Map<String, BigDecimal> newPackage = new HashMap<String, BigDecimal>();
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.<String, BigDecimal>newInstance());
+ packages.add(new HashMap<String, BigDecimal>());
}
// package loop
@@ -147,7 +146,7 @@ public class ShipmentWorker {
}
}
if (!addedToPackage) {
- Map<String, BigDecimal> packageMap = FastMap.newInstance();
+ Map<String, BigDecimal> packageMap = new HashMap<String, BigDecimal>();
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<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
try {
result = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", weightUomId, "uomIdTo", "WT_lb", "originalValue", productWeight));
} catch (GenericServiceException ex) {
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/test/IssuanceTest.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/test/IssuanceTest.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/test/IssuanceTest.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/test/IssuanceTest.java Fri Apr 10 20:22:54 2015
@@ -56,7 +56,7 @@ public class IssuanceTest extends OFBizT
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 OFBizT
// Test the OrderShipment is correct
List<GenericValue> 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 OFBizT
assertTrue("Incorrect quantity in OrderShipment. Expected 6.00000 actual " + actual, actual.compareTo(BigDecimal.valueOf(6L))==0);
// Test the ItemIssuances are correct
- List<GenericValue> itemIssuances = orderHeader.getRelated("ItemIssuance", null, UtilMisc.toList("itemIssuanceId"), false);
+ List<GenericValue> 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 OFBizT
// Test reservations have been removed
List<GenericValue> 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<GenericValue> orderItems = orderHeader.getRelated("OrderItem", null, null, false);
-
- for ( GenericValue orderItem : orderItems )
+
+ for (GenericValue orderItem : orderItems) {
assertEquals("ITEM_COMPLETED", orderItem.getString("statusId"));
+ }
}
}
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java Fri Apr 10 20:22:54 2015
@@ -21,15 +21,14 @@ package org.ofbiz.shipment.thirdparty.dh
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<String, Object> inContext = FastMap.newInstance();
+ Map<String, Object> inContext = new HashMap<String, Object>();
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<String, Object> handleDhlRateResponse(Document rateResponseDocument, Locale locale) {
- List<Object> errorList = FastList.newInstance();
- Map<String, Object> dhlRateCodeMap = FastMap.newInstance();
+ List<Object> errorList = new LinkedList<Object>();
+ Map<String, Object> dhlRateCodeMap = new HashMap<String, Object>();
// process RateResponse
Element rateResponseElement = rateResponseDocument.getDocumentElement();
DhlServices.handleErrors(rateResponseElement, errorList, locale);
@@ -360,10 +359,10 @@ public class DhlServices {
List<? extends Element> chargeNodeList = UtilXml.childElementList(responseChargesElement,
"Charge");
- List<Map<String, String>> chargeList = FastList.newInstance();
+ List<Map<String, String>> chargeList = new LinkedList<Map<String,String>>();
if (UtilValidate.isNotEmpty(chargeNodeList)) {
for (Element responseChargeElement: chargeNodeList) {
- Map<String, String> charge = FastMap.newInstance();
+ Map<String, String> charge = new HashMap<String, String>();
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<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
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<String, Object> handleDhlRegisterResponse(Document registerResponseDocument, Locale locale) {
- List<Object> errorList = FastList.newInstance();
+ List<Object> errorList = new LinkedList<Object>();
// 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<String, Object> inContext = FastMap.newInstance();
+ Map<String, Object> inContext = new HashMap<String, Object>();
inContext.put("action", "GenerateLabel");
inContext.put("userid", userid);
inContext.put("password", password);
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java Fri Apr 10 20:22:54 2015
@@ -22,13 +22,12 @@ package org.ofbiz.shipment.thirdparty.fe
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<Object> errorList = FastList.newInstance();
+ List<Object> errorList = new LinkedList<Object> ();
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<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
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<EntityCondition> postalAddressConditions = FastList.newInstance();
+ List<EntityCondition> postalAddressConditions = new LinkedList<EntityCondition>();
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<EntityCondition> phoneNumberConditions = FastList.newInstance();
+ List<EntityCondition> phoneNumberConditions = new LinkedList<EntityCondition>();
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<EntityCondition> faxNumberConditions = FastList.newInstance();
+ List<EntityCondition> faxNumberConditions = new LinkedList<EntityCondition>();
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<EntityCondition> emailConditions = FastList.newInstance();
+ List<EntityCondition> emailConditions = new LinkedList<EntityCondition>();
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<String, Object> subscriptionRequestContext = FastMap.newInstance();
+ Map<String, Object> subscriptionRequestContext = new HashMap<String, Object>();
subscriptionRequestContext.put("AccountNumber", accountNumber);
subscriptionRequestContext.put("PersonName", contactPartyName);
subscriptionRequestContext.put("CompanyName", companyName);
@@ -469,7 +468,7 @@ public class FedexServices {
}
try {
- Map<String, Object> shipRequestContext = FastMap.newInstance();
+ Map<String, Object> shipRequestContext = new HashMap<String, Object>();
// 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<String, Object> handleFedexShipReply(String fDXShipReplyString, GenericValue shipmentRouteSegment,
List<GenericValue> shipmentPackageRouteSegs, Locale locale) throws GenericEntityException {
- List<Object> errorList = FastList.newInstance();
+ List<Object> errorList = new LinkedList<Object>();
GenericValue shipmentPackageRouteSeg = shipmentPackageRouteSegs.get(0);
Document fdxShipReplyDocument = null;
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java Fri Apr 10 20:22:54 2015
@@ -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<String, String> unitsUpsToOfbiz = FastMap.newInstance();
- public static Map<String, String> unitsOfbizToUps = FastMap.newInstance();
+ public static Map<String, String> unitsUpsToOfbiz = new HashMap<String, String>();
+ public static Map<String, String> unitsOfbizToUps = new HashMap<String, String>();
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<Object> errorList = FastList.newInstance();
+ List<Object> errorList = new LinkedList<Object>();
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<Object> errorList = FastList.newInstance();
+ List<Object> errorList = new LinkedList<Object>();
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<Object> errorList = FastList.newInstance();
+ List<Object> errorList = new LinkedList<Object>();
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<Object> errorList = FastList.newInstance();
+ List<Object> errorList = new LinkedList<Object>();
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<Object> errorList = FastList.newInstance();
+ List<Object> errorList = new LinkedList<Object>();
UpsServices.handleErrors(responseElement, errorList, locale);
if ("1".equals(responseStatusCode)) {
List<? extends Element> rates = UtilXml.childElementList(rateResponseElement, "RatedShipment");
- Map<String, BigDecimal> rateMap = FastMap.newInstance();
+ Map<String, BigDecimal> rateMap = new HashMap<String, BigDecimal>();
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<Object> errorList = FastList.newInstance();
+ List<Object> errorList = new LinkedList<Object>();
UpsServices.handleErrors(responseElement, errorList, locale);
if ("1".equals(responseStatusCode)) {
- List<Map<String, String>> matches = FastList.newInstance();
+ List<Map<String, String>> matches = new LinkedList<Map<String,String>>();
List<? extends Element> avResultList = UtilXml.childElementList(avResponseElement, "AddressValidationResult");
// TODO: return error if there are no matches?
if (UtilValidate.isNotEmpty(avResultList)) {
for (Element avResultElement: avResultList) {
- Map<String, String> match = FastMap.newInstance();
+ Map<String, String> match = new HashMap<String, String>();
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<Object> errorList = FastList.newInstance();
+ List<Object> errorList = new LinkedList<Object>();
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<Map<String, Object>> shippingRates = FastList.newInstance();
+ List<Map<String, Object>> shippingRates = new LinkedList<Map<String,Object>>();
GenericValue shipmentRouteSegment = null;
Map<String, Object> shipmentGatewayConfig = ShipmentServices.getShipmentGatewayConfigFromShipment(delegator, shipmentId, locale);
String shipmentGatewayConfigId = (String) shipmentGatewayConfig.get("shipmentGatewayConfigId");
@@ -3100,7 +3099,7 @@ public class UpsServices {
List <GenericValue> productStoreShipmentMethods = EntityQuery.use(delegator).from("ProductStoreShipmentMethView").where("productStoreId", productStoreId).queryList();
for (GenericValue productStoreShipmentMethod :productStoreShipmentMethods) {
if ("UPS".equals(productStoreShipmentMethod.get("partyId"))) {
- Map<String,Object> thisUpsRateCodeMap = FastMap.newInstance();
+ Map<String, Object> thisUpsRateCodeMap = new HashMap<String, Object>();
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<Object> errorList = FastList.newInstance();
+ List<Object> errorList = new LinkedList<Object>();
UpsServices.handleErrors(responseElement, errorList, locale);
String totalRates = null;
if ("1".equals(responseStatusCode)) {
List<? extends Element> rates = UtilXml.childElementList(rateResponseElement, "RatedShipment");
- Map<String, BigDecimal> rateMap = FastMap.newInstance();
+ Map<String, BigDecimal> rateMap = new HashMap<String, BigDecimal>();
if (UtilValidate.isEmpty(rates)) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsNoRateAvailable", locale));
} else {
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java Fri Apr 10 20:22:54 2015
@@ -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<String> domesticCountries = FastList.newInstance();
+ private static List<String> domesticCountries = new LinkedList<String>();
// Countries treated as domestic for rate enquiries
static {
domesticCountries.add("USA");
@@ -480,7 +479,7 @@ public class UspsServices {
List<? extends Element> detailElementList = UtilXml.childElementList(trackInfoElement, "TrackDetail");
if (UtilValidate.isNotEmpty(detailElementList)) {
- List<String> trackingDetailList = FastList.newInstance();
+ List<String> trackingDetailList = new LinkedList<String>();
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<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
try {
result = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", weightUomId, "uomIdTo", "WT_lb", "originalValue", weight));
} catch (GenericServiceException ex) {
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServicesTests.java Fri Apr 10 20:22:54 2015
@@ -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 O
public void testUspsDomesticRate() throws Exception {
// prepare the context
- Map<String, Object> context = FastMap.newInstance();
+ Map<String, Object> context = new HashMap<String, Object>();
context.put("service", "Priority");
context.put("originZip", "20770");
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickServices.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickServices.java Fri Apr 10 20:22:54 2015
@@ -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<String, Object> shipment = FastMap.newInstance();
+ Map<String, Object> shipment = new HashMap<String, Object>();
shipment.put("shipmentId", shipmentId);
pickSession.clearAllRows();
return shipment;
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java Fri Apr 10 20:22:54 2015
@@ -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 implement
this._delegator = _dispatcher.getDelegator();
this.delegatorName = _delegator.getDelegatorName();
this.userLogin = userLogin;
- this.pickRows = FastList.newInstance();
+ this.pickRows = new LinkedList<VerifyPickSessionRow>();
}
public LocalDispatcher getDispatcher() {
@@ -91,7 +91,7 @@ public class VerifyPickSession implement
}
// get the reservations for the item
- Map<String, Object> inventoryLookupMap = FastMap.newInstance();
+ Map<String, Object> inventoryLookupMap = new HashMap<String, Object>();
inventoryLookupMap.put("orderId", orderId);
inventoryLookupMap.put("orderItemSeqId", orderItemSeqId);
inventoryLookupMap.put("shipGroupSeqId", shipGroupSeqId);
@@ -108,7 +108,7 @@ public class VerifyPickSession implement
this.createVerifyPickRow(checkCode, reservation, orderId, orderItemSeqId, shipGroupSeqId, productId, originGeoId, quantity, locale);
} else {
// more than one reservation found
- Map<GenericValue, BigDecimal> reserveQtyMap = FastMap.newInstance();
+ Map<GenericValue, BigDecimal> reserveQtyMap = new HashMap<GenericValue, BigDecimal>();
BigDecimal qtyRemain = quantity;
for (GenericValue reservation : reservations) {
@@ -155,7 +155,7 @@ public class VerifyPickSession implement
protected String findOrderItemSeqId(String productId, String orderId, String shipGroupSeqId, BigDecimal quantity, Locale locale) throws GeneralException {
- Map<String, Object> orderItemLookupMap = FastMap.newInstance();
+ Map<String, Object> orderItemLookupMap = new HashMap<String, Object>();
orderItemLookupMap.put("orderId", orderId);
orderItemLookupMap.put("productId", productId);
orderItemLookupMap.put("statusId", "ITEM_APPROVED");
@@ -167,7 +167,7 @@ public class VerifyPickSession implement
if (orderItems != null) {
for (GenericValue orderItem : orderItems) {
// get the reservations for the item
- Map<String, Object> inventoryLookupMap = FastMap.newInstance();
+ Map<String, Object> inventoryLookupMap = new HashMap<String, Object>();
inventoryLookupMap.put("orderId", orderId);
inventoryLookupMap.put("orderItemSeqId", orderItem.getString("orderItemSeqId"));
inventoryLookupMap.put("shipGroupSeqId", shipGroupSeqId);
@@ -254,7 +254,7 @@ public class VerifyPickSession implement
}
public List<VerifyPickSessionRow> getPickRows(String orderId) {
- List<VerifyPickSessionRow> pickVerifyRows = FastList.newInstance();
+ List<VerifyPickSessionRow> pickVerifyRows = new LinkedList<VerifyPickSessionRow>();
for (VerifyPickSessionRow line: this.getPickRows()) {
if (orderId.equals(line.getOrderId())) {
pickVerifyRows.add(line);
@@ -309,7 +309,7 @@ public class VerifyPickSession implement
this.updateProduct();
// Update the shipment status to Picked, this will trigger createInvoicesFromShipment and finally a invoice will be created
- Map<String, Object> updateShipmentCtx = FastMap.newInstance();
+ Map<String, Object> updateShipmentCtx = new HashMap<String, Object>();
updateShipmentCtx.put("shipmentId", shipmentId);
updateShipmentCtx.put("statusId", "SHIPMENT_PICKED");
updateShipmentCtx.put("userLogin", this.getUserLogin());
@@ -319,7 +319,7 @@ public class VerifyPickSession implement
}
protected void checkReservedQty(String orderId, Locale locale) throws GeneralException {
- List<String> errorList = FastList.newInstance();
+ List<String> errorList = new LinkedList<String>();
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 implement
}
protected void issueItemsToShipment(String shipmentId, Locale locale) throws GeneralException {
- List<VerifyPickSessionRow> processedRows = FastList.newInstance();
+ List<VerifyPickSessionRow> processedRows = new LinkedList<VerifyPickSessionRow>();
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 implement
protected String createShipment(VerifyPickSessionRow line) throws GeneralException {
Delegator delegator = this.getDelegator();
String orderId = line.getOrderId();
- Map<String, Object> newShipment = FastMap.newInstance();
+ Map<String, Object> newShipment = new HashMap<String, Object>();
newShipment.put("originFacilityId", facilityId);
newShipment.put("primaryShipGroupSeqId", line.getShipGroupSeqId());
newShipment.put("primaryOrderId", orderId);
@@ -429,7 +429,7 @@ public class VerifyPickSession implement
protected void updateProduct() throws GeneralException {
for (VerifyPickSessionRow pickRow : this.getPickRows()) {
if (UtilValidate.isNotEmpty(pickRow.getOriginGeoId())) {
- Map<String, Object> updateProductCtx = FastMap.newInstance();
+ Map<String, Object> updateProductCtx = new HashMap<String, Object>();
updateProductCtx.put("originGeoId", pickRow.getOriginGeoId());
updateProductCtx.put("productId", pickRow.getProductId());
updateProductCtx.put("userLogin", this.getUserLogin());
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSessionRow.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSessionRow.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSessionRow.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSessionRow.java Fri Apr 10 20:22:54 2015
@@ -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 implem
quantity = this.getReadyToVerifyQty();
}
- Map<String, Object> issueOrderItemMap = FastMap.newInstance();
+ Map<String, Object> issueOrderItemMap = new HashMap<String, Object>();
issueOrderItemMap.put("shipmentId", shipmentId);
issueOrderItemMap.put("orderId", this.getOrderId());
issueOrderItemMap.put("orderItemSeqId", this.getOrderItemSeqId());
@@ -154,7 +153,7 @@ public class VerifyPickSessionRow implem
if (picklistBinId != null) {
// find the pick list item
Delegator delegator = dispatcher.getDelegator();
- Map<String, Object> picklistItemMap = FastMap.newInstance();
+ Map<String, Object> picklistItemMap = new HashMap<String, Object>();
picklistItemMap.put("picklistBinId", picklistBinId);
picklistItemMap.put("orderId", this.getOrderId());
picklistItemMap.put("orderItemSeqId", this.getOrderItemSeqId());
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java Fri Apr 10 20:22:54 2015
@@ -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<String, Object> response = FastMap.newInstance();
+ Map<String, Object> response = new HashMap<String, Object>();
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<String, Object> response = FastMap.newInstance();
+ Map<String, Object> response = new HashMap<String, Object>();
try {
String getActualShippingQuoteFromUps = EntityUtilProperties.getPropertyValue("shipment.properties", "shipment.ups.shipping", "N", delegator);
if (weightPackageSession.completeShipment(orderId, getActualShippingQuoteFromUps)) {
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java Fri Apr 10 20:22:54 2015
@@ -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 implem
this.picklistBinId = picklistBinId;
this.userLogin = userLogin;
this.facilityId = facilityId;
- this.weightPackageLines = FastList.newInstance();
+ this.weightPackageLines = new LinkedList<WeightPackageSessionLine>();
}
public WeightPackageSession(LocalDispatcher dispatcher, GenericValue userLogin, String facilityId) {
@@ -216,7 +215,7 @@ public class WeightPackageSession implem
}
public List<WeightPackageSessionLine> getPackedLines(String orderId) {
- List<WeightPackageSessionLine> packedLines = FastList.newInstance();
+ List<WeightPackageSessionLine> packedLines = new LinkedList<WeightPackageSessionLine>();
if (UtilValidate.isNotEmpty(orderId)) {
for (WeightPackageSessionLine packedLine: this.getPackedLines()) {
if (orderId.equals(packedLine.getOrderId()))
@@ -356,7 +355,7 @@ public class WeightPackageSession implem
List<GenericValue> shipmentRouteSegments = EntityQuery.use(delegator).from("ShipmentRouteSegment").where("shipmentId", shipmentId).queryList();
if (UtilValidate.isNotEmpty(shipmentRouteSegments)) {
for (GenericValue shipmentRouteSegment : shipmentRouteSegments) {
- Map<String, Object> shipmentRouteSegmentMap = FastMap.newInstance();
+ Map<String, Object> shipmentRouteSegmentMap = new HashMap<String, Object>();
shipmentRouteSegmentMap.put("shipmentId", shipmentId);
shipmentRouteSegmentMap.put("shipmentRouteSegmentId", shipmentRouteSegment.getString("shipmentRouteSegmentId"));
shipmentRouteSegmentMap.put("userLogin", userLogin);
@@ -375,7 +374,7 @@ public class WeightPackageSession implem
List<GenericValue> shipmentRouteSegments = this.getDelegator().findByAnd("ShipmentRouteSegment", UtilMisc.toMap("shipmentId", shipmentId), null, false);
if (UtilValidate.isNotEmpty(shipmentRouteSegments)) {
for (GenericValue shipmentRouteSegment : shipmentRouteSegments) {
- Map<String, Object> shipmentRouteSegmentMap = FastMap.newInstance();
+ Map<String, Object> shipmentRouteSegmentMap = new HashMap<String, Object>();
shipmentRouteSegmentMap.put("shipmentId", shipmentId);
shipmentRouteSegmentMap.put("shipmentRouteSegmentId", shipmentRouteSegment.getString("shipmentRouteSegmentId"));
shipmentRouteSegmentMap.put("userLogin", userLogin);
@@ -407,7 +406,7 @@ public class WeightPackageSession implem
for (WeightPackageSessionLine packedLine : this.getPackedLines(orderId)) {
String shipmentPackageSeqId = UtilFormatOut.formatPaddedNumber(++shipPackSeqId, 5);
- Map<String, Object> shipmentPackageMap = FastMap.newInstance();
+ Map<String, Object> shipmentPackageMap = new HashMap<String, Object>();
shipmentPackageMap.put("shipmentId", shipmentId);
shipmentPackageMap.put("shipmentPackageSeqId", shipmentPackageSeqId);
shipmentPackageMap.put("weight", packedLine.getPackageWeight());
@@ -419,7 +418,7 @@ public class WeightPackageSession implem
shipmentPackageMap.put("weightUomId", getWeightUomId());
shipmentPackageMap.put("userLogin", userLogin);
- Map<String, Object> shipmentPackageResult = FastMap.newInstance();
+ Map<String, Object> shipmentPackageResult = new HashMap<String, Object>();
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 implem
for (GenericValue orderItem : orderItems) {
List<GenericValue> orderItemShipGrpInvReserves = orderItem.getRelated("OrderItemShipGrpInvRes", null, null, false);
if (UtilValidate.isEmpty(orderItemShipGrpInvReserves)) {
- Map<String, Object> orderItemStatusMap = FastMap.newInstance();
+ Map<String, Object> orderItemStatusMap = new HashMap<String, Object>();
orderItemStatusMap.put("orderId", orderId);
orderItemStatusMap.put("orderItemSeqId", orderItem.getString("orderItemSeqId"));
orderItemStatusMap.put("userLogin", userLogin);
@@ -481,7 +480,7 @@ public class WeightPackageSession implem
}
protected void setShipmentToPacked() throws GeneralException {
- Map<String, Object> shipmentMap = FastMap.newInstance();
+ Map<String, Object> shipmentMap = new HashMap<String, Object>();
shipmentMap.put("shipmentId", shipmentId);
shipmentMap.put("statusId", "SHIPMENT_PACKED");
shipmentMap.put("userLogin", userLogin);
@@ -501,7 +500,7 @@ public class WeightPackageSession implem
BigDecimal shipmentCostEstimate = ZERO;
Map<String, Object> shipCostEstimateResult = null;
try {
- Map<String, Object> shipCostEstimateMap = FastMap.newInstance();
+ Map<String, Object> shipCostEstimateMap = new HashMap<String, Object>();
shipCostEstimateMap.put("shippingContactMechId", shippingContactMechId);
shipCostEstimateMap.put("shipmentMethodTypeId", shipmentMethodTypeId);
shipCostEstimateMap.put("carrierPartyId", carrierPartyId);
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSessionLine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSessionLine.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSessionLine.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSessionLine.java Fri Apr 10 20:22:54 2015
@@ -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 im
protected void applyLineToPackage(String shipmentId, GenericValue userLogin, LocalDispatcher dispatcher, int shipPackSeqId) throws GeneralException {
String shipmentPackageSeqId = UtilFormatOut.formatPaddedNumber(shipPackSeqId, 5);
- Map<String, Object> packageMap = FastMap.newInstance();
+ Map<String, Object> packageMap = new HashMap<String, Object>();
packageMap.put("shipmentId", shipmentId);
packageMap.put("shipmentItemSeqId", this.getShipmentItemSeqId());
// quanity given, by defult one because it is a required field
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy Fri Apr 10 20:22:54 2015
@@ -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.
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStorePaySetup.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStorePaySetup.groovy?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStorePaySetup.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStorePaySetup.groovy Fri Apr 10 20:22:54 2015
@@ -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 && paymentServic
}
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"));
Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryAverageCosts.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryAverageCosts.groovy?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryAverageCosts.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryAverageCosts.groovy Fri Apr 10 20:22:54 2015
@@ -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 = Entity
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)) {
Modified: ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java (original)
+++ ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java Fri Apr 10 20:22:54 2015
@@ -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.HttpServletReq
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<String, Object> bodyParameters = FastMap.newInstance();
+ Map<String, Object> bodyParameters = new HashMap<String, Object>();
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<String, Object> serviceContext = FastMap.newInstance();
+ Map<String, Object> serviceContext = new HashMap<String, Object>();
serviceContext.put("bodyScreenUri", bodyScreenLocation);
serviceContext.put("bodyParameters", bodyParameters);
if (productStoreEmail != null) {
Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/content/WorkEffortContentWrapper.java Fri Apr 10 20:22:54 2015
@@ -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.GeneralRuntim
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 im
}
if (workEffortContent != null) {
// when rendering the product content, always include the Product and ProductContent records that this comes from
- Map<String, Object> inContext = FastMap.newInstance();
+ Map<String, Object> inContext = new HashMap<String, Object>();
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 im
.filterByDate()
.queryList();
- List<String> contentList = FastList.newInstance();
+ List<String> contentList = new LinkedList<String>();
if (partyContentList != null) {
for (GenericValue workEffortContent: partyContentList) {
StringWriter outWriter = new StringWriter();
- Map<String, Object> inContext = FastMap.newInstance();
+ Map<String, Object> inContext = new HashMap<String, Object>();
inContext.put("workEffort", workEffort);
inContext.put("workEffortContent", workEffortContent);
ContentWorker.renderContentAsText(dispatcher, delegator, workEffortContent.getString("contentId"), outWriter, inContext, locale, mimeTypeId, null, null, false);
Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java Fri Apr 10 20:22:54 2015
@@ -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<String, Object> context) {
- Map<String, Object> serviceMap = FastMap.newInstance();
+ Map<String, Object> serviceMap = new HashMap<String, Object>();
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<String, Object> invokeService(String serviceName, Map<String, ? extends Object> serviceMap, Map<String, Object> context) {
LocalDispatcher dispatcher = (LocalDispatcher) context.get("dispatcher");
- Map<String, Object> localMap = FastMap.newInstance();
+ Map<String, Object> localMap = new HashMap<String, Object>();
try {
ModelService modelService = null;
modelService = dispatcher.getDispatchContext().getModelService(serviceName);
@@ -722,7 +722,7 @@ public class ICalConverter {
}
boolean hasCreatePermission = hasPermission(workEffortId, "CREATE", context);
List<GenericValue> workEfforts = getRelatedWorkEfforts(publishProperties, context);
- Set<String> validWorkEfforts = FastSet.newInstance();
+ Set<String> validWorkEfforts = new HashSet<String>();
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<String, Object> context) {
ResponseProperties responseProps = null;
- Map<String, Object> serviceMap = FastMap.newInstance();
- List<Property> partyList = FastList.newInstance();
+ Map<String, Object> serviceMap = new HashMap<String, Object>();
+ List<Property> partyList = new LinkedList<Property>();
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<String, Object> serviceMap = FastMap.newInstance();
+ Map<String, Object> serviceMap = new HashMap<String, Object>();
serviceMap.put("workEffortId", workEffortId);
setWorkEffortServiceMap(component, serviceMap);
invokeService("updateWorkEffort", serviceMap, context);
Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalHandlerFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalHandlerFactory.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalHandlerFactory.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalHandlerFactory.java Fri Apr 10 20:22:54 2015
@@ -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 implemen
protected final RequestHandler doNothingHandler = new DoNothingHandler();
public ICalHandlerFactory() {
- this.handlerMap = FastMap.newInstance();
+ this.handlerMap = new HashMap<String, RequestHandler>();
this.handlerMap.put("COPY", doNothingHandler);
this.handlerMap.put("DELETE", doNothingHandler);
this.handlerMap.put("GET", new GetHandler());