Modified: 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
 Mon Dec 15 09:10:03 2014
@@ -1152,14 +1152,14 @@ public class DatabaseUtil {
                         ResultSet rsPks = dbData.getPrimaryKeys(null, 
lookupSchemaName, null);
                         pkCount += checkPrimaryKeyInfo(rsPks, 
lookupSchemaName, needsUpperCase, colInfo, messages);
                     } catch (Exception e1) {
-                        Debug.logWarning("Error getting primary key info from 
database with null tableName, will try other means: " + e1.toString(), module);
+                        Debug.logInfo("Error getting primary key info from 
database with null tableName, will try other means: " + e1.toString(), module);
                     }
                     if (pkCount == 0) {
                         try {
                             ResultSet rsPks = dbData.getPrimaryKeys(null, 
lookupSchemaName, "%");
                             pkCount += checkPrimaryKeyInfo(rsPks, 
lookupSchemaName, needsUpperCase, colInfo, messages);
                         } catch (Exception e1) {
-                            Debug.logWarning("Error getting primary key info 
from database with % tableName, will try other means: " + e1.toString(), 
module);
+                            Debug.logInfo("Error getting primary key info from 
database with % tableName, will try other means: " + e1.toString(), module);
                         }
                     }
                     if (pkCount == 0) {

Modified: 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java
 Mon Dec 15 09:10:03 2014
@@ -55,7 +55,8 @@ import org.w3c.dom.NodeList;
 public class ModelViewEntity extends ModelEntity {
     public static final String module = ModelViewEntity.class.getName();
 
-    public static Map<String, String> functionPrefixMap = new HashMap<String, 
String>();
+    private static final Map<String, String> functionPrefixMap = new 
HashMap<String, String>();
+    private static final Set<String> numericFunctionsSet = new 
HashSet<String>(); // names of functions that return a numeric type
     static {
         functionPrefixMap.put("min", "MIN(");
         functionPrefixMap.put("max", "MAX(");
@@ -65,6 +66,14 @@ public class ModelViewEntity extends Mod
         functionPrefixMap.put("count-distinct", "COUNT(DISTINCT ");
         functionPrefixMap.put("upper", "UPPER(");
         functionPrefixMap.put("lower", "LOWER(");
+        functionPrefixMap.put("extract-year", "EXTRACT(YEAR FROM ");
+        functionPrefixMap.put("extract-month", "EXTRACT(MONTH FROM ");
+        functionPrefixMap.put("extract-day", "EXTRACT(DAY FROM ");
+        numericFunctionsSet.add("count");
+        numericFunctionsSet.add("count-distinct");
+        numericFunctionsSet.add("extract-year");
+        numericFunctionsSet.add("extract-month");
+        numericFunctionsSet.add("extract-day");
     }
 
     /** Contains member-entity alias name definitions: key is alias, value is 
ModelMemberEntity */
@@ -480,8 +489,8 @@ public class ModelViewEntity extends Mod
                     fieldSet = alias.getFieldSet();
                 }
             }
-            if ("count".equals(alias.function) || 
"count-distinct".equals(alias.function)) {
-                // if we have a "count" function we have to change the type
+            if (numericFunctionsSet.contains(alias.function)) {
+                // if we have a numeric function we have to change the type
                 type = "numeric";
             }
             if (UtilValidate.isNotEmpty(alias.function)) {

Modified: 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcherImpl.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcherImpl.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcherImpl.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcherImpl.java
 Mon Dec 15 09:10:03 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/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
 Mon Dec 15 09:10:03 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/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
 Mon Dec 15 09:10:03 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;
@@ -1020,6 +1022,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/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy
 Mon Dec 15 09:10:03 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/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
 Mon Dec 15 09:10:03 2014
@@ -20,7 +20,6 @@ package org.ofbiz.widget;
 
 import java.io.IOException;
 import java.io.StringWriter;
-import java.io.UnsupportedEncodingException;
 import java.math.BigDecimal;
 import java.net.URLEncoder;
 import java.nio.charset.Charset;
@@ -145,8 +144,8 @@ public class WidgetWorker {
                 externalWriter.append(parameter.getKey());
                 externalWriter.append('=');
                 StringUtil.SimpleEncoder simpleEncoder = 
(StringUtil.SimpleEncoder) context.get("simpleEncoder");
-                if (simpleEncoder != null) {
-                    
externalWriter.append(simpleEncoder.encode(parameterValue));
+                if (simpleEncoder != null && parameterValue != null) {
+                    
externalWriter.append(simpleEncoder.encode(URLEncoder.encode(parameterValue, 
Charset.forName("UTF-8").displayName())));
                 } else {
                     externalWriter.append(parameterValue);
                 }
@@ -298,15 +297,10 @@ public class WidgetWorker {
 
         for (Map.Entry<String, String> parameter: parameterMap.entrySet()) {
             if (parameter.getValue() != null) {
-                String key = parameter.getKey();
-
                 writer.append("<input name=\"");
-                writer.append(key);
+                writer.append(parameter.getKey());
                 writer.append("\" value=\"");
-
-                String valueFromContext = context.containsKey(key) && 
context.get(key)!= null ?
-                        context.get(key).toString() : parameter.getValue();
-                writer.append(valueFromContext);
+                
writer.append(StringUtil.htmlEncoder.encode(parameter.getValue()));
                 writer.append("\" type=\"hidden\"/>");
             }
         }
@@ -362,12 +356,7 @@ public class WidgetWorker {
 
         public String getValue(Map<String, Object> context) {
             if (this.value != null) {
-                try {
-                    return URLEncoder.encode(this.value.expandString(context), 
Charset.forName("UTF-8").displayName());
-                } catch (UnsupportedEncodingException e) {
-                    Debug.logError(e, module);
-                    return this.value.expandString(context);
-                }
+                return this.value.expandString(context);
             }
 
             Object retVal = null;
@@ -398,11 +387,7 @@ public class WidgetWorker {
                     DateFormat df = UtilDateTime.toDateTimeFormat("EEE MMM dd 
hh:mm:ss z yyyy", timeZone, null);
                     returnValue = df.format((java.util.Date) retVal);
                 } else {
-                    try {
-                        returnValue = URLEncoder.encode(retVal.toString(), 
Charset.forName("UTF-8").displayName());
-                    } catch (UnsupportedEncodingException e) {
-                        Debug.logError(e, module);
-                    }
+                    returnValue = retVal.toString();
                 }
                 return returnValue;
             } else {

Modified: 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
 Mon Dec 15 09:10:03 2014
@@ -3083,7 +3083,7 @@ public final class MacroFormRenderer imp
             parameters.append(parameter.getName());
             parameters.append("'");
             parameters.append(",'value':'");
-            parameters.append(parameter.getValue(context));
+            
parameters.append(StringUtil.htmlEncoder.encode(parameter.getValue(context)));
             parameters.append("'}");
         }
         parameters.append("]");

Modified: 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/screen/MacroScreenViewHandler.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/screen/MacroScreenViewHandler.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/screen/MacroScreenViewHandler.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/screen/MacroScreenViewHandler.java
 Mon Dec 15 09:10:03 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/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/screen/ScreenFopViewHandler.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/screen/ScreenFopViewHandler.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/screen/ScreenFopViewHandler.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/screen/ScreenFopViewHandler.java
 Mon Dec 15 09:10:03 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/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/birt/src/org/ofbiz/birt/webapp/view/BirtViewHandler.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/birt/src/org/ofbiz/birt/webapp/view/BirtViewHandler.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/birt/src/org/ofbiz/birt/webapp/view/BirtViewHandler.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/birt/src/org/ofbiz/birt/webapp/view/BirtViewHandler.java
 Mon Dec 15 09:10:03 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/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebay/src/org/ofbiz/ebay/EbayHelper.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebay/src/org/ofbiz/ebay/EbayHelper.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebay/src/org/ofbiz/ebay/EbayHelper.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebay/src/org/ofbiz/ebay/EbayHelper.java
 Mon Dec 15 09:10:03 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/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
 Mon Dec 15 09:10:03 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/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/PopularTags.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/PopularTags.groovy?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/PopularTags.groovy
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/PopularTags.groovy
 Mon Dec 15 09:10:03 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/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy
 Mon Dec 15 09:10:03 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/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java
 Mon Dec 15 09:10:03 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/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ldap/src/org/ofbiz/ldap/commons/AbstractOFBizAuthenticationHandler.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ldap/src/org/ofbiz/ldap/commons/AbstractOFBizAuthenticationHandler.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ldap/src/org/ofbiz/ldap/commons/AbstractOFBizAuthenticationHandler.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ldap/src/org/ofbiz/ldap/commons/AbstractOFBizAuthenticationHandler.java
 Mon Dec 15 09:10:03 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/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/src/org/ofbiz/content/search/ProductDocument.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/src/org/ofbiz/content/search/ProductDocument.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/src/org/ofbiz/content/search/ProductDocument.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/src/org/ofbiz/content/search/ProductDocument.java
 Mon Dec 15 09:10:03 2014
@@ -22,7 +22,6 @@ import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.base.util.UtilDateTime;
 import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.content.data.DataResourceWorker;
 import org.ofbiz.entity.Delegator;
@@ -32,6 +31,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 +74,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();
@@ -82,11 +82,11 @@ public class ProductDocument implements
 
                 // Product Fields
                 doc.add(new StringField("productId", productId, 
Field.Store.YES));
-                this.addTextFieldByWeight(doc, "productName", 
product.getString("productName"), "index.weight.Product.productName", 0, false, 
"fullText");
-                this.addTextFieldByWeight(doc, "internalName", 
product.getString("internalName"), "index.weight.Product.internalName", 0, 
false, "fullText");
-                this.addTextFieldByWeight(doc, "brandName", 
product.getString("brandName"), "index.weight.Product.brandName", 0, false, 
"fullText");
-                this.addTextFieldByWeight(doc, "description", 
product.getString("description"), "index.weight.Product.description", 0, false, 
"fullText");
-                this.addTextFieldByWeight(doc, "longDescription", 
product.getString("longDescription"), "index.weight.Product.longDescription", 
0, false, "fullText");
+                this.addTextFieldByWeight(doc, "productName", 
product.getString("productName"), "index.weight.Product.productName", 0, false, 
"fullText", delegator);
+                this.addTextFieldByWeight(doc, "internalName", 
product.getString("internalName"), "index.weight.Product.internalName", 0, 
false, "fullText", delegator);
+                this.addTextFieldByWeight(doc, "brandName", 
product.getString("brandName"), "index.weight.Product.brandName", 0, false, 
"fullText", delegator);
+                this.addTextFieldByWeight(doc, "description", 
product.getString("description"), "index.weight.Product.description", 0, false, 
"fullText", delegator);
+                this.addTextFieldByWeight(doc, "longDescription", 
product.getString("longDescription"), "index.weight.Product.longDescription", 
0, false, "fullText", delegator);
                 //doc.add(new StringField("introductionDate", 
checkValue(product.getString("introductionDate")), Store.NO));
                 doc.add(new LongField("introductionDate", 
quantizeTimestampToDays(product.getTimestamp("introductionDate")), 
Field.Store.NO));
                 nextReIndex = 
this.checkSetNextReIndex(product.getTimestamp("introductionDate"), nextReIndex);
@@ -95,9 +95,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);
@@ -115,9 +115,9 @@ public class ProductDocument implements
                         doc.add(new StringField("productFeatureId", 
productFeatureAndAppl.getString("productFeatureId"), Field.Store.NO));
                         doc.add(new StringField("productFeatureCategoryId", 
productFeatureAndAppl.getString("productFeatureCategoryId"), Field.Store.NO));
                         doc.add(new StringField("productFeatureTypeId", 
productFeatureAndAppl.getString("productFeatureTypeId"), Field.Store.NO));
-                        this.addTextFieldByWeight(doc, "featureDescription", 
productFeatureAndAppl.getString("description"), 
"index.weight.ProductFeatureAndAppl.description", 0, false, "fullText");
-                        this.addTextFieldByWeight(doc, "featureAbbreviation", 
productFeatureAndAppl.getString("abbrev"), 
"index.weight.ProductFeatureAndAppl.abbrev", 0, false, "fullText");
-                        this.addTextFieldByWeight(doc, "featureCode", 
productFeatureAndAppl.getString("idCode"), 
"index.weight.ProductFeatureAndAppl.idCode", 0, false, "fullText");
+                        this.addTextFieldByWeight(doc, "featureDescription", 
productFeatureAndAppl.getString("description"), 
"index.weight.ProductFeatureAndAppl.description", 0, false, "fullText", 
delegator);
+                        this.addTextFieldByWeight(doc, "featureAbbreviation", 
productFeatureAndAppl.getString("abbrev"), 
"index.weight.ProductFeatureAndAppl.abbrev", 0, false, "fullText", delegator);
+                        this.addTextFieldByWeight(doc, "featureCode", 
productFeatureAndAppl.getString("idCode"), 
"index.weight.ProductFeatureAndAppl.idCode", 0, false, "fullText", delegator);
                         // Get the ProductFeatureGroupIds
                         List<GenericValue> productFeatureGroupAppls = 
EntityQuery.use(delegator).from("ProductFeatureGroupAppl").where("productFeatureId",
 productFeatureAndAppl.get("productFeatureId")).queryList();
                         productFeatureGroupAppls = 
this.filterByThruDate(productFeatureGroupAppls);
@@ -137,31 +137,31 @@ 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) {
-                        this.addTextFieldByWeight(doc, "attributeName", 
productAttribute.getString("attrName"), 
"index.weight.ProductAttribute.attrName", 0, false, "fullText");
-                        this.addTextFieldByWeight(doc, "attributeValue", 
productAttribute.getString("attrValue"), 
"index.weight.ProductAttribute.attrValue", 0, false, "fullText");
+                        this.addTextFieldByWeight(doc, "attributeName", 
productAttribute.getString("attrName"), 
"index.weight.ProductAttribute.attrName", 0, false, "fullText", delegator);
+                        this.addTextFieldByWeight(doc, "attributeValue", 
productAttribute.getString("attrValue"), 
"index.weight.ProductAttribute.attrValue", 0, false, "fullText", delegator);
                     }
                 }
 
                 // 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");
                         String idValue = 
goodIdentification.getString("idValue");
                         doc.add(new StringField("goodIdentificationTypeId", 
goodIdentificationTypeId, Field.Store.NO));
                         doc.add(new StringField(goodIdentificationTypeId + 
"_GoodIdentification", idValue, Field.Store.NO));
-                        this.addTextFieldByWeight(doc, "identificationValue", 
idValue, "index.weight.GoodIdentification.idValue", 0, false, "fullText");
+                        this.addTextFieldByWeight(doc, "identificationValue", 
idValue, "index.weight.GoodIdentification.idValue", 0, false, "fullText", 
delegator);
                     }
                 }
 
                 // 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) {
@@ -174,18 +174,18 @@ public class ProductDocument implements
                             } else if (thruDate != null) {
                                 nextReIndex = 
this.checkSetNextReIndex(thruDate, nextReIndex);
                             }
-                            this.addTextFieldByWeight(doc, "variantProductId", 
variantProductAssoc.getString("productIdTo"), 
"index.weight.Variant.Product.productId", 0, false, "fullText");
+                            this.addTextFieldByWeight(doc, "variantProductId", 
variantProductAssoc.getString("productIdTo"), 
"index.weight.Variant.Product.productId", 0, false, "fullText", delegator);
                         }
                     }
                 }
 
                 // 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);
                     }
