Author: ashish
Date: Wed Dec 17 12:28:02 2014
New Revision: 1646214

URL: http://svn.apache.org/r1646214
Log:
Applied patch from jira issue OFBIZ-5902 - Fetch configurable settings data 
driven by replacing UtilProperties.getPropertyValue() method with 
EntityUtilProperties.getPropertyValue().
We have removed the recent changes that we did for <property-to-field> in XML 
file because those changes was not actually needed.
Thanks Arun for the contribution. 

Modified:
    
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
    
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy
    
ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindLookUp.groovy
    ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
    
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java
    
ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy
    
ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/autoUpdateConfig.groovy
    ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/LdapLoginWorker.java
    
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
    ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java
    
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java

Modified: 
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java?rev=1646214&r1=1646213&r2=1646214&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
 (original)
+++ 
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
 Wed Dec 17 12:28:02 2014
@@ -865,7 +865,7 @@ public class CCPaymentServices {
         Element instructionsElement = 
UtilXml.addChildElement(engineDocElement, "Instructions", requestDocument);
 
         String pipeline = "PaymentNoFraud";
-        if (UtilProperties.propertyValueEqualsIgnoreCase(paymentConfig, 
"payment.clearcommerce.enableFraudShield", "Y")) {
+        if (EntityUtilProperties.propertyValueEqualsIgnoreCase(paymentConfig, 
"payment.clearcommerce.enableFraudShield", "Y", delegator)) {
             pipeline = "Payment";
         }
         UtilXml.addChildElementValue(instructionsElement, "Pipeline", 
pipeline, requestDocument);

Modified: 
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy?rev=1646214&r1=1646213&r2=1646214&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy
 (original)
+++ 
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy
 Wed Dec 17 12:28:02 2014
@@ -39,7 +39,7 @@ viewIndex = parameters.VIEW_INDEX;
 currentCatalogId = CatalogWorker.getCurrentCatalogId(request);
 
 // set the default view size
-defaultViewSize = request.getAttribute("defaultViewSize") ?: 
UtilProperties.getPropertyValue("widget", "widget.form.defaultViewSize", "20");
+defaultViewSize = request.getAttribute("defaultViewSize") ?: 
EntityUtilProperties.getPropertyValue("widget", "widget.form.defaultViewSize", 
"20", delegator);
 context.defaultViewSize = defaultViewSize;
 
 // set the limit view

Modified: 
ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindLookUp.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindLookUp.groovy?rev=1646214&r1=1646213&r2=1646214&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindLookUp.groovy
 (original)
+++ 
ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindLookUp.groovy
 Wed Dec 17 12:28:02 2014
@@ -19,12 +19,13 @@
 
 import org.ofbiz.base.util.*;
 import org.ofbiz.entity.condition.*;
+import org.ofbiz.entity.util.EntityUtilProperties;
 
 if (context.noConditionFind == null) {
     context.noConditionFind = parameters.noConditionFind;
 }
 if (context.noConditionFind == null) {
-    context.noConditionFind = UtilProperties.getPropertyValue("widget", 
"widget.defaultNoConditionFind");
+    context.noConditionFind = EntityUtilProperties.getPropertyValue("widget", 
"widget.defaultNoConditionFind", delegator);
 }
 if (context.filterByDate == null) {
     context.filterByDate = parameters.filterByDate;

Modified: 
ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java?rev=1646214&r1=1646213&r2=1646214&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java 
(original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java 
Wed Dec 17 12:28:02 2014
@@ -238,7 +238,7 @@ public class EmailServices {
             }
 
             session = Session.getInstance(props);
-            boolean debug = 
UtilProperties.propertyValueEqualsIgnoreCase("general.properties", 
"mail.debug.on", "Y");
+            boolean debug = 
EntityUtilProperties.propertyValueEqualsIgnoreCase("general.properties", 
"mail.debug.on", "Y", delegator);
             session.setDebug(debug);
 
             mail = new MimeMessage(session);

Modified: 
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java?rev=1646214&r1=1646213&r2=1646214&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java 
(original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java 
Wed Dec 17 12:28:02 2014
@@ -237,7 +237,7 @@ public class LoginWorker {
         // check if they have permission for this login attempt; if not log 
them out
         if (userLogin != null) {
             List<Object> errorMessageList = 
UtilGenerics.checkList(request.getAttribute("_ERROR_MESSAGE_LIST"));
-            if (!hasBasePermission(userLogin, request) || 
isFlaggedLoggedOut(userLogin)) {
+            if (!hasBasePermission(userLogin, request) || 
isFlaggedLoggedOut(userLogin, userLogin.getDelegator())) {
                 if (errorMessageList == null) {
                     errorMessageList = new LinkedList<Object>();
                     request.setAttribute("_ERROR_MESSAGE_LIST", 
errorMessageList);
@@ -1066,8 +1066,8 @@ public class LoginWorker {
         return "success";
     }
 
-    public static boolean isFlaggedLoggedOut(GenericValue userLogin) {
-        if 
("true".equalsIgnoreCase(UtilProperties.getPropertyValue("security.properties", 
"login.disable.global.logout"))) {
+    public static boolean isFlaggedLoggedOut(GenericValue userLogin, Delegator 
delegator) {
+        if 
("true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security.properties",
 "login.disable.global.logout", delegator))) {
             return false;
         }
         if (userLogin == null || userLogin.get("userLoginId") == null) {

Modified: 
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=1646214&r1=1646213&r2=1646214&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java 
(original)
+++ 
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java 
Wed Dec 17 12:28:02 2014
@@ -71,8 +71,6 @@ import org.python.modules.re;
 public class RequestHandler {
 
     public static final String module = RequestHandler.class.getName();
-    private static final boolean 
throwRequestHandlerExceptionOnMissingLocalRequest = 
UtilProperties.propertyValueEqualsIgnoreCase(
-            "requestHandler.properties", 
"throwRequestHandlerExceptionOnMissingLocalRequest", "Y");
     private final String defaultStatusCodeString = 
UtilProperties.getPropertyValue("requestHandler.properties", "status-code", 
"302");
     private final ViewFactory viewFactory;
     private final EventFactory eventFactory;
@@ -131,6 +129,8 @@ public class RequestHandler {
     public void doRequest(HttpServletRequest request, HttpServletResponse 
response, String chain,
             GenericValue userLogin, Delegator delegator) throws 
RequestHandlerException, RequestHandlerExceptionAllowExternalRequests {
 
+       final boolean throwRequestHandlerExceptionOnMissingLocalRequest = 
EntityUtilProperties.propertyValueEqualsIgnoreCase(
+                "requestHandler.properties", 
"throwRequestHandlerExceptionOnMissingLocalRequest", "Y", delegator);
         long startTime = System.currentTimeMillis();
         HttpSession session = request.getSession();
 
@@ -280,7 +280,7 @@ public class RequestHandler {
                         }
                     }
                     if (enableHttps == null) {
-                        enableHttps = 
UtilProperties.propertyValueEqualsIgnoreCase("url.properties", 
"port.https.enabled", "Y");
+                        enableHttps = 
EntityUtilProperties.propertyValueEqualsIgnoreCase("url.properties", 
"port.https.enabled", "Y", delegator);
                     }
 
                     if (Boolean.FALSE.equals(enableHttps)) {
@@ -1024,11 +1024,11 @@ public class RequestHandler {
     @Deprecated
     public static String getDefaultServerRootUrl(HttpServletRequest request, 
boolean secure) {
        Delegator delegator = (Delegator) request.getAttribute("delegator");
-        String httpsPort = UtilProperties.getPropertyValue("url.properties", 
"port.https", "443");
-        String httpsServer = UtilProperties.getPropertyValue("url.properties", 
"force.https.host");
-        String httpPort = UtilProperties.getPropertyValue("url.properties", 
"port.http", "80");
-        String httpServer = UtilProperties.getPropertyValue("url.properties", 
"force.http.host");
-        boolean useHttps = 
UtilProperties.propertyValueEqualsIgnoreCase("url.properties", 
"port.https.enabled", "Y");
+        String httpsPort = 
EntityUtilProperties.getPropertyValue("url.properties", "port.https", "443", 
delegator);
+        String httpsServer = 
EntityUtilProperties.getPropertyValue("url.properties", "force.https.host", 
delegator);
+        String httpPort = 
EntityUtilProperties.getPropertyValue("url.properties", "port.http", "80", 
delegator);
+        String httpServer = 
EntityUtilProperties.getPropertyValue("url.properties", "force.http.host", 
delegator);
+        boolean useHttps = 
EntityUtilProperties.propertyValueEqualsIgnoreCase("url.properties", 
"port.https.enabled", "Y", delegator);
 
         if (Start.getInstance().getConfig().portOffset != 0) {
             Integer httpPortValue = Integer.valueOf(httpPort);

Modified: 
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java?rev=1646214&r1=1646213&r2=1646214&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java 
(original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java 
Wed Dec 17 12:28:02 2014
@@ -37,6 +37,7 @@ import org.ofbiz.entity.GenericEntityExc
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.model.ModelEntity;
 import org.ofbiz.entity.util.EntityQuery;
+import org.ofbiz.entity.util.EntityUtilProperties;
 
 import com.ibm.icu.util.Calendar;
 
@@ -213,7 +214,7 @@ public class ServerHitBin {
             // put the copy at the first of the list, then put this object 
back on
             if (bin.getNumberHits() > 0) {
                 // persist each bin when time ends if option turned on
-                if 
(UtilProperties.propertyValueEqualsIgnoreCase("serverstats", "stats.persist." + 
ServerHitBin.typeIds[type] + ".bin", "true")) {
+                if 
(EntityUtilProperties.propertyValueEqualsIgnoreCase("serverstats", 
"stats.persist." + ServerHitBin.typeIds[type] + ".bin", "true", delegator)) {
                     GenericValue serverHitBin = 
delegator.makeValue("ServerHitBin");
                     serverHitBin.set("contentId", bin.id);
                     serverHitBin.set("hitTypeId", 
ServerHitBin.typeIds[bin.type]);
@@ -465,7 +466,8 @@ public class ServerHitBin {
 
     private void saveHit(HttpServletRequest request, long startTime, long 
runningTime, GenericValue userLogin) throws GenericEntityException {
         // persist record of hit in ServerHit entity if option turned on
-        if (UtilProperties.propertyValueEqualsIgnoreCase("serverstats", 
"stats.persist." + ServerHitBin.typeIds[type] + ".hit", "true")) {
+       Delegator delegator = (Delegator) request.getAttribute("delegator");
+        if (EntityUtilProperties.propertyValueEqualsIgnoreCase("serverstats", 
"stats.persist." + ServerHitBin.typeIds[type] + ".hit", "true", delegator)) {
             // if the hit type is ENTITY and the name contains "ServerHit" 
don't
             // persist; avoids the infinite loop and a bunch of annoying data
             if (this.type == ENTITY && this.id.indexOf("ServerHit") > 0) {

Modified: 
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java?rev=1646214&r1=1646213&r2=1646214&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java 
(original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java 
Wed Dec 17 12:28:02 2014
@@ -36,6 +36,7 @@ import org.ofbiz.entity.GenericEntityExc
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.model.ModelEntity;
 import org.ofbiz.entity.util.EntityQuery;
+import org.ofbiz.entity.util.EntityUtilProperties;
 
 /**
  * Handles saving and maintaining visit information
@@ -204,7 +205,8 @@ public class VisitHandler {
 
     public static GenericValue getVisitor(HttpServletRequest request, 
HttpServletResponse response) {
         // this defaults to true: ie if anything but "false" it will be true
-        if (!UtilProperties.propertyValueEqualsIgnoreCase("serverstats", 
"stats.persist.visitor", "false")) {
+       Delegator delegator = (Delegator) request.getAttribute("delegator");
+        if (!EntityUtilProperties.propertyValueEqualsIgnoreCase("serverstats", 
"stats.persist.visitor", "false", delegator)) {
             HttpSession session = request.getSession();
 
             GenericValue visitor = (GenericValue) 
session.getAttribute("visitor");
@@ -212,7 +214,6 @@ public class VisitHandler {
                 synchronized (session) {
                     visitor = (GenericValue) session.getAttribute("visitor");
                     if (visitor == null) {
-                        Delegator delegator = (Delegator) 
request.getAttribute("delegator");
 
                         String delegatorName = (String) 
session.getAttribute("delegatorName");
                         if (delegator == null && 
UtilValidate.isNotEmpty(delegatorName)) {

Modified: 
ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy?rev=1646214&r1=1646213&r2=1646214&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy
 (original)
+++ 
ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy
 Wed Dec 17 12:28:02 2014
@@ -28,6 +28,7 @@ import org.ofbiz.service.ModelPermission
 import org.ofbiz.service.ServiceContainer;
 import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.entity.util.EntityUtilProperties;
 
 List getEcaListForService(String selectedService) {
     ecaMap = 
org.ofbiz.service.eca.ServiceEcaUtil.getServiceEventMap(selectedService);
@@ -476,7 +477,7 @@ if (selectedService) {
 
     if (showWsdl?.equals("true")) {
         try {
-            wsdl = 
curServiceModel.toWSDL("http://${request.getServerName()}:${UtilProperties.getPropertyValue("url.properties",
 "port.http", "80")}${parameters._CONTROL_PATH_}/SOAPService");
+            wsdl = 
curServiceModel.toWSDL("http://${request.getServerName()}:${EntityUtilProperties.getPropertyValue("url.properties",
 "port.http", "80", delegator)}${parameters._CONTROL_PATH_}/SOAPService");
             curServiceMap.wsdl = UtilXml.writeXmlDocument(wsdl);
         } catch (WSDLException ex) {
             curServiceMap.wsdl = ex.getLocalizedMessage();

Modified: 
ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/autoUpdateConfig.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/autoUpdateConfig.groovy?rev=1646214&r1=1646213&r2=1646214&view=diff
==============================================================================
--- 
ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/autoUpdateConfig.groovy
 (original)
+++ 
ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/autoUpdateConfig.groovy
 Wed Dec 17 12:28:02 2014
@@ -17,30 +17,30 @@
  * under the License.
  */
 import javolution.util.FastList
-import org.ofbiz.base.util.UtilProperties
+import org.ofbiz.entity.util.EntityUtilProperties
 
 configList = []
-str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStoreId")
+str = 
EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStoreId", delegator)
 productStoreIds = str.split(",")
-str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.option.outOfStock")
+str = 
EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.option.outOfStock", delegator)
 outOfStock = str.split(",")
-str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.option.backInStock")
+str = 
EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.option.backInStock", delegator)
 backInStock = str.split(",")
-str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.webSiteUrl")
+str = 
EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.webSiteUrl", delegator)
 webSiteUrl = str.split(",")
-str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.actionType")
+str = 
EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.actionType", delegator)
 actionType = str.split(",")
-str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.statusId")
+str = 
EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.statusId", delegator)
 statusId = str.split(",")
-str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.testMode")
+str = 
EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.testMode", delegator)
 testMode = str.split(",")
-str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.webSiteMountPoint")
+str = 
EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.webSiteMountPoint", delegator)
 webSiteMountPoint = str.split(",")
-str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.countryCode")
+str = 
EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.countryCode", delegator)
 countryCode = str.split(",")
-str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.trackingCodeId")
+str = 
EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.trackingCodeId", delegator)
 trackingCodeId = str.split(",")
-str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.allowRecommended")
+str = 
EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", 
"autoUpdateGoogleBase.productStore.allowRecommended", delegator)
 allowRecommended = str.split(",")
 
 productStoreIds.eachWithIndex{ productStoreId, i ->

Modified: 
ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/LdapLoginWorker.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/LdapLoginWorker.java?rev=1646214&r1=1646213&r2=1646214&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/LdapLoginWorker.java 
(original)
+++ ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/LdapLoginWorker.java Wed 
Dec 17 12:28:02 2014
@@ -94,7 +94,7 @@ public class LdapLoginWorker extends Log
                 }
             }
 
-            if (!hasBasePermission(userLogin, request) || 
isFlaggedLoggedOut(userLogin) || hasLdapLoggedOut) {
+            if (!hasBasePermission(userLogin, request) || 
isFlaggedLoggedOut(userLogin, userLogin.getDelegator()) || hasLdapLoggedOut) {
                 Debug.logInfo("User does not have permission or is flagged as 
logged out", module);
                 doBasicLogout(userLogin, request, response);
                 userLogin = null;

Modified: 
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java?rev=1646214&r1=1646213&r2=1646214&view=diff
==============================================================================
--- 
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
 (original)
+++ 
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
 Wed Dec 17 12:28:02 2014
@@ -59,7 +59,7 @@ public class OagisInventoryServices {
     public static final String resource = "OagisUiLabels";
     public static final Double doubleZero = new Double(0.0);
     public static final Double doubleOne = new Double(1.0);
-    public static final String syncInventoryFacilityId = 
UtilProperties.getPropertyValue("oagis.properties", 
"Oagis.Warehouse.SyncInventoryFacilityId");
+    
 
     public static Map<String, Object> 
oagisReceiveSyncInventory(DispatchContext ctx, Map<String, Object> context) {
         Document doc = (Document) context.get("document");
@@ -69,7 +69,7 @@ public class OagisInventoryServices {
         Locale locale = (Locale) context.get("locale");
         List<Map<String, String>> errorMapList = FastList.newInstance();
         List<Map<String, Object>> inventoryMapList = FastList.newInstance();
-
+        final String syncInventoryFacilityId = 
EntityUtilProperties.getPropertyValue("oagis.properties", 
"Oagis.Warehouse.SyncInventoryFacilityId", delegator);
         GenericValue userLogin = null;
         try {
             userLogin = 
EntityQuery.use(delegator).from("UserLogin").where("userLoginId", 
"system").queryOne();

Modified: 
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java?rev=1646214&r1=1646213&r2=1646214&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java 
(original)
+++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java Wed 
Dec 17 12:28:02 2014
@@ -82,10 +82,6 @@ public class OagisServices {
 
     public static final String resource = "OagisUiLabels";
 
-    public static final String certAlias = 
UtilProperties.getPropertyValue("oagis.properties", 
"auth.client.certificate.alias");
-    public static final String basicAuthUsername = 
UtilProperties.getPropertyValue("oagis.properties", "auth.basic.username");
-    public static final String basicAuthPassword = 
UtilProperties.getPropertyValue("oagis.properties", "auth.basic.password");
-
     public static final boolean debugSaveXmlOut = 
"true".equals(UtilProperties.getPropertyValue("oagis.properties", 
"Oagis.Debug.Save.Xml.Out"));
     public static final boolean debugSaveXmlIn = 
"true".equals(UtilProperties.getPropertyValue("oagis.properties", 
"Oagis.Debug.Save.Xml.In"));
 
@@ -108,7 +104,7 @@ public class OagisServices {
         Locale locale = (Locale) context.get("locale");
         String errorReferenceId = (String) context.get("referenceId");
         List<Map<String, String>> errorMapList = 
UtilGenerics.checkList(context.get("errorMapList"));
-
+        
         String sendToUrl = (String) context.get("sendToUrl");
         if (UtilValidate.isEmpty(sendToUrl)) {
             sendToUrl = 
EntityUtilProperties.getPropertyValue("oagis.properties", 
"url.send.confirmBod", delegator);
@@ -219,7 +215,7 @@ public class OagisServices {
             Debug.logError(e, errMsg, module);
         }
 
-        Map<String, Object> sendMessageReturn = 
OagisServices.sendMessageText(outText, out, sendToUrl, saveToDirectory, 
saveToFilename, locale);
+        Map<String, Object> sendMessageReturn = 
OagisServices.sendMessageText(outText, out, sendToUrl, saveToDirectory, 
saveToFilename, locale, delegator);
         if (sendMessageReturn != null) {
             return sendMessageReturn;
         }
@@ -679,8 +675,11 @@ public class OagisServices {
         return result;
     }
 
-    public static Map<String, Object> sendMessageText(String outText, 
OutputStream out, String sendToUrl, String saveToDirectory, String 
saveToFilename, Locale locale) {
-        if (out != null) {
+    public static Map<String, Object> sendMessageText(String outText, 
OutputStream out, String sendToUrl, String saveToDirectory, String 
saveToFilename, Locale locale, Delegator delegator) {
+        final String certAlias = 
EntityUtilProperties.getPropertyValue("oagis.properties", 
"auth.client.certificate.alias", delegator);
+        final String basicAuthUsername = 
EntityUtilProperties.getPropertyValue("oagis.properties", 
"auth.basic.username", delegator);
+        final String basicAuthPassword = 
EntityUtilProperties.getPropertyValue("oagis.properties", 
"auth.basic.password", delegator);
+       if (out != null) {
             Writer outWriter = new OutputStreamWriter(out);
             try {
                 outWriter.write(outText);

Modified: 
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java?rev=1646214&r1=1646213&r2=1646214&view=diff
==============================================================================
--- 
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java 
(original)
+++ 
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java 
Wed Dec 17 12:28:02 2014
@@ -80,10 +80,6 @@ public class OagisShipmentServices {
 
     public static final String resource = "OagisUiLabels";
 
-    public static final String certAlias = 
UtilProperties.getPropertyValue("oagis.properties", 
"auth.client.certificate.alias");
-    public static final String basicAuthUsername = 
UtilProperties.getPropertyValue("oagis.properties", "auth.basic.username");
-    public static final String basicAuthPassword = 
UtilProperties.getPropertyValue("oagis.properties", "auth.basic.password");
-
     public static final String oagisMainNamespacePrefix = "n";
     public static final String oagisSegmentsNamespacePrefix = "os";
     public static final String oagisFieldsNamespacePrefix = "of";
@@ -906,7 +902,7 @@ public class OagisShipmentServices {
                 Debug.logError(e, errMsg, module);
             }
 
-            Map<String, Object> sendMessageReturn = 
OagisServices.sendMessageText(outText, out, sendToUrl, saveToDirectory, 
saveToFilename, locale);
+            Map<String, Object> sendMessageReturn = 
OagisServices.sendMessageText(outText, out, sendToUrl, saveToDirectory, 
saveToFilename, locale, delegator);
             if (sendMessageReturn != null && 
ServiceUtil.isError(sendMessageReturn)) {
                 try {
                     Map<String, Object> uomiCtx = FastMap.newInstance();
@@ -1149,7 +1145,7 @@ public class OagisShipmentServices {
                 Debug.logError(e, errMsg, module);
             }
 
-            Map<String, Object> sendMessageReturn = 
OagisServices.sendMessageText(outText, out, sendToUrl, saveToDirectory, 
saveToFilename, locale);
+            Map<String, Object> sendMessageReturn = 
OagisServices.sendMessageText(outText, out, sendToUrl, saveToDirectory, 
saveToFilename, locale, delegator);
             if (sendMessageReturn != null && 
ServiceUtil.isError(sendMessageReturn)) {
                 try {
                     Map<String, Object> uomiCtx = FastMap.newInstance();


Reply via email to