svn commit: r1644015 [3/4] - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/invoice/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/ applications/...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1644015 [3/4] - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/invoice/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/ applications/...

ashish-18
Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java Tue Dec  9 10:09:22 2014
@@ -53,6 +53,7 @@ import org.ofbiz.entity.condition.Entity
 import org.ofbiz.entity.model.ModelEntity;
 import org.ofbiz.entity.util.EntityListIterator;
 import org.ofbiz.entity.util.EntityQuery;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.security.Security;
 import org.ofbiz.service.DispatchContext;
 import org.ofbiz.service.GenericServiceException;
@@ -1049,8 +1050,8 @@ public class WorkEffortServices {
                 }
             } else {
                 // TODO: Remove this block after the next release 2010-11-29
-                String screenLocation = UtilProperties.getPropertyValue("EventReminders", "eventReminders.emailScreenWidgetLocation");
-                String fromAddress = UtilProperties.getPropertyValue("EventReminders", "eventReminders.emailFromAddress");
+                String screenLocation = EntityUtilProperties.getPropertyValue("EventReminders", "eventReminders.emailScreenWidgetLocation", delegator);
+                String fromAddress = EntityUtilProperties.getPropertyValue("EventReminders", "eventReminders.emailFromAddress", delegator);
                 String subject = UtilProperties.getMessage("WorkEffortUiLabels", "WorkEffortEventReminder", (Locale) parameters.get("locale"));
                 Map<String, Object> emailCtx = UtilMisc.toMap("sendFrom", fromAddress, "sendTo", toAddress, "subject", subject, "bodyParameters", parameters, "bodyScreenUri", screenLocation);
                 try {
@@ -1069,10 +1070,11 @@ public class WorkEffortServices {
     @Deprecated
     protected static void processEventReminder(DispatchContext ctx, GenericValue reminder, Map<String, Object> parameters) throws GenericEntityException {
         LocalDispatcher dispatcher = ctx.getDispatcher();
+        Delegator delegator = ctx.getDelegator();
         GenericValue contactMech = reminder.getRelatedOne("ContactMech", false);
         if (contactMech != null && "EMAIL_ADDRESS".equals(contactMech.get("contactMechTypeId"))) {
-            String screenLocation = UtilProperties.getPropertyValue("EventReminders", "eventReminders.emailScreenWidgetLocation");
-            String fromAddress = UtilProperties.getPropertyValue("EventReminders", "eventReminders.emailFromAddress");
+            String screenLocation = EntityUtilProperties.getPropertyValue("EventReminders", "eventReminders.emailScreenWidgetLocation", delegator);
+            String fromAddress = EntityUtilProperties.getPropertyValue("EventReminders", "eventReminders.emailFromAddress", delegator);
             String toAddress = contactMech.getString("infoString");
             String subject = UtilProperties.getMessage("WorkEffortUiLabels", "WorkEffortEventReminder", (Locale) parameters.get("locale"));
             Map<String, Object> emailCtx = UtilMisc.toMap("sendFrom", fromAddress, "sendTo", toAddress, "subject", subject, "bodyParameters", parameters, "bodyScreenUri", screenLocation);

Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java (original)
+++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java Tue Dec  9 10:09:22 2014
@@ -33,6 +33,8 @@ import org.apache.tomcat.util.http.Serve
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.entity.Delegator;
+import org.ofbiz.entity.util.EntityUtilProperties;
 
 public class CrossSubdomainSessionValve extends ValveBase {
 
@@ -63,9 +65,10 @@ public class CrossSubdomainSessionValve
 
     protected void replaceCookie(Request request, Response response, Cookie cookie) {
 
+     Delegator delegator = (Delegator) request.getAttribute("delegator");
         // copy the existing session cookie, but use a different domain (only if domain is valid)
         String cookieDomain = null;
-        cookieDomain = UtilProperties.getPropertyValue("url", "cookie.domain", "");
+        cookieDomain = EntityUtilProperties.getPropertyValue("url", "cookie.domain", "", delegator);
 
         if (UtilValidate.isEmpty(cookieDomain)) {
             String serverName = request.getServerName();

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonEvents.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonEvents.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonEvents.java Tue Dec  9 10:09:22 2014
@@ -57,6 +57,7 @@ import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.util.EntityQuery;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.security.Security;
 
 /**
@@ -392,8 +393,9 @@ public class CommonEvents {
 
     public static String getCaptcha(HttpServletRequest request, HttpServletResponse response) {
         try {
+         Delegator delegator = (Delegator) request.getAttribute("delegator");
             final String captchaSizeConfigName = StringUtils.defaultIfEmpty(request.getParameter("captchaSize"), "default");
-            final String captchaSizeConfig = UtilProperties.getPropertyValue("captcha.properties", "captcha." + captchaSizeConfigName);
+            final String captchaSizeConfig = EntityUtilProperties.getPropertyValue("captcha.properties", "captcha." + captchaSizeConfigName, delegator);
             final String[] captchaSizeConfigs = captchaSizeConfig.split("\\|");
             final String captchaCodeId = StringUtils.defaultIfEmpty(request.getParameter("captchaCodeId"), ""); // this is used to uniquely identify in the user session the attribute where the captcha code for the last captcha for the form is stored
 
@@ -401,7 +403,7 @@ public class CommonEvents {
             final int height = Integer.parseInt(captchaSizeConfigs[1]);
             final int width = Integer.parseInt(captchaSizeConfigs[2]);
             final int charsToPrint = UtilProperties.getPropertyAsInteger("captcha.properties", "captcha.code_length", 6);
-            final char[] availableChars = UtilProperties.getPropertyValue("captcha.properties", "captcha.characters").toCharArray();
+            final char[] availableChars = EntityUtilProperties.getPropertyValue("captcha.properties", "captcha.characters", delegator).toCharArray();
 
             //It is possible to pass the font size, image width and height with the request as well
             Color backgroundColor = Color.gray;

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java Tue Dec  9 10:09:22 2014
@@ -57,7 +57,7 @@ public class CommonWorkers {
         }
 
         List<EntityExpr> exprs = UtilMisc.toList(EntityCondition.makeCondition("geoTypeId", EntityOperator.EQUALS, "COUNTRY"));
-        List<String> countriesAvailable = StringUtil.split(UtilProperties.getPropertyValue("general.properties", "countries.geo.id.available"), ",");
+        List<String> countriesAvailable = StringUtil.split(EntityUtilProperties.getPropertyValue("general.properties", "countries.geo.id.available", delegator), ",");
         if (UtilValidate.isNotEmpty(countriesAvailable)) {
             // only available countries (we don't verify the list of geoId in countries.geo.id.available)
             exprs.add(EntityCondition.makeCondition("geoId", EntityOperator.IN, countriesAvailable));

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java Tue Dec  9 10:09:22 2014
@@ -54,6 +54,7 @@ import org.ofbiz.entity.model.ModelField
 import org.ofbiz.entity.util.EntityFindOptions;
 import org.ofbiz.entity.util.EntityListIterator;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.service.DispatchContext;
 import org.ofbiz.service.GenericServiceException;
 import org.ofbiz.service.LocalDispatcher;
@@ -462,13 +463,14 @@ public class FindServices {
         List<String> fieldList =  UtilGenerics.<String>checkList(context.get("fieldList"));
         GenericValue userLogin = (GenericValue) context.get("userLogin");
         Locale locale = (Locale) context.get("locale");
+        Delegator delegator = dctx.getDelegator();
         if (UtilValidate.isEmpty(noConditionFind)) {
             // try finding in inputFields Map
             noConditionFind = (String) inputFields.get("noConditionFind");
         }
         if (UtilValidate.isEmpty(noConditionFind)) {
             // Use configured default
-            noConditionFind = UtilProperties.getPropertyValue("widget", "widget.defaultNoConditionFind");
+            noConditionFind = EntityUtilProperties.getPropertyValue("widget", "widget.defaultNoConditionFind", delegator);
         }
         String filterByDate = (String) context.get("filterByDate");
         if (UtilValidate.isEmpty(filterByDate)) {
@@ -529,6 +531,7 @@ public class FindServices {
      */
     public static Map<String, Object> prepareFind(DispatchContext dctx, Map<String, ?> context) {
         String entityName = (String) context.get("entityName");
+        Delegator delegator = dctx.getDelegator();
         String orderBy = (String) context.get("orderBy");
         Map<String, ?> inputFields = checkMap(context.get("inputFields"), String.class, Object.class); // Input
         String noConditionFind = (String) context.get("noConditionFind");
@@ -538,7 +541,7 @@ public class FindServices {
         }
         if (UtilValidate.isEmpty(noConditionFind)) {
             // Use configured default
-            noConditionFind = UtilProperties.getPropertyValue("widget", "widget.defaultNoConditionFind");
+            noConditionFind = EntityUtilProperties.getPropertyValue("widget", "widget.defaultNoConditionFind", delegator);
         }
         String filterByDate = (String) context.get("filterByDate");
         if (UtilValidate.isEmpty(filterByDate)) {
@@ -548,7 +551,6 @@ public class FindServices {
         Timestamp filterByDateValue = (Timestamp) context.get("filterByDateValue");
 
         Map<String, Object> queryStringMap = new LinkedHashMap<String, Object>();
-        Delegator delegator = dctx.getDelegator();
         ModelEntity modelEntity = delegator.getModelEntity(entityName);
         List<EntityCondition> tmpList = createConditionList(inputFields, modelEntity.getFieldsUnmodifiable(), queryStringMap, delegator, context);
 

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=1644015&r1=1644014&r2=1644015&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 Tue Dec  9 10:09:22 2014
@@ -135,7 +135,7 @@ public class EmailServices {
         String sendBcc = (String) context.get("sendBcc");
 
         // check to see if we should redirect all mail for testing
-        String redirectAddress = UtilProperties.getPropertyValue("general.properties", "mail.notifications.redirectTo");
+        String redirectAddress = EntityUtilProperties.getPropertyValue("general.properties", "mail.notifications.redirectTo", delegator);
         if (UtilValidate.isNotEmpty(redirectAddress)) {
             String originalRecipients = " [To: " + sendTo + ", Cc: " + sendCc + ", Bcc: " + sendBcc + "]";
             subject += originalRecipients;

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LdapAuthenticationServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LdapAuthenticationServices.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LdapAuthenticationServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LdapAuthenticationServices.java Tue Dec  9 10:09:22 2014
@@ -37,6 +37,7 @@ import org.ofbiz.entity.GenericEntityExc
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.transaction.GenericTransactionException;
 import org.ofbiz.entity.transaction.TransactionUtil;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.service.DispatchContext;
 
 /** LDAP Authentication Services.
@@ -93,7 +94,7 @@ public class LdapAuthenticationServices
         }
         // Synchronize user's OFBiz password with user's LDAP password
         if (userLogin != null) {
-            boolean useEncryption = "true".equals(UtilProperties.getPropertyValue("security.properties", "password.encrypt"));
+            boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.encrypt", delegator));
             String currentPassword = userLogin.getString("currentPassword");
             boolean samePassword;
             if (useEncryption) {

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java Tue Dec  9 10:09:22 2014
@@ -50,6 +50,7 @@ import org.ofbiz.entity.transaction.Tran
 import org.ofbiz.entity.util.EntityFindOptions;
 import org.ofbiz.entity.util.EntityListIterator;
 import org.ofbiz.entity.util.EntityQuery;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.security.Security;
 import org.ofbiz.service.DispatchContext;
 import org.ofbiz.service.LocalDispatcher;
@@ -71,6 +72,7 @@ public class LoginServices {
     public static Map<String, Object> userLogin(DispatchContext ctx, Map<String, ?> context) {
         LocalDispatcher dispatcher = ctx.getDispatcher();
         Locale locale = (Locale) context.get("locale");
+        Delegator delegator = ctx.getDelegator();
 
         // load the external auth modules -- note: this will only run once and cache the objects
         if (!AuthHelper.authenticatorsLoaded()) {
@@ -79,10 +81,10 @@ public class LoginServices {
 
         // Authenticate to LDAP if configured to do so
         // TODO: this should be moved to using the NEW Authenticator API
-        if ("true".equals(UtilProperties.getPropertyValue("security", "security.ldap.enable"))) {
+        if ("true".equals(EntityUtilProperties.getPropertyValue("security", "security.ldap.enable", delegator))) {
             if (!LdapAuthenticationServices.userLogin(ctx, context)) {
                 String errMsg = UtilProperties.getMessage(resource, "loginservices.ldap_authentication_failed", locale);
-                if ("true".equals(UtilProperties.getPropertyValue("security", "security.ldap.fail.login"))) {
+                if ("true".equals(EntityUtilProperties.getPropertyValue("security", "security.ldap.fail.login", delegator))) {
                     return ServiceUtil.returnError(errMsg);
                 } else {
                     Debug.logInfo(errMsg, module);
@@ -91,8 +93,7 @@ public class LoginServices {
         }
 
         Map<String, Object> result =  new LinkedHashMap<String, Object>();
-        Delegator delegator = ctx.getDelegator();
-        boolean useEncryption = "true".equals(UtilProperties.getPropertyValue("security.properties", "password.encrypt"));
+        boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.encrypt", delegator));
 
         // if isServiceAuth is not specified, default to not a service auth
         boolean isServiceAuth = context.get("isServiceAuth") != null && ((Boolean) context.get("isServiceAuth")).booleanValue();
@@ -112,10 +113,10 @@ public class LoginServices {
             errMsg = UtilProperties.getMessage(resource,"loginservices.password_missing", locale);
         } else {
 
-            if ("true".equalsIgnoreCase(UtilProperties.getPropertyValue("security.properties", "username.lowercase"))) {
+            if ("true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security.properties", "username.lowercase", delegator))) {
                 username = username.toLowerCase();
             }
-            if ("true".equalsIgnoreCase(UtilProperties.getPropertyValue("security.properties", "password.lowercase"))) {
+            if ("true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security.properties", "password.lowercase", delegator))) {
                 password = password.toLowerCase();
             }
 
@@ -155,7 +156,7 @@ public class LoginServices {
                 }
 
                 if (userLogin != null) {
-                    String ldmStr = UtilProperties.getPropertyValue("security.properties", "login.disable.minutes");
+                    String ldmStr = EntityUtilProperties.getPropertyValue("security.properties", "login.disable.minutes", delegator);
                     long loginDisableMinutes = 30;
 
                     try {
@@ -265,7 +266,7 @@ public class LoginServices {
                             userLogin.set("successiveFailedLogins", currentFailedLogins);
 
                             // if failed logins over amount in properties file, disable account
-                            String mflStr = UtilProperties.getPropertyValue("security.properties", "max.failed.logins");
+                            String mflStr = EntityUtilProperties.getPropertyValue("security.properties", "max.failed.logins", delegator);
                             long maxFailedLogins = 3;
                             try {
                                 maxFailedLogins = Long.parseLong(mflStr);
@@ -302,11 +303,11 @@ public class LoginServices {
                                     userLogin.store();
                                 }
 
-                                if ("true".equals(UtilProperties.getPropertyValue("security.properties", "store.login.history"))) {
+                                if ("true".equals(EntityUtilProperties.getPropertyValue("security.properties", "store.login.history", delegator))) {
                                     boolean createHistory = true;
 
                                     // only save info on service auth if option set to true to do so
-                                    if (isServiceAuth && !"true".equals(UtilProperties.getPropertyValue("security.properties", "store.login.history.on.service.auth"))) {
+                                    if (isServiceAuth && !"true".equals(EntityUtilProperties.getPropertyValue("security.properties", "store.login.history.on.service.auth", delegator))) {
                                         createHistory = false;
                                     }
 
@@ -320,7 +321,7 @@ public class LoginServices {
                                         }
 
                                         // ONLY save the password if it was incorrect
-                                        if ("N".equals(successfulLogin) && !"false".equals(UtilProperties.getPropertyValue("security.properties", "store.login.history.incorrect.password"))) {
+                                        if ("N".equals(successfulLogin) && !"false".equals(EntityUtilProperties.getPropertyValue("security.properties", "store.login.history.incorrect.password", delegator))) {
                                             ulhCreateMap.put("passwordUsed", password);
                                         }
 
@@ -425,7 +426,7 @@ public class LoginServices {
     public static void createUserLoginPasswordHistory(Delegator delegator,String userLoginId, String currentPassword) throws GenericEntityException{
         int passwordChangeHistoryLimit = 0;
         try {
-            passwordChangeHistoryLimit = Integer.parseInt(UtilProperties.getPropertyValue("security.properties", "password.change.history.limit", "0"));
+            passwordChangeHistoryLimit = Integer.parseInt(EntityUtilProperties.getPropertyValue("security.properties", "password.change.history.limit", "0", delegator));
         } catch (NumberFormatException nfe) {
             //No valid value is found so don't bother to save any password history
             passwordChangeHistoryLimit = 0;
@@ -457,7 +458,7 @@ public class LoginServices {
 
         // save this password in history
         GenericValue userLoginPwdHistToCreate = delegator.makeValue("UserLoginPasswordHistory", UtilMisc.toMap("userLoginId", userLoginId,"fromDate", nowTimestamp));
-        boolean useEncryption = "true".equals(UtilProperties.getPropertyValue("security.properties", "password.encrypt"));
+        boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.encrypt", delegator));
         userLoginPwdHistToCreate.set("currentPassword", useEncryption ? HashCrypt.cryptUTF8(getHashType(), null, currentPassword) : currentPassword);
         userLoginPwdHistToCreate.create();
     }
@@ -475,7 +476,7 @@ public class LoginServices {
         List<String> errorMessageList = new LinkedList<String>();
         Locale locale = (Locale) context.get("locale");
 
-        boolean useEncryption = "true".equals(UtilProperties.getPropertyValue("security.properties", "password.encrypt"));
+        boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.encrypt", delegator));
 
         String userLoginId = (String) context.get("userLoginId");
         String partyId = (String) context.get("partyId");
@@ -579,7 +580,7 @@ public class LoginServices {
             AuthHelper.loadAuthenticators(ctx.getDispatcher());
         }
 
-        boolean useEncryption = "true".equals(UtilProperties.getPropertyValue("security.properties", "password.encrypt"));
+        boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.encrypt", delegator));
         boolean adminUser = false;
 
         String userLoginId = (String) context.get("userLoginId");
@@ -646,7 +647,7 @@ public class LoginServices {
             }
         }
 
-        if ("true".equals(UtilProperties.getPropertyValue("security.properties", "password.lowercase"))) {
+        if ("true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.lowercase", delegator))) {
             currentPassword = currentPassword.toLowerCase();
             newPassword = newPassword.toLowerCase();
             newPasswordVerify = newPasswordVerify.toLowerCase();
@@ -711,7 +712,7 @@ public class LoginServices {
         String userLoginId = (String) context.get("userLoginId");
         String errMsg = null;
 
-        if ((userLoginId != null) && ("true".equals(UtilProperties.getPropertyValue("security.properties", "username.lowercase")))) {
+        if ((userLoginId != null) && ("true".equals(EntityUtilProperties.getPropertyValue("security.properties", "username.lowercase", delegator)))) {
             userLoginId = userLoginId.toLowerCase();
         }
 
@@ -886,7 +887,8 @@ public class LoginServices {
     }
 
     public static void checkNewPassword(GenericValue userLogin, String currentPassword, String newPassword, String newPasswordVerify, String passwordHint, List<String> errorMessageList, boolean ignoreCurrentPassword, Locale locale) {
-        boolean useEncryption = "true".equals(UtilProperties.getPropertyValue("security.properties", "password.encrypt"));
+        Delegator delegator = userLogin.getDelegator();
+     boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.encrypt", delegator));
 
         String errMsg = null;
 
@@ -915,7 +917,7 @@ public class LoginServices {
 
         int passwordChangeHistoryLimit = 0;
         try {
-            passwordChangeHistoryLimit = Integer.parseInt(UtilProperties.getPropertyValue("security.properties", "password.change.history.limit", "0"));
+            passwordChangeHistoryLimit = Integer.parseInt(EntityUtilProperties.getPropertyValue("security.properties", "password.change.history.limit", "0", delegator));
         } catch (NumberFormatException nfe) {
             //No valid value is found so don't bother to save any password history
             passwordChangeHistoryLimit = 0;
@@ -923,7 +925,6 @@ public class LoginServices {
         Debug.logInfo(" password.change.history.limit is set to " + passwordChangeHistoryLimit, module);
         if (passwordChangeHistoryLimit > 0 && userLogin != null) {
             Debug.logInfo(" checkNewPassword Checking if user is tyring to use old password " + passwordChangeHistoryLimit, module);
-            Delegator delegator = userLogin.getDelegator();
             try {
                 List<GenericValue> pwdHistList = delegator.findByAnd("UserLoginPasswordHistory", UtilMisc.toMap("userLoginId",userLogin.getString("userLoginId")), UtilMisc.toList("-fromDate"), false);
                 for (GenericValue pwdHistValue : pwdHistList) {
@@ -945,14 +946,14 @@ public class LoginServices {
         int minPasswordLength = 0;
 
         try {
-            minPasswordLength = Integer.parseInt(UtilProperties.getPropertyValue("security.properties", "password.length.min", "0"));
+            minPasswordLength = Integer.parseInt(EntityUtilProperties.getPropertyValue("security.properties", "password.length.min", "0", delegator));
         } catch (NumberFormatException nfe) {
             minPasswordLength = 0;
         }
 
         if (newPassword != null) {
             // Matching password with pattern
-            String passwordPattern = UtilProperties.getPropertyValue("security.properties", "security.login.password.pattern", "^.*(?=.{5,}).*$");
+            String passwordPattern = EntityUtilProperties.getPropertyValue("security.properties", "security.login.password.pattern", "^.*(?=.{5,}).*$", delegator);
             boolean usePasswordPattern = UtilProperties.getPropertyAsBoolean("security.properties", "security.login.password.pattern.enable", true);
             if (usePasswordPattern) {
                 Pattern pattern = Pattern.compile(passwordPattern);
@@ -961,8 +962,8 @@ public class LoginServices {
                 if (!matched) {
                     // This is a mix to handle the OOTB pattern which is only a fixed length
                     Map<String, String> messageMap = UtilMisc.toMap("minPasswordLength", Integer.toString(minPasswordLength));
-                    String passwordPatternMessage = UtilProperties.getPropertyValue("security.properties",
-                            "security.login.password.pattern.description", "loginservices.password_must_be_least_characters_long");
+                    String passwordPatternMessage = EntityUtilProperties.getPropertyValue("security.properties",
+                            "security.login.password.pattern.description", "loginservices.password_must_be_least_characters_long", delegator);
                     errMsg = UtilProperties.getMessage(resource, passwordPatternMessage, messageMap, locale);
                     messageMap = UtilMisc.toMap("passwordPatternMessage", errMsg);
                     errMsg = UtilProperties.getMessage(resource,"loginservices.password.pattern.errmsg", messageMap, locale);

Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy (original)
+++ ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy Tue Dec  9 10:09:22 2014
@@ -19,7 +19,6 @@
 
 import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.Debug;
-import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.entity.util.EntityFindOptions;
 import org.ofbiz.entity.condition.EntityCondition;
 import org.ofbiz.entity.condition.EntityConditionList;
@@ -27,6 +26,7 @@ import org.ofbiz.entity.condition.Entity
 import org.ofbiz.entity.condition.EntityFieldValue;
 import org.ofbiz.entity.condition.EntityFunction;
 import org.ofbiz.entity.condition.EntityOperator;
+import org.ofbiz.entity.util.EntityUtilProperties;
 
 def mainAndConds = [];
 def orExprs = [];
@@ -107,7 +107,7 @@ if (orExprs && entityName && displayFiel
 
     String viewSizeStr = context.autocompleterViewSize;
     if (viewSizeStr == null) {
-        viewSizeStr = UtilProperties.getPropertyValue("widget", "widget.autocompleter.defaultViewSize");
+        viewSizeStr = EntityUtilProperties.getPropertyValue("widget", "widget.autocompleter.defaultViewSize", delegator);
     }
     Integer autocompleterViewSize = Integer.valueOf(viewSizeStr ?: 10);
     EntityFindOptions findOptions = new EntityFindOptions();

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcherImpl.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcherImpl.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcherImpl.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcherImpl.java Tue Dec  9 10:09:22 2014
@@ -25,6 +25,8 @@ import java.rmi.server.UnicastRemoteObje
 import java.util.Map;
 
 import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.entity.Delegator;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.service.GenericRequester;
 import org.ofbiz.service.GenericResultWaiter;
 import org.ofbiz.service.GenericServiceException;
@@ -45,7 +47,8 @@ public class RemoteDispatcherImpl extend
     public RemoteDispatcherImpl(LocalDispatcher dispatcher, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException {
         super(0, csf, ssf);
         this.dispatcher = dispatcher;
-        exportAll = "true".equals(UtilProperties.getPropertyValue("service", "remotedispatcher.exportall", "false"));
+        Delegator delegator = dispatcher.getDelegator();
+        exportAll = "true".equals(EntityUtilProperties.getPropertyValue("service", "remotedispatcher.exportall", "false", delegator));
     }
 
     // RemoteDispatcher methods

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=1644015&r1=1644014&r2=1644015&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 Tue Dec  9 10:09:22 2014
@@ -67,6 +67,7 @@ import org.ofbiz.entity.transaction.Gene
 import org.ofbiz.entity.transaction.TransactionUtil;
 import org.ofbiz.entity.util.EntityQuery;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.security.Security;
 import org.ofbiz.security.SecurityConfigurationException;
 import org.ofbiz.security.SecurityFactory;
@@ -124,7 +125,8 @@ public class LoginWorker {
      * Gets (and creates if necessary) a key to be used for an external login parameter
      */
     public static String getExternalLoginKey(HttpServletRequest request) {
-        boolean externalLoginKeyEnabled = "true".equals(UtilProperties.getPropertyValue("security", "security.login.externalLoginKey.enabled", "true"));
+     Delegator delegator = (Delegator) request.getAttribute("delegator");
+        boolean externalLoginKeyEnabled = "true".equals(EntityUtilProperties.getPropertyValue("security", "security.login.externalLoginKey.enabled", "true", delegator));
         if (!externalLoginKeyEnabled) {
             return null;
         }
@@ -543,7 +545,7 @@ public class LoginWorker {
             if (userLogin != null && "Y".equals(userLogin.getString("requirePasswordChange"))) {
                 return "requirePasswordChange";
             }
-            String autoChangePassword = UtilProperties.getPropertyValue("security.properties", "user.auto.change.password.enable", "false");
+            String autoChangePassword = EntityUtilProperties.getPropertyValue("security.properties", "user.auto.change.password.enable", "false", delegator);
             if ("true".equalsIgnoreCase(autoChangePassword)) {
                 if ("requirePasswordChange".equals(autoChangePassword(request, response))) {
                     return "requirePasswordChange";
@@ -733,7 +735,7 @@ public class LoginWorker {
         Delegator delegator = (Delegator) request.getAttribute("delegator");
         HttpSession session = request.getSession();
         GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
-        String domain = UtilProperties.getPropertyValue("url.properties", "cookie.domain");
+        String domain = EntityUtilProperties.getPropertyValue("url.properties", "cookie.domain", delegator);
         if (userLogin != null) {
             Cookie autoLoginCookie = new Cookie(getAutoLoginCookieName(request), userLogin.getString("userLoginId"));
             autoLoginCookie.setMaxAge(60 * 60 * 24 * 365);
@@ -867,7 +869,8 @@ public class LoginWorker {
 
     // preprocessor method to login a user from a HTTP request header (configured in security.properties)
     public static String checkRequestHeaderLogin(HttpServletRequest request, HttpServletResponse response) {
-        String httpHeader = UtilProperties.getPropertyValue("security.properties", "security.login.http.header", null);
+     Delegator delegator = (Delegator) request.getAttribute("delegator");
+        String httpHeader = EntityUtilProperties.getPropertyValue("security.properties", "security.login.http.header", null, delegator);
 
         // make sure the header field is set in security.properties; if not, then this is disabled and just return
         if (UtilValidate.isNotEmpty(httpHeader)) {
@@ -891,7 +894,8 @@ public class LoginWorker {
 
     // preprocessor method to login a user from HttpServletRequest.getRemoteUser() (configured in security.properties)
     public static String checkServletRequestRemoteUserLogin(HttpServletRequest request, HttpServletResponse response) {
-        Boolean allowRemoteUserLogin = "true".equals(UtilProperties.getPropertyValue("security", "security.login.http.servlet.remoteuserlogin.allow", "false"));
+     Delegator delegator = (Delegator) request.getAttribute("delegator");
+        Boolean allowRemoteUserLogin = "true".equals(EntityUtilProperties.getPropertyValue("security", "security.login.http.servlet.remoteuserlogin.allow", "false", delegator));
         // make sure logging users via remote user is allowed in security.properties; if not just return
         if (allowRemoteUserLogin) {
 
@@ -913,9 +917,9 @@ public class LoginWorker {
     }
     // preprocessor method to login a user w/ client certificate see security.properties to configure the pattern of CN
     public static String check509CertLogin(HttpServletRequest request, HttpServletResponse response) {
-        boolean doCheck = "true".equalsIgnoreCase(UtilProperties.getPropertyValue("security.properties", "security.login.cert.allow", "true"));
+     Delegator delegator = (Delegator) request.getAttribute("delegator");
+        boolean doCheck = "true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security.properties", "security.login.cert.allow", "true", delegator));
         if (doCheck) {
-            Delegator delegator = (Delegator) request.getAttribute("delegator");
             HttpSession session = request.getSession();
             GenericValue currentUserLogin = (GenericValue) session.getAttribute("userLogin");
             if (currentUserLogin != null) {
@@ -925,7 +929,7 @@ public class LoginWorker {
                 }
             }
 
-            String cnPattern = UtilProperties.getPropertyValue("security.properties", "security.login.cert.pattern", "(.*)");
+            String cnPattern = EntityUtilProperties.getPropertyValue("security.properties", "security.login.cert.pattern", "(.*)", delegator);
             Pattern pattern = Pattern.compile(cnPattern);
             //Debug.logInfo("CN Pattern: " + cnPattern, module);
 
@@ -1171,8 +1175,8 @@ public class LoginWorker {
         Delegator delegator = (Delegator) request.getAttribute("delegator");
         String userName = request.getParameter("USERNAME");
         Timestamp now = UtilDateTime.nowTimestamp();
-        Integer reqToChangePwdInDays = Integer.valueOf(UtilProperties.getPropertyValue("security.properties", "user.change.password.days", "0"));
-        Integer passwordNoticePeriod = Integer.valueOf(UtilProperties.getPropertyValue("security.properties", "user.change.password.notification.days", "0"));
+        Integer reqToChangePwdInDays = Integer.valueOf(EntityUtilProperties.getPropertyValue("security.properties", "user.change.password.days", "0", delegator));
+        Integer passwordNoticePeriod = Integer.valueOf(EntityUtilProperties.getPropertyValue("security.properties", "user.change.password.notification.days", "0", delegator));
         if (reqToChangePwdInDays > 0) {
             List<GenericValue> passwordHistories = null;
             try {

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=1644015&r1=1644014&r2=1644015&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 Tue Dec  9 10:09:22 2014
@@ -51,6 +51,7 @@ import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.util.EntityQuery;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.webapp.OfbizUrlBuilder;
 import org.ofbiz.webapp.event.EventFactory;
 import org.ofbiz.webapp.event.EventHandler;
@@ -62,6 +63,7 @@ import org.ofbiz.webapp.view.ViewHandler
 import org.ofbiz.webapp.website.WebSiteProperties;
 import org.ofbiz.webapp.website.WebSiteWorker;
 import org.owasp.esapi.errors.EncodingException;
+import org.python.modules.re;
 
 /**
  * RequestHandler - Request Processor Object
@@ -395,7 +397,7 @@ public class RequestHandler {
                                     if (protectView != null) {
                                         overrideViewUri = protectView;
                                     } else {
-                                        overrideViewUri = UtilProperties.getPropertyValue("security.properties", "default.error.response.view");
+                                        overrideViewUri = EntityUtilProperties.getPropertyValue("security.properties", "default.error.response.view", delegator);
                                         overrideViewUri = overrideViewUri.replace("view:", "");
                                         if ("none:".equals(overrideViewUri)) {
                                             interruptRequest = true;
@@ -1021,6 +1023,7 @@ 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");

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy Tue Dec  9 10:09:22 2014
@@ -39,6 +39,7 @@ import org.ofbiz.entity.condition.Entity
 import org.ofbiz.entity.transaction.TransactionUtil;
 import org.ofbiz.entity.util.EntityFindOptions;
 import org.ofbiz.entity.util.EntityListIterator;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.base.util.Debug;
 import java.sql.Timestamp;
 import java.sql.Date;
@@ -47,6 +48,7 @@ import javolution.util.FastList;
 import javolution.util.FastMap;
 import javolution.util.FastSet;
 
+
 entityName = parameters.entityName;
 
 ModelReader reader = delegator.getModelReader();
@@ -125,7 +127,7 @@ context.viewIndexNext = viewIndex+1;
 try {
     viewSize = Integer.valueOf((String)parameters.get("VIEW_SIZE")).intValue();
 } catch (NumberFormatException nfe) {
-    viewSize = Integer.valueOf(UtilProperties.getPropertyValue("widget.properties", "widget.form.defaultViewSize")).intValue();
+    viewSize = Integer.valueOf(EntityUtilProperties.getPropertyValue("widget.properties", "widget.form.defaultViewSize", delegator)).intValue();
 }
 
 context.viewSize = viewSize;

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenViewHandler.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenViewHandler.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenViewHandler.java Tue Dec  9 10:09:22 2014
@@ -31,6 +31,8 @@ import org.ofbiz.base.util.GeneralExcept
 import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.entity.Delegator;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.webapp.view.AbstractViewHandler;
 import org.ofbiz.webapp.view.ViewHandlerException;
 import org.ofbiz.widget.form.FormStringRenderer;
@@ -39,6 +41,7 @@ import org.ofbiz.widget.menu.MacroMenuRe
 import org.ofbiz.widget.menu.MenuStringRenderer;
 import org.ofbiz.widget.tree.MacroTreeRenderer;
 import org.ofbiz.widget.tree.TreeStringRenderer;
+import org.python.modules.re;
 import org.xml.sax.SAXException;
 
 import freemarker.template.TemplateException;
@@ -57,14 +60,14 @@ public class MacroScreenViewHandler exte
     public void render(String name, String page, String info, String contentType, String encoding, HttpServletRequest request, HttpServletResponse response) throws ViewHandlerException {
         try {
             Writer writer = response.getWriter();
-
+            Delegator delegator = (Delegator) request.getAttribute("delegator");
             // compress output if configured to do so
             if (UtilValidate.isEmpty(encoding)) {
-                encoding = UtilProperties.getPropertyValue("widget", getName() + ".default.encoding", "none");
+                encoding = EntityUtilProperties.getPropertyValue("widget", getName() + ".default.encoding", "none", delegator);
             }
             boolean compressOutput = "compressed".equals(encoding);
             if (!compressOutput) {
-                compressOutput = "true".equals(UtilProperties.getPropertyValue("widget", getName() + ".compress"));
+                compressOutput = "true".equals(EntityUtilProperties.getPropertyValue("widget", getName() + ".compress", delegator));
             }
             if (!compressOutput && this.servletContext != null) {
                 compressOutput = "true".equals(this.servletContext.getAttribute("compressHTML"));
@@ -74,25 +77,25 @@ public class MacroScreenViewHandler exte
                 // to speed up output.
                 writer = new StandardCompress().getWriter(writer, null);
             }
-            ScreenStringRenderer screenStringRenderer = new MacroScreenRenderer(UtilProperties.getPropertyValue("widget", getName() + ".name"), UtilProperties.getPropertyValue("widget", getName() + ".screenrenderer"));
+            ScreenStringRenderer screenStringRenderer = new MacroScreenRenderer(EntityUtilProperties.getPropertyValue("widget", getName() + ".name", delegator), EntityUtilProperties.getPropertyValue("widget", getName() + ".screenrenderer", delegator));
             ScreenRenderer screens = new ScreenRenderer(writer, null, screenStringRenderer);
             screens.populateContextForRequest(request, response, servletContext);
-            String macroLibraryPath = UtilProperties.getPropertyValue("widget", getName() + ".formrenderer");
+            String macroLibraryPath = EntityUtilProperties.getPropertyValue("widget", getName() + ".formrenderer", delegator);
             if (UtilValidate.isNotEmpty(macroLibraryPath)) {
                 FormStringRenderer formStringRenderer = new MacroFormRenderer(macroLibraryPath, request, response);
                 screens.getContext().put("formStringRenderer", formStringRenderer);
             }
-            macroLibraryPath = UtilProperties.getPropertyValue("widget", getName() + ".treerenderer");
+            macroLibraryPath = EntityUtilProperties.getPropertyValue("widget", getName() + ".treerenderer", delegator);
             if (UtilValidate.isNotEmpty(macroLibraryPath)) {
                 TreeStringRenderer treeStringRenderer = new MacroTreeRenderer(macroLibraryPath, writer);
                 screens.getContext().put("treeStringRenderer", treeStringRenderer);
             }
-            macroLibraryPath = UtilProperties.getPropertyValue("widget", getName() + ".menurenderer");
+            macroLibraryPath = EntityUtilProperties.getPropertyValue("widget", getName() + ".menurenderer", delegator);
             if (UtilValidate.isNotEmpty(macroLibraryPath)) {
                 MenuStringRenderer menuStringRenderer = new MacroMenuRenderer(macroLibraryPath, request, response);
                 screens.getContext().put("menuStringRenderer", menuStringRenderer);
             }
-            screens.getContext().put("simpleEncoder", StringUtil.getEncoder(UtilProperties.getPropertyValue("widget", getName() + ".encoder")));
+            screens.getContext().put("simpleEncoder", StringUtil.getEncoder(EntityUtilProperties.getPropertyValue("widget", getName() + ".encoder", delegator)));
             screenStringRenderer.renderScreenBegin(writer, screens.getContext());
             screens.render(page);
             screenStringRenderer.renderScreenEnd(writer, screens.getContext());

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFopViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFopViewHandler.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFopViewHandler.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFopViewHandler.java Tue Dec  9 10:09:22 2014
@@ -35,6 +35,8 @@ import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.entity.Delegator;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.webapp.view.AbstractViewHandler;
 import org.ofbiz.webapp.view.ApacheFopWorker;
 import org.ofbiz.webapp.view.ViewHandlerException;
@@ -64,11 +66,12 @@ public class ScreenFopViewHandler extend
      */
     public void render(String name, String page, String info, String contentType, String encoding, HttpServletRequest request, HttpServletResponse response) throws ViewHandlerException {
 
+     Delegator delegator = (Delegator) request.getAttribute("delegator");
         // render and obtain the XSL-FO
         Writer writer = new StringWriter();
         try {
-            ScreenStringRenderer screenStringRenderer = new MacroScreenRenderer(UtilProperties.getPropertyValue("widget", getName() + ".name"), UtilProperties.getPropertyValue("widget", getName() + ".screenrenderer"));
-            FormStringRenderer formStringRenderer = new MacroFormRenderer(UtilProperties.getPropertyValue("widget", getName() + ".formrenderer"), request, response);
+            ScreenStringRenderer screenStringRenderer = new MacroScreenRenderer(EntityUtilProperties.getPropertyValue("widget", getName() + ".name", delegator), EntityUtilProperties.getPropertyValue("widget", getName() + ".screenrenderer", delegator));
+            FormStringRenderer formStringRenderer = new MacroFormRenderer(EntityUtilProperties.getPropertyValue("widget", getName() + ".formrenderer", delegator), request, response);
             // TODO: uncomment these lines when the renderers are implemented
             //TreeStringRenderer treeStringRenderer = new MacroTreeRenderer(UtilProperties.getPropertyValue("widget", getName() + ".treerenderer"), writer);
             //MenuStringRenderer menuStringRenderer = new MacroMenuRenderer(UtilProperties.getPropertyValue("widget", getName() + ".menurenderer"), writer);
@@ -77,7 +80,7 @@ public class ScreenFopViewHandler extend
 
             // this is the object used to render forms from their definitions
             screens.getContext().put("formStringRenderer", formStringRenderer);
-            screens.getContext().put("simpleEncoder", StringUtil.getEncoder(UtilProperties.getPropertyValue("widget", getName() + ".encoder")));
+            screens.getContext().put("simpleEncoder", StringUtil.getEncoder(EntityUtilProperties.getPropertyValue("widget", getName() + ".encoder", delegator)));
             screens.render(page);
         } catch (Exception e) {
             renderError("Problems with the response writer/output stream", e, "[Not Yet Rendered]", request, response);

Modified: ofbiz/trunk/specialpurpose/birt/src/org/ofbiz/birt/webapp/view/BirtViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/birt/src/org/ofbiz/birt/webapp/view/BirtViewHandler.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/birt/src/org/ofbiz/birt/webapp/view/BirtViewHandler.java (original)
+++ ofbiz/trunk/specialpurpose/birt/src/org/ofbiz/birt/webapp/view/BirtViewHandler.java Tue Dec  9 10:09:22 2014
@@ -42,7 +42,9 @@ import org.ofbiz.base.util.UtilPropertie
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.birt.BirtFactory;
 import org.ofbiz.birt.BirtWorker;
+import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityException;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.webapp.view.ViewHandler;
 import org.ofbiz.webapp.view.ViewHandlerException;
 import org.xml.sax.SAXException;
@@ -112,7 +114,8 @@ public class BirtViewHandler implements
             }
             
             context.put(BirtWorker.BIRT_LOCALE, locale);
-            String birtImageDirectory = UtilProperties.getPropertyValue("birt", "birt.html.image.directory");
+            Delegator delegator = (Delegator) request.getAttribute("delegator");
+            String birtImageDirectory = EntityUtilProperties.getPropertyValue("birt", "birt.html.image.directory", delegator);
             context.put(BirtWorker.BIRT_IMAGE_DIRECTORY, birtImageDirectory);
             BirtWorker.exportReport(design, context, contentType, response.getOutputStream());
         } catch (BirtException e) {

Modified: ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayHelper.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayHelper.java (original)
+++ ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayHelper.java Tue Dec  9 10:09:22 2014
@@ -49,6 +49,7 @@ import org.ofbiz.entity.GenericEntityExc
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.util.EntityQuery;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.order.shoppingcart.ShoppingCart;
 import org.ofbiz.party.contact.ContactHelper;
 import org.ofbiz.service.GenericServiceException;
@@ -86,14 +87,14 @@ public class EbayHelper {
                 buildEbayConfigContext.put("apiServerUrl", eBayConfig.getString("apiServerUrl"));
             }
         } else {
-            buildEbayConfigContext.put("devID", UtilProperties.getPropertyValue(configFileName, "eBayExport.devID"));
-            buildEbayConfigContext.put("appID", UtilProperties.getPropertyValue(configFileName, "eBayExport.appID"));
-            buildEbayConfigContext.put("certID", UtilProperties.getPropertyValue(configFileName, "eBayExport.certID"));
-            buildEbayConfigContext.put("token", UtilProperties.getPropertyValue(configFileName, "eBayExport.token"));
-            buildEbayConfigContext.put("compatibilityLevel", UtilProperties.getPropertyValue(configFileName, "eBayExport.compatibilityLevel"));
-            buildEbayConfigContext.put("siteID", UtilProperties.getPropertyValue(configFileName, "eBayExport.siteID"));
-            buildEbayConfigContext.put("xmlGatewayUri", UtilProperties.getPropertyValue(configFileName, "eBayExport.xmlGatewayUri"));
-            buildEbayConfigContext.put("apiServerUrl", UtilProperties.getPropertyValue(configFileName, "eBayExport.xmlGatewayUri"));
+            buildEbayConfigContext.put("devID", EntityUtilProperties.getPropertyValue(configFileName, "eBayExport.devID", delegator));
+            buildEbayConfigContext.put("appID", EntityUtilProperties.getPropertyValue(configFileName, "eBayExport.appID", delegator));
+            buildEbayConfigContext.put("certID", EntityUtilProperties.getPropertyValue(configFileName, "eBayExport.certID", delegator));
+            buildEbayConfigContext.put("token", EntityUtilProperties.getPropertyValue(configFileName, "eBayExport.token", delegator));
+            buildEbayConfigContext.put("compatibilityLevel", EntityUtilProperties.getPropertyValue(configFileName, "eBayExport.compatibilityLevel", delegator));
+            buildEbayConfigContext.put("siteID", EntityUtilProperties.getPropertyValue(configFileName, "eBayExport.siteID", delegator));
+            buildEbayConfigContext.put("xmlGatewayUri", EntityUtilProperties.getPropertyValue(configFileName, "eBayExport.xmlGatewayUri", delegator));
+            buildEbayConfigContext.put("apiServerUrl", EntityUtilProperties.getPropertyValue(configFileName, "eBayExport.xmlGatewayUri", delegator));
         }
         return buildEbayConfigContext;
     }

Modified: ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java (original)
+++ ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java Tue Dec  9 10:09:22 2014
@@ -492,7 +492,7 @@ public class ProductsExportToEbay {
         if (UtilValidate.isNotEmpty(customXmlFromUI)) {
             customXml = customXmlFromUI;
         } else {
-            customXml = UtilProperties.getPropertyValue(configFileName, "eBayExport.customXml");
+            customXml = EntityUtilProperties.getPropertyValue(configFileName, "eBayExport.customXml", delegator);
         }
         if (UtilValidate.isNotEmpty(customXml)) {
             Document customXmlDoc = UtilXml.readXmlDocument(customXml);

Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/PopularTags.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/PopularTags.groovy?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/PopularTags.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/PopularTags.groovy Tue Dec  9 10:09:22 2014
@@ -27,10 +27,11 @@ import org.ofbiz.base.util.*;
 import org.ofbiz.base.util.string.*;
 import org.ofbiz.content.content.*;
 import org.apache.commons.lang.StringEscapeUtils;
+import org.ofbiz.entity.util.EntityUtilProperties;
 
-int minFontSize = Integer.parseInt(UtilProperties.getPropertyValue("ecommerce.properties", "tagcloud.min.fontsize"));
-int maxFontSize = Integer.parseInt(UtilProperties.getPropertyValue("ecommerce.properties", "tagcloud.max.fontsize"));
-int limitTagCloud = Integer.parseInt(UtilProperties.getPropertyValue("ecommerce.properties", "tagcloud.limit"));
+int minFontSize = Integer.parseInt(EntityUtilProperties.getPropertyValue("ecommerce.properties", "tagcloud.min.fontsize", delegator));
+int maxFontSize = Integer.parseInt(EntityUtilProperties.getPropertyValue("ecommerce.properties", "tagcloud.max.fontsize", delegator));
+int limitTagCloud = Integer.parseInt(EntityUtilProperties.getPropertyValue("ecommerce.properties", "tagcloud.limit", delegator));
 
 tagCloudList = [] as LinkedList;
 tagList = [] as LinkedList;

Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy Tue Dec  9 10:09:22 2014
@@ -145,7 +145,7 @@ if (shoppingListId) {
             context.shoppingListItemDatas = shoppingListItemDatas;
             // pagination for the shopping list
             viewIndex = Integer.valueOf(parameters.VIEW_INDEX  ?: 1);
-            viewSize = Integer.valueOf(parameters.VIEW_SIZE ?: UtilProperties.getPropertyValue("widget", "widget.form.defaultViewSize", "20"));
+            viewSize = Integer.valueOf(parameters.VIEW_SIZE ?: EntityUtilProperties.getPropertyValue("widget", "widget.form.defaultViewSize", "20", delegator));
             listSize = shoppingListItemDatas ? shoppingListItemDatas.size() : 0;
 
             lowIndex = ((viewIndex - 1) * viewSize) + 1;

Modified: ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java (original)
+++ ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java Tue Dec  9 10:09:22 2014
@@ -37,6 +37,7 @@ import org.ofbiz.entity.GenericEntityExc
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.util.EntityQuery;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.order.shoppingcart.ShoppingCart;
 import org.ofbiz.order.shoppingcart.ShoppingCartItem;
 import org.ofbiz.service.DispatchContext;
@@ -114,8 +115,8 @@ public class GoogleRequestServices {
         }
 
         // flow support URLs
-        String contShoppingUrl = UtilProperties.getPropertyValue("googleCheckout.properties", "continueShoppingUrl");
-        String editCartUrl = UtilProperties.getPropertyValue("googleCheckout.properties", "editCartUrl");
+        String contShoppingUrl = EntityUtilProperties.getPropertyValue("googleCheckout.properties", "continueShoppingUrl", delegator);
+        String editCartUrl = EntityUtilProperties.getPropertyValue("googleCheckout.properties", "editCartUrl", delegator);
         req.setContinueShoppingUrl(contShoppingUrl);
         req.setEditCartUrl(editCartUrl);
 
@@ -640,13 +641,13 @@ public class GoogleRequestServices {
         }
 
         // base URLs
-        String productionRoot = UtilProperties.getPropertyValue("google-checkout.properties", "production.root.url");
-        String sandboxRoot = UtilProperties.getPropertyValue("google-checkout.properties", "sandbox.root.url");
+        String productionRoot = EntityUtilProperties.getPropertyValue("google-checkout.properties", "production.root.url", delegator);
+        String sandboxRoot = EntityUtilProperties.getPropertyValue("google-checkout.properties", "sandbox.root.url", delegator);
 
         // command strings
-        String merchantCheckoutCommand = UtilProperties.getPropertyValue("google-checkout.properties", "merchant.checkout.command", "merchantCheckout");
-        String checkoutCommand = UtilProperties.getPropertyValue("google-checkout.properties", "checkout.command", "checkout");
-        String requestCommand = UtilProperties.getPropertyValue("google-checkout.properties", "request.command", "request");
+        String merchantCheckoutCommand = EntityUtilProperties.getPropertyValue("google-checkout.properties", "merchant.checkout.command", "merchantCheckout", delegator);
+        String checkoutCommand = EntityUtilProperties.getPropertyValue("google-checkout.properties", "checkout.command", "checkout", delegator);
+        String requestCommand = EntityUtilProperties.getPropertyValue("google-checkout.properties", "request.command", "request", delegator);
 
         String environment = null;
         String checkoutUrl = "";

Modified: ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/commons/AbstractOFBizAuthenticationHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/commons/AbstractOFBizAuthenticationHandler.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/commons/AbstractOFBizAuthenticationHandler.java (original)
+++ ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/commons/AbstractOFBizAuthenticationHandler.java Tue Dec  9 10:09:22 2014
@@ -40,6 +40,7 @@ import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.util.EntityQuery;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.ldap.LdapLoginWorker;
 import org.ofbiz.service.GenericServiceException;
 import org.ofbiz.service.LocalDispatcher;
@@ -97,7 +98,7 @@ public abstract class AbstractOFBizAuthe
         String visitId = VisitHandler.getVisitId(session);
         LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
         Delegator delegator = dispatcher.getDelegator();
-        boolean useEncryption = "true".equals(UtilProperties.getPropertyValue("security.properties", "password.encrypt"));
+        boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.encrypt", delegator));
         GenericValue userLoginToCreate = delegator.makeValue("UserLogin", UtilMisc.toMap("userLoginId", username));
         userLoginToCreate.set("passwordHint", "");
         userLoginToCreate.set("enabled", "Y");

Modified: ofbiz/trunk/specialpurpose/lucene/src/org/ofbiz/content/search/ProductDocument.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/lucene/src/org/ofbiz/content/search/ProductDocument.java?rev=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/lucene/src/org/ofbiz/content/search/ProductDocument.java (original)
+++ ofbiz/trunk/specialpurpose/lucene/src/org/ofbiz/content/search/ProductDocument.java Tue Dec  9 10:09:22 2014
@@ -32,6 +32,7 @@ import org.ofbiz.entity.condition.Entity
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.util.EntityQuery;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.util.EntityUtilProperties;
 
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.DoubleField;
@@ -74,7 +75,7 @@ public class ProductDocument implements
                 // Return a null document (we will remove the document from the index)
                 return null;
             } else {
-                if ("Y".equals(product.getString("isVariant")) && "true".equals(UtilProperties.getPropertyValue("prodsearch", "index.ignore.variants"))) {
+                if ("Y".equals(product.getString("isVariant")) && "true".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.ignore.variants", delegator))) {
                     return null;
                 }
                 Document doc = new Document();
@@ -95,9 +96,9 @@ public class ProductDocument implements
                 doc.add(new StringField("isVariant", product.get("isVariant") != null && product.getBoolean("isVariant") ? "true" : "false", Field.Store.NO));
 
                 // ProductFeature Fields, check that at least one of the fields is set to be indexed
-                if (!"0".equals(UtilProperties.getPropertyValue("prodsearch", "index.weight.ProductFeatureAndAppl.description", "0")) ||
-                        !"0".equals(UtilProperties.getPropertyValue("prodsearch", "index.weight.ProductFeatureAndAppl.abbrev", "0")) ||
-                        !"0".equals(UtilProperties.getPropertyValue("prodsearch", "index.weight.ProductFeatureAndAppl.idCode", "0"))) {
+                if (!"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductFeatureAndAppl.description", "0", delegator)) ||
+                        !"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductFeatureAndAppl.abbrev", "0", delegator)) ||
+                        !"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductFeatureAndAppl.idCode", "0", delegator))) {
 
                     List<GenericValue> productFeatureAndAppls = EntityQuery.use(delegator).from("ProductFeatureAndAppl").where("productId", productId).queryList();
                     productFeatureAndAppls = this.filterByThruDate(productFeatureAndAppls);
@@ -137,8 +138,8 @@ public class ProductDocument implements
                 }
 
                 // ProductAttribute Fields
-                if (!"0".equals(UtilProperties.getPropertyValue("prodsearch", "index.weight.ProductAttribute.attrName", "0")) ||
-                        !"0".equals(UtilProperties.getPropertyValue("prodsearch", "index.weight.ProductAttribute.attrValue", "0"))) {
+                if (!"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductAttribute.attrName", "0", delegator)) ||
+                        !"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductAttribute.attrValue", "0", delegator))) {
 
                     List<GenericValue> productAttributes = EntityQuery.use(delegator).from("ProductAttribute").where("productId", productId).queryList();
                     for (GenericValue productAttribute: productAttributes) {
@@ -148,7 +149,7 @@ public class ProductDocument implements
                 }
 
                 // GoodIdentification
-                if (!"0".equals(UtilProperties.getPropertyValue("prodsearch", "index.weight.GoodIdentification.idValue", "0"))) {
+                if (!"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.GoodIdentification.idValue", "0", delegator))) {
                     List<GenericValue> goodIdentifications = EntityQuery.use(delegator).from("GoodIdentification").where("productId", productId).queryList();
                     for (GenericValue goodIdentification: goodIdentifications) {
                         String goodIdentificationTypeId = goodIdentification.getString("goodIdentificationTypeId");
@@ -161,7 +162,7 @@ public class ProductDocument implements
 
                 // Virtual ProductIds
                 if ("Y".equals(product.getString("isVirtual"))) {
-                    if (!"0".equals(UtilProperties.getPropertyValue("prodsearch", "index.weight.Variant.Product.productId", "0"))) {
+                    if (!"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.Variant.Product.productId", "0", delegator))) {
                         List<GenericValue> variantProductAssocs = EntityQuery.use(delegator).from("ProductAssoc").where("productId", productId, "productAssocTypeId", "PRODUCT_VARIANT").queryList();
                         variantProductAssocs = this.filterByThruDate(variantProductAssocs);
                         for (GenericValue variantProductAssoc: variantProductAssocs) {
@@ -180,12 +181,12 @@ public class ProductDocument implements
                 }
 
                 // Index product content
-                String productContentTypes = UtilProperties.getPropertyValue("prodsearch", "index.include.ProductContentTypes");
+                String productContentTypes = EntityUtilProperties.getPropertyValue("prodsearch", "index.include.ProductContentTypes", delegator);
                 for (String productContentTypeId: productContentTypes.split(",")) {
                     int weight = 1;
                     try {
                         // this is defaulting to a weight of 1 because you specified you wanted to index this type
-                        weight = Integer.parseInt(UtilProperties.getPropertyValue("prodsearch", "index.weight.ProductContent." + productContentTypeId, "1"));
+                        weight = Integer.parseInt(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductContent." + productContentTypeId, "1", delegator));
                     } catch (Exception e) {
                         Debug.logWarning("Could not parse weight number: " + e.toString(), module);
                     }

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=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java (original)
+++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java Tue Dec  9 10:09:22 2014
@@ -44,6 +44,7 @@ import org.ofbiz.entity.transaction.Gene
 import org.ofbiz.entity.transaction.TransactionUtil;
 import org.ofbiz.entity.util.EntityQuery;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.product.product.ProductWorker;
 import org.ofbiz.service.DispatchContext;
 import org.ofbiz.service.GenericServiceException;
@@ -219,7 +220,7 @@ public class OagisInventoryServices {
                 // prepare information to send mail
                 Map<String, Object> sendMap = FastMap.newInstance();
 
-                String sendToEmail = UtilProperties.getPropertyValue("oagis.properties", "oagis.notification.email.sendTo");
+                String sendToEmail = EntityUtilProperties.getPropertyValue("oagis.properties", "oagis.notification.email.sendTo", delegator);
 
                 /* DEJ20070802 changed to get email address from properties file, should be way easier to manage
                 // get facility email address
@@ -253,7 +254,7 @@ public class OagisInventoryServices {
                 */
 
                 if (UtilValidate.isNotEmpty(sendToEmail)) {
-                    String productStoreId = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.SyncInventoryProductStoreId");
+                    String productStoreId = EntityUtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.SyncInventoryProductStoreId", delegator);
                     GenericValue productStoreEmail = EntityQuery.use(delegator).from("ProductStoreEmailSetting").where("productStoreId", productStoreId, "emailType", "PRDS_OAGIS_CONFIRM").queryOne();
                     if (productStoreEmail != null) {
                         String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation");
@@ -451,7 +452,7 @@ public class OagisInventoryServices {
         Element dataAreaElement = UtilXml.firstChildElement(receivePoElement, "ns:DATAAREA");
         Element acknowledgeDeliveryElement = UtilXml.firstChildElement(dataAreaElement, "ns:ACKNOWLEDGE_DELIVERY");
 
-        String facilityId = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.PoReceiptFacilityId");
+        String facilityId = EntityUtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.PoReceiptFacilityId", delegator);
         String orderId = null;
         // get RECEIPTLN elements from message
         List<? extends Element> acknowledgeElementList = UtilXml.childElementList(acknowledgeDeliveryElement, "ns:RECEIPTLN");
@@ -503,7 +504,7 @@ public class OagisInventoryServices {
                             // Case : New record entry when PO not exists in the Database
                             orderHeader =  delegator.makeValue("OrderHeader", UtilMisc.toMap("orderId", orderId, "orderTypeId",orderTypeId ,
                                     "orderDate", timestampItemReceived, "statusId", "ORDER_CREATED", "entryDate", UtilDateTime.nowTimestamp(),
-                                    "productStoreId", UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.SyncInventoryProductStoreId","9001")));
+                                    "productStoreId", EntityUtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.SyncInventoryProductStoreId","9001", delegator)));
                             toStore.add(orderHeader);
                             GenericValue orderItem = delegator.makeValue("OrderItem", UtilMisc.toMap("orderId", orderId,
                                     "orderItemSeqId", UtilFormatOut.formatPaddedNumber(1L, 5),
@@ -686,8 +687,8 @@ public class OagisInventoryServices {
         Element firstDocRefElement = UtilXml.firstChildElement(firstReceiptlnElement, "os:DOCUMNTREF");
         String firstReturnId = UtilXml.childElementValue(firstDocRefElement, "of:DOCUMENTID");
 
-        String facilityId = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.PoReceiptFacilityId");
-        String locationSeqId = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.ReturnReceiptLocationSeqId");
+        String facilityId = EntityUtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.PoReceiptFacilityId", delegator);
+        String locationSeqId = EntityUtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.ReturnReceiptLocationSeqId", delegator);
 
         Timestamp timestamp = UtilDateTime.nowTimestamp();
         Map<String, Object> comiCtx = FastMap.newInstance();
@@ -1196,8 +1197,8 @@ public class OagisInventoryServices {
         Element dataAreaElement = UtilXml.firstChildElement(receiveStatusElement, "ns:DATAAREA");
         Element acknowledgeDeliveryElement = UtilXml.firstChildElement(dataAreaElement, "ns:ACKNOWLEDGE_DELIVERY");
 
-        String facilityId = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.PoReceiptFacilityId");
-        String locationSeqId = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.ReturnReceiptLocationSeqId");
+        String facilityId = EntityUtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.PoReceiptFacilityId", delegator);
+        String locationSeqId = EntityUtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.ReturnReceiptLocationSeqId", delegator);
 
         Timestamp timestamp = UtilDateTime.nowTimestamp();
         Map<String, Object> comiCtx = FastMap.newInstance();

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=1644015&r1=1644014&r2=1644015&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java (original)
+++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java Tue Dec  9 10:09:22 2014
@@ -58,6 +58,7 @@ import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.util.EntityQuery;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.service.DispatchContext;
 import org.ofbiz.service.GenericServiceException;
 import org.ofbiz.service.LocalDispatcher;
@@ -110,19 +111,19 @@ public class OagisServices {
 
         String sendToUrl = (String) context.get("sendToUrl");
         if (UtilValidate.isEmpty(sendToUrl)) {
-            sendToUrl = UtilProperties.getPropertyValue("oagis.properties", "url.send.confirmBod");
+            sendToUrl = EntityUtilProperties.getPropertyValue("oagis.properties", "url.send.confirmBod", delegator);
         }
 
         String saveToFilename = (String) context.get("saveToFilename");
         if (UtilValidate.isEmpty(saveToFilename)) {
-            String saveToFilenameBase = UtilProperties.getPropertyValue("oagis.properties", "test.save.outgoing.filename.base", "");
+            String saveToFilenameBase = EntityUtilProperties.getPropertyValue("oagis.properties", "test.save.outgoing.filename.base", "", delegator);
             if (UtilValidate.isNotEmpty(saveToFilenameBase)) {
                 saveToFilename = saveToFilenameBase + "ConfirmBod" + errorReferenceId + ".xml";
             }
         }
         String saveToDirectory = (String) context.get("saveToDirectory");
         if (UtilValidate.isEmpty(saveToDirectory)) {
-            saveToDirectory = UtilProperties.getPropertyValue("oagis.properties", "test.save.outgoing.directory");
+            saveToDirectory = EntityUtilProperties.getPropertyValue("oagis.properties", "test.save.outgoing.directory", delegator);
         }
 
         OutputStream out = (OutputStream) context.get("outputStream");
@@ -134,8 +135,8 @@ public class OagisServices {
             Debug.logError(e, "Error getting userLogin", module);
         }
 
-        String logicalId = UtilProperties.getPropertyValue("oagis.properties", "CNTROLAREA.SENDER.LOGICALID");
-        String authId = UtilProperties.getPropertyValue("oagis.properties", "CNTROLAREA.SENDER.AUTHID");
+        String logicalId = EntityUtilProperties.getPropertyValue("oagis.properties", "CNTROLAREA.SENDER.LOGICALID", delegator);
+        String authId = EntityUtilProperties.getPropertyValue("oagis.properties", "CNTROLAREA.SENDER.AUTHID", delegator);
 
         MapStack<String> bodyParameters =  MapStack.create();
         bodyParameters.put("logicalId", logicalId);
@@ -189,7 +190,7 @@ public class OagisServices {
         bodyParameters.put("errorReferenceId", errorReferenceId);
         bodyParameters.put("errorMapList", errorMapList);
         bodyParameters.put("origRef", context.get("origRefId"));
-        String bodyScreenUri = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Template.ConfirmBod");
+        String bodyScreenUri = EntityUtilProperties.getPropertyValue("oagis.properties", "Oagis.Template.ConfirmBod", delegator);
 
         String outText = null;
         try {