@@ -205,7 +205,7 @@ public class ProductDocument implements
                         try {
                             Map<String, Object> drContext = UtilMisc.<String, 
Object>toMap("product", product);
                             String contentText = 
DataResourceWorker.renderDataResourceAsText(delegator, 
productContentAndInfo.getString("dataResourceId"), drContext, null, null, 
false);
-                            this.addTextFieldByWeight(doc, "content", 
contentText, null, weight, false, "fullText");
+                            this.addTextFieldByWeight(doc, "content", 
contentText, null, weight, false, "fullText", delegator);
                         } catch (IOException e1) {
                             Debug.logError(e1, "Error getting content text to 
index", module);
                         } catch (GeneralException e1) {
@@ -281,13 +281,13 @@ public class ProductDocument implements
     }
 
     // An attempt to boost/weight values in a similar manner to what OFBiz 
product search does.
-    private void addTextFieldByWeight(Document doc, String fieldName, String 
value, String property, int defaultWeight, boolean store, String 
fullTextFieldName) {
+    private void addTextFieldByWeight(Document doc, String fieldName, String 
value, String property, int defaultWeight, boolean store, String 
fullTextFieldName, Delegator delegator) {
         if (fieldName == null) return;
 
         float weight = 0;
         if (property != null) {
             try {
-                weight = 
Float.parseFloat(UtilProperties.getPropertyValue("prodsearch", property, "0"));
+                weight = 
Float.parseFloat(EntityUtilProperties.getPropertyValue("prodsearch", property, 
"0", delegator));
             } catch (Exception e) {
                 Debug.logWarning("Could not parse weight number: " + 
e.toString(), module);
             }

Modified: 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
 Mon Dec 15 09:10:03 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/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java
 Mon Dec 15 09:10:03 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 {

Modified: 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java
 Mon Dec 15 09:10:03 2014
@@ -53,6 +53,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.order.order.OrderReadHelper;
 import org.ofbiz.party.party.PartyWorker;
 import org.ofbiz.product.product.ProductWorker;
@@ -655,19 +656,19 @@ public class OagisShipmentServices {
 
         String sendToUrl = (String) context.get("sendToUrl");
         if (UtilValidate.isEmpty(sendToUrl)) {
-            sendToUrl = UtilProperties.getPropertyValue("oagis.properties", 
"url.send.processShipment");
+            sendToUrl = 
EntityUtilProperties.getPropertyValue("oagis.properties", 
"url.send.processShipment", 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 + "ProcessShipment" + 
orderId + ".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");
@@ -689,7 +690,7 @@ public class OagisShipmentServices {
         GenericValue orderHeader = null;
         GenericValue orderItemShipGroup = null;
 
-        String logicalId = UtilProperties.getPropertyValue("oagis.properties", 
"CNTROLAREA.SENDER.LOGICALID");
+        String logicalId = 
EntityUtilProperties.getPropertyValue("oagis.properties", 
"CNTROLAREA.SENDER.LOGICALID", delegator);
         String referenceId = null;
         String task = "SHIPREQUEST"; // Actual value of task is "SHIPREQUEST" 
which is more than 10 char, need this in the db so it will match Confirm BODs, 
etc
         String component = "INVENTORY";
@@ -714,7 +715,7 @@ public class OagisShipmentServices {
                 return 
ServiceUtil.returnError(UtilProperties.getMessage(resource, 
"OagisOrderIdNotFound", UtilMisc.toMap("orderId", orderId), locale));
             }
 
-            List<String> validStores = 
StringUtil.split(UtilProperties.getPropertyValue("oagis.properties", 
"Oagis.Order.ValidProductStores"), ",");
+            List<String> validStores = 
StringUtil.split(EntityUtilProperties.getPropertyValue("oagis.properties", 
"Oagis.Order.ValidProductStores", delegator), ",");
             if (UtilValidate.isNotEmpty(validStores)) {
                 if 
(!validStores.contains(orderHeader.getString("productStoreId"))) {
                     return 
ServiceUtil.returnSuccess(UtilProperties.getMessage(resource, 
"OagisOrderIdNotValidStore", UtilMisc.toMap("orderId", orderId), locale));
@@ -752,7 +753,7 @@ public class OagisShipmentServices {
             referenceId = delegator.getNextSeqId("OagisMessageInfo");
             omiPkMap = UtilMisc.toMap("logicalId", logicalId, "component", 
component, "task", task, "referenceId", referenceId);
 
-            String authId = 
UtilProperties.getPropertyValue("oagis.properties", "CNTROLAREA.SENDER.AUTHID");
+            String authId = 
EntityUtilProperties.getPropertyValue("oagis.properties", 
"CNTROLAREA.SENDER.AUTHID", delegator);
             Timestamp timestamp = UtilDateTime.nowTimestamp();
             String sentDate = OagisServices.isoDateFormat.format(timestamp);
 
@@ -881,7 +882,7 @@ public class OagisShipmentServices {
             bodyParameters.put("orderId", orderId);
             bodyParameters.put("userLogin", userLogin);
 
-            String bodyScreenUri = 
UtilProperties.getPropertyValue("oagis.properties", 
"Oagis.Template.ProcessShipment");
+            String bodyScreenUri = 
EntityUtilProperties.getPropertyValue("oagis.properties", 
"Oagis.Template.ProcessShipment", delegator);
             String outText = null;
             Writer writer = new StringWriter();
             ScreenRenderer screens = new ScreenRenderer(writer, 
bodyParameters, htmlScreenRenderer);
@@ -977,19 +978,19 @@ public class OagisShipmentServices {
         Locale locale = (Locale) context.get("locale");
         String sendToUrl = (String) context.get("sendToUrl");
         if (UtilValidate.isEmpty(sendToUrl)) {
-            sendToUrl = UtilProperties.getPropertyValue("oagis.properties", 
"url.send.receiveDelivery");
+            sendToUrl = 
EntityUtilProperties.getPropertyValue("oagis.properties", 
"url.send.receiveDelivery", 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 + "ReceiveDelivery" + 
returnId + ".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);
         }
 
         GenericValue userLogin = null;
@@ -1037,8 +1038,8 @@ public class OagisShipmentServices {
 
             orderId = EntityUtil.getFirst(returnItems).getString("orderId");
 
-            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);
 
             referenceId = delegator.getNextSeqId("OagisMessageInfo");
             omiPkMap = UtilMisc.toMap("logicalId", logicalId, "component", 
component, "task", task, "referenceId", referenceId);
@@ -1127,7 +1128,7 @@ public class OagisShipmentServices {
 
             bodyParameters.put("returnId", returnId);
 
-            String bodyScreenUri = 
UtilProperties.getPropertyValue("oagis.properties", 
"Oagis.Template.ReceiveDelivery");
+            String bodyScreenUri = 
EntityUtilProperties.getPropertyValue("oagis.properties", 
"Oagis.Template.ReceiveDelivery", delegator);
             Writer writer = new StringWriter();
             ScreenRenderer screens = new ScreenRenderer(writer, 
bodyParameters, htmlScreenRenderer);
             screens.render(bodyScreenUri);

Modified: 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/pos/src/org/ofbiz/guiapp/xui/XuiContainer.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/pos/src/org/ofbiz/guiapp/xui/XuiContainer.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/pos/src/org/ofbiz/guiapp/xui/XuiContainer.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/pos/src/org/ofbiz/guiapp/xui/XuiContainer.java
 Mon Dec 15 09:10:03 2014
@@ -31,6 +31,7 @@ import org.ofbiz.base.container.Containe
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.DelegatorFactory;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.service.LocalDispatcher;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.service.ServiceContainer;
@@ -103,7 +104,7 @@ public abstract class XuiContainer imple
         jframe.setUndecorated(true);
         new XuiScreen(
                 new String[] { this.startupDir + this.startupFile,
-                classPackageName}, jframe);
+                classPackageName}, jframe, delegator);
         return true;
     }
 
@@ -136,12 +137,12 @@ public abstract class XuiContainer imple
     class XuiScreen extends XApplet {
         protected String startupProperties = "";
 
-        public XuiScreen(String[] args, JFrame frame) {
+        public XuiScreen(String[] args, JFrame frame, Delegator delegator) {
             super(args, frame);
             if (args.length > 0) {
                 startupProperties = args[0];
             }
-            String languageSuffix = 
UtilProperties.getPropertyValue("xui.properties", "languageSuffix", "");
+            String languageSuffix = 
EntityUtilProperties.getPropertyValue("xui.properties", "languageSuffix", "", 
delegator);
             String suffix = null;
             if(UtilValidate.isEmpty(languageSuffix)) {
                 suffix = Locale.getDefault().getLanguage();
@@ -153,7 +154,7 @@ public abstract class XuiContainer imple
             } else {
                 suffix = "_" + suffix;
             }
-            String language = 
UtilProperties.getPropertyValue(startupProperties, "Language");
+            String language = 
EntityUtilProperties.getPropertyValue(startupProperties, "Language", delegator);
             if (language.compareTo("XuiLabels" + suffix) != 0) {
                 UtilProperties.setPropertyValue(startupProperties, "Language", 
"XuiLabels" + suffix);
             }

Modified: 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java?rev=1645602&r1=1645601&r2=1645602&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java
 Mon Dec 15 09:10:03 2014
@@ -58,6 +58,7 @@ import org.ofbiz.entity.util.EntityFindO
 import org.ofbiz.entity.util.EntityListIterator;
 import org.ofbiz.entity.util.EntityQuery;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.guiapp.xui.XuiSession;
 import org.ofbiz.order.shoppingcart.CartItemModifyException;
 import org.ofbiz.order.shoppingcart.CheckOutHelper;
@@ -1732,6 +1733,7 @@ public class PosTransaction implements S
         // We suppose only one email address (should be ok anyway because of 
the contactMechPurposeTypeId == "PRIMARY_EMAIL")
         // we suppose only one phone number (should be ok anyway because of 
the contactMechPurposeTypeId == "PHONE_HOME")
         LocalDispatcher dispatcher = session.getDispatcher();
+        Delegator delegator = dispatcher.getDelegator();
         GenericValue userLogin = session.getUserLogin();
         GenericValue partyUserLogin = null;
         String result = null;
@@ -1937,7 +1939,8 @@ public class PosTransaction implements S
                             trace("updatePassword");
                             String passwordAcceptEncryptedAndPlain = null;
                             try {
-                                passwordAcceptEncryptedAndPlain = 
UtilProperties.getPropertyValue("security.properties", 
"password.accept.encrypted.and.plain");
+                               
+                                passwordAcceptEncryptedAndPlain = 
EntityUtilProperties.getPropertyValue("security.properties", 
"password.accept.encrypted.and.plain", delegator);
                                 
UtilProperties.setPropertyValueInMemory("security.properties", 
"password.accept.encrypted.and.plain", "true");
                                 svcRes = dispatcher.runSync("updatePassword",
                                         UtilMisc.toMap("userLogin", userLogin,


Reply via email to