Converted GenericDelegator concrete class references to Delegator interface references.
This commit requires ant clean. Also, external libraries that reference GenericDelegator will need to be updated. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@821643 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -28,7 +28,7 @@ import java.util.Map;
|
||||
import org.ofbiz.base.util.Debug;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilProperties;
|
||||
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;
|
||||
@@ -47,7 +47,7 @@ public class FixedAssetMaintServices {
|
||||
|
||||
public static Map addPartFixedAssetMaint(DispatchContext ctx, Map context) {
|
||||
LocalDispatcher dispatcher = ctx.getDispatcher();
|
||||
GenericDelegator delegator = ctx.getDelegator();
|
||||
Delegator delegator = ctx.getDelegator();
|
||||
Locale locale = (Locale) context.get("locale");
|
||||
String fixedAssetId = (String)context.get("fixedAssetId");
|
||||
String maintHistSeqId = (String)context.get("maintHistSeqId");
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.ofbiz.common.authentication.api.AuthenticatorException;
|
||||
import org.ofbiz.service.LocalDispatcher;
|
||||
import org.ofbiz.service.GenericServiceException;
|
||||
import org.ofbiz.service.ServiceUtil;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.transaction.TransactionUtil;
|
||||
@@ -52,7 +52,7 @@ public class CrowdAuthenticator extends CrowdWorker implements Authenticator {
|
||||
private static final String props = "crowd.properties";
|
||||
|
||||
protected LocalDispatcher dispatcher;
|
||||
protected GenericDelegator delegator;
|
||||
protected Delegator delegator;
|
||||
|
||||
/**
|
||||
* Method called when authenticator is first initialized (the delegator
|
||||
|
||||
@@ -44,7 +44,7 @@ import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilProperties;
|
||||
import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.base.util.UtilXml;
|
||||
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;
|
||||
@@ -62,7 +62,7 @@ public class EbayHelper {
|
||||
private static final String module = EbayHelper.class.getName();
|
||||
public static final String resource = "EbayUiLabels";
|
||||
|
||||
public static Map<String, Object> buildEbayConfig(Map<String, Object> context, GenericDelegator delegator) {
|
||||
public static Map<String, Object> buildEbayConfig(Map<String, Object> context, Delegator delegator) {
|
||||
Map<String, Object> buildEbayConfigContext = FastMap.newInstance();
|
||||
Locale locale = (Locale) context.get("locale");
|
||||
String productStoreId = (String) context.get("productStoreId");
|
||||
@@ -165,7 +165,7 @@ public class EbayHelper {
|
||||
return outputBuilder.toString();
|
||||
}
|
||||
|
||||
public static void setShipmentMethodType(ShoppingCart cart, String shippingService, String productStoreId, GenericDelegator delegator) {
|
||||
public static void setShipmentMethodType(ShoppingCart cart, String shippingService, String productStoreId, Delegator delegator) {
|
||||
String partyId = "_NA_";
|
||||
String shipmentMethodTypeId = "NO_SHIPPING";
|
||||
try {
|
||||
@@ -181,7 +181,7 @@ public class EbayHelper {
|
||||
cart.setShipmentMethodTypeId(shipmentMethodTypeId);
|
||||
}
|
||||
|
||||
public static boolean createPaymentFromPaymentPreferences(GenericDelegator delegator, LocalDispatcher dispatcher, GenericValue userLogin,
|
||||
public static boolean createPaymentFromPaymentPreferences(Delegator delegator, LocalDispatcher dispatcher, GenericValue userLogin,
|
||||
String orderId, String externalId, Timestamp orderDate, String partyIdFrom) {
|
||||
List<GenericValue> paymentPreferences = null;
|
||||
try {
|
||||
@@ -208,7 +208,7 @@ public class EbayHelper {
|
||||
public static boolean createPayment(LocalDispatcher dispatcher, GenericValue userLogin,
|
||||
GenericValue paymentPreference, String orderId, String externalId, Timestamp orderDate, String partyIdFrom) {
|
||||
try {
|
||||
GenericDelegator delegator = paymentPreference.getDelegator();
|
||||
Delegator delegator = paymentPreference.getDelegator();
|
||||
|
||||
// create the PaymentGatewayResponse
|
||||
String responseId = delegator.getNextSeqId("PaymentGatewayResponse");
|
||||
@@ -239,7 +239,7 @@ public class EbayHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public static GenericValue makeOrderAdjustment(GenericDelegator delegator, String orderAdjustmentTypeId,
|
||||
public static GenericValue makeOrderAdjustment(Delegator delegator, String orderAdjustmentTypeId,
|
||||
String orderId, String orderItemSeqId, String shipGroupSeqId, double amount, double sourcePercentage) {
|
||||
GenericValue orderAdjustment = null;
|
||||
|
||||
@@ -442,7 +442,7 @@ public class EbayHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public static Map<String, Object> getCountryGeoId(GenericDelegator delegator, String geoCode) {
|
||||
public static Map<String, Object> getCountryGeoId(Delegator delegator, String geoCode) {
|
||||
GenericValue geo = null;
|
||||
try {
|
||||
Debug.logInfo("geocode: " + geoCode, module);
|
||||
@@ -471,7 +471,7 @@ public class EbayHelper {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String setShippingAddressContactMech(LocalDispatcher dispatcher, GenericDelegator delegator,
|
||||
public static String setShippingAddressContactMech(LocalDispatcher dispatcher, Delegator delegator,
|
||||
GenericValue party, GenericValue userLogin, Map<String, Object> context) {
|
||||
String contactMechId = null;
|
||||
String partyId = (String) party.get("partyId");
|
||||
@@ -519,7 +519,7 @@ public class EbayHelper {
|
||||
return createAddress(dispatcher, partyId, userLogin, "SHIPPING_LOCATION", context);
|
||||
}
|
||||
|
||||
public static String setEmailContactMech(LocalDispatcher dispatcher, GenericDelegator delegator,
|
||||
public static String setEmailContactMech(LocalDispatcher dispatcher, Delegator delegator,
|
||||
GenericValue party, GenericValue userLogin, Map<String, Object> context) {
|
||||
String contactMechId = null;
|
||||
String partyId = (String) party.get("partyId");
|
||||
@@ -544,7 +544,7 @@ public class EbayHelper {
|
||||
return createPartyEmail(dispatcher, partyId, (String) context.get("emailBuyer"), userLogin);
|
||||
}
|
||||
|
||||
public static String setPhoneContactMech(LocalDispatcher dispatcher, GenericDelegator delegator,
|
||||
public static String setPhoneContactMech(LocalDispatcher dispatcher, Delegator delegator,
|
||||
GenericValue party, GenericValue userLogin, Map<String, Object> context) {
|
||||
String contactMechId = null;
|
||||
String partyId = (String) party.get("partyId");
|
||||
@@ -579,7 +579,7 @@ public class EbayHelper {
|
||||
return createPartyPhone(dispatcher, partyId, (String) context.get("shippingAddressPhone"), userLogin);
|
||||
}
|
||||
|
||||
public static String retrieveProductIdFromTitle(GenericDelegator delegator, String title) {
|
||||
public static String retrieveProductIdFromTitle(Delegator delegator, String title) {
|
||||
String productId = "";
|
||||
try {
|
||||
// First try to get an exact match: title == internalName
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilProperties;
|
||||
import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.base.util.UtilXml;
|
||||
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;
|
||||
@@ -66,7 +66,7 @@ public class EbayOrderServices {
|
||||
private static List<String> orderImportFailureMessageList = FastList.newInstance();
|
||||
|
||||
public static Map<String, Object> getEbayOrders(DispatchContext dctx, Map<String, Object> context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
LocalDispatcher dispatcher = dctx.getDispatcher();
|
||||
Locale locale = (Locale) context.get("locale");
|
||||
orderImportSuccessMessageList.clear();
|
||||
@@ -113,7 +113,7 @@ public class EbayOrderServices {
|
||||
}
|
||||
|
||||
public static Map<String, Object> importEbayOrders(DispatchContext dctx, Map<String, Object> context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
LocalDispatcher dispatcher = dctx.getDispatcher();
|
||||
Locale locale = (Locale) context.get("locale");
|
||||
Map<String, Object> result = FastMap.newInstance();
|
||||
@@ -252,7 +252,7 @@ public class EbayOrderServices {
|
||||
return ServiceUtil.returnSuccess();
|
||||
}
|
||||
|
||||
private static Map<String, Object> checkOrders(GenericDelegator delegator, LocalDispatcher dispatcher, Locale locale, Map<String, Object> context, String responseMsg) {
|
||||
private static Map<String, Object> checkOrders(Delegator delegator, LocalDispatcher dispatcher, Locale locale, Map<String, Object> context, String responseMsg) {
|
||||
StringBuffer errorMessage = new StringBuffer();
|
||||
Map<String, Object> result = FastMap.newInstance();
|
||||
GenericValue userLogin = (GenericValue) context.get("userLogin");
|
||||
@@ -415,7 +415,7 @@ public class EbayOrderServices {
|
||||
//</GetOrdersResponse>
|
||||
|
||||
|
||||
private static List<Map<String, Object>> readGetOrdersResponse(String responseMsg, Locale locale, String productStoreId, GenericDelegator delegator, LocalDispatcher dispatcher, StringBuffer errorMessage, GenericValue userLogin) {
|
||||
private static List<Map<String, Object>> readGetOrdersResponse(String responseMsg, Locale locale, String productStoreId, Delegator delegator, LocalDispatcher dispatcher, StringBuffer errorMessage, GenericValue userLogin) {
|
||||
List<Map<String, Object>> fetchedOrders = FastList.newInstance();
|
||||
try {
|
||||
Document docResponse = UtilXml.readXmlDocument(responseMsg, true);
|
||||
@@ -624,7 +624,7 @@ public class EbayOrderServices {
|
||||
return fetchedOrders;
|
||||
}
|
||||
|
||||
private static List<Map<String, Object>> readGetSellerTransactionResponse(String responseMsg, Locale locale, String productStoreId, GenericDelegator delegator, LocalDispatcher dispatcher, StringBuffer errorMessage, GenericValue userLogin) {
|
||||
private static List<Map<String, Object>> readGetSellerTransactionResponse(String responseMsg, Locale locale, String productStoreId, Delegator delegator, LocalDispatcher dispatcher, StringBuffer errorMessage, GenericValue userLogin) {
|
||||
List<Map<String, Object>> fetchedOrders = FastList.newInstance();
|
||||
try {
|
||||
Document docResponse = UtilXml.readXmlDocument(responseMsg, true);
|
||||
@@ -901,7 +901,7 @@ public class EbayOrderServices {
|
||||
return fetchedOrders;
|
||||
}
|
||||
|
||||
private static List<String> readGetMyeBaySellingResponse(String responseMsg, Locale locale, String productStoreId, GenericDelegator delegator, LocalDispatcher dispatcher, StringBuffer errorMessage, GenericValue userLogin) {
|
||||
private static List<String> readGetMyeBaySellingResponse(String responseMsg, Locale locale, String productStoreId, Delegator delegator, LocalDispatcher dispatcher, StringBuffer errorMessage, GenericValue userLogin) {
|
||||
List<String> fetchDeletedOrdersAndTransactions = FastList.newInstance();
|
||||
try {
|
||||
Document docResponse = UtilXml.readXmlDocument(responseMsg, true);
|
||||
@@ -966,7 +966,7 @@ public class EbayOrderServices {
|
||||
return fetchDeletedOrdersAndTransactions;
|
||||
}
|
||||
|
||||
private static Map<String, Object> createShoppingCart(GenericDelegator delegator, LocalDispatcher dispatcher, Locale locale, Map<String, Object> context, boolean create) {
|
||||
private static Map<String, Object> createShoppingCart(Delegator delegator, LocalDispatcher dispatcher, Locale locale, Map<String, Object> context, boolean create) {
|
||||
try {
|
||||
String productStoreId = (String) context.get("productStoreId");
|
||||
GenericValue userLogin = (GenericValue) context.get("userLogin");
|
||||
@@ -1215,7 +1215,7 @@ public class EbayOrderServices {
|
||||
}
|
||||
|
||||
// Made some changes transactionId removed.
|
||||
private static GenericValue externalOrderExists(GenericDelegator delegator, String externalId) throws GenericEntityException {
|
||||
private static GenericValue externalOrderExists(Delegator delegator, String externalId) throws GenericEntityException {
|
||||
Debug.logInfo("Checking for existing externalId: " + externalId, module);
|
||||
GenericValue orderHeader = null;
|
||||
List<GenericValue> orderHeaderList = delegator.findByAnd("OrderHeader", UtilMisc.toMap("externalId", externalId));
|
||||
@@ -1225,7 +1225,7 @@ public class EbayOrderServices {
|
||||
return orderHeader;
|
||||
}
|
||||
|
||||
private static void addItem(ShoppingCart cart, Map<String, Object> orderItem, LocalDispatcher dispatcher, GenericDelegator delegator, int groupIdx) throws GeneralException {
|
||||
private static void addItem(ShoppingCart cart, Map<String, Object> orderItem, LocalDispatcher dispatcher, Delegator delegator, int groupIdx) throws GeneralException {
|
||||
String productId = (String) orderItem.get("productId");
|
||||
GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), false);
|
||||
if (UtilValidate.isEmpty(product)) {
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilProperties;
|
||||
import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.base.util.UtilXml;
|
||||
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;
|
||||
@@ -57,7 +57,7 @@ public class ImportOrdersFromEbay {
|
||||
private static final String module = ImportOrdersFromEbay.class.getName();
|
||||
|
||||
public static Map<String, Object> importOrdersSearchFromEbay(DispatchContext dctx, Map<String, Object> context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
LocalDispatcher dispatcher = dctx.getDispatcher();
|
||||
Locale locale = (Locale) context.get("locale");
|
||||
Map<String, Object> result = FastMap.newInstance();
|
||||
@@ -81,7 +81,7 @@ public class ImportOrdersFromEbay {
|
||||
}
|
||||
|
||||
public static Map<String, Object> importOrderFromEbay(DispatchContext dctx, Map<String, Object> context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
LocalDispatcher dispatcher = dctx.getDispatcher();
|
||||
Locale locale = (Locale) context.get("locale");
|
||||
Map<String, Object> order = FastMap.newInstance();
|
||||
@@ -125,7 +125,7 @@ public class ImportOrdersFromEbay {
|
||||
}
|
||||
|
||||
public static Map<String, Object> setEbayOrderToComplete(DispatchContext dctx, Map<String, Object> context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
Locale locale = (Locale) context.get("locale");
|
||||
String orderId = (String) context.get("orderId");
|
||||
String externalId = (String) context.get("externalId");
|
||||
@@ -181,7 +181,7 @@ public class ImportOrdersFromEbay {
|
||||
return ServiceUtil.returnSuccess();
|
||||
}
|
||||
|
||||
private static Map<String, Object> checkOrders(GenericDelegator delegator, LocalDispatcher dispatcher, Locale locale, Map<String, Object> context, String response) {
|
||||
private static Map<String, Object> checkOrders(Delegator delegator, LocalDispatcher dispatcher, Locale locale, Map<String, Object> context, String response) {
|
||||
StringBuffer errorMessage = new StringBuffer();
|
||||
List<Map<String, Object>> orders = readResponseFromEbay(response, locale, (String)context.get("productStoreId"), delegator, errorMessage);
|
||||
if (orders == null) {
|
||||
@@ -249,7 +249,7 @@ public class ImportOrdersFromEbay {
|
||||
return ServiceUtil.returnSuccess();
|
||||
}
|
||||
|
||||
public static Map<String, Object> buildCompleteSaleRequest(GenericDelegator delegator, Locale locale, String itemId, String transactionId, Map<String, Object> context, StringBuffer dataItemsXml, String token) {
|
||||
public static Map<String, Object> buildCompleteSaleRequest(Delegator delegator, Locale locale, String itemId, String transactionId, Map<String, Object> context, StringBuffer dataItemsXml, String token) {
|
||||
String paid = (String)context.get("paid");
|
||||
String shipped = (String)context.get("shipped");
|
||||
|
||||
@@ -323,7 +323,7 @@ public class ImportOrdersFromEbay {
|
||||
return ServiceUtil.returnSuccess();
|
||||
}
|
||||
|
||||
private static List<Map<String, Object>> readResponseFromEbay(String msg, Locale locale, String productStoreId, GenericDelegator delegator, StringBuffer errorMessage) {
|
||||
private static List<Map<String, Object>> readResponseFromEbay(String msg, Locale locale, String productStoreId, Delegator delegator, StringBuffer errorMessage) {
|
||||
List<Map<String, Object>> orders = null;
|
||||
try {
|
||||
Document docResponse = UtilXml.readXmlDocument(msg, true);
|
||||
@@ -571,7 +571,7 @@ public class ImportOrdersFromEbay {
|
||||
return orders;
|
||||
}
|
||||
|
||||
private static Map<String, Object> createShoppingCart(GenericDelegator delegator, LocalDispatcher dispatcher, Locale locale, Map<String, Object> parameters, boolean create) {
|
||||
private static Map<String, Object> createShoppingCart(Delegator delegator, LocalDispatcher dispatcher, Locale locale, Map<String, Object> parameters, boolean create) {
|
||||
try {
|
||||
String productStoreId = (String) parameters.get("productStoreId");
|
||||
GenericValue userLogin = (GenericValue) parameters.get("userLogin");
|
||||
@@ -809,7 +809,7 @@ public class ImportOrdersFromEbay {
|
||||
}
|
||||
|
||||
|
||||
private static GenericValue externalOrderExists(GenericDelegator delegator, String externalId, String transactionId) throws GenericEntityException {
|
||||
private static GenericValue externalOrderExists(Delegator delegator, String externalId, String transactionId) throws GenericEntityException {
|
||||
Debug.logInfo("Checking for existing externalId: " + externalId +" and transactionId: " + transactionId, module);
|
||||
GenericValue orderHeader = null;
|
||||
List<GenericValue> entities = delegator.findByAnd("OrderHeader", UtilMisc.toMap("externalId", externalId, "transactionId", transactionId));
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilProperties;
|
||||
import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.base.util.UtilXml;
|
||||
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;
|
||||
@@ -67,7 +67,7 @@ public class ProductsExportToEbay {
|
||||
|
||||
public static Map exportToEbay(DispatchContext dctx, Map context) {
|
||||
Locale locale = (Locale) context.get("locale");
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
productExportSuccessMessageList.clear();
|
||||
productExportFailureMessageList.clear();
|
||||
Map<String, Object> result = FastMap.newInstance();
|
||||
@@ -180,7 +180,7 @@ public class ProductsExportToEbay {
|
||||
private static Map buildDataItemsXml(DispatchContext dctx, Map context, StringBuffer dataItemsXml, String token, GenericValue prod) {
|
||||
Locale locale = (Locale)context.get("locale");
|
||||
try {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String webSiteUrl = (String)context.get("webSiteUrl");
|
||||
List selectResult = (List)context.get("selectResult");
|
||||
|
||||
@@ -458,7 +458,7 @@ public class ProductsExportToEbay {
|
||||
}
|
||||
}
|
||||
|
||||
private static void setMiscDetails(Document itemDocument, Element itemElem, Map context, GenericDelegator delegator) throws Exception {
|
||||
private static void setMiscDetails(Document itemDocument, Element itemElem, Map context, Delegator delegator) throws Exception {
|
||||
String customXmlFromUI = (String) context.get("customXml");
|
||||
String customXml = "";
|
||||
if (UtilValidate.isNotEmpty(customXmlFromUI)) {
|
||||
@@ -480,7 +480,7 @@ public class ProductsExportToEbay {
|
||||
}
|
||||
|
||||
public static Map getEbayCategories(DispatchContext dctx, Map context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
Locale locale = (Locale) context.get("locale");
|
||||
String categoryCode = (String)context.get("categoryCode");
|
||||
Map result = null;
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Map;
|
||||
|
||||
import org.ofbiz.base.util.UtilHttp;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.order.shoppingcart.CheckOutHelper;
|
||||
import org.ofbiz.order.shoppingcart.ShoppingCart;
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.ofbiz.base.util.UtilHttp;
|
||||
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.util.EntityUtil;
|
||||
@@ -103,7 +103,7 @@ public class ThirdPartyEvents {
|
||||
*@return String specifying the exit status of this event
|
||||
*/
|
||||
public static String updateAssociatedDistributor(HttpServletRequest request, HttpServletResponse response) {
|
||||
GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
|
||||
Delegator delegator = (Delegator) request.getAttribute("delegator");
|
||||
GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin");
|
||||
GenericValue party = null;
|
||||
|
||||
@@ -183,7 +183,7 @@ public class ThirdPartyEvents {
|
||||
*@return String specifying the exit status of this event
|
||||
*/
|
||||
public static String updateAssociatedAffiliate(HttpServletRequest request, HttpServletResponse response) {
|
||||
GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
|
||||
Delegator delegator = (Delegator) request.getAttribute("delegator");
|
||||
GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin");
|
||||
GenericValue party = null;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
import org.ofbiz.base.util.*;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.product.store.ProductStoreSurveyWrapper;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.*;
|
||||
import org.ofbiz.entity.condition.*;
|
||||
import org.ofbiz.entity.util.*;
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilProperties;
|
||||
import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.base.util.UtilXml;
|
||||
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;
|
||||
@@ -68,7 +68,7 @@ public class ProductsExportToGoogle {
|
||||
|
||||
public static Map<String, Object> exportToGoogle(DispatchContext dctx, Map<String, Object> context) {
|
||||
Locale locale = (Locale) context.get("locale");
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
LocalDispatcher dispatcher = dctx.getDispatcher();
|
||||
|
||||
Map<String, Object> result = null;
|
||||
@@ -245,7 +245,7 @@ public class ProductsExportToGoogle {
|
||||
}
|
||||
|
||||
private static Map postItem(String token, String postItemsUrl, String developerKey, StringBuffer dataItems,
|
||||
Locale locale, String testMode, List newProductsInGoogle, List productsRemovedFromGoogle, LocalDispatcher dispatcher, GenericDelegator delegator) throws IOException {
|
||||
Locale locale, String testMode, List newProductsInGoogle, List productsRemovedFromGoogle, LocalDispatcher dispatcher, Delegator delegator) throws IOException {
|
||||
if (Debug.verboseOn()) {
|
||||
Debug.logVerbose("Request To Google Base :\n" + dataItems.toString(), module);
|
||||
}
|
||||
@@ -301,7 +301,7 @@ public class ProductsExportToGoogle {
|
||||
List<Object> newProductsInGoogle = FastList.newInstance();
|
||||
List<Object> productsRemovedFromGoogle = FastList.newInstance();
|
||||
try {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
LocalDispatcher dispatcher = dctx.getDispatcher();
|
||||
List selectResult = (List)context.get("selectResult");
|
||||
String webSiteUrl = (String)context.get("webSiteUrl");
|
||||
@@ -531,7 +531,7 @@ public class ProductsExportToGoogle {
|
||||
return priceString;
|
||||
}
|
||||
|
||||
private static Map<String, Object> readResponseFromGoogle(String msg, List<Object> newProductsInGoogle, List<Object> productsRemovedFromGoogle, LocalDispatcher dispatcher, GenericDelegator delegator, Locale locale) {
|
||||
private static Map<String, Object> readResponseFromGoogle(String msg, List<Object> newProductsInGoogle, List<Object> productsRemovedFromGoogle, LocalDispatcher dispatcher, Delegator delegator, Locale locale) {
|
||||
List message = FastList.newInstance();
|
||||
// Debug.log("====get xml response from google: " + msg);
|
||||
try {
|
||||
@@ -589,7 +589,7 @@ public class ProductsExportToGoogle {
|
||||
return ServiceUtil.returnSuccess();
|
||||
}
|
||||
|
||||
private static Map<String, Object> buildGoogleBaseConfig(Map<String, Object> context, GenericDelegator delegator) {
|
||||
private static Map<String, Object> buildGoogleBaseConfig(Map<String, Object> context, Delegator delegator) {
|
||||
String productStoreId = (String) context.get("productStoreId");
|
||||
Map<String, Object> buildGoogleBaseConfigContext = FastMap.newInstance();
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.ofbiz.base.util.Debug;
|
||||
import org.ofbiz.base.util.GeneralException;
|
||||
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;
|
||||
@@ -73,10 +73,10 @@ public class GoogleCheckoutHelper {
|
||||
public static final int BILLING_ADDRESS = 50;
|
||||
|
||||
protected LocalDispatcher dispatcher;
|
||||
protected GenericDelegator delegator;
|
||||
protected Delegator delegator;
|
||||
protected GenericValue system;
|
||||
|
||||
public GoogleCheckoutHelper(LocalDispatcher dispatcher, GenericDelegator delegator) {
|
||||
public GoogleCheckoutHelper(LocalDispatcher dispatcher, Delegator delegator) {
|
||||
this.dispatcher = dispatcher;
|
||||
this.delegator = delegator;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.ofbiz.base.util.Debug;
|
||||
import org.ofbiz.base.util.GeneralException;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.product.store.ProductStoreWorker;
|
||||
import org.ofbiz.service.LocalDispatcher;
|
||||
import org.w3c.dom.Document;
|
||||
@@ -46,7 +46,7 @@ public class GoogleCheckoutResponseEvents {
|
||||
|
||||
public static String checkNotification(HttpServletRequest request, HttpServletResponse response) {
|
||||
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
|
||||
GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
|
||||
Delegator delegator = (Delegator) request.getAttribute("delegator");
|
||||
|
||||
GoogleCheckoutHelper helper = new GoogleCheckoutHelper(dispatcher, delegator);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilNumber;
|
||||
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.util.EntityUtil;
|
||||
@@ -70,7 +70,7 @@ public class GoogleRequestServices {
|
||||
public static Map<String, Object> sendShoppingCartRequest(DispatchContext dctx, Map<String, ? extends Object> context) {
|
||||
ShoppingCart cart = (ShoppingCart) context.get("shoppingCart");
|
||||
String productStoreId = cart.getProductStoreId();
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
GenericValue googleCfg = getGoogleConfiguration(delegator, productStoreId);
|
||||
MerchantInfo mInfo = getMerchantInfo(delegator, productStoreId);
|
||||
if (mInfo == null) {
|
||||
@@ -225,7 +225,7 @@ public class GoogleRequestServices {
|
||||
}
|
||||
|
||||
public static Map<String, Object> sendOrderNumberRequest(DispatchContext dctx, Map<String, ? extends Object> context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String orderId = (String) context.get("orderId");
|
||||
GenericValue order = findGoogleOrder(delegator, orderId);
|
||||
if (order != null) {
|
||||
@@ -245,7 +245,7 @@ public class GoogleRequestServices {
|
||||
}
|
||||
|
||||
public static Map<String, Object> sendAuthorizeRequest(DispatchContext dctx, Map<String, ? extends Object> context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String orderId = (String) context.get("orderId");
|
||||
GenericValue order = findGoogleOrder(delegator, orderId);
|
||||
if (order != null) {
|
||||
@@ -266,7 +266,7 @@ public class GoogleRequestServices {
|
||||
|
||||
// trigger on captureOrderPayments
|
||||
public static Map<String, Object> sendChargeRequest(DispatchContext dctx, Map<String, ? extends Object> context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String orderId = (String) context.get("orderId");
|
||||
GenericValue order = findGoogleOrder(delegator, orderId);
|
||||
if (order != null) {
|
||||
@@ -292,7 +292,7 @@ public class GoogleRequestServices {
|
||||
}
|
||||
|
||||
public static Map<String, Object> sendReturnRequest(DispatchContext dctx, Map<String, ? extends Object> context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String returnId = (String) context.get("returnId");
|
||||
|
||||
// sort by order
|
||||
@@ -393,7 +393,7 @@ public class GoogleRequestServices {
|
||||
}
|
||||
|
||||
public static Map<String, Object> sendShipRequest(DispatchContext dctx, Map<String, ? extends Object> context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String shipmentId = (String) context.get("shipmentId");
|
||||
try {
|
||||
sendItemsShipped(delegator, shipmentId);
|
||||
@@ -405,7 +405,7 @@ public class GoogleRequestServices {
|
||||
}
|
||||
|
||||
public static Map<String, Object> sendOrderCancelRequest(DispatchContext dctx, Map<String, ? extends Object> context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String orderId = (String) context.get("orderId");
|
||||
GenericValue order = findGoogleOrder(delegator, orderId);
|
||||
if (order != null) {
|
||||
@@ -425,7 +425,7 @@ public class GoogleRequestServices {
|
||||
}
|
||||
|
||||
public static Map<String, Object> sendOrderItemCancelRequest(DispatchContext dctx, Map<String, ? extends Object> context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String orderId = (String) context.get("orderId");
|
||||
String orderItemSeqId = (String) context.get("orderItemSeqId");
|
||||
GenericValue order = findGoogleOrder(delegator, orderId);
|
||||
@@ -456,7 +456,7 @@ public class GoogleRequestServices {
|
||||
}
|
||||
|
||||
public static Map<String, Object> sendArchiveOrderRequest(DispatchContext dctx, Map<String, ? extends Object> context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String orderId = (String) context.get("orderId");
|
||||
GenericValue order = findGoogleOrder(delegator, orderId);
|
||||
if (order != null) {
|
||||
@@ -476,7 +476,7 @@ public class GoogleRequestServices {
|
||||
}
|
||||
|
||||
public static Map<String, Object> sendUnarchiveOrderRequest(DispatchContext dctx, Map<String, ? extends Object> context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String orderId = (String) context.get("orderId");
|
||||
GenericValue order = findGoogleOrder(delegator, orderId);
|
||||
if (order != null) {
|
||||
@@ -497,7 +497,7 @@ public class GoogleRequestServices {
|
||||
|
||||
// special service to tigger off of events which prevent editing orders
|
||||
public static Map<String, Object> catchEditGoogleOrder(DispatchContext dctx, Map<String, ? extends Object> context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String orderId = (String) context.get("orderId");
|
||||
GenericValue order = findGoogleOrder(delegator, orderId);
|
||||
if (order != null) {
|
||||
@@ -507,7 +507,7 @@ public class GoogleRequestServices {
|
||||
return ServiceUtil.returnSuccess();
|
||||
}
|
||||
|
||||
private static void sendItemsShipped(GenericDelegator delegator, String shipmentId) throws GeneralException {
|
||||
private static void sendItemsShipped(Delegator delegator, String shipmentId) throws GeneralException {
|
||||
List<GenericValue> issued = delegator.findByAnd("ItemIssuance", UtilMisc.toMap("shipmentId", shipmentId));
|
||||
if (issued != null && issued.size() > 0) {
|
||||
for (GenericValue issue : issued) {
|
||||
@@ -573,7 +573,7 @@ public class GoogleRequestServices {
|
||||
}
|
||||
}
|
||||
|
||||
public static GenericValue findGoogleOrder(GenericDelegator delegator, String orderId) {
|
||||
public static GenericValue findGoogleOrder(Delegator delegator, String orderId) {
|
||||
GenericValue order = null;
|
||||
try {
|
||||
order = delegator.findOne("OrderHeader", false, "orderId", orderId);
|
||||
@@ -591,7 +591,7 @@ public class GoogleRequestServices {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getProductStoreFromShipment(GenericDelegator delegator, String shipmentId) {
|
||||
public static String getProductStoreFromShipment(Delegator delegator, String shipmentId) {
|
||||
GenericValue shipment = null;
|
||||
try {
|
||||
shipment = delegator.findOne("Shipment", false, "shipmentId", shipmentId);
|
||||
@@ -612,7 +612,7 @@ public class GoogleRequestServices {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static GenericValue getGoogleConfiguration(GenericDelegator delegator, String productStoreId) {
|
||||
public static GenericValue getGoogleConfiguration(Delegator delegator, String productStoreId) {
|
||||
if (productStoreId == null) return null;
|
||||
GenericValue config = null;
|
||||
try {
|
||||
@@ -623,7 +623,7 @@ public class GoogleRequestServices {
|
||||
return config;
|
||||
}
|
||||
|
||||
public static MerchantInfo getMerchantInfo(GenericDelegator delegator, String productStoreId) {
|
||||
public static MerchantInfo getMerchantInfo(Delegator delegator, String productStoreId) {
|
||||
// google configuration
|
||||
GenericValue config = getGoogleConfiguration(delegator, productStoreId);
|
||||
if (config == null) {
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.base.util.GeneralRuntimeException;
|
||||
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.product.product.ProductWorker;
|
||||
@@ -43,7 +43,7 @@ public class FacilityServices {
|
||||
public static final String module = FacilityServices.class.getName();
|
||||
|
||||
public static Map findProductsById(DispatchContext dctx, Map context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String facilityId = (String) context.get("facilityId");
|
||||
String idValue = (String) context.get("idValue");
|
||||
GenericValue product = null;
|
||||
@@ -65,7 +65,7 @@ public class FacilityServices {
|
||||
}
|
||||
|
||||
public static Map fixProductNegativeQOH(DispatchContext dctx, Map context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
LocalDispatcher dispatcher = dctx.getDispatcher();
|
||||
|
||||
String facilityId = (String) context.get("facilityId");
|
||||
@@ -109,7 +109,7 @@ public class FacilityServices {
|
||||
}
|
||||
|
||||
public static Map updateProductStocktake(DispatchContext dctx, Map context) {
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
LocalDispatcher dispatcher = dctx.getDispatcher();
|
||||
|
||||
String facilityId = (String) context.get("facilityId");
|
||||
|
||||
@@ -36,7 +36,7 @@ import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilProperties;
|
||||
import org.ofbiz.base.util.UtilXml;
|
||||
import org.ofbiz.common.login.LoginServices;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.ldap.LdapLoginWorker;
|
||||
@@ -95,7 +95,7 @@ public abstract class AbstractOFBizAuthenticationHandler implements InterfaceOFB
|
||||
// get the visit id to pass to the userLogin for history
|
||||
String visitId = VisitHandler.getVisitId(session);
|
||||
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
|
||||
GenericDelegator delegator = dispatcher.getDelegator();
|
||||
Delegator delegator = dispatcher.getDelegator();
|
||||
boolean useEncryption = "true".equals(UtilProperties.getPropertyValue("security.properties", "password.encrypt"));
|
||||
GenericValue userLoginToCreate = delegator.makeValue("UserLogin", UtilMisc.toMap("userLoginId", username));
|
||||
userLoginToCreate.set("passwordHint", "");
|
||||
|
||||
@@ -36,7 +36,7 @@ import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilProperties;
|
||||
import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.base.util.UtilXml;
|
||||
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;
|
||||
@@ -67,7 +67,7 @@ public class OagisInventoryServices {
|
||||
Document doc = (Document) context.get("document");
|
||||
boolean isErrorRetry = Boolean.TRUE.equals(context.get("isErrorRetry"));
|
||||
|
||||
GenericDelegator delegator = ctx.getDelegator();
|
||||
Delegator delegator = ctx.getDelegator();
|
||||
LocalDispatcher dispatcher = ctx.getDispatcher();
|
||||
Locale locale = (Locale) context.get("locale");
|
||||
List errorMapList = FastList.newInstance();
|
||||
@@ -364,7 +364,7 @@ public class OagisInventoryServices {
|
||||
boolean isErrorRetry = Boolean.TRUE.equals(context.get("isErrorRetry"));
|
||||
|
||||
LocalDispatcher dispatcher = ctx.getDispatcher();
|
||||
GenericDelegator delegator = ctx.getDelegator();
|
||||
Delegator delegator = ctx.getDelegator();
|
||||
List errorMapList = FastList.newInstance();
|
||||
Map comiCtx = FastMap.newInstance();
|
||||
|
||||
@@ -658,7 +658,7 @@ public class OagisInventoryServices {
|
||||
boolean isErrorRetry = Boolean.TRUE.equals(context.get("isErrorRetry"));
|
||||
|
||||
LocalDispatcher dispatcher = ctx.getDispatcher();
|
||||
GenericDelegator delegator = ctx.getDelegator();
|
||||
Delegator delegator = ctx.getDelegator();
|
||||
List errorMapList = FastList.newInstance();
|
||||
|
||||
GenericValue userLogin = null;
|
||||
@@ -1193,7 +1193,7 @@ public class OagisInventoryServices {
|
||||
boolean isErrorRetry = Boolean.TRUE.equals(context.get("isErrorRetry"));
|
||||
|
||||
LocalDispatcher dispatcher = ctx.getDispatcher();
|
||||
GenericDelegator delegator = ctx.getDelegator();
|
||||
Delegator delegator = ctx.getDelegator();
|
||||
List errorMapList = FastList.newInstance();
|
||||
|
||||
GenericValue userLogin = null;
|
||||
|
||||
@@ -55,7 +55,7 @@ import org.ofbiz.base.util.UtilProperties;
|
||||
import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.base.util.UtilXml;
|
||||
import org.ofbiz.base.util.collections.MapStack;
|
||||
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;
|
||||
@@ -102,7 +102,7 @@ public class OagisServices {
|
||||
}
|
||||
|
||||
public static Map oagisSendConfirmBod(DispatchContext ctx, Map context) {
|
||||
GenericDelegator delegator = ctx.getDelegator();
|
||||
Delegator delegator = ctx.getDelegator();
|
||||
LocalDispatcher dispatcher = ctx.getDispatcher();
|
||||
|
||||
String errorReferenceId = (String) context.get("referenceId");
|
||||
@@ -238,7 +238,7 @@ public class OagisServices {
|
||||
}
|
||||
|
||||
public static Map oagisReceiveConfirmBod(DispatchContext ctx, Map context) {
|
||||
GenericDelegator delegator = ctx.getDelegator();
|
||||
Delegator delegator = ctx.getDelegator();
|
||||
LocalDispatcher dispatcher = ctx.getDispatcher();
|
||||
Document doc = (Document) context.get("document");
|
||||
List errorMapList = FastList.newInstance();
|
||||
@@ -439,7 +439,7 @@ public class OagisServices {
|
||||
}
|
||||
|
||||
public static Map oagisReReceiveMessage(DispatchContext ctx, Map context) {
|
||||
GenericDelegator delegator = ctx.getDelegator();
|
||||
Delegator delegator = ctx.getDelegator();
|
||||
LocalDispatcher dispatcher = ctx.getDispatcher();
|
||||
|
||||
String logicalId = (String) context.get("logicalId");
|
||||
@@ -487,7 +487,7 @@ public class OagisServices {
|
||||
}
|
||||
|
||||
public static Map oagisMessageHandler(DispatchContext ctx, Map context) {
|
||||
GenericDelegator delegator = ctx.getDelegator();
|
||||
Delegator delegator = ctx.getDelegator();
|
||||
LocalDispatcher dispatcher = ctx.getDispatcher();
|
||||
InputStream in = (InputStream) context.get("inputStream");
|
||||
List errorList = FastList.newInstance();
|
||||
|
||||
@@ -44,7 +44,7 @@ import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.base.util.UtilXml;
|
||||
import org.ofbiz.base.util.collections.MapStack;
|
||||
import org.ofbiz.base.util.StringUtil;
|
||||
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;
|
||||
@@ -94,7 +94,7 @@ public class OagisShipmentServices {
|
||||
boolean isErrorRetry = Boolean.TRUE.equals(context.get("isErrorRetry"));
|
||||
|
||||
LocalDispatcher dispatcher = ctx.getDispatcher();
|
||||
GenericDelegator delegator = ctx.getDelegator();
|
||||
Delegator delegator = ctx.getDelegator();
|
||||
Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
|
||||
List errorMapList = FastList.newInstance();
|
||||
|
||||
@@ -661,7 +661,7 @@ public class OagisShipmentServices {
|
||||
|
||||
public static Map oagisSendProcessShipment(DispatchContext ctx, Map context) {
|
||||
LocalDispatcher dispatcher = ctx.getDispatcher();
|
||||
GenericDelegator delegator = ctx.getDelegator();
|
||||
Delegator delegator = ctx.getDelegator();
|
||||
String orderId = (String) context.get("orderId");
|
||||
|
||||
// Check if order is not on back order before processing shipment
|
||||
@@ -1005,7 +1005,7 @@ public class OagisShipmentServices {
|
||||
|
||||
public static Map oagisSendReceiveDelivery(DispatchContext dctx, Map context) {
|
||||
LocalDispatcher dispatcher = dctx.getDispatcher();
|
||||
GenericDelegator delegator = dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String returnId = (String) context.get("returnId");
|
||||
|
||||
String sendToUrl = (String) context.get("sendToUrl");
|
||||
|
||||
@@ -46,7 +46,7 @@ import org.ofbiz.base.util.UtilNumber;
|
||||
import org.ofbiz.base.util.UtilProperties;
|
||||
import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.base.util.collections.LifoSet;
|
||||
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;
|
||||
@@ -403,7 +403,7 @@ public class PosTransaction implements Serializable {
|
||||
public boolean isAggregatedItem(String productId) {
|
||||
trace("is Aggregated Item", productId);
|
||||
try {
|
||||
GenericDelegator delegator = cart.getDelegator();
|
||||
Delegator delegator = cart.getDelegator();
|
||||
GenericValue product = null;
|
||||
product = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", productId));
|
||||
if ("AGGREGATED".equals(product.getString("productTypeId"))) {
|
||||
@@ -424,7 +424,7 @@ public class PosTransaction implements Serializable {
|
||||
trace("get Product Config Wrapper", productId);
|
||||
ProductConfigWrapper pcw = null;
|
||||
try {
|
||||
GenericDelegator delegator = cart.getDelegator();
|
||||
Delegator delegator = cart.getDelegator();
|
||||
pcw = new ProductConfigWrapper(delegator, session.getDispatcher(),
|
||||
productId, null, null, null, null, null, null);
|
||||
} catch (ItemNotFoundException e) {
|
||||
@@ -450,7 +450,7 @@ public class PosTransaction implements Serializable {
|
||||
try {
|
||||
int index = Integer.parseInt(cartIndex);
|
||||
ShoppingCartItem product = cart.findCartItem(index);
|
||||
GenericDelegator delegator = cart.getDelegator();
|
||||
Delegator delegator = cart.getDelegator();
|
||||
pcw = product.getConfigWrapper();
|
||||
} catch (Exception e) {
|
||||
trace("general exception", e);
|
||||
@@ -462,7 +462,7 @@ public class PosTransaction implements Serializable {
|
||||
public void addItem(String productId, BigDecimal quantity) throws CartItemModifyException, ItemNotFoundException {
|
||||
trace("add item", productId + "/" + quantity);
|
||||
try {
|
||||
GenericDelegator delegator = cart.getDelegator();
|
||||
Delegator delegator = cart.getDelegator();
|
||||
GenericValue product = null;
|
||||
ProductConfigWrapper pcw = null;
|
||||
product = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", productId));
|
||||
@@ -900,7 +900,7 @@ public class PosTransaction implements Serializable {
|
||||
return null;
|
||||
}
|
||||
|
||||
GenericDelegator delegator = session.getDelegator();
|
||||
Delegator delegator = session.getDelegator();
|
||||
GenericValue facilityContactMech = ContactMechWorker.getFacilityContactMechByPurpose(delegator, facilityId, UtilMisc.toList("SHIP_ORIG_LOCATION", "PRIMARY_LOCATION"));
|
||||
if (facilityContactMech != null) {
|
||||
try {
|
||||
@@ -1120,7 +1120,7 @@ public class PosTransaction implements Serializable {
|
||||
}
|
||||
|
||||
public GenericValue getTerminalState() {
|
||||
GenericDelegator delegator = session.getDelegator();
|
||||
Delegator delegator = session.getDelegator();
|
||||
List states = null;
|
||||
try {
|
||||
states = delegator.findByAnd("PosTerminalState", UtilMisc.toMap("posTerminalId", this.getTerminalId()));
|
||||
@@ -1237,7 +1237,7 @@ public class PosTransaction implements Serializable {
|
||||
try {
|
||||
int index = Integer.parseInt(cartIndex);
|
||||
ShoppingCartItem product = cart.findCartItem(index);
|
||||
GenericDelegator delegator = cart.getDelegator();
|
||||
Delegator delegator = cart.getDelegator();
|
||||
ProductConfigWrapper pcw = null;
|
||||
pcw = product.getConfigWrapper();
|
||||
if (pcw != null) {
|
||||
@@ -1255,7 +1255,7 @@ public class PosTransaction implements Serializable {
|
||||
|
||||
public List createShoppingLists() {
|
||||
List shoppingLists = null;
|
||||
GenericDelegator delegator = this.session.getDelegator();
|
||||
Delegator delegator = this.session.getDelegator();
|
||||
try {
|
||||
shoppingLists = delegator.findList("ShoppingList", null, null, null, null, false);
|
||||
} catch (GenericEntityException e) {
|
||||
@@ -1302,7 +1302,7 @@ public class PosTransaction implements Serializable {
|
||||
}
|
||||
|
||||
public boolean addListToCart(String shoppingListId, PosScreen pos, boolean append) {
|
||||
GenericDelegator delegator = session.getDelegator();
|
||||
Delegator delegator = session.getDelegator();
|
||||
LocalDispatcher dispatcher = session.getDispatcher();
|
||||
String includeChild = null; // Perhaps will be used later ...
|
||||
String prodCatalogId = null;
|
||||
@@ -1318,7 +1318,7 @@ public class PosTransaction implements Serializable {
|
||||
}
|
||||
|
||||
public boolean restoreOrder(String orderId, PosScreen pos, boolean append) {
|
||||
GenericDelegator delegator = session.getDelegator();
|
||||
Delegator delegator = session.getDelegator();
|
||||
LocalDispatcher dispatcher = session.getDispatcher();
|
||||
|
||||
Map svcCtx = FastMap.newInstance();
|
||||
@@ -1362,7 +1362,7 @@ public class PosTransaction implements Serializable {
|
||||
}
|
||||
|
||||
public boolean clearList(String shoppingListId, PosScreen pos) {
|
||||
GenericDelegator delegator = session.getDelegator();
|
||||
Delegator delegator = session.getDelegator();
|
||||
try {
|
||||
ShoppingListEvents.clearListInfo(delegator, shoppingListId);
|
||||
} catch (GenericEntityException e) {
|
||||
@@ -1384,7 +1384,7 @@ public class PosTransaction implements Serializable {
|
||||
pos.showDialog("dialog/error/exception", UtilProperties.getMessage("OrderErrorUiLabels", "OrderUnableToCreateNewShoppingList",locale));
|
||||
return;
|
||||
}
|
||||
GenericDelegator delegator = this.session.getDelegator();
|
||||
Delegator delegator = this.session.getDelegator();
|
||||
LocalDispatcher dispatcher = session.getDispatcher();
|
||||
GenericValue userLogin = session.getUserLogin();
|
||||
Locale locale = defaultLocale;
|
||||
@@ -1413,7 +1413,7 @@ public class PosTransaction implements Serializable {
|
||||
pos.showDialog("dialog/error/exception", UtilProperties.getMessage("OrderErrorUiLabels", "OrderUnableToCreateNewShoppingList",locale));
|
||||
return;
|
||||
}
|
||||
GenericDelegator delegator = this.session.getDelegator();
|
||||
Delegator delegator = this.session.getDelegator();
|
||||
LocalDispatcher dispatcher = session.getDispatcher();
|
||||
GenericValue userLogin = session.getUserLogin();
|
||||
Locale locale = defaultLocale;
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.ofbiz.base.util.UtilNumber;
|
||||
import org.ofbiz.base.util.UtilProperties;
|
||||
import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.base.util.cache.UtilCache;
|
||||
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;
|
||||
@@ -463,7 +463,7 @@ public class ManagerEvents {
|
||||
BigDecimal othTotal = ZERO;
|
||||
BigDecimal total = ZERO;
|
||||
|
||||
GenericDelegator delegator = pos.getSession().getDelegator();
|
||||
Delegator delegator = pos.getSession().getDelegator();
|
||||
List<EntityExpr> exprs = UtilMisc.toList(EntityCondition.makeCondition("originFacilityId", EntityOperator.EQUALS, trans.getFacilityId()),
|
||||
EntityCondition.makeCondition("terminalId", EntityOperator.EQUALS, trans.getTerminalId()));
|
||||
EntityListIterator eli = null;
|
||||
|
||||
@@ -28,7 +28,7 @@ import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import org.ofbiz.base.util.*;
|
||||
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;
|
||||
@@ -97,7 +97,7 @@ public class Various {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public static double calculateActualHours(GenericDelegator delegator, String timesheetId) {
|
||||
public static double calculateActualHours(Delegator delegator, String timesheetId) {
|
||||
List actuals = FastList.newInstance();
|
||||
double actualHours = 0.00;
|
||||
if (timesheetId != null) {
|
||||
|
||||
@@ -20,7 +20,7 @@ package org.ofbiz.shark.audit;
|
||||
|
||||
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;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class AssignmentEventAudit extends EventAudit implements AssignmentEventA
|
||||
protected GenericValue assignmentEventAudit = null;
|
||||
private boolean newValue = false;
|
||||
|
||||
public AssignmentEventAudit(EntityAuditMgr mgr, GenericDelegator delegator, String eventAuditId) {
|
||||
public AssignmentEventAudit(EntityAuditMgr mgr, Delegator delegator, String eventAuditId) {
|
||||
super(mgr, delegator, eventAuditId);
|
||||
if (this.delegator != null) {
|
||||
try {
|
||||
@@ -49,7 +49,7 @@ public class AssignmentEventAudit extends EventAudit implements AssignmentEventA
|
||||
}
|
||||
}
|
||||
|
||||
public AssignmentEventAudit(EntityAuditMgr mgr, GenericDelegator delegator) {
|
||||
public AssignmentEventAudit(EntityAuditMgr mgr, Delegator delegator) {
|
||||
super(mgr, delegator);
|
||||
this.newValue = true;
|
||||
this.assignmentEventAudit = delegator.makeValue("WfAssignmentEventAudit", UtilMisc.toMap("eventAuditId", this.eventAuditId));
|
||||
|
||||
@@ -18,17 +18,17 @@
|
||||
*******************************************************************************/
|
||||
package org.ofbiz.shark.audit;
|
||||
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
|
||||
|
||||
public abstract class AuditEntityObject {
|
||||
|
||||
protected transient GenericDelegator delegator = null;
|
||||
protected transient Delegator delegator = null;
|
||||
protected EntityAuditMgr mgr = null;
|
||||
protected String delegatorName = null;
|
||||
|
||||
public AuditEntityObject(EntityAuditMgr mgr, GenericDelegator delegator) {
|
||||
public AuditEntityObject(EntityAuditMgr mgr, Delegator delegator) {
|
||||
this.delegatorName = delegator.getDelegatorName();
|
||||
this.delegator = delegator;
|
||||
this.mgr = mgr;
|
||||
@@ -38,9 +38,9 @@ public abstract class AuditEntityObject {
|
||||
return this.mgr;
|
||||
}
|
||||
|
||||
public GenericDelegator getGenericDelegator() {
|
||||
public Delegator getDelegator() {
|
||||
if (this.delegator == null && delegatorName != null) {
|
||||
this.delegator = GenericDelegator.getGenericDelegator(delegatorName);
|
||||
this.delegator = Delegator.getDelegator(delegatorName);
|
||||
}
|
||||
return this.delegator;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ package org.ofbiz.shark.audit;
|
||||
|
||||
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;
|
||||
|
||||
@@ -35,7 +35,7 @@ public class CreateProcessEventAudit extends EventAudit implements CreateProcess
|
||||
protected GenericValue createProcessEventAudit = null;
|
||||
private boolean newValue = false;
|
||||
|
||||
public CreateProcessEventAudit(EntityAuditMgr mgr, GenericDelegator delegator, String eventAuditId) {
|
||||
public CreateProcessEventAudit(EntityAuditMgr mgr, Delegator delegator, String eventAuditId) {
|
||||
super(mgr, delegator, eventAuditId);
|
||||
if (this.delegator != null) {
|
||||
try {
|
||||
@@ -48,7 +48,7 @@ public class CreateProcessEventAudit extends EventAudit implements CreateProcess
|
||||
}
|
||||
}
|
||||
|
||||
public CreateProcessEventAudit(EntityAuditMgr mgr, GenericDelegator delegator) {
|
||||
public CreateProcessEventAudit(EntityAuditMgr mgr, Delegator delegator) {
|
||||
super(mgr, delegator);
|
||||
this.newValue = true;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.Map;
|
||||
|
||||
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;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class DataEventAudit extends EventAudit implements DataEventAuditPersiste
|
||||
protected GenericValue dataEventAudit = null;
|
||||
private boolean newValue = false;
|
||||
|
||||
public DataEventAudit(EntityAuditMgr mgr, GenericDelegator delegator, String eventAuditId) {
|
||||
public DataEventAudit(EntityAuditMgr mgr, Delegator delegator, String eventAuditId) {
|
||||
super(mgr, delegator, eventAuditId);
|
||||
if (this.delegator != null) {
|
||||
try {
|
||||
@@ -55,7 +55,7 @@ public class DataEventAudit extends EventAudit implements DataEventAuditPersiste
|
||||
}
|
||||
}
|
||||
|
||||
public DataEventAudit(EntityAuditMgr mgr, GenericDelegator delegator) {
|
||||
public DataEventAudit(EntityAuditMgr mgr, Delegator delegator) {
|
||||
super(mgr, delegator);
|
||||
this.newValue = true;
|
||||
this.dataEventAudit = delegator.makeValue(org.ofbiz.shark.SharkConstants.WfDataEventAudit, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.eventAuditId, this.eventAuditId));
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
|
||||
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.shark.container.SharkContainer;
|
||||
@@ -167,7 +167,7 @@ public class EntityAuditMgr implements EventAuditManagerInterface {
|
||||
// process history
|
||||
private List getCreateProcessEvents(String processId) throws EventAuditException {
|
||||
if (Debug.verboseOn()) Debug.log(":: getCreateProcessEvents ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List createProcessEvents = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -190,7 +190,7 @@ public class EntityAuditMgr implements EventAuditManagerInterface {
|
||||
|
||||
private List getProcessStateEvents(String processId) throws EventAuditException {
|
||||
if (Debug.verboseOn()) Debug.log(":: getProcessStateEvents ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List stateEvents = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -213,7 +213,7 @@ public class EntityAuditMgr implements EventAuditManagerInterface {
|
||||
|
||||
private List getProcessDataEvents(String processId) throws EventAuditException {
|
||||
if (Debug.verboseOn()) Debug.log(":: getProcessDataEvents ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List dataEvents = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -237,7 +237,7 @@ public class EntityAuditMgr implements EventAuditManagerInterface {
|
||||
// activity history
|
||||
private List getAssignmentEvents(String processId, String activityId) throws EventAuditException {
|
||||
if (Debug.verboseOn()) Debug.log(":: getAssignmentEvents ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List assignmentEvents = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -260,7 +260,7 @@ public class EntityAuditMgr implements EventAuditManagerInterface {
|
||||
|
||||
private List getActivityStateEvents(String processId, String activityId) throws EventAuditException {
|
||||
if (Debug.verboseOn()) Debug.log(":: getActivityStateEvents ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List stateEvents = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -283,7 +283,7 @@ public class EntityAuditMgr implements EventAuditManagerInterface {
|
||||
|
||||
private List getActivityDataEvents(String processId, String activityId) throws EventAuditException {
|
||||
if (Debug.verboseOn()) Debug.log(":: getActivityDataEvents ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List dataEvents = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -305,7 +305,7 @@ public class EntityAuditMgr implements EventAuditManagerInterface {
|
||||
}
|
||||
|
||||
public synchronized String getNextId(String string) throws EventAuditException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
return delegator.getNextSeqId("SharkAuditSeq").toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ package org.ofbiz.shark.audit;
|
||||
|
||||
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;
|
||||
|
||||
@@ -37,7 +37,7 @@ public class EventAudit extends AuditEntityObject implements EventAuditPersisten
|
||||
private GenericValue eventAudit = null;
|
||||
private boolean newValue = false;
|
||||
|
||||
public EventAudit(EntityAuditMgr mgr, GenericDelegator delegator, String eventAuditId) {
|
||||
public EventAudit(EntityAuditMgr mgr, Delegator delegator, String eventAuditId) {
|
||||
super(mgr, delegator);
|
||||
this.eventAuditId = eventAuditId;
|
||||
if (this.delegator != null) {
|
||||
@@ -51,7 +51,7 @@ public class EventAudit extends AuditEntityObject implements EventAuditPersisten
|
||||
}
|
||||
}
|
||||
|
||||
public EventAudit(EntityAuditMgr mgr, GenericDelegator delegator) {
|
||||
public EventAudit(EntityAuditMgr mgr, Delegator delegator) {
|
||||
super(mgr, delegator);
|
||||
this.newValue = true;
|
||||
this.eventAuditId = delegator.getNextSeqId(org.ofbiz.shark.SharkConstants.WfEventAudit);
|
||||
|
||||
@@ -20,7 +20,7 @@ package org.ofbiz.shark.audit;
|
||||
|
||||
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;
|
||||
|
||||
@@ -35,7 +35,7 @@ public class StateEventAudit extends EventAudit implements StateEventAuditPersis
|
||||
protected GenericValue stateEventAudit = null;
|
||||
private boolean newValue = false;
|
||||
|
||||
public StateEventAudit(EntityAuditMgr mgr, GenericDelegator delegator, String eventAuditId) {
|
||||
public StateEventAudit(EntityAuditMgr mgr, Delegator delegator, String eventAuditId) {
|
||||
super(mgr, delegator, eventAuditId);
|
||||
if (this.delegator != null) {
|
||||
try {
|
||||
@@ -48,7 +48,7 @@ public class StateEventAudit extends EventAudit implements StateEventAuditPersis
|
||||
}
|
||||
}
|
||||
|
||||
public StateEventAudit(EntityAuditMgr mgr, GenericDelegator delegator) {
|
||||
public StateEventAudit(EntityAuditMgr mgr, Delegator delegator) {
|
||||
super(mgr, delegator);
|
||||
this.newValue = true;
|
||||
this.stateEventAudit = delegator.makeValue(org.ofbiz.shark.SharkConstants.WfStateEventAudit, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.eventAuditId, this.eventAuditId));
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*******************************************************************************/
|
||||
package org.ofbiz.shark.auth;
|
||||
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.shark.container.SharkContainer;
|
||||
@@ -42,7 +42,7 @@ public class GenericAuthenticationMgr implements AuthenticationManager {
|
||||
}
|
||||
|
||||
public boolean validateUser(UserTransaction userTransaction, String userName, String password) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
GenericValue sharkUser = null;
|
||||
try {
|
||||
sharkUser = delegator.findByPrimaryKey(org.ofbiz.shark.SharkConstants.SharkUser, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.userName, userName));
|
||||
|
||||
@@ -20,7 +20,7 @@ package org.ofbiz.shark.auth;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
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.EntityCrypto;
|
||||
@@ -49,7 +49,7 @@ public class OfbizAuthenticationMgr implements AuthenticationManager {
|
||||
}
|
||||
|
||||
public boolean validateUser(UserTransaction userTransaction, String userName, String password) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
String p = null;
|
||||
GenericValue adminUser = null;
|
||||
String pass_hash = LoginServices.getPasswordHash(password);
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.ofbiz.base.util.Debug;
|
||||
import org.ofbiz.base.util.GeneralRuntimeException;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilProperties;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.service.GenericDispatcher;
|
||||
@@ -55,7 +55,7 @@ public class SharkContainer implements Container, Runnable
|
||||
{
|
||||
public static final String module = SharkContainer.class.getName();
|
||||
|
||||
private static GenericDelegator delegator = null;
|
||||
private static Delegator delegator = null;
|
||||
private static LocalDispatcher dispatcher = null;
|
||||
private static GenericValue adminUser = null;
|
||||
private static String adminPass = null;
|
||||
@@ -107,7 +107,7 @@ public class SharkContainer implements Container, Runnable
|
||||
}
|
||||
|
||||
// get the delegator and dispatcher objects
|
||||
SharkContainer.delegator = GenericDelegator.getGenericDelegator(delegatorProp.value);
|
||||
SharkContainer.delegator = Delegator.getDelegator(delegatorProp.value);
|
||||
try {
|
||||
SharkContainer.dispatcher = GenericDispatcher.getLocalDispatcher(dispatcherProp.value, SharkContainer.delegator);
|
||||
} catch (GenericServiceException e) {
|
||||
@@ -223,7 +223,7 @@ public class SharkContainer implements Container, Runnable
|
||||
}
|
||||
|
||||
// static helper methods
|
||||
public static GenericDelegator getDelegator() {
|
||||
public static Delegator getDelegator() {
|
||||
return SharkContainer.delegator;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.enhydra.shark.api.common.ExpressionBuilder;
|
||||
import org.ofbiz.base.util.StringUtil;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilObject;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.util.EntityListIterator;
|
||||
import org.ofbiz.entity.condition.EntityCondition;
|
||||
@@ -86,7 +86,7 @@ public abstract class BaseEntityCondExprBldr implements ExpressionBuilder, Seria
|
||||
}
|
||||
|
||||
public List runQuery() throws GenericEntityException {
|
||||
GenericDelegator delegator = this.getDelegator();
|
||||
Delegator delegator = this.getDelegator();
|
||||
DynamicViewEntity view = this.makeView();
|
||||
EntityListIterator eli = null;
|
||||
List result = null;
|
||||
@@ -145,7 +145,7 @@ public abstract class BaseEntityCondExprBldr implements ExpressionBuilder, Seria
|
||||
this.viewLinks.add(new ViewLink(entityAlias, relEntityAlias, opt, keyMap));
|
||||
}
|
||||
|
||||
protected GenericDelegator getDelegator() {
|
||||
protected Delegator getDelegator() {
|
||||
return SharkContainer.getDelegator();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*******************************************************************************/
|
||||
package org.ofbiz.shark.instance;
|
||||
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
@@ -38,7 +38,7 @@ public class Activity extends InstanceEntityObject implements ActivityPersistenc
|
||||
protected GenericValue activity = null;
|
||||
protected boolean newValue = false;
|
||||
|
||||
protected Activity(EntityPersistentMgr mgr, GenericDelegator delegator, String activityId) throws PersistenceException {
|
||||
protected Activity(EntityPersistentMgr mgr, Delegator delegator, String activityId) throws PersistenceException {
|
||||
super(mgr, delegator);
|
||||
this.delegator = delegator;
|
||||
if (this.delegator != null) {
|
||||
@@ -57,7 +57,7 @@ public class Activity extends InstanceEntityObject implements ActivityPersistenc
|
||||
this.activity = activity;
|
||||
}
|
||||
|
||||
public Activity(EntityPersistentMgr mgr, GenericDelegator delegator) {
|
||||
public Activity(EntityPersistentMgr mgr, Delegator delegator) {
|
||||
super(mgr, delegator);
|
||||
this.newValue = true;
|
||||
this.activity = delegator.makeValue(org.ofbiz.shark.SharkConstants.WfActivity);
|
||||
|
||||
@@ -21,7 +21,7 @@ package org.ofbiz.shark.instance;
|
||||
import org.ofbiz.base.util.Debug;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilObject;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.shark.container.SharkContainer;
|
||||
@@ -40,7 +40,7 @@ public class ActivityVariable extends InstanceEntityObject implements ActivityVa
|
||||
protected GenericValue activityVariable = null;
|
||||
protected boolean newValue = false;
|
||||
|
||||
protected ActivityVariable(EntityPersistentMgr mgr, GenericDelegator delegator, String activityVariableId) throws PersistenceException {
|
||||
protected ActivityVariable(EntityPersistentMgr mgr, Delegator delegator, String activityVariableId) throws PersistenceException {
|
||||
super(mgr, delegator);
|
||||
this.delegator = delegator;
|
||||
if (this.delegator != null) {
|
||||
@@ -59,7 +59,7 @@ public class ActivityVariable extends InstanceEntityObject implements ActivityVa
|
||||
this.activityVariable = activityVariable;
|
||||
}
|
||||
|
||||
public ActivityVariable(EntityPersistentMgr mgr, GenericDelegator delegator) {
|
||||
public ActivityVariable(EntityPersistentMgr mgr, Delegator delegator) {
|
||||
super(mgr, delegator);
|
||||
this.newValue = true;
|
||||
this.activityVariable = delegator.makeValue(org.ofbiz.shark.SharkConstants.WfActivityVariable, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.activityVariableId, delegator.getNextSeqId(org.ofbiz.shark.SharkConstants.WfActivityVariable)));
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*******************************************************************************/
|
||||
package org.ofbiz.shark.instance;
|
||||
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
@@ -38,7 +38,7 @@ public class AndJoinEntry extends InstanceEntityObject implements AndJoinEntryIn
|
||||
protected GenericValue andJoin = null;
|
||||
protected boolean newValue = false;
|
||||
|
||||
protected AndJoinEntry(EntityPersistentMgr mgr, GenericDelegator delegator, String andJoinId) {
|
||||
protected AndJoinEntry(EntityPersistentMgr mgr, Delegator delegator, String andJoinId) {
|
||||
super(mgr, delegator);
|
||||
if (this.delegator != null) {
|
||||
try {
|
||||
@@ -56,7 +56,7 @@ public class AndJoinEntry extends InstanceEntityObject implements AndJoinEntryIn
|
||||
this.andJoin = andJoin;
|
||||
}
|
||||
|
||||
public AndJoinEntry(EntityPersistentMgr mgr, GenericDelegator delegator) {
|
||||
public AndJoinEntry(EntityPersistentMgr mgr, Delegator delegator) {
|
||||
super(mgr, delegator);
|
||||
this.newValue = true;
|
||||
this.andJoin = delegator.makeValue(org.ofbiz.shark.SharkConstants.WfAndJoin, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.andJoinId, delegator.getNextSeqId(org.ofbiz.shark.SharkConstants.WfAndJoin)));
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*******************************************************************************/
|
||||
package org.ofbiz.shark.instance;
|
||||
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
@@ -38,7 +38,7 @@ public class Assignment extends InstanceEntityObject implements AssignmentPersis
|
||||
protected GenericValue assignment = null;
|
||||
protected boolean newValue = false;
|
||||
|
||||
protected Assignment(EntityPersistentMgr mgr, GenericDelegator delegator, String activityId, String userName) throws PersistenceException {
|
||||
protected Assignment(EntityPersistentMgr mgr, Delegator delegator, String activityId, String userName) throws PersistenceException {
|
||||
super(mgr, delegator);
|
||||
if (this.delegator != null) {
|
||||
try {
|
||||
@@ -56,7 +56,7 @@ public class Assignment extends InstanceEntityObject implements AssignmentPersis
|
||||
this.assignment = assignment;
|
||||
}
|
||||
|
||||
public Assignment(EntityPersistentMgr mgr, GenericDelegator delegator) {
|
||||
public Assignment(EntityPersistentMgr mgr, Delegator delegator) {
|
||||
super(mgr, delegator);
|
||||
this.newValue = true;
|
||||
this.assignment = delegator.makeValue(org.ofbiz.shark.SharkConstants.WfAssignment);
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.enhydra.shark.api.internal.instancepersistence.PersistenceException;
|
||||
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;
|
||||
@@ -40,7 +40,7 @@ public class Deadline extends InstanceEntityObject implements DeadlinePersistenc
|
||||
protected GenericValue deadline = null;
|
||||
protected boolean newValue = false;
|
||||
|
||||
protected Deadline(EntityPersistentMgr mgr, GenericDelegator delegator, String deadlineId) throws PersistenceException {
|
||||
protected Deadline(EntityPersistentMgr mgr, Delegator delegator, String deadlineId) throws PersistenceException {
|
||||
super(mgr, delegator);
|
||||
if (this.delegator != null) {
|
||||
try {
|
||||
@@ -58,7 +58,7 @@ public class Deadline extends InstanceEntityObject implements DeadlinePersistenc
|
||||
this.deadline = deadline;
|
||||
}
|
||||
|
||||
public Deadline(EntityPersistentMgr mgr, GenericDelegator delegator) {
|
||||
public Deadline(EntityPersistentMgr mgr, Delegator delegator) {
|
||||
super(mgr, delegator);
|
||||
this.newValue = true;
|
||||
this.deadline = delegator.makeValue(org.ofbiz.shark.SharkConstants.WfDeadline, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.deadlineId, delegator.getNextSeqId(org.ofbiz.shark.SharkConstants.WfDeadline)));
|
||||
|
||||
@@ -45,7 +45,7 @@ import org.enhydra.shark.api.internal.working.CallbackUtilities;
|
||||
import org.ofbiz.base.util.Debug;
|
||||
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.EntityComparisonOperator;
|
||||
@@ -214,7 +214,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
}
|
||||
|
||||
public void deleteProcess(String processId, boolean admin, SharkTransaction trans) throws PersistenceException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
if (admin) {
|
||||
if (Debug.infoOn()) Debug.log(":: deleteProcess ::", module);
|
||||
Process process = (Process) this.restoreProcess(processId, trans);
|
||||
@@ -284,7 +284,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
|
||||
public void deleteAndJoinEntries(String procId, String asDefId, String aDefId, SharkTransaction trans) throws PersistenceException {
|
||||
if (Debug.infoOn()) Debug.log(":: deleteAndJoinEntries ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
try {
|
||||
delegator.removeByAnd(org.ofbiz.shark.SharkConstants.WfAndJoin, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.processId, procId,
|
||||
org.ofbiz.shark.SharkConstants.activitySetDefId, asDefId, org.ofbiz.shark.SharkConstants.activityDefId, aDefId));
|
||||
@@ -294,7 +294,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
}
|
||||
|
||||
public void deleteDeadlines(String procId, SharkTransaction trans) throws PersistenceException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
try {
|
||||
delegator.removeByAnd(org.ofbiz.shark.SharkConstants.WfDeadline, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.processId, procId));
|
||||
} catch (GenericEntityException e) {
|
||||
@@ -303,7 +303,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
}
|
||||
|
||||
public void deleteDeadlines(String procId, String actId, SharkTransaction trans) throws PersistenceException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
try {
|
||||
delegator.removeByAnd(org.ofbiz.shark.SharkConstants.WfDeadline, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.processId, procId, org.ofbiz.shark.SharkConstants.activityId, actId));
|
||||
} catch (GenericEntityException e) {
|
||||
@@ -353,7 +353,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
|
||||
public List getAllProcessMgrs(SharkTransaction trans) throws PersistenceException {
|
||||
if (Debug.verboseOn()) Debug.log(":: getAllProcessMgrs ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List createdList = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -383,7 +383,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
|
||||
public List getAllResources(SharkTransaction trans) throws PersistenceException {
|
||||
if (Debug.verboseOn()) Debug.log(":: getAllResources ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List createdList = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -403,7 +403,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
|
||||
public List getAllAssignments(SharkTransaction trans) throws PersistenceException {
|
||||
if (Debug.verboseOn()) Debug.log(":: getAllAssignments ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List createdList = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -422,7 +422,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
}
|
||||
public List getAllActivities(SharkTransaction trans) throws PersistenceException {
|
||||
if (Debug.verboseOn()) Debug.log(":: getAllActivities ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List createdList = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -447,7 +447,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
|
||||
public List getProcessesForMgr(String mgrName, String state, SharkTransaction trans) throws PersistenceException {
|
||||
if (Debug.verboseOn()) Debug.log(":: getProcessesForMgr ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List createdList = new ArrayList();
|
||||
List lookupList = null;
|
||||
|
||||
@@ -472,7 +472,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
}
|
||||
|
||||
public List getAllRunningProcesses(SharkTransaction trans) throws PersistenceException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List runningStates = UtilMisc.toList("open.running");
|
||||
List order = UtilMisc.toList(org.ofbiz.shark.SharkConstants.startedTime);
|
||||
List createdList = new ArrayList();
|
||||
@@ -495,7 +495,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
|
||||
protected List findFinishedProcesses(SharkTransaction trans, String packageId, String processDefId, String packageVer, Date finishedBefore) throws PersistenceException {
|
||||
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List finsihedStates = UtilMisc.toList("closed.completed", "closed.terminated", "closed.aborted");
|
||||
List order = UtilMisc.toList(org.ofbiz.shark.SharkConstants.lastStateTime);
|
||||
List createdList = new ArrayList();
|
||||
@@ -555,7 +555,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
return this.findProcessActivities(processId, finishedStates, EntityOperator.NOT_EQUAL, trans);
|
||||
}
|
||||
public List getAllAssignmentsForResource(String user, SharkTransaction trans) throws PersistenceException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List createdList = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -619,7 +619,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
* matter if activity is already in "closed" state or some of its sub-states.
|
||||
*/
|
||||
public List getAllAssignmentsForActivity(String activityId, SharkTransaction trans) throws PersistenceException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List createdList = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -682,7 +682,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
|
||||
public List getAllVariablesForProcess(String processId, SharkTransaction trans) throws PersistenceException {
|
||||
if (Debug.verboseOn()) Debug.log(":: getAllVariablesForProcess ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List createdList = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -708,7 +708,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
public List getAllVariablesForActivity(String activityId, SharkTransaction trans) throws PersistenceException {
|
||||
|
||||
if (Debug.verboseOn()) Debug.log(":: getAllVariablesForActivity ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List createdList = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -729,7 +729,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
|
||||
public List getResourceRequestersProcessIds(String userName, SharkTransaction trans) throws PersistenceException {
|
||||
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List idList = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -782,7 +782,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
|
||||
public List getAllIdsForProcessesWithExpiriedDeadlines(long l, SharkTransaction trans) throws PersistenceException {
|
||||
if (Debug.infoOn()) Debug.log(":: getAllIdsForProcessesWithExpiriedDeadlines ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List processIds = new ArrayList();
|
||||
|
||||
DynamicViewEntity view = new DynamicViewEntity();
|
||||
@@ -843,7 +843,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
|
||||
public int getExecuteCount(String procId, String asDefId, String aDefId, SharkTransaction trans) throws PersistenceException {
|
||||
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
long count = 0;
|
||||
try {
|
||||
count = delegator.findCountByAnd(org.ofbiz.shark.SharkConstants.WfActivity, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.processId, procId, org.ofbiz.shark.SharkConstants.setDefinitionId, asDefId, org.ofbiz.shark.SharkConstants.definitionId, aDefId));
|
||||
@@ -855,7 +855,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
}
|
||||
|
||||
private List getAndJoinValues(String processId, String activitySetDefId, String activityDefId) throws PersistenceException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List lookupList = null;
|
||||
try {
|
||||
lookupList = delegator.findByAnd(org.ofbiz.shark.SharkConstants.WfAndJoin, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.processId, processId,
|
||||
@@ -870,7 +870,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
}
|
||||
|
||||
private List getDeadlineValues(List exprList) throws PersistenceException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List lookupList = null;
|
||||
if (exprList == null) {
|
||||
lookupList = new ArrayList();
|
||||
@@ -940,7 +940,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
}
|
||||
|
||||
public synchronized String getNextId(String string) throws PersistenceException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
return delegator.getNextSeqId("SharkWorkflowSeq").toString();
|
||||
}
|
||||
|
||||
@@ -1004,7 +1004,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
}
|
||||
public List getAllProcesses(SharkTransaction trans) throws PersistenceException {
|
||||
if (Debug.verboseOn()) Debug.log(":: getAllProcesses ::", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List createdList = new ArrayList();
|
||||
List lookupList = null;
|
||||
try {
|
||||
@@ -1132,7 +1132,7 @@ public class EntityPersistentMgr implements PersistentManagerInterface {
|
||||
}
|
||||
}
|
||||
protected List findProcessActivities(String processId, List states, EntityComparisonOperator operator, SharkTransaction trans) throws PersistenceException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List createdList = new ArrayList();
|
||||
List order = UtilMisc.toList(org.ofbiz.shark.SharkConstants.lastStateTime);
|
||||
List lookupList = null;
|
||||
|
||||
@@ -19,11 +19,12 @@
|
||||
package org.ofbiz.shark.instance;
|
||||
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
|
||||
public abstract class InstanceEntityObject {
|
||||
|
||||
protected transient GenericDelegator delegator = null;
|
||||
protected transient Delegator delegator = null;
|
||||
protected EntityPersistentMgr mgr = null;
|
||||
protected String delegatorName = null;
|
||||
|
||||
@@ -37,7 +38,7 @@ public abstract class InstanceEntityObject {
|
||||
return this.mgr;
|
||||
}
|
||||
|
||||
public GenericDelegator getGenericDelegator() {
|
||||
public Delegator getGenericDelegator() {
|
||||
if (this.delegator == null && delegatorName != null) {
|
||||
this.delegator = GenericDelegator.getGenericDelegator(delegatorName);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.enhydra.shark.api.internal.instancepersistence.ProcessPersistenceInte
|
||||
import org.ofbiz.base.util.Debug;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilObject;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.shark.container.SharkContainer;
|
||||
@@ -43,7 +43,7 @@ public class Process extends InstanceEntityObject implements ProcessPersistenceI
|
||||
protected GenericValue process = null;
|
||||
protected boolean newValue = false;
|
||||
|
||||
protected Process(EntityPersistentMgr mgr, GenericDelegator delegator, String processId) throws PersistenceException {
|
||||
protected Process(EntityPersistentMgr mgr, Delegator delegator, String processId) throws PersistenceException {
|
||||
super(mgr, delegator);
|
||||
if (this.delegator != null) {
|
||||
try {
|
||||
@@ -63,7 +63,7 @@ public class Process extends InstanceEntityObject implements ProcessPersistenceI
|
||||
this.process = process;
|
||||
}
|
||||
|
||||
public Process(EntityPersistentMgr mgr, GenericDelegator delegator) {
|
||||
public Process(EntityPersistentMgr mgr, Delegator delegator) {
|
||||
super(mgr, delegator);
|
||||
this.newValue = true;
|
||||
this.process = delegator.makeValue(org.ofbiz.shark.SharkConstants.WfProcess);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package org.ofbiz.shark.instance;
|
||||
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.Debug;
|
||||
@@ -37,7 +37,7 @@ public class ProcessMgr extends InstanceEntityObject implements ProcessMgrPersis
|
||||
protected GenericValue processMgr = null;
|
||||
protected boolean newValue = false;
|
||||
|
||||
protected ProcessMgr(EntityPersistentMgr mgr, GenericDelegator delegator, String name) throws PersistenceException {
|
||||
protected ProcessMgr(EntityPersistentMgr mgr, Delegator delegator, String name) throws PersistenceException {
|
||||
super(mgr, delegator);
|
||||
if (this.delegator != null) {
|
||||
try {
|
||||
@@ -55,7 +55,7 @@ public class ProcessMgr extends InstanceEntityObject implements ProcessMgrPersis
|
||||
this.processMgr = processMgr;
|
||||
}
|
||||
|
||||
public ProcessMgr(EntityPersistentMgr mgr, GenericDelegator delegator) {
|
||||
public ProcessMgr(EntityPersistentMgr mgr, Delegator delegator) {
|
||||
super(mgr, delegator);
|
||||
this.newValue = true;
|
||||
this.processMgr = delegator.makeValue(org.ofbiz.shark.SharkConstants.WfProcessMgr, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.currentState, new Long(0)));
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.enhydra.shark.api.internal.instancepersistence.ProcessVariablePersist
|
||||
import org.ofbiz.base.util.Debug;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilObject;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.shark.container.SharkContainer;
|
||||
@@ -39,7 +39,7 @@ public class ProcessVariable extends InstanceEntityObject implements ProcessVari
|
||||
protected GenericValue processVariable = null;
|
||||
protected boolean newValue = false;
|
||||
|
||||
protected ProcessVariable(EntityPersistentMgr mgr, GenericDelegator delegator, String processVariableId) throws PersistenceException {
|
||||
protected ProcessVariable(EntityPersistentMgr mgr, Delegator delegator, String processVariableId) throws PersistenceException {
|
||||
super(mgr, delegator);
|
||||
if (this.delegator != null) {
|
||||
try {
|
||||
@@ -57,7 +57,7 @@ public class ProcessVariable extends InstanceEntityObject implements ProcessVari
|
||||
this.processVariable = processVariable;
|
||||
}
|
||||
|
||||
public ProcessVariable(EntityPersistentMgr mgr, GenericDelegator delegator) {
|
||||
public ProcessVariable(EntityPersistentMgr mgr, Delegator delegator) {
|
||||
super(mgr, delegator);
|
||||
this.newValue = true;
|
||||
this.processVariable = delegator.makeValue(org.ofbiz.shark.SharkConstants.WfProcessVariable, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.processVariableId, delegator.getNextSeqId(org.ofbiz.shark.SharkConstants.WfProcessVariable)));
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*******************************************************************************/
|
||||
package org.ofbiz.shark.instance;
|
||||
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
@@ -38,7 +38,7 @@ public class Resource extends InstanceEntityObject implements ResourcePersistenc
|
||||
protected GenericValue resource = null;
|
||||
protected boolean newValue = false;
|
||||
|
||||
protected Resource(EntityPersistentMgr mgr, GenericDelegator delegator, String name) throws PersistenceException {
|
||||
protected Resource(EntityPersistentMgr mgr, Delegator delegator, String name) throws PersistenceException {
|
||||
super(mgr, delegator);
|
||||
if (this.delegator != null) {
|
||||
try {
|
||||
@@ -56,7 +56,7 @@ public class Resource extends InstanceEntityObject implements ResourcePersistenc
|
||||
this.resource = resource;
|
||||
}
|
||||
|
||||
public Resource(EntityPersistentMgr mgr, GenericDelegator delegator) {
|
||||
public Resource(EntityPersistentMgr mgr, Delegator delegator) {
|
||||
super(mgr, delegator);
|
||||
this.newValue = true;
|
||||
this.resource = delegator.makeValue(org.ofbiz.shark.SharkConstants.WfResource);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package org.ofbiz.shark.mapping;
|
||||
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.shark.container.SharkContainer;
|
||||
@@ -32,11 +32,11 @@ import org.enhydra.shark.api.RootException;
|
||||
*/
|
||||
public class EntityApplicationMap implements ApplicationMap {
|
||||
|
||||
protected GenericDelegator delegator = null;
|
||||
protected Delegator delegator = null;
|
||||
protected GenericValue application = null;
|
||||
protected boolean isNew = false;
|
||||
|
||||
protected EntityApplicationMap(GenericDelegator delegator, String packageId, String processDefId, String applicationDefId) throws RootException {
|
||||
protected EntityApplicationMap(Delegator delegator, String packageId, String processDefId, String applicationDefId) throws RootException {
|
||||
this.delegator = delegator;
|
||||
try {
|
||||
this.application = delegator.findByPrimaryKey(org.ofbiz.shark.SharkConstants.WfApplicationMap, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.packageId, packageId, org.ofbiz.shark.SharkConstants.processDefId, processDefId, org.ofbiz.shark.SharkConstants.applicationDefId, applicationDefId));
|
||||
@@ -50,7 +50,7 @@ public class EntityApplicationMap implements ApplicationMap {
|
||||
this.delegator = application.getDelegator();
|
||||
}
|
||||
|
||||
public EntityApplicationMap(GenericDelegator delegator) {
|
||||
public EntityApplicationMap(Delegator delegator) {
|
||||
this.isNew = true;
|
||||
this.delegator = delegator;
|
||||
this.application = delegator.makeValue("SharkApplicationMap");
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.shark.container.SharkContainer;
|
||||
@@ -63,7 +63,7 @@ public class EntityApplicationMappingMgr implements ApplicationMappingManager {
|
||||
}
|
||||
|
||||
public List getAllApplicationMappings(ApplicationMappingTransaction mappingTransaction) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List lookupList = null;
|
||||
try {
|
||||
lookupList = delegator.findList(org.ofbiz.shark.SharkConstants.WfApplicationMap, null, null, null, null, false);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*******************************************************************************/
|
||||
package org.ofbiz.shark.mapping;
|
||||
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
@@ -36,11 +36,11 @@ public class EntityParticipantMap implements ParticipantMap {
|
||||
|
||||
public static final String module = EntityParticipantMap.class.getName();
|
||||
|
||||
protected GenericDelegator delegator = null;
|
||||
protected Delegator delegator = null;
|
||||
protected GenericValue participant = null;
|
||||
protected boolean newValue = false;
|
||||
|
||||
protected EntityParticipantMap(GenericDelegator delegator, String packageId, String processDefId, String participantId) throws RootException {
|
||||
protected EntityParticipantMap(Delegator delegator, String packageId, String processDefId, String participantId) throws RootException {
|
||||
this.delegator = delegator;
|
||||
try {
|
||||
this.participant = delegator.findByPrimaryKey(org.ofbiz.shark.SharkConstants.WfParticipantMap, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.packageId, packageId, org.ofbiz.shark.SharkConstants.processDefId, processDefId, org.ofbiz.shark.SharkConstants.participantId, participantId));
|
||||
@@ -54,7 +54,7 @@ public class EntityParticipantMap implements ParticipantMap {
|
||||
this.delegator = application.getDelegator();
|
||||
}
|
||||
|
||||
public EntityParticipantMap(GenericDelegator delegator) {
|
||||
public EntityParticipantMap(Delegator delegator) {
|
||||
this.newValue = true;
|
||||
this.delegator = delegator;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.shark.container.SharkContainer;
|
||||
@@ -61,7 +61,7 @@ public class EntityParticipantMappingMgr implements ParticipantMappingManager {
|
||||
}
|
||||
|
||||
public List getAllParticipantMappings(ParticipantMappingTransaction mappingTransaction) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List lookupList = null;
|
||||
try {
|
||||
lookupList = delegator.findList(org.ofbiz.shark.SharkConstants.WfParticipantMap, null, null, null, null, false);
|
||||
@@ -94,7 +94,7 @@ public class EntityParticipantMappingMgr implements ParticipantMappingManager {
|
||||
}
|
||||
|
||||
public List getParticipantMappings(ParticipantMappingTransaction mappingTransaction, String packageId, String processDefId, String participantId) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List lookupList = null;
|
||||
try {
|
||||
lookupList = delegator.findByAnd(org.ofbiz.shark.SharkConstants.WfParticipantMap, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.packageId, packageId, org.ofbiz.shark.SharkConstants.processDefId, processDefId, org.ofbiz.shark.SharkConstants.participantId, participantId));
|
||||
@@ -115,7 +115,7 @@ public class EntityParticipantMappingMgr implements ParticipantMappingManager {
|
||||
}
|
||||
|
||||
public List getParticipantMappings(ParticipantMappingTransaction mappingTransaction, String userName) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List lookupList = null;
|
||||
try {
|
||||
lookupList = delegator.findByAnd(org.ofbiz.shark.SharkConstants.WfParticipantMap, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.userName, userName));
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.enhydra.shark.api.internal.working.CallbackUtilities;
|
||||
import org.ofbiz.base.util.Debug;
|
||||
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;
|
||||
@@ -74,7 +74,7 @@ public class EntityRepositoryMgr implements RepositoryPersistenceManager {
|
||||
|
||||
public void deleteXPDL(RepositoryTransaction t, String xpdlId, String xpdlVersion) throws RepositoryException {
|
||||
Debug.log("XPDL Delete : " + xpdlId + "/" + xpdlVersion, module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
GenericValue value = this.getXpdlValue(xpdlId, xpdlVersion, false);
|
||||
if (value != null) {
|
||||
try {
|
||||
@@ -88,7 +88,7 @@ public class EntityRepositoryMgr implements RepositoryPersistenceManager {
|
||||
|
||||
public void moveToHistory(RepositoryTransaction t, String xpdlId, String xpdlVersion) throws RepositoryException {
|
||||
Debug.log("XPDL Move to History : " + xpdlId + "/" + xpdlVersion, module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
GenericValue value = this.getXpdlValue(xpdlId, xpdlVersion, false);
|
||||
value.set(org.ofbiz.shark.SharkConstants.isHistorical, "Y");
|
||||
try {
|
||||
@@ -113,7 +113,7 @@ public class EntityRepositoryMgr implements RepositoryPersistenceManager {
|
||||
|
||||
public void clearRepository(RepositoryTransaction t) throws RepositoryException {
|
||||
Debug.log("XPDL Clear Repository", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
try {
|
||||
delegator.removeAll(org.ofbiz.shark.SharkConstants.WfRepository);
|
||||
} catch (GenericEntityException e) {
|
||||
@@ -207,7 +207,7 @@ public class EntityRepositoryMgr implements RepositoryPersistenceManager {
|
||||
|
||||
public List getReferringXPDLIds(RepositoryTransaction t, String referredXPDLId) throws RepositoryException {
|
||||
Debug.log("Get XPDL Reference IDs", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List referringIds = new ArrayList();
|
||||
List refs = null;
|
||||
try {
|
||||
@@ -228,7 +228,7 @@ public class EntityRepositoryMgr implements RepositoryPersistenceManager {
|
||||
|
||||
public List getReferringXPDLVersions(RepositoryTransaction t, String referredXPDLId, String referringXPDLId) throws RepositoryException {
|
||||
Debug.log("Get Referring XPDL Versions", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List referringVers = new ArrayList();
|
||||
List refs = null;
|
||||
try {
|
||||
@@ -248,7 +248,7 @@ public class EntityRepositoryMgr implements RepositoryPersistenceManager {
|
||||
|
||||
public List getReferredXPDLIds(RepositoryTransaction t, String referringXPDLId, String referringXPDLVersion) throws RepositoryException {
|
||||
Debug.log("Get Referring XPDL IDs", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List referringIds = new ArrayList();
|
||||
List refs = null;
|
||||
try {
|
||||
@@ -278,7 +278,7 @@ public class EntityRepositoryMgr implements RepositoryPersistenceManager {
|
||||
}
|
||||
|
||||
private GenericValue getXpdlValue(String xpdlId, String xpdlVersion, boolean includeHistorical) throws RepositoryException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
GenericValue xpdl = null;
|
||||
try {
|
||||
xpdl = delegator.findByPrimaryKey(org.ofbiz.shark.SharkConstants.WfRepository, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.xpdlId, xpdlId, org.ofbiz.shark.SharkConstants.xpdlVersion, xpdlVersion));
|
||||
@@ -293,7 +293,7 @@ public class EntityRepositoryMgr implements RepositoryPersistenceManager {
|
||||
}
|
||||
|
||||
private List getXpdlValues(String xpdlId, String xpdlVersion, boolean includeHistory) throws RepositoryException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List exprList = new ArrayList();
|
||||
if (xpdlId != null) {
|
||||
exprList.add(EntityCondition.makeCondition(org.ofbiz.shark.SharkConstants.xpdlId, EntityOperator.EQUALS, xpdlId));
|
||||
@@ -332,7 +332,7 @@ public class EntityRepositoryMgr implements RepositoryPersistenceManager {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
try {
|
||||
GenericValue v = delegator.makeValue(org.ofbiz.shark.SharkConstants.WfRepository);
|
||||
v.set(org.ofbiz.shark.SharkConstants.xpdlId, xpdlId);
|
||||
@@ -379,7 +379,7 @@ public class EntityRepositoryMgr implements RepositoryPersistenceManager {
|
||||
int referredXPDLNumber) throws RepositoryException
|
||||
{
|
||||
Debug.log("Add XPDL Reference", module);
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
GenericValue ref = delegator.makeValue(org.ofbiz.shark.SharkConstants.WfRepositoryRef);
|
||||
ref.set(org.ofbiz.shark.SharkConstants.xpdlId, referringXPDLId);
|
||||
ref.set(org.ofbiz.shark.SharkConstants.xpdlVersion, referringXPDLVersion);
|
||||
|
||||
@@ -26,6 +26,7 @@ import java.util.HashMap;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
@@ -52,7 +53,7 @@ import org.enhydra.shark.WfProcessIteratorWrapper;
|
||||
public abstract class AbstractRequester implements WfRequester, Serializable {
|
||||
|
||||
public static final String module = LoggingRequester.class.getName();
|
||||
protected transient GenericDelegator delegator = null;
|
||||
protected transient Delegator delegator = null;
|
||||
protected transient GenericValue userLogin = null;
|
||||
protected String delegatorName = null;
|
||||
protected String userLoginId = null;
|
||||
@@ -144,7 +145,7 @@ public abstract class AbstractRequester implements WfRequester, Serializable {
|
||||
return wrdMap;
|
||||
}
|
||||
|
||||
protected synchronized GenericDelegator getDelegator() {
|
||||
protected synchronized Delegator getDelegator() {
|
||||
if (this.delegator == null && this.delegatorName != null) {
|
||||
this.delegator = GenericDelegator.getGenericDelegator(this.delegatorName);
|
||||
}
|
||||
@@ -153,7 +154,7 @@ public abstract class AbstractRequester implements WfRequester, Serializable {
|
||||
|
||||
protected synchronized GenericValue getUserLogin() throws GenericEntityException {
|
||||
if (userLogin == null && this.userLoginId != null) {
|
||||
GenericDelegator delegator = this.getDelegator();
|
||||
Delegator delegator = this.getDelegator();
|
||||
if (delegator != null) {
|
||||
this.userLogin = delegator.findByPrimaryKey("UserLogin",
|
||||
UtilMisc.toMap("userLoginId", this.userLoginId));
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.shark.container.SharkContainer;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
@@ -48,7 +48,7 @@ public class GenericUserGroupMgr implements UserGroupManager {
|
||||
}
|
||||
|
||||
public List getAllGroupnames(UserTransaction trans) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List groupNames = new ArrayList();
|
||||
List groups = null;
|
||||
try {
|
||||
@@ -68,7 +68,7 @@ public class GenericUserGroupMgr implements UserGroupManager {
|
||||
}
|
||||
|
||||
public List getAllUsers(UserTransaction trans) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List userNames = new ArrayList();
|
||||
List users = null;
|
||||
try {
|
||||
@@ -88,7 +88,7 @@ public class GenericUserGroupMgr implements UserGroupManager {
|
||||
}
|
||||
|
||||
public List getAllUsers(UserTransaction trans, String groupName) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List userNames = new ArrayList();
|
||||
List members = null;
|
||||
try {
|
||||
@@ -124,7 +124,7 @@ public class GenericUserGroupMgr implements UserGroupManager {
|
||||
}
|
||||
|
||||
public List getAllSubgroups(UserTransaction trans, String groupName) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
List subGroups = new ArrayList();
|
||||
List rollups = null;
|
||||
try {
|
||||
@@ -160,7 +160,7 @@ public class GenericUserGroupMgr implements UserGroupManager {
|
||||
}
|
||||
|
||||
public void createGroup(UserTransaction trans, String groupName, String description) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
GenericValue group = delegator.makeValue(org.ofbiz.shark.SharkConstants.SharkGroup);
|
||||
group.set(org.ofbiz.shark.SharkConstants.groupName, groupName);
|
||||
group.set(org.ofbiz.shark.SharkConstants.description, description);
|
||||
@@ -214,7 +214,7 @@ public class GenericUserGroupMgr implements UserGroupManager {
|
||||
}
|
||||
|
||||
public void addGroupToGroup(UserTransaction trans, String parentGroupName, String groupName) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
GenericValue rollup = delegator.makeValue(org.ofbiz.shark.SharkConstants.SharkGroupRollup);
|
||||
rollup.set(org.ofbiz.shark.SharkConstants.parentGroupName, parentGroupName);
|
||||
rollup.set(org.ofbiz.shark.SharkConstants.groupName, groupName);
|
||||
@@ -260,7 +260,7 @@ public class GenericUserGroupMgr implements UserGroupManager {
|
||||
}
|
||||
|
||||
public void addUserToGroup(UserTransaction trans, String groupName, String username) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
GenericValue member = delegator.makeValue(org.ofbiz.shark.SharkConstants.SharkGroupMember);
|
||||
member.set(org.ofbiz.shark.SharkConstants.groupName, groupName);
|
||||
member.set(org.ofbiz.shark.SharkConstants.userName, username);
|
||||
@@ -298,7 +298,7 @@ public class GenericUserGroupMgr implements UserGroupManager {
|
||||
}
|
||||
|
||||
public void createUser(UserTransaction trans, String groupName, String username, String password, String firstName, String lastName, String email) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
GenericValue user = delegator.makeValue(org.ofbiz.shark.SharkConstants.SharkUser);
|
||||
user.set(org.ofbiz.shark.SharkConstants.userName, username);
|
||||
user.set(org.ofbiz.shark.SharkConstants.firstName, firstName);
|
||||
@@ -399,7 +399,7 @@ public class GenericUserGroupMgr implements UserGroupManager {
|
||||
}
|
||||
|
||||
private GenericValue getUser(String username) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
GenericValue value = null;
|
||||
try {
|
||||
value = delegator.findByPrimaryKey(org.ofbiz.shark.SharkConstants.SharkUser, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.userName, username));
|
||||
@@ -411,7 +411,7 @@ public class GenericUserGroupMgr implements UserGroupManager {
|
||||
}
|
||||
|
||||
private GenericValue getGroup(String groupName) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
GenericValue value = null;
|
||||
try {
|
||||
value = delegator.findByPrimaryKey(org.ofbiz.shark.SharkConstants.SharkGroup, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.groupName, groupName));
|
||||
@@ -423,7 +423,7 @@ public class GenericUserGroupMgr implements UserGroupManager {
|
||||
}
|
||||
|
||||
private GenericValue getGroupMember(String groupName, String username) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
GenericValue member = null;
|
||||
try {
|
||||
member = delegator.findByPrimaryKey(org.ofbiz.shark.SharkConstants.SharkGroupMember, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.groupName, groupName, org.ofbiz.shark.SharkConstants.userName, username));
|
||||
@@ -435,7 +435,7 @@ public class GenericUserGroupMgr implements UserGroupManager {
|
||||
}
|
||||
|
||||
private GenericValue getGroupRollup(String parentGroup, String group) throws RootException {
|
||||
GenericDelegator delegator = SharkContainer.getDelegator();
|
||||
Delegator delegator = SharkContainer.getDelegator();
|
||||
GenericValue rollup = null;
|
||||
try {
|
||||
rollup = delegator.findByPrimaryKey(org.ofbiz.shark.SharkConstants.SharkGroupRollup, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.parentGroupName, parentGroup, org.ofbiz.shark.SharkConstants.groupName, group));
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.shark.container.SharkContainer;
|
||||
@@ -37,7 +37,7 @@ public class PartyUserGroupMgr implements UserGroupManager {
|
||||
|
||||
public static final String module = PartyUserGroupMgr.class.getName();
|
||||
protected CallbackUtilities callBack = null;
|
||||
protected GenericDelegator delegator = null;
|
||||
protected Delegator delegator = null;
|
||||
|
||||
public void configure(CallbackUtilities cb) throws RootException {
|
||||
this.delegator = SharkContainer.getDelegator();
|
||||
|
||||
@@ -24,7 +24,7 @@ import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.ofbiz.base.util.GeneralException;
|
||||
import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.order.shoppingcart.ShoppingCart;
|
||||
import org.ofbiz.product.store.ProductStoreWorker;
|
||||
@@ -66,7 +66,7 @@ public class WebPosEvents {
|
||||
GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
|
||||
WebPosSession webPosSession = (WebPosSession) session.getAttribute("webPosSession");
|
||||
ShoppingCart cart = (ShoppingCart) session.getAttribute("shoppingCart");
|
||||
GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
|
||||
Delegator delegator = (Delegator) request.getAttribute("delegator");
|
||||
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
|
||||
|
||||
if (UtilValidate.isEmpty(webPosSession)) {
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.ofbiz.base.util.GeneralException;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilProperties;
|
||||
import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
@@ -49,14 +50,14 @@ public class WebPosSession {
|
||||
private String productStoreId = null;
|
||||
private String facilityId = null;
|
||||
private String currencyUomId = null;
|
||||
private transient GenericDelegator delegator = null;
|
||||
private transient Delegator delegator = null;
|
||||
private String delegatorName = null;
|
||||
private LocalDispatcher dispatcher = null;
|
||||
private Boolean mgrLoggedIn = null;
|
||||
private WebPosTransaction webPosTransaction = null;
|
||||
private ShoppingCart cart = null;
|
||||
|
||||
public WebPosSession(String id, Map<String, Object> attributes, GenericValue userLogin, Locale locale, String productStoreId, String facilityId, String currencyUomId, GenericDelegator delegator, LocalDispatcher dispatcher, ShoppingCart cart) {
|
||||
public WebPosSession(String id, Map<String, Object> attributes, GenericValue userLogin, Locale locale, String productStoreId, String facilityId, String currencyUomId, Delegator delegator, LocalDispatcher dispatcher, ShoppingCart cart) {
|
||||
this.id = id;
|
||||
this.attributes = attributes;
|
||||
this.userLogin = userLogin;
|
||||
@@ -143,7 +144,7 @@ public class WebPosSession {
|
||||
this.currencyUomId = currencyUomId;
|
||||
}
|
||||
|
||||
public GenericDelegator getDelegator() {
|
||||
public Delegator getDelegator() {
|
||||
if (UtilValidate.isEmpty(delegator)) {
|
||||
delegator = GenericDelegator.getGenericDelegator(delegatorName);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.ofbiz.base.util.UtilDateTime;
|
||||
import org.ofbiz.base.util.UtilFormatOut;
|
||||
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;
|
||||
@@ -67,7 +67,7 @@ public class WebPosTransaction {
|
||||
public WebPosTransaction(WebPosSession session) {
|
||||
this.webPosSession = session;
|
||||
this.partyId = "_NA_";
|
||||
GenericDelegator delegator = session.getDelegator();
|
||||
Delegator delegator = session.getDelegator();
|
||||
ShoppingCart cart = session.getCart();
|
||||
this.ch = new CheckOutHelper(session.getDispatcher(), delegator, cart);
|
||||
cart.setChannelType("POS_SALES_CHANNEL");
|
||||
@@ -132,7 +132,7 @@ public class WebPosTransaction {
|
||||
}
|
||||
|
||||
public GenericValue getTerminalState() {
|
||||
GenericDelegator delegator = webPosSession.getDelegator();
|
||||
Delegator delegator = webPosSession.getDelegator();
|
||||
List<GenericValue> states = null;
|
||||
try {
|
||||
states = delegator.findList("PosTerminalState", EntityCondition.makeCondition(UtilMisc.toMap("posTerminalId", webPosSession.getId(), "startingTxId", getTransactionId())), null, null, null, false);
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.ofbiz.base.util.Debug;
|
||||
import org.ofbiz.base.util.GeneralException;
|
||||
import org.ofbiz.base.util.ObjectType;
|
||||
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.serialize.SerializeException;
|
||||
@@ -90,7 +90,7 @@ public class WfApplicationServices {
|
||||
}
|
||||
|
||||
public static Map getApplicationContext(DispatchContext ctx, Map context) throws GenericServiceException {
|
||||
final GenericDelegator delegator = ctx.getDelegator();
|
||||
final Delegator delegator = ctx.getDelegator();
|
||||
final Map result = new HashMap();
|
||||
try {
|
||||
result.put("applicationContext",
|
||||
@@ -105,7 +105,7 @@ public class WfApplicationServices {
|
||||
}
|
||||
|
||||
public static Map completeApplication(DispatchContext ctx, Map context) throws GenericServiceException {
|
||||
final GenericDelegator delegator = ctx.getDelegator();
|
||||
final Delegator delegator = ctx.getDelegator();
|
||||
final String applicationId = (String) context.get("applicationId");
|
||||
final Map result = new HashMap();
|
||||
|
||||
@@ -175,7 +175,7 @@ public class WfApplicationServices {
|
||||
return result;
|
||||
}
|
||||
|
||||
private static String insertAppSandbox(GenericDelegator delegator, String workEffortId, String partyId,
|
||||
private static String insertAppSandbox(Delegator delegator, String workEffortId, String partyId,
|
||||
String roleTypeId, Timestamp fromDate, Map context) throws GenericServiceException {
|
||||
String dataId = null;
|
||||
String applicationId = Long.toString((new Date().getTime()));
|
||||
@@ -205,7 +205,7 @@ public class WfApplicationServices {
|
||||
return applicationId;
|
||||
}
|
||||
|
||||
private static GenericValue getApplicationSandbox(GenericDelegator delegator, String applicationId)
|
||||
private static GenericValue getApplicationSandbox(Delegator delegator, String applicationId)
|
||||
throws GenericServiceException {
|
||||
try {
|
||||
GenericValue application =
|
||||
@@ -216,7 +216,7 @@ public class WfApplicationServices {
|
||||
}
|
||||
}
|
||||
|
||||
private static Map getRunTimeContext(GenericDelegator delegator, GenericValue runTimeData)
|
||||
private static Map getRunTimeContext(Delegator delegator, GenericValue runTimeData)
|
||||
throws GenericServiceException {
|
||||
try {
|
||||
return (Map) XmlSerializer.deserialize((String) runTimeData.get("runtimeInfo"), delegator);
|
||||
@@ -244,7 +244,7 @@ public class WfApplicationServices {
|
||||
}
|
||||
}
|
||||
|
||||
private static GenericValue getRuntimeData(GenericDelegator delegator, String applicationId)
|
||||
private static GenericValue getRuntimeData(Delegator delegator, String applicationId)
|
||||
throws GenericServiceException {
|
||||
try {
|
||||
GenericValue application =
|
||||
@@ -255,7 +255,7 @@ public class WfApplicationServices {
|
||||
}
|
||||
}
|
||||
|
||||
private static void getApplicationSignatures(GenericDelegator delegator, GenericValue application,
|
||||
private static void getApplicationSignatures(Delegator delegator, GenericValue application,
|
||||
Map contextSignature, Map resultSignature) throws GenericEntityException {
|
||||
Map expresions = null;
|
||||
// look for the 1st application.
|
||||
@@ -305,7 +305,7 @@ public class WfApplicationServices {
|
||||
}
|
||||
}
|
||||
|
||||
private static GenericValue getWorkEffortPartyAssigment(GenericDelegator delegator, String workEffortId)
|
||||
private static GenericValue getWorkEffortPartyAssigment(Delegator delegator, String workEffortId)
|
||||
throws GenericServiceException {
|
||||
Map expresions = new HashMap();
|
||||
expresions.putAll(UtilMisc.toMap("workEffortId", workEffortId));
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
|
||||
/**
|
||||
@@ -257,10 +257,10 @@ public interface WfExecutionObject {
|
||||
|
||||
/**
|
||||
* Returns the delegator being used by this workflow
|
||||
* @return GenericDelegator used for this workflow
|
||||
* @return Delegator used for this workflow
|
||||
* @throws WfException
|
||||
*/
|
||||
public GenericDelegator getDelegator() throws WfException;
|
||||
public Delegator getDelegator() throws WfException;
|
||||
|
||||
} // interface WfExecutionObjectOperations
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
|
||||
import org.ofbiz.base.util.cache.UtilCache;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.service.DispatchContext;
|
||||
import org.ofbiz.workflow.client.WorkflowClient;
|
||||
@@ -57,7 +57,7 @@ public class WfFactory {
|
||||
return new WfActivityImpl(value, process);
|
||||
}
|
||||
|
||||
public static WfActivity getWfActivity(GenericDelegator delegator, String workEffortId) throws WfException {
|
||||
public static WfActivity getWfActivity(Delegator delegator, String workEffortId) throws WfException {
|
||||
if (delegator == null) throw new WfException("The delegator object cannot be null");
|
||||
if (workEffortId == null) throw new WfException("The WorkEffort key cannot be null");
|
||||
return new WfActivityImpl(delegator, workEffortId);
|
||||
@@ -75,7 +75,7 @@ public class WfFactory {
|
||||
return new WfAssignmentImpl(activity, resource, fromDate, create);
|
||||
}
|
||||
|
||||
public static WfAssignment getWfAssignment(GenericDelegator delegator, String work, String party, String role, Timestamp from) throws WfException {
|
||||
public static WfAssignment getWfAssignment(Delegator delegator, String work, String party, String role, Timestamp from) throws WfException {
|
||||
WfActivity act = getWfActivity(delegator, work);
|
||||
WfResource res = getWfResource(delegator, null, null, party, role);
|
||||
return getWfAssignment(act, res, from, false);
|
||||
@@ -94,7 +94,7 @@ public class WfFactory {
|
||||
return new WfProcessImpl(value, mgr);
|
||||
}
|
||||
|
||||
public static WfProcess getWfProcess(GenericDelegator delegator, String workEffortId) throws WfException {
|
||||
public static WfProcess getWfProcess(Delegator delegator, String workEffortId) throws WfException {
|
||||
if (delegator == null) throw new WfException("The delegator object cannot be null");
|
||||
if (workEffortId == null) throw new WfException("The WorkEffort key cannot be null");
|
||||
WfProcess process = null;
|
||||
@@ -123,7 +123,7 @@ public class WfFactory {
|
||||
|
||||
/**
|
||||
* Creates a new {@link WfProcessMgr} instance.
|
||||
* @param delegator The GenericDelegator to use for this manager.
|
||||
* @param delegator The Delegator to use for this manager.
|
||||
* @param pkg The Workflow Package ID.
|
||||
* @param pkver The Workflow Package Version.
|
||||
* @param pid The Workflow Process ID.
|
||||
@@ -131,7 +131,7 @@ public class WfFactory {
|
||||
* @return An instance of the WfProcessMgr Interface.
|
||||
* @throws WfException
|
||||
*/
|
||||
public static WfProcessMgr getWfProcessMgr(GenericDelegator delegator, String pkg, String pkver, String pid, String pver) throws WfException {
|
||||
public static WfProcessMgr getWfProcessMgr(Delegator delegator, String pkg, String pkver, String pid, String pver) throws WfException {
|
||||
if (delegator == null) throw new WfException("Delegator cannot be null");
|
||||
if (pkg == null) throw new WfException("Workflow package id cannot be null.");
|
||||
if (pid == null) throw new WfException("Workflow process id cannot be null");
|
||||
@@ -169,7 +169,7 @@ public class WfFactory {
|
||||
|
||||
/**
|
||||
* Creates a new {@link WfResource} instance.
|
||||
* @param delegator The GenericDelegator for this instance
|
||||
* @param delegator The Delegator for this instance
|
||||
* @param key The key for the resource
|
||||
* @param name The name of the resource
|
||||
* @param party The partyId of the resource
|
||||
@@ -177,7 +177,7 @@ public class WfFactory {
|
||||
* @return An instance of the WfResource Interface.
|
||||
* @throws WfException
|
||||
*/
|
||||
public static WfResource getWfResource(GenericDelegator delegator, String key, String name, String party, String role) throws WfException {
|
||||
public static WfResource getWfResource(Delegator delegator, String key, String name, String party, String role) throws WfException {
|
||||
if (delegator == null) throw new WfException("Delegator cannot be null");
|
||||
if (party == null) party = "_NA_";
|
||||
if (role == null) role = "_NA_";
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import org.ofbiz.base.util.Debug;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.service.DispatchContext;
|
||||
import org.ofbiz.service.LocalDispatcher;
|
||||
import org.ofbiz.service.job.Job;
|
||||
@@ -45,19 +45,19 @@ public class WorkflowClient {
|
||||
|
||||
public static final String module = WorkflowClient.class.getName();
|
||||
|
||||
protected GenericDelegator delegator = null;
|
||||
protected Delegator delegator = null;
|
||||
protected LocalDispatcher dispatcher = null;
|
||||
|
||||
protected WorkflowClient() {}
|
||||
|
||||
/**
|
||||
* Get a new instance of the Workflow Client
|
||||
* @param delegator the GenericDelegator object which matchs the delegator used by the workflow engine.
|
||||
* @param delegator the Delegator object which matchs the delegator used by the workflow engine.
|
||||
* @param dispatcher a LocalDispatcher object to invoke the workflow services.
|
||||
*/
|
||||
public WorkflowClient(GenericDelegator delegator, LocalDispatcher dispatcher) {
|
||||
public WorkflowClient(Delegator delegator, LocalDispatcher dispatcher) {
|
||||
if (delegator == null)
|
||||
throw new IllegalArgumentException("GenericDelegator cannot be null");
|
||||
throw new IllegalArgumentException("Delegator cannot be null");
|
||||
if (dispatcher == null)
|
||||
throw new IllegalArgumentException("LocalDispatcher cannot be null");
|
||||
this.delegator = delegator;
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.Map;
|
||||
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;
|
||||
@@ -56,7 +56,7 @@ public class WorkflowServices {
|
||||
/** Cancel Workflow */
|
||||
public static Map cancelWorkflow(DispatchContext ctx, Map context) {
|
||||
Map result = new HashMap();
|
||||
GenericDelegator delegator = ctx.getDelegator();
|
||||
Delegator delegator = ctx.getDelegator();
|
||||
Security security = ctx.getSecurity();
|
||||
String workEffortId = (String) context.get("workEffortId");
|
||||
|
||||
@@ -492,7 +492,7 @@ public class WorkflowServices {
|
||||
/**
|
||||
* Returns the owner of the workflow.
|
||||
*/
|
||||
public static GenericValue getOwner(GenericDelegator delegator, String workEffortId) {
|
||||
public static GenericValue getOwner(Delegator delegator, String workEffortId) {
|
||||
try {
|
||||
GenericValue we = delegator.findByPrimaryKey("WorkEffort", UtilMisc.toMap("workEffortId", workEffortId));
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilURL;
|
||||
import org.ofbiz.base.util.UtilXml;
|
||||
import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
@@ -49,18 +50,18 @@ import org.xml.sax.SAXException;
|
||||
*/
|
||||
public class XpdlReader {
|
||||
|
||||
protected GenericDelegator delegator = null;
|
||||
protected Delegator delegator = null;
|
||||
protected List values = null;
|
||||
|
||||
public static final String module = XpdlReader.class.getName();
|
||||
|
||||
public XpdlReader(GenericDelegator delegator) {
|
||||
public XpdlReader(Delegator delegator) {
|
||||
this.delegator = delegator;
|
||||
}
|
||||
|
||||
/** Imports an XPDL file at the given location and imports it into the
|
||||
* datasource through the given delegator */
|
||||
public static void importXpdl(URL location, GenericDelegator delegator) throws DefinitionParserException {
|
||||
public static void importXpdl(URL location, Delegator delegator) throws DefinitionParserException {
|
||||
List values = readXpdl(location, delegator);
|
||||
|
||||
// attempt to start a transaction
|
||||
@@ -88,7 +89,7 @@ public class XpdlReader {
|
||||
/** Gets an XML file from the specified location and reads it into
|
||||
* GenericValue objects from the given delegator and returns them in a
|
||||
* List; does not write to the database, just gets the entities. */
|
||||
public static List readXpdl(URL location, GenericDelegator delegator) throws DefinitionParserException {
|
||||
public static List readXpdl(URL location, Delegator delegator) throws DefinitionParserException {
|
||||
if (Debug.infoOn()) Debug.logInfo("Beginning XPDL File Parse: " + location.toString(), module);
|
||||
|
||||
XpdlReader reader = new XpdlReader(delegator);
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.ofbiz.base.util.StringUtil;
|
||||
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.util.EntityTypeUtil;
|
||||
@@ -79,7 +79,7 @@ public class WfActivityImpl extends WfExecutionObjectImpl implements WfActivity
|
||||
init();
|
||||
}
|
||||
|
||||
public WfActivityImpl(GenericDelegator delegator, String workEffortId) throws WfException {
|
||||
public WfActivityImpl(Delegator delegator, String workEffortId) throws WfException {
|
||||
super(delegator, workEffortId);
|
||||
if (activityId == null || activityId.length() == 0)
|
||||
throw new WfException("Execution object is not of type WfActivity");
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.ofbiz.base.util.Debug;
|
||||
import org.ofbiz.base.util.ObjectType;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.string.FlexibleStringExpander;
|
||||
import org.ofbiz.entity.GenericDelegator;
|
||||
import org.ofbiz.entity.Delegator;
|
||||
import org.ofbiz.entity.GenericEntityException;
|
||||
import org.ofbiz.entity.GenericValue;
|
||||
import org.ofbiz.entity.serialize.SerializeException;
|
||||
@@ -73,7 +73,7 @@ public abstract class WfExecutionObjectImpl implements WfExecutionObject {
|
||||
protected String processVersion = null;
|
||||
protected String activityId = null;
|
||||
protected String workEffortId = null;
|
||||
protected GenericDelegator delegator = null;
|
||||
protected Delegator delegator = null;
|
||||
protected List history = null;
|
||||
|
||||
public WfExecutionObjectImpl(GenericValue valueObject, String parentId) throws WfException {
|
||||
@@ -90,7 +90,7 @@ public abstract class WfExecutionObjectImpl implements WfExecutionObject {
|
||||
createRuntime(parentId);
|
||||
}
|
||||
|
||||
public WfExecutionObjectImpl(GenericDelegator delegator, String workEffortId) throws WfException {
|
||||
public WfExecutionObjectImpl(Delegator delegator, String workEffortId) throws WfException {
|
||||
this.delegator = delegator;
|
||||
this.workEffortId = workEffortId;
|
||||
this.packageId = getRuntimeObject().getString("workflowPackageId");
|
||||
@@ -507,7 +507,7 @@ public abstract class WfExecutionObjectImpl implements WfExecutionObject {
|
||||
/**
|
||||
* @see org.ofbiz.workflow.WfExecutionObject#getDelegator()
|
||||
*/
|
||||
public GenericDelegator getDelegator() throws WfException {
|
||||
public Delegator getDelegator() throws WfException {
|
||||
return delegator;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.ofbiz.base.util.Debug;
|
||||
import org.ofbiz.base.util.StringUtil;
|
||||
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.service.GenericResultWaiter;
|
||||
@@ -75,9 +75,9 @@ public class WfProcessImpl extends WfExecutionObjectImpl implements WfProcess {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.ofbiz.workflow.impl.WfExecutionObjectImpl#WfExecutionObjectImpl(org.ofbiz.entity.GenericDelegator, java.lang.String)
|
||||
* @see org.ofbiz.workflow.impl.WfExecutionObjectImpl#WfExecutionObjectImpl(org.ofbiz.entity.Delegator, java.lang.String)
|
||||
*/
|
||||
public WfProcessImpl(GenericDelegator delegator, String workEffortId) throws WfException {
|
||||
public WfProcessImpl(Delegator delegator, String workEffortId) throws WfException {
|
||||
super(delegator, workEffortId);
|
||||
if (activityId != null && activityId.length() > 0)
|
||||
throw new WfException("Execution object is not of type WfProcess.");
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.ofbiz.base.util.Debug;
|
||||
import org.ofbiz.base.util.GeneralException;
|
||||
import org.ofbiz.base.util.ObjectType;
|
||||
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;
|
||||
@@ -71,7 +71,7 @@ public class WfProcessMgrImpl implements WfProcessMgr {
|
||||
* @param processVersion
|
||||
* @throws WfException
|
||||
*/
|
||||
public WfProcessMgrImpl(GenericDelegator delegator, String packageId, String packageVersion,
|
||||
public WfProcessMgrImpl(Delegator delegator, String packageId, String packageVersion,
|
||||
String processId, String processVersion) throws WfException {
|
||||
Map finder = UtilMisc.toMap("packageId", packageId, "processId", processId);
|
||||
List order = UtilMisc.toList("-packageVersion", "-processVersion");
|
||||
@@ -254,7 +254,7 @@ public class WfProcessMgrImpl implements WfProcessMgr {
|
||||
}
|
||||
|
||||
private void buildInitialContext() throws WfException {
|
||||
GenericDelegator delegator = processDef.getDelegator();
|
||||
Delegator delegator = processDef.getDelegator();
|
||||
this.initialContext = new HashMap();
|
||||
List dataFields = new ArrayList();
|
||||
try {
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
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.workflow.NotAssigned;
|
||||
@@ -40,7 +40,7 @@ import org.ofbiz.workflow.WfResource;
|
||||
*/
|
||||
public class WfResourceImpl implements WfResource {
|
||||
|
||||
protected GenericDelegator delegator = null;
|
||||
protected Delegator delegator = null;
|
||||
protected String resourceKey = null;
|
||||
protected String resourceName = null;
|
||||
protected String description = null;
|
||||
@@ -56,7 +56,7 @@ public class WfResourceImpl implements WfResource {
|
||||
* @param roleTypeId The roleTypeId of this resource
|
||||
* @param fromDate The fromDate of this resource
|
||||
*/
|
||||
public WfResourceImpl(GenericDelegator delegator, String resourceKey, String resourceName, String partyId, String roleTypeId) {
|
||||
public WfResourceImpl(Delegator delegator, String resourceKey, String resourceName, String partyId, String roleTypeId) {
|
||||
this.delegator = delegator;
|
||||
this.resourceKey = resourceKey;
|
||||
this.resourceName = resourceName;
|
||||
|
||||
Reference in New Issue
Block a user