You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2014/11/24 11:06:29 UTC
svn commit: r1641348 [6/7] - in
/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23: ./
applications/content/src/org/ofbiz/content/content/
applications/order/src/org/ofbiz/order/
applications/order/src/org/ofbiz/order/order/ applications/order/s...
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/packing/PackingSessionLine.java Mon Nov 24 10:06:26 2014
@@ -28,6 +28,7 @@ import org.ofbiz.base.util.UtilFormatOut
import org.ofbiz.base.util.Debug;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.Delegator;
+import org.ofbiz.entity.util.EntityQuery;
import org.ofbiz.service.LocalDispatcher;
import org.ofbiz.service.ServiceUtil;
@@ -212,7 +213,10 @@ public class PackingSessionLine implemen
itemLookup.put("orderItemSeqId", this.getOrderItemSeqId());
itemLookup.put("shipGroupSeqId", this.getShipGroupSeqId());
itemLookup.put("inventoryItemId", this.getInventoryItemId());
- GenericValue plItem = delegator.findOne("PicklistItem", itemLookup, false);
+ GenericValue plItem = EntityQuery.use(delegator)
+ .from("PicklistItem")
+ .where(itemLookup)
+ .queryOne();
if (plItem != null) {
Debug.logInfo("Found picklist bin: " + plItem, module);
BigDecimal itemQty = plItem.getBigDecimal("quantity");
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java Mon Nov 24 10:06:26 2014
@@ -33,6 +33,7 @@ import org.ofbiz.entity.GenericEntityExc
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.condition.EntityCondition;
import org.ofbiz.entity.condition.EntityOperator;
+import org.ofbiz.entity.util.EntityQuery;
import org.ofbiz.service.DispatchContext;
import org.ofbiz.service.ServiceUtil;
@@ -66,11 +67,12 @@ public class PickListServices {
EntityCondition idCond = EntityCondition.makeCondition(conditionList1, EntityOperator.OR);
conditionList2.add(idCond);
- EntityCondition cond = EntityCondition.makeCondition(conditionList2, EntityOperator.AND);
-
// run the query
try {
- orderHeaderList = delegator.findList("OrderHeader", cond, null, UtilMisc.toList("+orderDate"), null, false);
+ orderHeaderList = EntityQuery.use(delegator).from("OrderHeader")
+ .where(conditionList2)
+ .orderBy("orderDate")
+ .queryList();
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(e.getMessage());
@@ -89,7 +91,7 @@ public class PickListServices {
// lookup the items in the bin
List<GenericValue> items;
try {
- items = delegator.findByAnd("PicklistItem", UtilMisc.toMap("picklistBinId", picklistBinId), null, false);
+ items = EntityQuery.use(delegator).from("PicklistItem").where("picklistBinId", picklistBinId).queryList();
} catch (GenericEntityException e) {
Debug.logError(e, module);
throw e;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Mon Nov 24 10:06:26 2014
@@ -273,7 +273,10 @@ public class ShipmentServices {
Collection<GenericValue> estimates = null;
try {
- estimates = delegator.findList("ShipmentCostEstimate", estFieldsCond, null, null, null, true);
+ estimates = EntityQuery.use(delegator).from("ShipmentCostEstimate")
+ .where(estFieldsCond)
+ .cache(true)
+ .queryList();
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
@@ -302,8 +305,10 @@ public class ShipmentServices {
} else if (shippingPostalCode != null) {
String countryGeoId = null;
try {
- EntityCondition cond =EntityCondition.makeCondition(UtilMisc.toMap("geoTypeId", "COUNTRY", "geoCode", shippingCountryCode));
- GenericValue countryGeo = EntityUtil.getFirst(delegator.findList("Geo", cond, null, null, null, true));
+ GenericValue countryGeo = EntityQuery.use(delegator).from("Geo")
+ .where("geoTypeId", "COUNTRY", "geoCode", shippingCountryCode)
+ .cache(true)
+ .queryFirst();
if (countryGeo != null) {
countryGeoId = countryGeo.getString("geoId");
}
@@ -562,9 +567,11 @@ public class ShipmentServices {
GenericValue appl = null;
Map<String, String> fields = UtilMisc.toMap("productFeatureGroupId", featureGroupId, "productFeatureId", featureId);
try {
- List<GenericValue> appls = delegator.findByAnd("ProductFeatureGroupAppl", fields, null, true);
- appls = EntityUtil.filterByDate(appls);
- appl = EntityUtil.getFirst(appls);
+ appl = EntityQuery.use(delegator).from("ProductFeatureGroupAppl")
+ .where("productFeatureGroupId", featureGroupId, "productFeatureId", featureId)
+ .cache(true)
+ .filterByDate()
+ .queryFirst();
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to lookup feature/group" + fields, module);
}
@@ -722,20 +729,18 @@ public class ShipmentServices {
Delegator delegator = dctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
- List<String> orderBy = UtilMisc.toList("shipmentId", "shipmentPackageSeqId", "voidIndicator");
Map<String, String> shipmentMap = FastMap.newInstance();
EntityListIterator eli = null;
try {
- eli = delegator.find("OdbcPackageIn", null, null, null, orderBy, null);
+ eli = EntityQuery.use(delegator).from("OdbcPackageIn").orderBy("shipmentId", "shipmentPackageSeqId", "voidIndicator").queryIterator();
GenericValue pkgInfo;
while ((pkgInfo = eli.next()) != null) {
String packageSeqId = pkgInfo.getString("shipmentPackageSeqId");
String shipmentId = pkgInfo.getString("shipmentId");
// locate the shipment package
- GenericValue shipmentPackage = delegator.findOne("ShipmentPackage",
- UtilMisc.toMap("shipmentId", shipmentId, "shipmentPackageSeqId", packageSeqId), false);
+ GenericValue shipmentPackage = EntityQuery.use(delegator).from("ShipmentPackage").where("shipmentId", shipmentId, "shipmentPackageSeqId", packageSeqId).queryOne();
if (shipmentPackage != null) {
if ("00001".equals(packageSeqId)) {
@@ -777,7 +782,9 @@ public class ShipmentServices {
// first update the weight of the package
GenericValue pkg = null;
try {
- pkg = delegator.findOne("ShipmentPackage", pkgCtx, false);
+ pkg = EntityQuery.use(delegator).from("ShipmentPackage")
+ .where(pkgCtx)
+ .queryOne();
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(e.getMessage());
@@ -802,7 +809,7 @@ public class ShipmentServices {
pkgCtx.put("shipmentRouteSegmentId", "00001");
GenericValue pkgRtSeg = null;
try {
- pkgRtSeg = delegator.findOne("ShipmentPackageRouteSeg", pkgCtx, false);
+ pkgRtSeg = EntityQuery.use(delegator).from("ShipmentPackageRouteSeg").where(pkgCtx).queryOne();
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(e.getMessage());
@@ -910,7 +917,7 @@ public class ShipmentServices {
GenericValue userLogin = (GenericValue) context.get("userLogin");
try {
- List<GenericValue> shipmentReceipts = delegator.findByAnd("ShipmentReceipt", UtilMisc.toMap("shipmentId", shipmentId), null, false);
+ List<GenericValue> shipmentReceipts = EntityQuery.use(delegator).from("ShipmentReceipt").where("shipmentId", shipmentId).queryList();
if (shipmentReceipts.size() == 0) return ServiceUtil.returnSuccess();
// If there are shipment receipts, the shipment must have been shipped, so set the shipment status to PURCH_SHIP_SHIPPED if it's only PURCH_SHIP_CREATED
@@ -922,7 +929,7 @@ public class ShipmentServices {
}
}
- List<GenericValue> shipmentAndItems = delegator.findByAnd("ShipmentAndItem", UtilMisc.toMap("shipmentId", shipmentId, "statusId", "PURCH_SHIP_SHIPPED"), null, false);
+ List<GenericValue> shipmentAndItems = EntityQuery.use(delegator).from("ShipmentAndItem").where("shipmentId", shipmentId, "statusId", "PURCH_SHIP_SHIPPED").queryList();
if (shipmentAndItems.size() == 0) {
return ServiceUtil.returnSuccess();
}
@@ -1018,8 +1025,10 @@ public class ShipmentServices {
// get the carrierPartyId
try {
- GenericValue shipmentRouteSegment = delegator.findOne("ShipmentRouteSegment",
- UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), true);
+ GenericValue shipmentRouteSegment = EntityQuery.use(delegator).from("ShipmentRouteSegment")
+ .where("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId)
+ .cache(true)
+ .queryOne();
carrierPartyId = shipmentRouteSegment.getString("carrierPartyId");
} catch (GenericEntityException e) {
Debug.logError(e, module);
@@ -1083,7 +1092,7 @@ public class ShipmentServices {
return ServiceUtil.returnError(errorMessage);
}
- List<GenericValue> packageContents = delegator.findByAnd("PackedQtyVsOrderItemQuantity", UtilMisc.toMap("shipmentId", shipmentId, "shipmentPackageSeqId", shipmentPackageSeqId), null, false);
+ List<GenericValue> packageContents = EntityQuery.use(delegator).from("PackedQtyVsOrderItemQuantity").where("shipmentId", shipmentId, "shipmentPackageSeqId", shipmentPackageSeqId).queryList();
for (GenericValue packageContent: packageContents) {
String orderId = packageContent.getString("orderId");
String orderItemSeqId = packageContent.getString("orderItemSeqId");
@@ -1244,14 +1253,10 @@ public class ShipmentServices {
String shipmentMethodTypeId = primaryOrderItemShipGroup.getString("shipmentMethodTypeId");
String carrierPartyId = primaryOrderItemShipGroup.getString("carrierPartyId");
String carrierRoleTypeId = primaryOrderItemShipGroup.getString("carrierRoleTypeId");
- List<EntityCondition> conditions = FastList.newInstance();
- conditions.add(EntityCondition.makeCondition("productStoreId", EntityOperator.EQUALS, productStoreId));
- conditions.add(EntityCondition.makeCondition("shipmentMethodTypeId", EntityOperator.EQUALS, shipmentMethodTypeId));
- conditions.add(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, carrierPartyId));
- conditions.add(EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, carrierRoleTypeId));
- EntityConditionList<EntityCondition> ecl = EntityCondition.makeCondition(conditions, EntityOperator.AND);
- List<GenericValue> productStoreShipmentMeths = delegator.findList("ProductStoreShipmentMeth", ecl, null, null, null, false);
- GenericValue productStoreShipmentMeth = EntityUtil.getFirst(productStoreShipmentMeths);
+ GenericValue productStoreShipmentMeth = EntityQuery.use(delegator).from("ProductStoreShipmentMeth")
+ .where("productStoreId",productStoreId, "shipmentMethodTypeId", shipmentMethodTypeId,
+ "partyId", carrierPartyId, "roleTypeId", carrierRoleTypeId)
+ .queryFirst();
if (UtilValidate.isNotEmpty(productStoreShipmentMeth)) {
shipmentGatewayConfig.put("shipmentGatewayConfigId", productStoreShipmentMeth.getString("shipmentGatewayConfigId"));
shipmentGatewayConfig.put("configProps", productStoreShipmentMeth.getString("configProps"));
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java Mon Nov 24 10:06:26 2014
@@ -170,8 +170,9 @@ public class DhlServices {
// translate shipmentMethodTypeId to DHL service code
String dhlShipmentDetailCode = null;
try {
- GenericValue carrierShipmentMethod = delegator.findOne("CarrierShipmentMethod", UtilMisc.toMap("shipmentMethodTypeId", shipmentMethodTypeId,
- "partyId", carrierPartyId, "roleTypeId", "CARRIER"), false);
+ GenericValue carrierShipmentMethod = EntityQuery.use(delegator).from("CarrierShipmentMethod")
+ .where("shipmentMethodTypeId", shipmentMethodTypeId, "partyId", carrierPartyId, "roleTypeId", "CARRIER")
+ .queryOne();
if (carrierShipmentMethod == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
"FacilityShipmentDhlNoCarrierShipmentMethod",
@@ -711,8 +712,9 @@ public class DhlServices {
// translate shipmentMethodTypeId to DHL service code
String shipmentMethodTypeId = shipmentRouteSegment.getString("shipmentMethodTypeId");
String dhlShipmentDetailCode = null;
- GenericValue carrierShipmentMethod = delegator.findOne("CarrierShipmentMethod", UtilMisc.toMap("shipmentMethodTypeId", shipmentMethodTypeId,
- "partyId", "DHL", "roleTypeId", "CARRIER"), false);
+ GenericValue carrierShipmentMethod = EntityQuery.use(delegator).from("CarrierShipmentMethod")
+ .where("shipmentMethodTypeId", shipmentMethodTypeId, "partyId", "DHL", "roleTypeId", "CARRIER")
+ .queryOne();
if (carrierShipmentMethod == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
"FacilityShipmentDhlNoCarrierShipmentMethod",
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java Mon Nov 24 10:06:26 2014
@@ -203,9 +203,10 @@ public class FedexServices {
}
// Get the contact information for the company
- List<GenericValue> partyContactDetails = delegator.findByAnd("PartyContactDetailByPurpose", UtilMisc.toMap("partyId", companyPartyId), null, false);
- partyContactDetails = EntityUtil.filterByDate(partyContactDetails);
- partyContactDetails = EntityUtil.filterByDate(partyContactDetails, UtilDateTime.nowTimestamp(), "purposeFromDate", "purposeThruDate", true);
+ List<GenericValue> partyContactDetails = EntityQuery.use(delegator).from("PartyContactDetailByPurpose")
+ .where("partyId", companyPartyId)
+ .filterByDate(UtilDateTime.nowTimestamp(), "fromDate", "thruDate", "purposeFromDate", "purposeThruDate")
+ .queryList();
// Get the first valid postal address (address1, city, postalCode and countryGeoId are required by Fedex)
List<EntityCondition> postalAddressConditions = FastList.newInstance();
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java Mon Nov 24 10:06:26 2014
@@ -201,8 +201,7 @@ public class UpsServices {
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
}
- Map<String, Object> findCarrierShipmentMethodMap = UtilMisc.toMap("partyId", shipmentRouteSegment.get("carrierPartyId"), "roleTypeId", "CARRIER", "shipmentMethodTypeId", shipmentRouteSegment.get("shipmentMethodTypeId"));
- GenericValue carrierShipmentMethod = delegator.findOne("CarrierShipmentMethod", findCarrierShipmentMethodMap, false);
+ GenericValue carrierShipmentMethod = EntityQuery.use(delegator).from("CarrierShipmentMethod").where("partyId", shipmentRouteSegment.get("carrierPartyId"), "roleTypeId", "CARRIER", "shipmentMethodTypeId", shipmentRouteSegment.get("shipmentMethodTypeId")).queryOne();
if (carrierShipmentMethod == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentCarrierShipmentMethodNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId, "carrierPartyId", shipmentRouteSegment.get("carrierPartyId"), "shipmentMethodTypeId", shipmentRouteSegment.get("shipmentMethodTypeId")), locale));
@@ -241,7 +240,8 @@ public class UpsServices {
if (allowCOD) {
// Get the paymentMethodTypeIds of all the orderPaymentPreferences involved with the shipment
- List<GenericValue> opps = delegator.findList("OrderPaymentPreference", EntityCondition.makeCondition("orderId", EntityOperator.IN, orderIdSet), null, null, null, false);
+ List<GenericValue> opps = EntityQuery.use(delegator).from("OrderPaymentPreference")
+ .where(EntityCondition.makeCondition("orderId", EntityOperator.IN, orderIdSet)).queryList();
List<String> paymentMethodTypeIds = EntityUtil.getFieldListFromEntityList(opps, "paymentMethodTypeId", true);
if (paymentMethodTypeIds.size() > 1 || ! paymentMethodTypeIds.contains("EXT_COD")) {
@@ -2078,8 +2078,9 @@ public class UpsServices {
// locate the CarrierShipmentMethod record
GenericValue carrierShipmentMethod = null;
try {
- carrierShipmentMethod = delegator.findOne("CarrierShipmentMethod", UtilMisc.toMap("shipmentMethodTypeId",
- shipmentMethodTypeId, "partyId", carrierPartyId, "roleTypeId", carrierRoleTypeId), false);
+ carrierShipmentMethod = EntityQuery.use(delegator).from("CarrierShipmentMethod")
+ .where("shipmentMethodTypeId", shipmentMethodTypeId, "partyId", carrierPartyId, "roleTypeId", carrierRoleTypeId)
+ .queryOne();
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
@@ -2481,8 +2482,9 @@ public class UpsServices {
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
}
- Map<String, Object> findCarrierShipmentMethodMap = UtilMisc.toMap("partyId", shipmentRouteSegment.get("carrierPartyId"), "roleTypeId", "CARRIER", "shipmentMethodTypeId", shipmentRouteSegment.get("shipmentMethodTypeId"));
- GenericValue carrierShipmentMethod = delegator.findOne("CarrierShipmentMethod", findCarrierShipmentMethodMap, false);
+ GenericValue carrierShipmentMethod = EntityQuery.use(delegator).from("CarrierShipmentMethod")
+ .where("partyId", shipmentRouteSegment.get("carrierPartyId"), "roleTypeId", "CARRIER", "shipmentMethodTypeId", shipmentRouteSegment.get("shipmentMethodTypeId"))
+ .queryOne();
if (carrierShipmentMethod == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentCarrierShipmentMethodNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId, "carrierPartyId", shipmentRouteSegment.get("carrierPartyId"), "shipmentMethodTypeId", shipmentRouteSegment.get("shipmentMethodTypeId")), locale));
@@ -2798,10 +2800,9 @@ public class UpsServices {
try {
if (shipmentRouteSegmentId != null) {
- shipmentRouteSegment = delegator.findOne("ShipmentRouteSegment", false, UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId));
+ shipmentRouteSegment = EntityQuery.use(delegator).from("ShipmentRouteSegment").where("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId).queryOne();
} else {
- List<GenericValue> shipmentRouteSegments = delegator.findList("ShipmentRouteSegment", EntityCondition.makeCondition("shipmentId", EntityOperator.EQUALS, shipmentId), null, null, null, false);
- shipmentRouteSegment = EntityUtil.getFirst(shipmentRouteSegments);
+ shipmentRouteSegment = EntityQuery.use(delegator).from("ShipmentRouteSegment").where(EntityCondition.makeCondition("shipmentId", EntityOperator.EQUALS, shipmentId)).queryFirst();
}
if (shipmentRouteSegment == null) {
@@ -3096,12 +3097,13 @@ public class UpsServices {
GenericValue carrierShipmentMethod = null;
// Filtering out rates of shipping methods which are not configured in ProductStoreShipmentMeth entity.
try {
- List <GenericValue> productStoreShipmentMethods = delegator.findByAnd("ProductStoreShipmentMethView", UtilMisc.toMap("productStoreId", productStoreId), null, false);
+ 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();
- carrierShipmentMethod = delegator.findOne("CarrierShipmentMethod", false, UtilMisc.toMap("shipmentMethodTypeId",
- productStoreShipmentMethod.getString("shipmentMethodTypeId"), "partyId", productStoreShipmentMethod.getString("partyId"), "roleTypeId", productStoreShipmentMethod.getString("roleTypeId")));
+ carrierShipmentMethod = EntityQuery.use(delegator).from("CarrierShipmentMethod")
+ .where("shipmentMethodTypeId", productStoreShipmentMethod.getString("shipmentMethodTypeId"), "partyId", productStoreShipmentMethod.getString("partyId"), "roleTypeId", productStoreShipmentMethod.getString("roleTypeId"))
+ .queryOne();
String serviceCode = carrierShipmentMethod.getString("carrierServiceCode");
for (String thisServiceCode : upsRateCodeMap.keySet()) {
if (serviceCode.equals(thisServiceCode)) {
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java Mon Nov 24 10:06:26 2014
@@ -106,8 +106,7 @@ public class UspsServices {
GenericValue facilityContactMech = ContactMechWorker.getFacilityContactMechByPurpose(delegator, productStore.getString("inventoryFacilityId"), UtilMisc.toList("SHIP_ORIG_LOCATION", "PRIMARY_LOCATION"));
if (facilityContactMech != null) {
try {
- GenericValue shipFromAddress = delegator.findOne("PostalAddress",
- UtilMisc.toMap("contactMechId", facilityContactMech.getString("contactMechId")), false);
+ GenericValue shipFromAddress = EntityQuery.use(delegator).from("PostalAddress").where("contactMechId", facilityContactMech.getString("contactMechId")).queryOne();
if (shipFromAddress != null) {
originationZip = shipFromAddress.getString("postalCode");
}
@@ -146,9 +145,9 @@ public class UspsServices {
// get the service code
String serviceCode = null;
try {
- GenericValue carrierShipmentMethod = delegator.findOne("CarrierShipmentMethod",
- UtilMisc.toMap("shipmentMethodTypeId", (String) context.get("shipmentMethodTypeId"),
- "partyId", (String) context.get("carrierPartyId"), "roleTypeId", (String) context.get("carrierRoleTypeId")), false);
+ GenericValue carrierShipmentMethod = EntityQuery.use(delegator).from("CarrierShipmentMethod")
+ .where("shipmentMethodTypeId", (String) context.get("shipmentMethodTypeId"), "partyId", (String) context.get("carrierPartyId"), "roleTypeId", (String) context.get("carrierRoleTypeId"))
+ .queryOne();
if (carrierShipmentMethod != null) {
serviceCode = carrierShipmentMethod.getString("carrierServiceCode").toUpperCase();
}
@@ -315,9 +314,9 @@ public class UspsServices {
// get the service code
String serviceCode = null;
try {
- GenericValue carrierShipmentMethod = delegator.findOne("CarrierShipmentMethod",
- UtilMisc.toMap("shipmentMethodTypeId", (String) context.get("shipmentMethodTypeId"),
- "partyId", (String) context.get("carrierPartyId"), "roleTypeId", (String) context.get("carrierRoleTypeId")), false);
+ GenericValue carrierShipmentMethod = EntityQuery.use(delegator).from("CarrierShipmentMethod")
+ .where("shipmentMethodTypeId", (String) context.get("shipmentMethodTypeId"), "partyId", (String) context.get("carrierPartyId"), "roleTypeId", (String) context.get("carrierRoleTypeId"))
+ .queryOne();
if (carrierShipmentMethod != null) {
serviceCode = carrierShipmentMethod.getString("carrierServiceCode");
}
@@ -934,8 +933,7 @@ public class UspsServices {
}
try {
- GenericValue shipmentRouteSegment = delegator.findOne("ShipmentRouteSegment",
- UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), false);
+ GenericValue shipmentRouteSegment = EntityQuery.use(delegator).from("ShipmentRouteSegment").where("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId).queryOne();
if (shipmentRouteSegment == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
"ProductShipmentRouteSegmentNotFound",
@@ -991,8 +989,7 @@ public class UspsServices {
String shipmentMethodTypeId = shipmentRouteSegment.getString("shipmentMethodTypeId");
String partyId = shipmentRouteSegment.getString("carrierPartyId");
- GenericValue carrierShipmentMethod = delegator.findOne("CarrierShipmentMethod",
- UtilMisc.toMap("partyId", partyId, "roleTypeId", "CARRIER", "shipmentMethodTypeId", shipmentMethodTypeId), false);
+ GenericValue carrierShipmentMethod = EntityQuery.use(delegator).from("CarrierShipmentMethod").where("partyId", partyId, "roleTypeId", "CARRIER", "shipmentMethodTypeId", shipmentMethodTypeId).queryOne();
if (carrierShipmentMethod == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
"FacilityShipmentUspsNoCarrierShipmentMethod",
@@ -1241,8 +1238,7 @@ public class UspsServices {
"ProductShipmentNotFoundId", locale) + shipmentId);
}
- GenericValue shipmentRouteSegment = delegator.findOne("ShipmentRouteSegment",
- UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), false);
+ GenericValue shipmentRouteSegment = EntityQuery.use(delegator).from("ShipmentRouteSegment").where("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId).queryOne();
if (shipmentRouteSegment == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
"ProductShipmentRouteSegmentNotFound",
@@ -1286,8 +1282,7 @@ public class UspsServices {
String shipmentMethodTypeId = shipmentRouteSegment.getString("shipmentMethodTypeId");
String partyId = shipmentRouteSegment.getString("carrierPartyId");
- GenericValue carrierShipmentMethod = delegator.findOne("CarrierShipmentMethod",
- UtilMisc.toMap("partyId", partyId, "roleTypeId", "CARRIER", "shipmentMethodTypeId", shipmentMethodTypeId), false);
+ GenericValue carrierShipmentMethod = EntityQuery.use(delegator).from("CarrierShipmentMethod").where("partyId", partyId, "roleTypeId", "CARRIER", "shipmentMethodTypeId", shipmentMethodTypeId).queryOne();
if (carrierShipmentMethod == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
"FacilityShipmentUspsNoCarrierShipmentMethod",
@@ -1369,8 +1364,7 @@ public class UspsServices {
}
if (!"WT_oz".equals(weightUomId)) {
// attempt a conversion to pounds
- GenericValue uomConversion = delegator.findOne("UomConversion",
- UtilMisc.toMap("uomId", weightUomId, "uomIdTo", "WT_oz"), false);
+ GenericValue uomConversion = EntityQuery.use(delegator).from("UomConversion").where("uomId", weightUomId, "uomIdTo", "WT_oz").queryOne();
if (uomConversion == null || UtilValidate.isEmpty(uomConversion.getString("conversionFactor"))) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
"FacilityShipmentUspsWeightUnsupported",
@@ -1443,8 +1437,7 @@ public class UspsServices {
String shipmentId = (String) context.get("shipmentId");
String shipmentRouteSegmentId = (String) context.get("shipmentRouteSegmentId");
- GenericValue shipmentRouteSegment = delegator.findOne("ShipmentRouteSegment",
- UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), false);
+ GenericValue shipmentRouteSegment = EntityQuery.use(delegator).from("ShipmentRouteSegment").where("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId).queryOne();
List<GenericValue> shipmentPackageRouteSegList = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, UtilMisc.toList("+shipmentPackageSeqId"), false);
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java Mon Nov 24 10:06:26 2014
@@ -394,12 +394,12 @@ public class VerifyPickSession implement
newShipment.put("shipmentTypeId", "OUTGOING_SHIPMENT");
newShipment.put("statusId", "SHIPMENT_SCHEDULED");
newShipment.put("userLogin", this.getUserLogin());
- GenericValue orderRoleShipTo = EntityUtil.getFirst(delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "SHIP_TO_CUSTOMER"), null, false));
+ GenericValue orderRoleShipTo = EntityQuery.use(delegator).from("OrderRole").where("orderId", orderId, "roleTypeId", "SHIP_TO_CUSTOMER").queryFirst();
if (UtilValidate.isNotEmpty(orderRoleShipTo)) {
newShipment.put("partyIdTo", orderRoleShipTo.getString("partyId"));
}
String partyIdFrom = null;
- GenericValue orderItemShipGroup = EntityUtil.getFirst(delegator.findByAnd("OrderItemShipGroup", UtilMisc.toMap("orderId", orderId, "shipGroupSeqId", line.getShipGroupSeqId()), null, false));
+ GenericValue orderItemShipGroup = EntityQuery.use(delegator).from("OrderItemShipGroup").where("orderId", orderId, "shipGroupSeqId", line.getShipGroupSeqId()).queryFirst();
if (UtilValidate.isNotEmpty(orderItemShipGroup.getString("vendorPartyId"))) {
partyIdFrom = orderItemShipGroup.getString("vendorPartyId");
} else if (UtilValidate.isNotEmpty(orderItemShipGroup.getString("facilityId"))) {
@@ -409,11 +409,11 @@ public class VerifyPickSession implement
}
}
if (UtilValidate.isEmpty(partyIdFrom)) {
- GenericValue orderRoleShipFrom = EntityUtil.getFirst(delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "SHIP_FROM_VENDOR"), null, false));
+ GenericValue orderRoleShipFrom = EntityQuery.use(delegator).from("OrderRole").where("orderId", orderId, "roleTypeId", "SHIP_FROM_VENDOR").queryFirst();
if (UtilValidate.isNotEmpty(orderRoleShipFrom)) {
partyIdFrom = orderRoleShipFrom.getString("partyId");
} else {
- orderRoleShipFrom = EntityUtil.getFirst(delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "BILL_FROM_VENDOR"), null, false));
+ orderRoleShipFrom = EntityQuery.use(delegator).from("OrderRole").where("orderId", orderId, "roleTypeId", "BILL_FROM_VENDOR").queryFirst();
partyIdFrom = orderRoleShipFrom.getString("partyId");
}
}
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSessionRow.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSessionRow.java?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSessionRow.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSessionRow.java Mon Nov 24 10:06:26 2014
@@ -23,6 +23,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Locale;
import java.util.Map;
+
import javolution.util.FastMap;
import org.ofbiz.base.util.GeneralException;
@@ -30,6 +31,7 @@ import org.ofbiz.base.util.UtilPropertie
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.util.EntityQuery;
import org.ofbiz.service.LocalDispatcher;
import org.ofbiz.service.ServiceUtil;
@@ -159,7 +161,7 @@ public class VerifyPickSessionRow implem
picklistItemMap.put("shipGroupSeqId", this.getShipGroupSeqId());
picklistItemMap.put("inventoryItemId", this.getInventoryItemId());
- GenericValue picklistItem = delegator.findOne("PicklistItem", picklistItemMap, true);
+ GenericValue picklistItem = EntityQuery.use(delegator).from("PicklistItem").where(picklistItemMap).cache(true).queryOne();
if (UtilValidate.isNotEmpty(picklistItem)) {
BigDecimal itemQty = picklistItem.getBigDecimal("quantity");
if (itemQty.compareTo(quantity) == 0) {
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java Mon Nov 24 10:06:26 2014
@@ -31,6 +31,7 @@ import org.ofbiz.base.util.UtilPropertie
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.util.EntityQuery;
import org.ofbiz.service.DispatchContext;
import org.ofbiz.service.ServiceUtil;
@@ -64,7 +65,7 @@ public class WeightPackageServices {
}
try {
// Checked no of packages, it should not be greater than ordered quantity
- List<GenericValue> orderItems = delegator.findByAnd("OrderItem", UtilMisc.toMap("orderId", orderId, "statusId", "ITEM_APPROVED"), null, false);
+ List<GenericValue> orderItems = EntityQuery.use(delegator).from("OrderItem").where("orderId", orderId, "statusId", "ITEM_APPROVED").queryList();
BigDecimal orderedItemQty = ZERO;
for (GenericValue orderItem : orderItems) {
orderedItemQty = orderedItemQty.add(orderItem.getBigDecimal("quantity"));
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java Mon Nov 24 10:06:26 2014
@@ -353,7 +353,7 @@ public class WeightPackageSession implem
protected BigDecimal upsShipmentConfirm() throws GeneralException {
Delegator delegator = this.getDelegator();
BigDecimal actualCost = ZERO;
- List<GenericValue> shipmentRouteSegments = delegator.findByAnd("ShipmentRouteSegment", UtilMisc.toMap("shipmentId", shipmentId), null, false);
+ 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();
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/workeffort/widget/WorkEffortMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/workeffort/widget/WorkEffortMenus.xml?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/workeffort/widget/WorkEffortMenus.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/workeffort/widget/WorkEffortMenus.xml Mon Nov 24 10:06:26 2014
@@ -140,71 +140,181 @@ under the License.
</link>
</menu-item>
</menu>
- <menu name="Day" extends="Calendar">
- <menu-item name="next" title="${uiLabelMap.WorkEffortNextDay}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=day&start=${nextMillis}${urlParam}"/>
- </menu-item>
- <menu-item name="toDay" title="${uiLabelMap.CommonToday}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=day${urlParam}"/>
- </menu-item>
- <menu-item name="prev" title="${uiLabelMap.WorkEffortPreviousDay}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=day&start=${prevMillis}${urlParam}"/>
+ <menu name="Day" extends="Calendar">
+ <menu-item name="next">
+ <link target="${parameters._LAST_VIEW_NAME_}" text="${uiLabelMap.WorkEffortNextDay}">
+ <parameter param-name="period" value="day"/>
+ <parameter param-name="start" value="${nextMillis}"/>
+ <parameter param-name="partyId" from-field="parameters.partyId"/>
+ <parameter param-name="fixedAssetId" from-field="parameters.fixedAssetId"/>
+ <parameter param-name="workEffortTypeId" from-field="parameters.workEffortTypeId"/>
+ <parameter param-name="calendarType" from-field="parameters.calendarType"/>
+ <parameter param-name="facilityId" from-field="parameters.facilityId"/>
+ <parameter param-name="hideEvents" from-field="parameters.hideEvents"/>
+ </link>
+ </menu-item>
+ <menu-item name="toDay">
+ <link target="${parameters._LAST_VIEW_NAME_}" text="${uiLabelMap.CommonToday}">
+ <parameter param-name="period" value="day"/>
+ <parameter param-name="partyId" from-field="parameters.partyId"/>
+ <parameter param-name="fixedAssetId" from-field="parameters.fixedAssetId"/>
+ <parameter param-name="workEffortTypeId" from-field="parameters.workEffortTypeId"/>
+ <parameter param-name="calendarType" from-field="parameters.calendarType"/>
+ <parameter param-name="facilityId" from-field="parameters.facilityId"/>
+ <parameter param-name="hideEvents" from-field="parameters.hideEvents"/>
+ </link>
+ </menu-item>
+ <menu-item name="prev">
+ <link target="${parameters._LAST_VIEW_NAME_}" text="${uiLabelMap.WorkEffortPreviousDay}">
+ <parameter param-name="period" value="day"/>
+ <parameter param-name="start" value="${prevMillis}"/>
+ <parameter param-name="partyId" from-field="parameters.partyId"/>
+ <parameter param-name="fixedAssetId" from-field="parameters.fixedAssetId"/>
+ <parameter param-name="workEffortTypeId" from-field="parameters.workEffortTypeId"/>
+ <parameter param-name="calendarType" from-field="parameters.calendarType"/>
+ <parameter param-name="facilityId" from-field="parameters.facilityId"/>
+ <parameter param-name="hideEvents" from-field="parameters.hideEvents"/>
+ </link>
</menu-item>
</menu>
<menu name="Week" extends="Calendar">
- <menu-item name="next" title="${uiLabelMap.WorkEffortNextWeek}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=week&start=${nextMillis}${urlParam}"/>
- </menu-item>
- <menu-item name="thisWeek" title="${uiLabelMap.WorkEffortThisWeek}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=week${urlParam}"/>
- </menu-item>
- <menu-item name="prev" title="${uiLabelMap.WorkEffortPreviousWeek}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=week&start=${prevMillis}${urlParam}"/>
+ <menu-item name="next">
+ <link target="${parameters._LAST_VIEW_NAME_}" text="${uiLabelMap.WorkEffortNextWeek}">
+ <parameter param-name="period" value="week"/>
+ <parameter param-name="start" value="${nextMillis}"/>
+ <parameter param-name="partyId" from-field="parameters.partyId"/>
+ <parameter param-name="fixedAssetId" from-field="parameters.fixedAssetId"/>
+ <parameter param-name="workEffortTypeId" from-field="parameters.workEffortTypeId"/>
+ <parameter param-name="calendarType" from-field="parameters.calendarType"/>
+ <parameter param-name="facilityId" from-field="parameters.facilityId"/>
+ <parameter param-name="hideEvents" from-field="parameters.hideEvents"/>
+ </link>
+ </menu-item>
+ <menu-item name="thisWeek">
+ <link target="${parameters._LAST_VIEW_NAME_}" text="${uiLabelMap.WorkEffortThisWeek}">
+ <parameter param-name="period" value="week"/>
+ <parameter param-name="partyId" from-field="parameters.partyId"/>
+ <parameter param-name="fixedAssetId" from-field="parameters.fixedAssetId"/>
+ <parameter param-name="workEffortTypeId" from-field="parameters.workEffortTypeId"/>
+ <parameter param-name="calendarType" from-field="parameters.calendarType"/>
+ <parameter param-name="facilityId" from-field="parameters.facilityId"/>
+ <parameter param-name="hideEvents" from-field="parameters.hideEvents"/>
+ </link>
+ </menu-item>
+ <menu-item name="prev">
+ <link target="${parameters._LAST_VIEW_NAME_}" text="${uiLabelMap.WorkEffortPreviousWeek}">
+ <parameter param-name="period" value="week"/>
+ <parameter param-name="start" value="${prevMillis}"/>
+ <parameter param-name="partyId" from-field="parameters.partyId"/>
+ <parameter param-name="fixedAssetId" from-field="parameters.fixedAssetId"/>
+ <parameter param-name="workEffortTypeId" from-field="parameters.workEffortTypeId"/>
+ <parameter param-name="calendarType" from-field="parameters.calendarType"/>
+ <parameter param-name="facilityId" from-field="parameters.facilityId"/>
+ <parameter param-name="hideEvents" from-field="parameters.hideEvents"/>
+ </link>
</menu-item>
</menu>
<menu name="Month" extends="Calendar">
- <menu-item name="next" title="${uiLabelMap.WorkEffortNextMonth}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=month&start=${nextMillis}${urlParam}"/>
- </menu-item>
- <menu-item name="thisMonth" title="${uiLabelMap.WorkEffortThisMonth}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=month${urlParam}"/>
- </menu-item>
- <menu-item name="prev" title="${uiLabelMap.WorkEffortPreviousMonth}">
- <link target="${parameters._LAST_VIEW_NAME_}?period=month&start=${prevMillis}${urlParam}"/>
+ <menu-item name="next">
+ <link target="${parameters._LAST_VIEW_NAME_}" text="${uiLabelMap.WorkEffortNextMonth}">
+ <parameter param-name="period" value="month"/>
+ <parameter param-name="start" value="${nextMillis}"/>
+ <parameter param-name="partyId" from-field="parameters.partyId"/>
+ <parameter param-name="fixedAssetId" from-field="parameters.fixedAssetId"/>
+ <parameter param-name="workEffortTypeId" from-field="parameters.workEffortTypeId"/>
+ <parameter param-name="calendarType" from-field="parameters.calendarType"/>
+ <parameter param-name="facilityId" from-field="parameters.facilityId"/>
+ <parameter param-name="hideEvents" from-field="parameters.hideEvents"/>
+ </link>
+ </menu-item>
+ <menu-item name="thisMonth">
+ <link target="${parameters._LAST_VIEW_NAME_}" text="${uiLabelMap.WorkEffortThisMonth}">
+ <parameter param-name="period" value="month"/>
+ <parameter param-name="partyId" from-field="parameters.partyId"/>
+ <parameter param-name="fixedAssetId" from-field="parameters.fixedAssetId"/>
+ <parameter param-name="workEffortTypeId" from-field="parameters.workEffortTypeId"/>
+ <parameter param-name="calendarType" from-field="parameters.calendarType"/>
+ <parameter param-name="facilityId" from-field="parameters.facilityId"/>
+ <parameter param-name="hideEvents" from-field="parameters.hideEvents"/>
+ </link>
+ </menu-item>
+ <menu-item name="prev">
+ <link target="${parameters._LAST_VIEW_NAME_}" text="${uiLabelMap.WorkEffortPreviousMonth}">
+ <parameter param-name="period" value="month"/>
+ <parameter param-name="start" value="${prevMillis}"/>
+ <parameter param-name="partyId" from-field="parameters.partyId"/>
+ <parameter param-name="fixedAssetId" from-field="parameters.fixedAssetId"/>
+ <parameter param-name="workEffortTypeId" from-field="parameters.workEffortTypeId"/>
+ <parameter param-name="calendarType" from-field="parameters.calendarType"/>
+ <parameter param-name="facilityId" from-field="parameters.facilityId"/>
+ <parameter param-name="hideEvents" from-field="parameters.hideEvents"/>
+ </link>
</menu-item>
</menu>
<menu name="Upcoming" extends="Calendar">
</menu>
<menu name="Calendar">
- <menu-item name="upcoming" title="${uiLabelMap.WorkEffortUpcomingEvents}">
+ <menu-item name="upcoming">
<condition>
<and>
<if-compare field="parameters.period" operator="not-equals" value="upcoming"/>
<if-empty field="parameters.fixedAssetId"/>
</and>
</condition>
- <link target="${parameters._LAST_VIEW_NAME_}?period=upcoming${urlParam}"/>
+ <link target="${parameters._LAST_VIEW_NAME_}" text="${uiLabelMap.WorkEffortUpcomingEvents}">
+ <parameter param-name="period" value="upcoming"/>
+ <parameter param-name="partyId" from-field="parameters.partyId"/>
+ <parameter param-name="fixedAssetId" from-field="parameters.fixedAssetId"/>
+ <parameter param-name="workEffortTypeId" from-field="parameters.workEffortTypeId"/>
+ <parameter param-name="calendarType" from-field="parameters.calendarType"/>
+ <parameter param-name="facilityId" from-field="parameters.facilityId"/>
+ <parameter param-name="hideEvents" from-field="parameters.hideEvents"/>
+ </link>
</menu-item>
- <menu-item name="month" title="${uiLabelMap.WorkEffortMonthView}">
+ <menu-item name="month">
<condition>
<if-compare field="parameters.period" operator="not-equals" value="month"/>
</condition>
- <link target="${parameters._LAST_VIEW_NAME_}?period=month${urlParam}"/>
+ <link target="${parameters._LAST_VIEW_NAME_}" text="${uiLabelMap.WorkEffortMonthView}">
+ <parameter param-name="period" value="month"/>
+ <parameter param-name="partyId" from-field="parameters.partyId"/>
+ <parameter param-name="fixedAssetId" from-field="parameters.fixedAssetId"/>
+ <parameter param-name="workEffortTypeId" from-field="parameters.workEffortTypeId"/>
+ <parameter param-name="calendarType" from-field="parameters.calendarType"/>
+ <parameter param-name="facilityId" from-field="parameters.facilityId"/>
+ <parameter param-name="hideEvents" from-field="parameters.hideEvents"/>
+ </link>
</menu-item>
- <menu-item name="week" title="${uiLabelMap.WorkEffortWeekView}">
+ <menu-item name="week">
<condition>
<and>
<if-compare field="parameters.period" operator="not-equals" value="week"/>
<not><if-empty field="parameters.period"/></not>
</and>
</condition>
- <link target="${parameters._LAST_VIEW_NAME_}?period=week${urlParam}"/>
+ <link target="${parameters._LAST_VIEW_NAME_}" text="${uiLabelMap.WorkEffortWeekView}">
+ <parameter param-name="period" value="week"/>
+ <parameter param-name="partyId" from-field="parameters.partyId"/>
+ <parameter param-name="fixedAssetId" from-field="parameters.fixedAssetId"/>
+ <parameter param-name="workEffortTypeId" from-field="parameters.workEffortTypeId"/>
+ <parameter param-name="calendarType" from-field="parameters.calendarType"/>
+ <parameter param-name="facilityId" from-field="parameters.facilityId"/>
+ <parameter param-name="hideEvents" from-field="parameters.hideEvents"/>
+ </link>
</menu-item>
- <menu-item name="day" title="${uiLabelMap.WorkEffortDayView}">
+ <menu-item name="day">
<condition>
<if-compare field="parameters.period" operator="not-equals" value="day"/>
</condition>
- <link target="${parameters._LAST_VIEW_NAME_}?period=day${urlParam}"/>
+ <link target="${parameters._LAST_VIEW_NAME_}" text="${uiLabelMap.WorkEffortDayView}">
+ <parameter param-name="period" value="day"/>
+ <parameter param-name="partyId" from-field="parameters.partyId"/>
+ <parameter param-name="fixedAssetId" from-field="parameters.fixedAssetId"/>
+ <parameter param-name="workEffortTypeId" from-field="parameters.workEffortTypeId"/>
+ <parameter param-name="calendarType" from-field="parameters.calendarType"/>
+ <parameter param-name="facilityId" from-field="parameters.facilityId"/>
+ <parameter param-name="hideEvents" from-field="parameters.hideEvents"/>
+ </link>
</menu-item>
<menu-item name="dummy" title="--------">
<condition>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml Mon Nov 24 10:06:26 2014
@@ -345,7 +345,7 @@ under the License.
<include name="*/build.xml"/>
</fileset>
</subant>
- <antcall target="build"/>
+ <!--antcall target="build"/--><!-- you can chain if you don't use build-dev see MVP-256-->
</target>
<target name="build-qa"
@@ -356,7 +356,7 @@ under the License.
<include name="*/build.xml"/>
</fileset>
</subant>
- <antcall target="build"/>
+ <!--antcall target="build"/--><!-- you can chain if you don't use build-dev see MVP-256-->
</target>
<target name="build-production"
@@ -367,7 +367,7 @@ under the License.
<include name="*/build.xml"/>
</fileset>
</subant>
- <antcall target="build"/>
+ <!--antcall target="build"/--><!-- you can chain if you don't use build-dev see MVP-256-->
</target>
<!-- ================================================================== -->
@@ -643,7 +643,7 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
</java>
</target>
<target name="load-demo-multitenant" depends="build"
@@ -652,20 +652,20 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
</java>
<java jar="ofbiz.jar" fork="true">
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="delegator=default#DEMO1"/>
</java>
<java jar="ofbiz.jar" fork="true">
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="delegator=default#DEMO2"/>
</java>
</target>
@@ -675,7 +675,7 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="readers=seed"/>
</java>
</target>
@@ -685,7 +685,7 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="readers=seed,seed-initial,ext"/>
</java>
</target>
@@ -695,7 +695,7 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="readers=seed,seed-initial,ext,ext-test"/>
</java>
</target>
@@ -705,7 +705,7 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="readers=${data-readers}"/>
</java>
</target>
@@ -716,7 +716,7 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="delegator=${delegator}"/>
<arg value="file=${data-file}"/>
</java>
@@ -732,7 +732,7 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="readers=tenant"/>
</java>
<condition property="hasTenant">
@@ -773,7 +773,7 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="delegator=default#${tenantId}"/>
</java>
</target>
@@ -782,7 +782,7 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="delegator=default#${tenantId}"/>
<arg value="readers=${data-readers}"/>
</java>
@@ -807,7 +807,7 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="delegator=default#${tenantId}"/>
<arg value="component=${component}"/>
</java>
@@ -817,7 +817,7 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="delegator=default#${tenantId}"/>
<arg value="readers=${data-readers}"/>
<arg value="component=${component}"/>
@@ -835,7 +835,7 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="readers=tenant"/>
</java>
<condition property="hasReader">
@@ -856,7 +856,7 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="delegator=${delegator}"/>
</java>
</target>
@@ -865,7 +865,7 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="readers=${data-readers}"/>
<arg value="delegator=${delegator}"/>
</java>
@@ -1044,7 +1044,7 @@ under the License.
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<jvmarg value="${memory.maxpermsize.param}"/>
- <arg value="install"/>
+ <arg value="load-data"/>
<arg value="readers=${data-readers}"/>
<arg value="delegator=default#${tenantId}"/>
</java>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/config/ofbiz-containers.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/config/ofbiz-containers.xml?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/config/ofbiz-containers.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/config/ofbiz-containers.xml Mon Nov 24 10:06:26 2014
@@ -22,7 +22,7 @@ under the License.
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-containers.xsd">
<!-- load the ofbiz component container (always first) -->
- <container name="component-container" loaders="main,rmi,pos,install" class="org.ofbiz.base.container.ComponentContainer"/>
+ <container name="component-container" loaders="main,rmi,pos,load-data" class="org.ofbiz.base.container.ComponentContainer"/>
<container name="component-container-test" loaders="test" class="org.ofbiz.base.container.ComponentContainer">
<property name="ofbiz.instrumenterClassName" value="org.ofbiz.base.config.CoberturaInstrumenter"/>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/catalina/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/catalina/ofbiz-component.xml?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/catalina/ofbiz-component.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/catalina/ofbiz-component.xml Mon Nov 24 10:06:26 2014
@@ -146,8 +146,7 @@ under the License.
<property name="keystoreType" value="JKS"/>
<property name="keyAlias" value="ofbiz"/>
<property name="keyPass" value="changeit"/>
- <property name="sslProtocol" value="TLSv1.2"/>
- <property name="sslEnabledProtocols" value="TLSv1.2"/>
+ <property name="sslProtocol" value="TLS"/>
<property name="ciphers" value=""/>
</property>
</container>
@@ -204,8 +203,7 @@ under the License.
<property name="keystoreFile" value="framework/base/config/ofbizssl.jks"/>
<property name="keystorePass" value="changeit"/>
<property name="keystoreType" value="JKS"/>
- <property name="sslProtocol" value="TLSv1.2"/>
- <property name="sslEnabledProtocols" value="TLSv1.2"/>
+ <property name="sslProtocol" value="TLS"/>
<property name="ciphers" value=""/>
</property>
</container>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java Mon Nov 24 10:06:26 2014
@@ -237,7 +237,7 @@ public class EntityDataLoader {
return 0;
}
- Debug.logVerbose("[install.loadData] Loading XML Resource: \"" + dataUrl.toExternalForm() + "\"", module);
+ Debug.logVerbose("[loadData] Loading XML Resource: \"" + dataUrl.toExternalForm() + "\"", module);
try {
/* The OLD way
@@ -256,7 +256,7 @@ public class EntityDataLoader {
reader.setMaintainTxStamps(maintainTxs);
rowsChanged += reader.parse(dataUrl);
} catch (Exception e) {
- String xmlError = "[install.loadData]: Error loading XML Resource \"" + dataUrl.toExternalForm() + "\"; Error was: " + e.getMessage();
+ String xmlError = "[loadData]: Error loading XML Resource \"" + dataUrl.toExternalForm() + "\"; Error was: " + e.getMessage();
errorMessages.add(xmlError);
Debug.logError(e, xmlError, module);
}
@@ -287,7 +287,7 @@ public class EntityDataLoader {
toBeStored.add(delegator.makeValue("SecurityGroupPermission", "groupId", "FULLADMIN", "permissionId", baseName + "_ADMIN"));
rowsChanged += delegator.storeAll(toBeStored);
} catch (GenericEntityException e) {
- errorMessages.add("[install.generateData] ERROR: Failed Security Generation for entity \"" + baseName + "\"");
+ errorMessages.add("[generateData] ERROR: Failed Security Generation for entity \"" + baseName + "\"");
}
/*
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/ofbiz-component.xml?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/ofbiz-component.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/ofbiz-component.xml Mon Nov 24 10:06:26 2014
@@ -36,7 +36,7 @@ under the License.
<service-resource type="group" loader="main" location="servicedef/groups.xml"/>
<!-- load the data load container, runs the entity data load stuff -->
- <container name="dataload-container" loaders="install" class="org.ofbiz.entityext.data.EntityDataLoadContainer">
+ <container name="dataload-container" loaders="load-data" class="org.ofbiz.entityext.data.EntityDataLoadContainer">
<property name="delegator-name" value="default"/>
<property name="entity-group-name" value="org.ofbiz"/>
</container>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java Mon Nov 24 10:06:26 2014
@@ -94,7 +94,7 @@ public class EntityDataLoadContainer imp
ServiceDispatcher.enableSvcs(false);
/*
- install arguments:
+ load-data arguments:
readers (none, all, seed, demo, ext, etc - configured in entityengine.xml and associated via ofbiz-component.xml)
timeout (transaction timeout default 7200)
delegator (overrides the delegator name configured for the container)
@@ -103,8 +103,11 @@ public class EntityDataLoadContainer imp
file (import a specific XML file)
Example:
- $ java -jar ofbiz.jar -install -readers=seed,demo,ext -timeout=7200 -delegator=default -group=org.ofbiz
- $ java -jar ofbiz.jar -install -file=/tmp/dataload.xml
+ $ java -jar ofbiz.jar -load-data -readers=seed,demo,ext -timeout=7200 -delegator=default -group=org.ofbiz
+ $ java -jar ofbiz.jar -load-data -file=/tmp/dataload.xml
+ Currently no dashes before load-data, see OFBIZ-5872
+ $ java -jar ofbiz.jar load-data -readers=seed,demo,ext -timeout=7200 -delegator=default -group=org.ofbiz
+ $ java -jar ofbiz.jar load-data -file=/tmp/dataload.xml
*/
if (args != null) {
for (String argument: args) {
@@ -174,8 +177,10 @@ public class EntityDataLoadContainer imp
createConstraints = true;
}
} else if ("help".equalsIgnoreCase(argumentName)) {
+ //"java -jar ofbiz.jar -load-data [options]\n" +
+ // Currently no dashes before load-data, see OFBIZ-5872
String helpStr = "\n--------------------------------------\n" +
- "java -jar ofbiz.jar -install [options]\n" +
+ "java -jar ofbiz.jar load-data [options]\n" +
"-component=[name] .... only load from a specific component\n" +
"-delegator=[name] .... use the defined delegator (default-no-eca)\n" +
"-group=[name] ........ override the entity group (org.ofbiz)\n" +
@@ -203,6 +208,7 @@ public class EntityDataLoadContainer imp
/**
* @see org.ofbiz.base.container.Container#start()
*/
+ @Override
public boolean start() throws ContainerException {
if("all-tenants".equals(this.overrideDelegator)) {
if (!EntityUtil.isMultiTenantEnabled()) {
@@ -577,9 +583,11 @@ public class EntityDataLoadContainer imp
/**
* @see org.ofbiz.base.container.Container#stop()
*/
+ @Override
public void stop() throws ContainerException {
}
+ @Override
public String getName() {
return name;
}
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/ofbiz-component.xml?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/ofbiz-component.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/ofbiz-component.xml Mon Nov 24 10:06:26 2014
@@ -44,7 +44,7 @@ under the License.
<keystore name="rmitrust" type="jks" password="changeit" is-truststore="true"
is-certstore="false" loader="main" location="config/rmitrust.jks"/>
- <container name="service-container" loaders="main,rmi,pos,install,test" class="org.ofbiz.service.ServiceContainer">
+ <container name="service-container" loaders="main,rmi,pos,load-data,test" class="org.ofbiz.service.ServiceContainer">
<property name="dispatcher-factory" value="org.ofbiz.service.GenericDispatcherFactory"/>
</container>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy Mon Nov 24 10:06:26 2014
@@ -45,18 +45,6 @@ abstract class GroovyBaseScript extends
return result = binding.getVariable('delegator').makeValue(entityName);
}
- Map findOne(String entityName, Map inputMap) {
- Map genericValue = binding.getVariable('delegator').findOne(entityName, inputMap, true);
- // TODO: get the list of pk fields from the map and use them only
- return genericValue;
- }
-
- List findList(String entityName, Map inputMap) {
- List genericValues = binding.getVariable('delegator').findByAnd(entityName, inputMap, null, false);
- // TODO: get the list of entity fields from the map and use them only
- return genericValues;
- }
-
EntityQuery from(def entity) {
return EntityQuery.use(binding.getVariable('delegator')).from(entity);
}
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java Mon Nov 24 10:06:26 2014
@@ -74,19 +74,20 @@ public final class Start {
}
private static void help(PrintStream out) {
+ // Currently some commands have no dash, see OFBIZ-5872
out.println("");
out.println("Usage: java -jar ofbiz.jar [command] [arguments]");
- out.println("-both -----> Run simultaneously the POS (Point of Sales) application and OFBiz standard");
+ out.println("both -----> Runs simultaneously the POS (Point of Sales) application and OFBiz standard");
out.println("-help, -? ----> This screen");
- out.println("-install -----> Run install (create tables/load data)");
- out.println("-pos -----> Run the POS (Point of Sales) application");
- out.println("-setup -------> Run external application server setup");
- out.println("-start -------> Start the server");
- out.println("-status ------> Status of the server");
- out.println("-shutdown ----> Shutdown the server");
- out.println("-test --------> Run the JUnit test script");
- out.println("[no config] --> Use default config");
- out.println("[no command] -> Start the server w/ default config");
+ out.println("load-data -----> Creates tables/load data, eg: load-data -readers=seed,demo,ext -timeout=7200 -delegator=default -group=org.ofbiz. Or: load-data -file=/tmp/dataload.xml");
+ out.println("pos -----> Runs the POS (Point of Sales) application");
+ //out.println("-setup -------> Run external application server setup");
+ out.println("start -------> Starts the server");
+ out.println("-status ------> Gives the status of the server");
+ out.println("-shutdown ----> Shutdowns the server");
+ out.println("test --------> Runs the JUnit test script");
+ out.println("[no config] --> Uses default config");
+ out.println("[no command] -> Starts the server with default config");
}
public static void main(String[] args) throws StartupException {
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/config/WebtoolsUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/config/WebtoolsUiLabels.xml?rev=1641348&r1=1641347&r2=1641348&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/config/WebtoolsUiLabels.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/config/WebtoolsUiLabels.xml Mon Nov 24 10:06:26 2014
@@ -3761,17 +3761,17 @@
<value xml:lang="zh_TW">æ²æåºç¾</value>
</property>
<property key="WebtoolsNoteAntRunInstall">
- <value xml:lang="de">HINWEIS: Sofern Sie das Installationsskript zum Daten lagen noch nicht haben laufen lassen, geben Sie bitte im OFBIZ_HOME Verzeichnis "ant load-demo" oder "java -jar ofbiz.jar install" ein.</value>
- <value xml:lang="en">NOTE: If you have not already run the installation data loading script, from the ofbiz home directory run "ant load-demo" or "java -jar ofbiz.jar install"</value>
- <value xml:lang="fr">NOTE: Si vous n'avez pas déjà exécuté le script de chargement des données d'installation : à partir du répertoire racine d'ofbiz, exécutez "ant load-demo" ou "java -jar ofbiz.jar install"</value>
- <value xml:lang="it">NOTA: Se non hai ancora eseguito lo script di installazione di caricamento dei dati, esegui dalla home directory di ofbiz "ant load-demo" o "java -jar ofbiz.jar install"</value>
- <value xml:lang="ja">注æ: ãã¼ã¿ããã¼ãããã¤ã³ã¹ãã¼ã«ã¹ã¯ãªãããã¾ã å®è¡ãã¦ããªãå ´åãofbizãã¼ã ãã£ã¬ã¯ããªã§"ant run-install"ã¾ãã¯"java -jar ofbiz.jar install"ãå®è¡ãã¦ãã ãã</value>
+ <value xml:lang="de">HINWEIS: Sofern Sie das Installationsskript zum Daten lagen noch nicht haben laufen lassen, geben Sie bitte im OFBIZ_HOME Verzeichnis "ant load-demo" oder "java -jar ofbiz.jar load-data" ein.</value>
+ <value xml:lang="en">NOTE: If you have not already run the installation data loading script, from the ofbiz home directory run "ant load-demo" or "java -jar ofbiz.jar load-data"</value>
+ <value xml:lang="fr">NOTE: Si vous n'avez pas déjà exécuté le script de chargement des données d'installation : à partir du répertoire racine d'ofbiz, exécutez "ant load-demo" ou "java -jar ofbiz.jar load-data"</value>
+ <value xml:lang="it">NOTA: Se non hai ancora eseguito lo script di installazione di caricamento dei dati, esegui dalla home directory di ofbiz "ant load-demo" o "java -jar ofbiz.jar load-data"</value>
+ <value xml:lang="ja">注æ: ãã¼ã¿ããã¼ãããã¤ã³ã¹ãã¼ã«ã¹ã¯ãªãããã¾ã å®è¡ãã¦ããªãå ´åãofbizãã¼ã ãã£ã¬ã¯ããªã§"ant load-demo"ã¾ãã¯"java -jar ofbiz.jar load-data"ãå®è¡ãã¦ãã ãã</value>
<value xml:lang="pt">NOTA: Se você ainda não executou o script de carregamento e instalação de dados, a partir do diretório home do OFBiz executar "ant load-demo" ou "ofbiz.jar java-jar-install"</value>
- <value xml:lang="ro">NOTA: Daca inca nu ai executat script_ul de instalare incarcare date, executa de la home directory ofbiz "ant load-demo" sau "java -jar ofbiz.jar install"</value>
- <value xml:lang="th">หมายà¹à¸«à¸à¸¸: à¸à¹à¸²à¸à¸¸à¸à¹à¸¡à¹à¹à¸à¹à¸à¸³à¸à¸²à¸£à¸à¸³à¹à¸à¸´à¸à¸à¸²à¸à¸à¸´à¸à¸à¸±à¹à¸ data loading script à¸à¸²à¸ ofbiz home directory à¹à¸«à¹à¹à¸à¹à¸à¸³à¸ªà¸±à¹à¸ "ant load-demo" หรืภ"java -jar ofbiz.jar install"</value>
- <value xml:lang="vi">Ghi chú: nếu bạn Äã chạy quá trình tải dữ liá»u, từ thÆ° mục gá»c của Ofbiz bạn hãy chạy "ant load-demo" hoặc "java -jar ofbiz.jar install"</value>
- <value xml:lang="zh">注æï¼å¦æä½ è¿æ²¡æè¿è¡å®è£
æ°æ®è½½å
¥èæ¬ï¼é£ä¹ä½ å¯ä»¥å¨OFBizç®å½ä¸è¿è¡"ant load-demo"æ"java -jar ofbiz.jar install"</value>
- <value xml:lang="zh_TW">注æ:å¦æä½ éæ²æå·è¡å®è£è³æè¼å
¥è
³æ¬,é£éº¼ä½ å¯ä»¥å¨OFBizç®éä¸å·è¡"ant load-demo"æ"java -jar ofbiz.jar install"</value>
+ <value xml:lang="ro">NOTA: Daca inca nu ai executat script_ul de instalare incarcare date, executa de la home directory ofbiz "ant load-demo" sau "java -jar ofbiz.jar load-data"</value>
+ <value xml:lang="th">หมายà¹à¸«à¸à¸¸: à¸à¹à¸²à¸à¸¸à¸à¹à¸¡à¹à¹à¸à¹à¸à¸³à¸à¸²à¸£à¸à¸³à¹à¸à¸´à¸à¸à¸²à¸à¸à¸´à¸à¸à¸±à¹à¸ data loading script à¸à¸²à¸ ofbiz home directory à¹à¸«à¹à¹à¸à¹à¸à¸³à¸ªà¸±à¹à¸ "ant load-demo" หรืภ"java -jar ofbiz.jar load-data"</value>
+ <value xml:lang="vi">Ghi chú: nếu bạn Äã chạy quá trình tải dữ liá»u, từ thÆ° mục gá»c của Ofbiz bạn hãy chạy "ant load-demo" hoặc "java -jar ofbiz.jar load-data"</value>
+ <value xml:lang="zh">注æï¼å¦æä½ è¿æ²¡æè¿è¡å®è£
æ°æ®è½½å
¥èæ¬ï¼é£ä¹ä½ å¯ä»¥å¨OFBizç®å½ä¸è¿è¡"ant load-demo"æ"java -jar ofbiz.jar load-data"</value>
+ <value xml:lang="zh_TW">注æ:å¦æä½ éæ²æå·è¡å®è£è³æè¼å
¥è
³æ¬,é£éº¼ä½ å¯ä»¥å¨OFBizç®éä¸å·è¡"ant load-demo"æ"java -jar ofbiz.jar load-data"</value>
</property>
<property key="WebtoolsNoteForeighKeysMayAlsoBeCreated">
<value xml:lang="de">HINWEIS: Fremdschlüssel können mit der Datenbank-Check/-Update Funktion ebenfalls generiert werden, sofern die check-fks-on-start und andere Optionen auf der Datensource entsprechend gesetzt sind.</value>