You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2009/10/05 02:08:39 UTC
svn commit: r821643 [5/15] - in /ofbiz/trunk:
applications/accounting/script/org/ofbiz/accounting/test/
applications/accounting/src/org/ofbiz/accounting/
applications/accounting/src/org/ofbiz/accounting/agreement/
applications/accounting/src/org/ofbiz/...
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java Mon Oct 5 00:08:27 2009
@@ -35,7 +35,7 @@
import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.condition.EntityCondition;
@@ -62,7 +62,7 @@
public static final String resource = "ManufacturingUiLabels";
public static Map initMrpEvents(DispatchContext ctx, Map context) {
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
LocalDispatcher dispatcher = ctx.getDispatcher();
Timestamp now = UtilDateTime.nowTimestamp();
@@ -505,10 +505,10 @@
* @param product the product for which the Quantity Available is required
* @return the sum of all the totalAvailableToPromise of the inventoryItem related to the product, if the related facility is Mrp available (not yet implemented!!)
*/
- public static BigDecimal findProductMrpQoh(String mrpId, GenericValue product, String facilityId, LocalDispatcher dispatcher, GenericDelegator delegator) {
+ public static BigDecimal findProductMrpQoh(String mrpId, GenericValue product, String facilityId, LocalDispatcher dispatcher, Delegator delegator) {
return findProductMrpQoh(mrpId, product.getString("productId"), facilityId, dispatcher, delegator);
}
- public static BigDecimal findProductMrpQoh(String mrpId, String productId, String facilityId, LocalDispatcher dispatcher, GenericDelegator delegator) {
+ public static BigDecimal findProductMrpQoh(String mrpId, String productId, String facilityId, LocalDispatcher dispatcher, Delegator delegator) {
Map resultMap = null;
try {
if (facilityId == null) {
@@ -524,10 +524,10 @@
return ((BigDecimal)resultMap.get("quantityOnHandTotal"));
}
- public static void logMrpError(String mrpId, String productId, String errorMessage, GenericDelegator delegator) {
+ public static void logMrpError(String mrpId, String productId, String errorMessage, Delegator delegator) {
logMrpError(mrpId, productId, UtilDateTime.nowTimestamp(), errorMessage, delegator);
}
- public static void logMrpError(String mrpId, String productId, Timestamp eventDate, String errorMessage, GenericDelegator delegator) {
+ public static void logMrpError(String mrpId, String productId, Timestamp eventDate, String errorMessage, Delegator delegator) {
try {
if (UtilValidate.isNotEmpty(productId) && UtilValidate.isNotEmpty(errorMessage)) {
GenericValue inventoryEventError = delegator.makeValue("MrpEvent", UtilMisc.toMap("productId", productId,
@@ -555,7 +555,7 @@
public static void processBomComponent(String mrpId, GenericValue product, BigDecimal eventQuantity, Timestamp startDate, Map routingTaskStartDate, List listComponent) {
// TODO : change the return type to boolean to be able to test if all is ok or if it have had a exception
- GenericDelegator delegator = product.getDelegator();
+ Delegator delegator = product.getDelegator();
if (UtilValidate.isNotEmpty(listComponent)) {
Iterator listComponentIter = listComponent.iterator();
@@ -601,7 +601,7 @@
public static Map executeMrp(DispatchContext ctx, Map context) {
Debug.logInfo("executeMrp called", module);
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
LocalDispatcher dispatcher = ctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Timestamp now = UtilDateTime.nowTimestamp();
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java Mon Oct 5 00:08:27 2009
@@ -29,7 +29,7 @@
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.util.EntityUtil;
@@ -97,7 +97,7 @@
* <li>if ProposedOrder.isBuild a Map with all the routingTaskId as keys and estimatedStartDate as value.
* <li>else null.
**/
- public Map calculateStartDate(int daysToShip, GenericValue routing, GenericDelegator delegator, LocalDispatcher dispatcher, GenericValue userLogin) {
+ public Map calculateStartDate(int daysToShip, GenericValue routing, Delegator delegator, LocalDispatcher dispatcher, GenericValue userLogin) {
Map result = null;
Timestamp endDate = (Timestamp)requiredByDate.clone();
Timestamp startDate = endDate;
@@ -227,7 +227,7 @@
return null;
}
LocalDispatcher dispatcher = ctx.getDispatcher();
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
Map parameters = UtilMisc.toMap("userLogin", userLogin);
if (isBuilt) {
try {
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/routing/RoutingServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/routing/RoutingServices.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/routing/RoutingServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/routing/RoutingServices.java Mon Oct 5 00:08:27 2009
@@ -23,7 +23,7 @@
import java.util.Map;
import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.service.DispatchContext;
@@ -49,7 +49,7 @@
*/
public static Map getEstimatedTaskTime(DispatchContext ctx, Map context) {
Map result = new HashMap();
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
LocalDispatcher dispatcher = ctx.getDispatcher();
// The mandatory IN parameters
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java Mon Oct 5 00:08:27 2009
@@ -30,7 +30,7 @@
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.condition.EntityCondition;
@@ -58,7 +58,7 @@
* @return result: a map containing lookupResult (list of RoutingTask <=> workEffortId with currentStatusId = "ROU_ACTIVE" and workEffortTypeId = "ROU_TASK"
*/
public static Map lookupRoutingTask(DispatchContext ctx, Map context) {
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
Map result = new HashMap();
String workEffortName = (String) context.get("workEffortName");
@@ -96,7 +96,7 @@
* @return result a map containing sequenceNumNotOk which is equal to "Y" if it's not Ok
*/
public static Map checkRoutingTaskAssoc(DispatchContext ctx, Map context) {
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
Map result = new HashMap();
String sequenceNumNotOk = "N";
@@ -186,7 +186,7 @@
}
if (techDataCalendar == null) {
try {
- GenericDelegator delegator = routingTask.getDelegator();
+ Delegator delegator = routingTask.getDelegator();
techDataCalendar = delegator.findByPrimaryKey("TechDataCalendar",UtilMisc.toMap("calendarId","DEFAULT"));
} catch (GenericEntityException e) {
Debug.logError("Pb reading TechDataCalendar DEFAULT"+e.getMessage(), module);
Modified: ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/marketing/MarketingServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/marketing/MarketingServices.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/marketing/MarketingServices.java (original)
+++ ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/marketing/MarketingServices.java Mon Oct 5 00:08:27 2009
@@ -27,7 +27,7 @@
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.service.DispatchContext;
@@ -48,7 +48,7 @@
public static Map<String, Object> signUpForContactList(DispatchContext dctx, Map<String, ? extends Object> context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
Timestamp fromDate = UtilDateTime.nowTimestamp();
Modified: ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java (original)
+++ ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java Mon Oct 5 00:08:27 2009
@@ -35,7 +35,7 @@
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.webapp.stats.VisitHandler;
import org.ofbiz.webapp.website.WebSiteWorker;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.product.category.CategoryWorker;
@@ -57,7 +57,7 @@
if (UtilValidate.isNotEmpty(trackingCodeId)) {
//tracking code is specified on the request, get the TrackingCode value and handle accordingly
- GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ Delegator delegator = (Delegator) request.getAttribute("delegator");
GenericValue trackingCode;
try {
trackingCode = delegator.findByPrimaryKeyCache("TrackingCode", UtilMisc.toMap("trackingCodeId", trackingCodeId));
@@ -94,7 +94,7 @@
if (UtilValidate.isNotEmpty(trackingCodeId)) {
//partner managed tracking code is specified on the request
- GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ Delegator delegator = (Delegator) request.getAttribute("delegator");
GenericValue trackingCode;
try {
trackingCode = delegator.findByPrimaryKeyCache("TrackingCode", UtilMisc.toMap("trackingCodeId", trackingCodeId));
@@ -171,7 +171,7 @@
}
private static String processTrackingCode(GenericValue trackingCode, HttpServletRequest request, HttpServletResponse response) {
- GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ Delegator delegator = (Delegator) request.getAttribute("delegator");
String trackingCodeId = trackingCode.getString("trackingCodeId");
//check effective dates
@@ -308,7 +308,7 @@
* of events that run on the first hit in a visit.
*/
public static String checkTrackingCodeCookies(HttpServletRequest request, HttpServletResponse response) {
- GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ Delegator delegator = (Delegator) request.getAttribute("delegator");
java.sql.Timestamp nowStamp = UtilDateTime.nowTimestamp();
GenericValue visit = VisitHandler.getVisit(request.getSession());
if (visit == null) {
@@ -365,7 +365,7 @@
}
public static String checkAccessTrackingCode(HttpServletRequest request, HttpServletResponse response) {
- GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ Delegator delegator = (Delegator) request.getAttribute("delegator");
java.sql.Timestamp nowStamp = UtilDateTime.nowTimestamp();
String trackingCodeId = request.getParameter("autoTrackingCode");
@@ -436,7 +436,7 @@
/** Makes a list of TrackingCodeOrder entities to be attached to the current order; called by the createOrder event; the values in the returned List will not have the orderId set */
public static List<GenericValue> makeTrackingCodeOrders(HttpServletRequest request) {
- GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ Delegator delegator = (Delegator) request.getAttribute("delegator");
java.sql.Timestamp nowStamp = UtilDateTime.nowTimestamp();
List<GenericValue> trackingCodeOrders = FastList.newInstance();
Modified: ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java (original)
+++ ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java Mon Oct 5 00:08:27 2009
@@ -35,7 +35,7 @@
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.condition.EntityCondition;
@@ -71,7 +71,7 @@
public static Map<String, Object> importVCard(DispatchContext dctx, Map<String, ? extends Object> context) {
LocalDispatcher dispatcher = (LocalDispatcher) dctx.getDispatcher();
- GenericDelegator delegator = (GenericDelegator) dctx.getDelegator();
+ Delegator delegator = (Delegator) dctx.getDelegator();
Map<String, Object> result = ServiceUtil.returnSuccess();
Address workAddress = null;
String email = null;
@@ -183,7 +183,7 @@
}
public static Map<String, Object> exportVCard(DispatchContext dctx, Map<String, ? extends Object> context) {
- GenericDelegator delegator = (GenericDelegator) dctx.getDelegator();
+ Delegator delegator = (Delegator) dctx.getDelegator();
String partyId = (String) context.get("partyId");
File file = null;
try {
Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml (original)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml Mon Oct 5 00:08:27 2009
@@ -309,7 +309,7 @@
</condition>
<then>
<call-class-method class-name="org.ofbiz.product.config.ProductConfigWorker" method-name="loadProductConfigWrapper" ret-field="configWrapper">
- <field field="delegator" type="org.ofbiz.entity.GenericDelegator"/>
+ <field field="delegator" type="org.ofbiz.entity.Delegator"/>
<field field="dispatcher" type="org.ofbiz.service.LocalDispatcher"/>
<field field="parameters.configId" type="java.lang.String"/>
<field field="parameters.productId" type="java.lang.String"/>
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java Mon Oct 5 00:08:27 2009
@@ -38,7 +38,7 @@
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.condition.EntityCondition;
@@ -63,7 +63,7 @@
public static String processOfflinePayments(HttpServletRequest request, HttpServletResponse response) {
HttpSession session = request.getSession();
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
- GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ Delegator delegator = (Delegator) request.getAttribute("delegator");
GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
Locale locale = UtilHttp.getLocale(request);
@@ -129,7 +129,7 @@
public static String receiveOfflinePayment(HttpServletRequest request, HttpServletResponse response) {
HttpSession session = request.getSession();
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
- GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ Delegator delegator = (Delegator) request.getAttribute("delegator");
GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
Locale locale = UtilHttp.getLocale(request);
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java Mon Oct 5 00:08:27 2009
@@ -30,7 +30,7 @@
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilNumber;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntity;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
@@ -101,7 +101,7 @@
* @return
* @throws GenericEntityException
*/
- public static String getNewFinAccountCode(int codeLength, GenericDelegator delegator) throws GenericEntityException {
+ public static String getNewFinAccountCode(int codeLength, Delegator delegator) throws GenericEntityException {
// keep generating new account codes until a unique one is found
Random r = new Random();
@@ -136,7 +136,7 @@
* @return
* @throws GenericEntityException
*/
- public static GenericValue getFinAccountFromCode(String finAccountCode, GenericDelegator delegator) throws GenericEntityException {
+ public static GenericValue getFinAccountFromCode(String finAccountCode, Delegator delegator) throws GenericEntityException {
// regex magic to turn all letters in code to uppercase and then remove all non-alphanumeric letters
if (finAccountCode == null) {
return null;
@@ -178,7 +178,7 @@
* @return
* @throws GenericEntityException
*/
- public static BigDecimal getBalance(String finAccountId, Timestamp asOfDateTime, GenericDelegator delegator) throws GenericEntityException {
+ public static BigDecimal getBalance(String finAccountId, Timestamp asOfDateTime, Delegator delegator) throws GenericEntityException {
if (asOfDateTime == null) asOfDateTime = UtilDateTime.nowTimestamp();
BigDecimal incrementTotal = ZERO; // total amount of transactions which increase balance
@@ -221,7 +221,7 @@
* @return
* @throws GenericEntityException
*/
- public static BigDecimal getAvailableBalance(String finAccountId, Timestamp asOfDateTime, GenericDelegator delegator) throws GenericEntityException {
+ public static BigDecimal getAvailableBalance(String finAccountId, Timestamp asOfDateTime, Delegator delegator) throws GenericEntityException {
if (asOfDateTime == null) asOfDateTime = UtilDateTime.nowTimestamp();
BigDecimal netBalance = getBalance(finAccountId, asOfDateTime, delegator);
@@ -252,7 +252,7 @@
* @param pinNumber
* @return true if the bin is valid
*/
- public static boolean validatePin(GenericDelegator delegator, String finAccountId, String pinNumber) {
+ public static boolean validatePin(Delegator delegator, String finAccountId, String pinNumber) {
GenericValue finAccount = null;
try {
finAccount = delegator.findByPrimaryKey("FinAccount", UtilMisc.toMap("finAccountId", finAccountId));
@@ -280,7 +280,7 @@
* @return String generated number
* @throws GenericEntityException
*/
- public static String generateRandomFinNumber(GenericDelegator delegator, int length, boolean isId) throws GenericEntityException {
+ public static String generateRandomFinNumber(Delegator delegator, int length, boolean isId) throws GenericEntityException {
if (length > 19) {
length = 19;
}
@@ -311,7 +311,7 @@
return number;
}
- private static boolean checkIsNumberInDatabase(GenericDelegator delegator, String number) throws GenericEntityException {
+ private static boolean checkIsNumberInDatabase(Delegator delegator, String number) throws GenericEntityException {
GenericValue finAccount = delegator.findByPrimaryKey("FinAccount", UtilMisc.toMap("finAccountId", number));
return finAccount == null;
}
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderChangeHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderChangeHelper.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderChangeHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderChangeHelper.java Mon Oct 5 00:08:27 2009
@@ -26,7 +26,7 @@
import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.service.GenericServiceException;
@@ -170,7 +170,7 @@
// now set the status for digital items
if (digitalItemStatus != null && !digitalItemStatus.equals(toItemStatus)) {
- GenericDelegator delegator = dispatcher.getDelegator();
+ Delegator delegator = dispatcher.getDelegator();
GenericValue orderHeader = null;
try {
orderHeader = delegator.findByPrimaryKey("OrderHeader", UtilMisc.toMap("orderId", orderId));
@@ -306,7 +306,7 @@
public static boolean releaseInitialOrderHold(LocalDispatcher dispatcher, String orderId) {
/* NOTE DEJ20080609 commenting out this code because the old OFBiz Workflow Engine is being deprecated and this was only for that
// get the delegator from the dispatcher
- GenericDelegator delegator = dispatcher.getDelegator();
+ Delegator delegator = dispatcher.getDelegator();
// find the workEffortId for this order
List workEfforts = null;
@@ -348,7 +348,7 @@
public static boolean abortOrderProcessing(LocalDispatcher dispatcher, String orderId) {
/* NOTE DEJ20080609 commenting out this code because the old OFBiz Workflow Engine is being deprecated and this was only for that
Debug.logInfo("Aborting workflow for order " + orderId, module);
- GenericDelegator delegator = dispatcher.getDelegator();
+ Delegator delegator = dispatcher.getDelegator();
// find the workEffortId for this order
GenericValue workEffort = null;
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderContentWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderContentWrapper.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderContentWrapper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderContentWrapper.java Mon Oct 5 00:08:27 2009
@@ -35,7 +35,7 @@
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.cache.UtilCache;
import org.ofbiz.content.content.ContentWorker;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.util.EntityUtil;
import org.ofbiz.service.LocalDispatcher;
@@ -93,7 +93,7 @@
return getOrderContentAsText(order, orderContentTypeId, locale, null, null, dispatcher);
}
- public static String getOrderContentAsText(GenericValue order, String orderContentTypeId, Locale locale, String mimeTypeId, GenericDelegator delegator, LocalDispatcher dispatcher) {
+ public static String getOrderContentAsText(GenericValue order, String orderContentTypeId, Locale locale, String mimeTypeId, Delegator delegator, LocalDispatcher dispatcher) {
/* caching: there is one cache created, "order.content" Each order's content is cached with a key of
* contentTypeId::locale::mimeType::orderId::orderItemSeqId, or whatever the SEPARATOR is defined above to be.
*/
@@ -124,7 +124,7 @@
}
}
- public static void getOrderContentAsText(String orderId, String orderItemSeqId, GenericValue order, String orderContentTypeId, Locale locale, String mimeTypeId, GenericDelegator delegator, LocalDispatcher dispatcher, Writer outWriter) throws GeneralException, IOException {
+ public static void getOrderContentAsText(String orderId, String orderItemSeqId, GenericValue order, String orderContentTypeId, Locale locale, String mimeTypeId, Delegator delegator, LocalDispatcher dispatcher, Writer outWriter) throws GeneralException, IOException {
if (orderId == null && order != null) {
orderId = order.getString("orderId");
}
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderEvents.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderEvents.java Mon Oct 5 00:08:27 2009
@@ -33,7 +33,7 @@
import org.ofbiz.base.util.UtilHttp;
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.content.data.DataResourceWorker;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
@@ -53,7 +53,7 @@
public static String downloadDigitalProduct(HttpServletRequest request, HttpServletResponse response) {
HttpSession session = request.getSession();
ServletContext application = session.getServletContext();
- GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ Delegator delegator = (Delegator) request.getAttribute("delegator");
GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
String dataResourceId = request.getParameter("dataResourceId");
@@ -99,7 +99,7 @@
public static String cancelSelectedOrderItems(HttpServletRequest request, HttpServletResponse response) {
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
- GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
+ Delegator delegator = (Delegator) request.getAttribute("delegator");
HttpSession session = request.getSession();
GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java Mon Oct 5 00:08:27 2009
@@ -21,7 +21,7 @@
import javolution.util.FastList;
import org.ofbiz.base.util.*;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.condition.*;
@@ -50,7 +50,7 @@
public static Map findOrders(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
Security security = dctx.getSecurity();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Mon Oct 5 00:08:27 2009
@@ -41,7 +41,7 @@
import org.ofbiz.base.util.UtilNumber;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.common.DataModelConstants;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntity;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
@@ -122,7 +122,7 @@
this.orderItems = orderItems;
}
- public OrderReadHelper(GenericDelegator delegator, String orderId) {
+ public OrderReadHelper(Delegator delegator, String orderId) {
try {
this.orderHeader = delegator.findByPrimaryKey("OrderHeader", UtilMisc.toMap("orderId", orderId));
} catch (GenericEntityException e) {
@@ -157,7 +157,7 @@
public GenericValue getProductStore() {
String productStoreId = orderHeader.getString("productStoreId");
try {
- GenericDelegator delegator = orderHeader.getDelegator();
+ Delegator delegator = orderHeader.getDelegator();
GenericValue productStore = delegator.findByPrimaryKeyCache("ProductStore", UtilMisc.toMap("productStoreId", productStoreId));
return productStore;
} catch (GenericEntityException ex) {
@@ -727,7 +727,7 @@
}
public GenericValue getPartyFromRole(String roleTypeId) {
- GenericDelegator delegator = orderHeader.getDelegator();
+ Delegator delegator = orderHeader.getDelegator();
GenericValue partyObject = null;
try {
GenericValue orderRole = EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderRole", UtilMisc.toMap("roleTypeId", roleTypeId)));
@@ -1004,7 +1004,7 @@
}
public BigDecimal getItemWeight(GenericValue item) {
- GenericDelegator delegator = orderHeader.getDelegator();
+ Delegator delegator = orderHeader.getDelegator();
BigDecimal itemWeight = ZERO;
GenericValue product = null;
@@ -1123,7 +1123,7 @@
}
public BigDecimal getItemSize(GenericValue item) {
- GenericDelegator delegator = orderHeader.getDelegator();
+ Delegator delegator = orderHeader.getDelegator();
BigDecimal size = BigDecimal.ZERO;
GenericValue product = null;
@@ -1172,7 +1172,7 @@
}
public long getItemPiecesIncluded(GenericValue item) {
- GenericDelegator delegator = orderHeader.getDelegator();
+ Delegator delegator = orderHeader.getDelegator();
long piecesIncluded = 1;
GenericValue product = null;
@@ -1242,7 +1242,7 @@
}
public String getOrderEmailString() {
- GenericDelegator delegator = orderHeader.getDelegator();
+ Delegator delegator = orderHeader.getDelegator();
// get the email addresses from the order contact mech(s)
List orderContactMechs = null;
try {
@@ -1281,7 +1281,7 @@
* amounts received and refunded as payments for the settled ones.
*/
public BigDecimal getOrderOpenAmount() throws GenericEntityException {
- GenericDelegator delegator = orderHeader.getDelegator();
+ Delegator delegator = orderHeader.getDelegator();
BigDecimal total = getOrderGrandTotal();
BigDecimal openAmount = BigDecimal.ZERO;
List prefs = getPaymentPreferences();
@@ -1346,7 +1346,7 @@
}
public int hasSurvey() {
- GenericDelegator delegator = orderHeader.getDelegator();
+ Delegator delegator = orderHeader.getDelegator();
List surveys = null;
try {
surveys = delegator.findByAnd("SurveyResponse", UtilMisc.toMap("orderId", orderHeader.getString("orderId")));
@@ -1413,7 +1413,7 @@
}
return false;
}*/
- GenericDelegator delegator = orderHeader.getDelegator();
+ Delegator delegator = orderHeader.getDelegator();
GenericValue orderDeliverySchedule = null;
try {
orderDeliverySchedule = delegator.findByPrimaryKey("OrderDeliverySchedule", UtilMisc.toMap("orderId", orderId, "orderItemSeqId", "_NA_"));
@@ -1591,7 +1591,7 @@
public String getCurrentOrderItemWorkEffort(GenericValue orderItem) {
String orderItemSeqId = orderItem.getString("orderItemSeqId");
String orderId = orderItem.getString("orderId");
- GenericDelegator delegator = orderItem.getDelegator();
+ Delegator delegator = orderItem.getDelegator();
GenericValue workOrderItemFulFillment = null;
GenericValue workEffort = null;
try {
@@ -1627,7 +1627,7 @@
public List getOrderItemPriceInfos(GenericValue orderItem) {
if (orderItem == null) return null;
if (this.orderItemPriceInfos == null) {
- GenericDelegator delegator = orderHeader.getDelegator();
+ Delegator delegator = orderHeader.getDelegator();
try {
orderItemPriceInfos = delegator.findByAnd("OrderItemPriceInfo", UtilMisc.toMap("orderId", orderHeader.get("orderId")));
@@ -1654,7 +1654,7 @@
public List getOrderItemShipGrpInvResList(GenericValue orderItem) {
if (orderItem == null) return null;
if (this.orderItemShipGrpInvResList == null) {
- GenericDelegator delegator = orderItem.getDelegator();
+ Delegator delegator = orderItem.getDelegator();
try {
orderItemShipGrpInvResList = delegator.findByAnd("OrderItemShipGrpInvRes", UtilMisc.toMap("orderId", orderItem.get("orderId")));
} catch (GenericEntityException e) {
@@ -1671,7 +1671,7 @@
public List getOrderItemIssuances(GenericValue orderItem, String shipmentId) {
if (orderItem == null) return null;
if (this.orderItemIssuances == null) {
- GenericDelegator delegator = orderItem.getDelegator();
+ Delegator delegator = orderItem.getDelegator();
try {
orderItemIssuances = delegator.findByAnd("ItemIssuance", UtilMisc.toMap("orderId", orderItem.get("orderId")));
@@ -1698,7 +1698,7 @@
}
public List getOrderReturnItems() {
- GenericDelegator delegator = orderHeader.getDelegator();
+ Delegator delegator = orderHeader.getDelegator();
if (this.orderReturnItems == null) {
try {
this.orderReturnItems = delegator.findByAnd("ReturnItem", UtilMisc.toMap("orderId", orderHeader.getString("orderId")));
@@ -2221,7 +2221,7 @@
// =================== Static Methods ===================
// ======================================================
- public static GenericValue getOrderHeader(GenericDelegator delegator, String orderId) {
+ public static GenericValue getOrderHeader(Delegator delegator, String orderId) {
GenericValue orderHeader = null;
if (orderId != null && delegator != null) {
try {
@@ -2254,7 +2254,7 @@
return orderQty.subtract(cancelQty);
}
- public static GenericValue getProductStoreFromOrder(GenericDelegator delegator, String orderId) {
+ public static GenericValue getProductStoreFromOrder(Delegator delegator, String orderId) {
GenericValue orderHeader = getOrderHeader(delegator, orderId);
if (orderHeader == null) {
Debug.logWarning("Could not find OrderHeader for orderId [" + orderId + "] in getProductStoreFromOrder, returning null", module);
@@ -2266,7 +2266,7 @@
if (orderHeader == null) {
return null;
}
- GenericDelegator delegator = orderHeader.getDelegator();
+ Delegator delegator = orderHeader.getDelegator();
GenericValue productStore = null;
if (orderHeader != null && orderHeader.get("productStoreId") != null) {
try {
@@ -2333,7 +2333,7 @@
}
public static List getOrderSurveyResponses(GenericValue orderHeader) {
- GenericDelegator delegator = orderHeader.getDelegator();
+ Delegator delegator = orderHeader.getDelegator();
String orderId = orderHeader.getString("orderId");
List responses = null;
try {
@@ -2349,7 +2349,7 @@
}
public static List getOrderItemSurveyResponse(GenericValue orderItem) {
- GenericDelegator delegator = orderItem.getDelegator();
+ Delegator delegator = orderItem.getDelegator();
String orderItemSeqId = orderItem.getString("orderItemSeqId");
String orderId = orderItem.getString("orderId");
List responses = null;
@@ -2682,7 +2682,7 @@
return newOrderAdjustmentsList;
}
- public static BigDecimal getQuantityOnOrder(GenericDelegator delegator, String productId) {
+ public static BigDecimal getQuantityOnOrder(Delegator delegator, String productId) {
BigDecimal quantity = BigDecimal.ZERO;
// first find all open purchase orders
@@ -2779,7 +2779,7 @@
* @param condition
* @return
*/
- public static BigDecimal getReturnAdjustmentTotal(GenericDelegator delegator, Map condition) {
+ public static BigDecimal getReturnAdjustmentTotal(Delegator delegator, Map condition) {
BigDecimal total = ZERO;
List adjustments;
try {
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Mon Oct 5 00:08:27 2009
@@ -45,7 +45,7 @@
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.collections.ResourceBundleMapWrapper;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.condition.EntityCondition;
@@ -86,7 +86,7 @@
// locate the return item's initial inventory item cost
public static Map getReturnItemInitialCost(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String returnId = (String) context.get("returnId");
String returnItemSeqId = (String) context.get("returnItemSeqId");
@@ -97,7 +97,7 @@
// obtain order/return total information
public static Map getOrderAvailableReturnedTotal(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String orderId = (String) context.get("orderId");
OrderReadHelper orh = null;
try {
@@ -129,7 +129,7 @@
}
// worker method which can be used in screen iterations
- public static BigDecimal getReturnItemInitialCost(GenericDelegator delegator, String returnId, String returnItemSeqId) {
+ public static BigDecimal getReturnItemInitialCost(Delegator delegator, String returnId, String returnItemSeqId) {
if (delegator == null || returnId == null || returnItemSeqId == null) {
throw new IllegalArgumentException("Method parameters cannot contain nulls");
}
@@ -192,7 +192,7 @@
// helper method for sending return notifications
private static Map sendReturnNotificationScreen(DispatchContext dctx, Map context, String emailType) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
String returnId = (String) context.get("returnId");
@@ -309,7 +309,7 @@
// cancel replacement order if return not received within 30 days and send notification
public static Map<String,Object> autoCancelReplacementOrders(DispatchContext dctx, Map<String, ? extends Object> context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
List<GenericValue> returnHeaders = null;
@@ -446,7 +446,7 @@
// get a map of returnable items (items not already returned) and quantities
public static Map getReturnableItems(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String orderId = (String) context.get("orderId");
Locale locale = (Locale) context.get("locale");
@@ -581,7 +581,7 @@
// check return items status and update return header status
public static Map checkReturnComplete(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
String returnId = (String) context.get("returnId");
@@ -676,7 +676,7 @@
// credit (billingAccount) return
public static Map processCreditReturn(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String returnId = (String) context.get("returnId");
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
@@ -974,7 +974,7 @@
* @throws GenericEntityException
*/
public static BigDecimal getBillingAccountBalance(String billingAccountId, DispatchContext dctx) throws GenericEntityException {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
GenericValue billingAccount = delegator.findByPrimaryKey("BillingAccount", UtilMisc.toMap("billingAccountId", billingAccountId));
BigDecimal balance = ZERO;
@@ -1083,7 +1083,7 @@
}
public static Map processRefundReturnForReplacement(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
Locale locale = (Locale) context.get("locale");
GenericValue userLogin = (GenericValue) context.get("userLogin");
@@ -1141,7 +1141,7 @@
// refund (cash/charge) return
public static Map processRefundReturn(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
String returnId = (String) context.get("returnId");
String returnTypeId = (String) context.get("returnTypeId");
@@ -1468,7 +1468,7 @@
}
public static Map refundBillingAccountPayment(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
@@ -1559,7 +1559,7 @@
public static Map createPaymentApplicationsFromReturnItemResponse(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
// the strategy for this service is to get a list of return invoices via the return items -> return item billing relationships
@@ -1647,7 +1647,7 @@
// replacement return (create new order adjusted to be at no charge)
public static Map processReplacementReturn(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String returnId = (String) context.get("returnId");
String returnTypeId = (String) context.get("returnTypeId");
GenericValue userLogin = (GenericValue) context.get("userLogin");
@@ -2134,7 +2134,7 @@
}
public static Map processSubscriptionReturn(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String returnId = (String) context.get("returnId");
Timestamp now = UtilDateTime.nowTimestamp();
@@ -2197,7 +2197,7 @@
* @param delegator
* @param returnId
*/
- public static void groupReturnItemsByOrder(List returnItems, Map returnItemsByOrderId, Map totalByOrder, GenericDelegator delegator, String returnId, String returnTypeId) {
+ public static void groupReturnItemsByOrder(List returnItems, Map returnItemsByOrderId, Map totalByOrder, Delegator delegator, String returnId, String returnTypeId) {
Iterator itemIt = returnItems.iterator();
while (itemIt.hasNext()) {
GenericValue returnItem = (GenericValue) itemIt.next();
@@ -2258,7 +2258,7 @@
public static Map getReturnAmountByOrder(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String returnId = (String) context.get("returnId");
Locale locale = (Locale) context.get("locale");
List returnItems = null;
@@ -2302,7 +2302,7 @@
public static Map checkPaymentAmountForRefund(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String returnId = (String) context.get("returnId");
Locale locale = (Locale) context.get("locale");
Map returnAmountByOrder = null;
@@ -2345,7 +2345,7 @@
}
public static Map createReturnAdjustment(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String orderAdjustmentId = (String) context.get("orderAdjustmentId");
String returnAdjustmentTypeId = (String) context.get("returnAdjustmentTypeId");
String returnId = (String) context.get("returnId");
@@ -2452,7 +2452,7 @@
}
public static Map updateReturnAdjustment(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
GenericValue returnItem = null;
GenericValue returnAdjustment = null;
@@ -2559,7 +2559,7 @@
* @param condition
* @return
*/
- public static BigDecimal getReturnAdjustmentTotal(GenericDelegator delegator, Map condition) {
+ public static BigDecimal getReturnAdjustmentTotal(Delegator delegator, Map condition) {
BigDecimal total = BigDecimal.ZERO;
List adjustments;
try {
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon Oct 5 00:08:27 2009
@@ -50,7 +50,7 @@
import org.ofbiz.base.util.collections.ResourceBundleMapWrapper;
import org.ofbiz.common.CommonWorkers;
import org.ofbiz.common.DataModelConstants;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntity;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
@@ -115,7 +115,7 @@
public static final BigDecimal ZERO = BigDecimal.ZERO.setScale(taxDecimals, taxRounding);
- private static boolean hasPermission(String orderId, GenericValue userLogin, String action, Security security, GenericDelegator delegator) {
+ private static boolean hasPermission(String orderId, GenericValue userLogin, String action, Security security, Delegator delegator) {
OrderReadHelper orh = new OrderReadHelper(delegator, orderId);
String orderTypeId = orh.getOrderTypeId();
String partyId = null;
@@ -179,7 +179,7 @@
}
/** Service for creating a new order */
public static Map createOrder(DispatchContext ctx, Map context) {
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
LocalDispatcher dispatcher = ctx.getDispatcher();
Security security = ctx.getSecurity();
List toBeStored = new LinkedList();
@@ -1116,7 +1116,7 @@
return successResult;
}
- public static void reserveInventory(GenericDelegator delegator, LocalDispatcher dispatcher, GenericValue userLogin, Locale locale, List orderItemShipGroupInfo, List dropShipGroupIds, Map itemValuesBySeqId, String orderTypeId, String productStoreId, List resErrorMessages) throws GeneralException {
+ public static void reserveInventory(Delegator delegator, LocalDispatcher dispatcher, GenericValue userLogin, Locale locale, List orderItemShipGroupInfo, List dropShipGroupIds, Map itemValuesBySeqId, String orderTypeId, String productStoreId, List resErrorMessages) throws GeneralException {
boolean isImmediatelyFulfilled = false;
GenericValue productStore = null;
if (UtilValidate.isNotEmpty(productStoreId)) {
@@ -1284,7 +1284,7 @@
/** Service for resetting the OrderHeader grandTotal */
public static Map resetGrandTotal(DispatchContext ctx, Map context) {
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
//appears to not be used: GenericValue userLogin = (GenericValue) context.get("userLogin");
String orderId = (String) context.get("orderId");
@@ -1346,7 +1346,7 @@
/** Service for setting the OrderHeader grandTotal for all OrderHeaders with no grandTotal */
public static Map setEmptyGrandTotals(DispatchContext ctx, Map context) {
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
LocalDispatcher dispatcher = ctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Boolean forceAll = (Boolean) context.get("forceAll");
@@ -1404,7 +1404,7 @@
/** Service for checking and re-calc the tax amount */
public static Map recalcOrderTax(DispatchContext ctx, Map context) {
LocalDispatcher dispatcher = ctx.getDispatcher();
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
String orderId = (String) context.get("orderId");
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
@@ -1616,7 +1616,7 @@
/** Service for checking and re-calc the shipping amount */
public static Map recalcOrderShipping(DispatchContext ctx, Map context) {
LocalDispatcher dispatcher = ctx.getDispatcher();
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
String orderId = (String) context.get("orderId");
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
@@ -1711,7 +1711,7 @@
/** Service for checking to see if an order is fully completed or canceled */
public static Map checkItemStatus(DispatchContext ctx, Map context) {
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
LocalDispatcher dispatcher = ctx.getDispatcher();
Locale locale = (Locale) context.get("locale");
@@ -1844,7 +1844,7 @@
/** Service to cancel an order item quantity */
public static Map cancelOrderItem(DispatchContext ctx, Map context) {
LocalDispatcher dispatcher = ctx.getDispatcher();
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
Locale locale = (Locale) context.get("locale");
GenericValue userLogin = (GenericValue) context.get("userLogin");
@@ -1997,7 +1997,7 @@
/** Service for changing the status on order item(s) */
public static Map setItemStatus(DispatchContext ctx, Map context) {
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
String orderId = (String) context.get("orderId");
@@ -2089,7 +2089,7 @@
/** Service for changing the status on an order header */
public static Map setOrderStatus(DispatchContext ctx, Map context) {
LocalDispatcher dispatcher = ctx.getDispatcher();
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
String orderId = (String) context.get("orderId");
String statusId = (String) context.get("statusId");
@@ -2193,7 +2193,7 @@
/** Service to update the order tracking number */
public static Map updateTrackingNumber(DispatchContext dctx, Map context) {
Map result = new HashMap();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String orderId = (String) context.get("orderId");
String shipGroupSeqId = (String) context.get("shipGroupSeqId");
String trackingNumber = (String) context.get("trackingNumber");
@@ -2221,7 +2221,7 @@
/** Service to add a role type to an order */
public static Map addRoleType(DispatchContext ctx, Map context) {
Map result = new HashMap();
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
String orderId = (String) context.get("orderId");
String partyId = (String) context.get("partyId");
String roleTypeId = (String) context.get("roleTypeId");
@@ -2261,7 +2261,7 @@
/** Service to remove a role type from an order */
public static Map removeRoleType(DispatchContext ctx, Map context) {
Map result = new HashMap();
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
String orderId = (String) context.get("orderId");
String partyId = (String) context.get("partyId");
String roleTypeId = (String) context.get("roleTypeId");
@@ -2323,7 +2323,7 @@
protected static Map sendOrderNotificationScreen(DispatchContext dctx, Map context, String emailType) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
String orderId = (String) context.get("orderId");
String orderItemSeqId = (String) context.get("orderItemSeqId");
@@ -2464,7 +2464,7 @@
/** Service to email order notifications for pending actions */
public static Map sendProcessNotification(DispatchContext ctx, Map context) {
//appears to not be used: Map result = new HashMap();
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
LocalDispatcher dispatcher = ctx.getDispatcher();
String adminEmailList = (String) context.get("adminEmailList");
String assignedToUser = (String) context.get("assignedPartyId");
@@ -2559,7 +2559,7 @@
/** Service to create an order payment preference */
public static Map createPaymentPreference(DispatchContext ctx, Map context) {
Map result = new HashMap();
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
String orderId = (String) context.get("orderId");
String paymentMethodTypeId = (String) context.get("paymentMethodTypeId");
String paymentMethodId = (String) context.get("paymentMethodId");
@@ -2597,7 +2597,7 @@
/** Service to get order header information as standard results. */
public static Map getOrderHeaderInformation(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String orderId = (String) context.get("orderId");
Locale locale = (Locale) context.get("locale");
@@ -2618,7 +2618,7 @@
/** Service to get the total shipping for an order. */
public static Map getOrderShippingAmount(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String orderId = (String) context.get("orderId");
Locale locale = (Locale) context.get("locale");
@@ -2652,7 +2652,7 @@
/** Service to get an order contact mech. */
public static Map getOrderAddress(DispatchContext dctx, Map context) {
Map result = new HashMap();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String orderId = (String) context.get("orderId");
//appears to not be used: GenericValue v = null;
@@ -2697,7 +2697,7 @@
/** Service to create a order header note. */
public static Map createOrderNote(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
String noteString = (String) context.get("note");
@@ -2737,7 +2737,7 @@
}
public static Map allowOrderSplit(DispatchContext ctx, Map context) {
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
String orderId = (String) context.get("orderId");
String shipGroupSeqId = (String) context.get("shipGroupSeqId");
@@ -2783,7 +2783,7 @@
}
public static Map cancelFlaggedSalesOrders(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
//Locale locale = (Locale) context.get("locale");
@@ -2905,7 +2905,7 @@
}
public static Map checkDigitalItemFulfillment(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
String orderId = (String) context.get("orderId");
@@ -3080,7 +3080,7 @@
}
public static Map fulfillDigitalItems(DispatchContext ctx, Map context) {
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
LocalDispatcher dispatcher = ctx.getDispatcher();
//appears to not be used: String orderId = (String) context.get("orderId");
List orderItems = (List) context.get("orderItems");
@@ -3186,7 +3186,7 @@
/** Service to invoice service items from order*/
public static Map invoiceServiceItems(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
String orderId = (String) context.get("orderId");
@@ -3309,7 +3309,7 @@
public static Map addItemToApprovedOrder(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
String shipGroupSeqId = (String) context.get("shipGroupSeqId");
@@ -3402,7 +3402,7 @@
public static Map updateApprovedOrderItems(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
String orderId = (String) context.get("orderId");
@@ -3604,7 +3604,7 @@
public static Map loadCartForUpdate(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String orderId = (String) context.get("orderId");
GenericValue userLogin = (GenericValue) context.get("userLogin");
@@ -3632,7 +3632,7 @@
* must be stored back using the method saveUpdatedCartToOrder(...),
* because that method will recreate the data.
*/
- private static ShoppingCart loadCartForUpdate(LocalDispatcher dispatcher, GenericDelegator delegator, GenericValue userLogin, String orderId) throws GeneralException {
+ private static ShoppingCart loadCartForUpdate(LocalDispatcher dispatcher, Delegator delegator, GenericValue userLogin, String orderId) throws GeneralException {
// load the order into a shopping cart
Map loadCartResp = null;
try {
@@ -3793,7 +3793,7 @@
public static Map saveUpdatedCartToOrder(DispatchContext dctx, Map context) throws GeneralException {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String orderId = (String) context.get("orderId");
GenericValue userLogin = (GenericValue) context.get("userLogin");
@@ -3815,7 +3815,7 @@
return result;
}
- private static void saveUpdatedCartToOrder(LocalDispatcher dispatcher, GenericDelegator delegator, ShoppingCart cart, Locale locale, GenericValue userLogin, String orderId, Map changeMap) throws GeneralException {
+ private static void saveUpdatedCartToOrder(LocalDispatcher dispatcher, Delegator delegator, ShoppingCart cart, Locale locale, GenericValue userLogin, String orderId, Map changeMap) throws GeneralException {
// get/set the shipping estimates. if it's a SALES ORDER, then return an error if there are no ship estimates
int shipGroups = cart.getShipGroupSize();
for (int gi = 0; gi < shipGroups; gi++) {
@@ -4088,7 +4088,7 @@
public static Map processOrderPayments(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
String orderId = (String) context.get("orderId");
@@ -4158,7 +4158,7 @@
* @return Map
*/
public static Map createPaymentFromPreference(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
@@ -4272,7 +4272,7 @@
public static Map massChangeOrderStatus(DispatchContext dctx, Map context, String statusId) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
List orderIds = (List) context.get("orderIdList");
Iterator i = orderIds.iterator();
@@ -4313,7 +4313,7 @@
public static Map massChangeItemStatus(DispatchContext dctx, Map context, String statusId) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
List orderIds = (List) context.get("orderIdList");
Iterator i = orderIds.iterator();
@@ -4380,7 +4380,7 @@
public static Map massPickOrders(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
// grouped by facility
@@ -4541,7 +4541,7 @@
}
public static Map checkCreateDropShipPurchaseOrders(DispatchContext ctx, Map context) {
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
LocalDispatcher dispatcher = ctx.getDispatcher();
// TODO (use the "system" user)
GenericValue userLogin = (GenericValue) context.get("userLogin");
@@ -4624,7 +4624,7 @@
}
public static Map updateOrderPaymentPreference(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
@@ -4686,7 +4686,7 @@
* @return
*/
public static Map generateReqsFromCancelledPOItems(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
@@ -4761,7 +4761,7 @@
* @return
*/
public static Map cancelRemainingPurchaseOrderItems(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
@@ -4839,7 +4839,7 @@
// create simple non-product order
public static Map createSimpleNonProductSalesOrder(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
@@ -4911,7 +4911,7 @@
// generic method for creating an order from a shopping cart
public static Map createOrderFromShoppingCart(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
ShoppingCart cart = (ShoppingCart) context.get("shoppingCart");
GenericValue userLogin = cart.getUserLogin();
@@ -4932,7 +4932,7 @@
// generic method for processing an order's payment(s)
public static Map callProcessOrderPayments(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
Transaction trans = null;
try {
@@ -4988,7 +4988,7 @@
* @return Map
*/
public static Map getOrderItemInvoicedAmountAndQuantity(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
String orderId = (String) context.get("orderId");
@@ -5119,7 +5119,7 @@
public static Map setOrderPaymentStatus(DispatchContext ctx, Map context) {
LocalDispatcher dispatcher = ctx.getDispatcher();
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
String orderPaymentPreferenceId = (String) context.get("orderPaymentPreferenceId");
String changeReason = (String) context.get("changeReason");
@@ -5155,7 +5155,7 @@
}
public static Map runSubscriptionAutoReorders(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
@@ -5262,7 +5262,7 @@
// only rollback the transaction if we started one...
TransactionUtil.rollback(beganTransaction, "Error creating subscription auto-reorders", e);
} catch (GenericEntityException e2) {
- Debug.logError(e2, "[GenericDelegator] Could not rollback transaction: " + e2.toString(), module);
+ Debug.logError(e2, "[Delegator] Could not rollback transaction: " + e2.toString(), module);
}
String errMsg = "Error while creating new shopping list based automatic reorder" + e.toString();
@@ -5280,7 +5280,7 @@
}
public static Map setShippingInstructions(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String orderId = (String) context.get("orderId");
String shipGroupSeqId = (String) context.get("shipGroupSeqId");
String shippingInstructions = (String) context.get("shippingInstructions");
@@ -5295,7 +5295,7 @@
}
public static Map setGiftMessage(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String orderId = (String) context.get("orderId");
String shipGroupSeqId = (String) context.get("shipGroupSeqId");
String giftMessage = (String) context.get("giftMessage");
@@ -5311,7 +5311,7 @@
}
public static Map<String, Object> createAlsoBoughtProductAssocs(DispatchContext dctx, Map context) {
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
// All orders with an entryDate > orderEntryFromDateTime will be processed
Timestamp orderEntryFromDateTime = (Timestamp) context.get("orderEntryFromDateTime");
@@ -5382,7 +5382,7 @@
public static Map<String, Object> createAlsoBoughtProductAssocsForOrder(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String orderId = (String) context.get("orderId");
OrderReadHelper orh = new OrderReadHelper(delegator, orderId);
List<GenericValue> orderItems = orh.getOrderItems();
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/quote/QuoteServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/quote/QuoteServices.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/quote/QuoteServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/quote/QuoteServices.java Mon Oct 5 00:08:27 2009
@@ -30,7 +30,7 @@
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.service.DispatchContext;
@@ -47,7 +47,7 @@
public static Map sendQuoteReportMail(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
- GenericDelegator delegator = dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Locale locale = (Locale) context.get("locale");
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java Mon Oct 5 00:08:27 2009
@@ -27,7 +27,7 @@
import org.ofbiz.base.util.*;
import org.ofbiz.entity.condition.*;
-import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.util.EntityUtil;
@@ -46,7 +46,7 @@
public static final String resource_error = "OrderErrorUiLabels";
public static Map getRequirementsForSupplier(DispatchContext ctx, Map context) {
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
LocalDispatcher dispatcher = ctx.getDispatcher();
Locale locale = (Locale) context.get("locale");
@@ -201,7 +201,7 @@
// note that this service is designed to work only when a sales order status changes from CREATED -> APPROVED because HOLD -> APPROVED is too complex
public static Map createAutoRequirementsForOrder(DispatchContext ctx, Map context) {
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
LocalDispatcher dispatcher = ctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
@@ -241,7 +241,7 @@
// note that this service is designed to work only when a sales order status changes from CREATED -> APPROVED because HOLD -> APPROVED is too complex
public static Map createATPRequirementsForOrder(DispatchContext ctx, Map context) {
- GenericDelegator delegator = ctx.getDelegator();
+ Delegator delegator = ctx.getDelegator();
LocalDispatcher dispatcher = ctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java?rev=821643&r1=821642&r2=821643&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java Mon Oct 5 00:08:27 2009
@@ -28,6 +28,7 @@
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.webapp.stats.VisitHandler;
+import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericDelegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
@@ -56,7 +57,7 @@
}
String delegatorName = (String) session.getAttribute("delegatorName");
- GenericDelegator delegator = null;
+ Delegator delegator = null;
if (UtilValidate.isNotEmpty(delegatorName)) {
delegator = GenericDelegator.getGenericDelegator(delegatorName);
}