You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ar...@apache.org on 2016/06/23 13:10:51 UTC
svn commit: r1749882 - in /ofbiz/trunk:
applications/content/src/org/ofbiz/content/content/
applications/manufacturing/groovyScripts/mrp/
applications/party/groovyScripts/party/
applications/party/groovyScripts/visit/ applications/product/groovyScripts...
Author: arunpatidar
Date: Thu Jun 23 13:10:51 2016
New Revision: 1749882
URL: http://svn.apache.org/viewvc?rev=1749882&view=rev
Log:
Applied patch from ticket - OFBIZ-7339 - Replace EntityUtilProperties getPropertyValue method with correct method calls. Thanks Rahul Singh Kushwah and Rishi Solanki for your contribution.
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentKeywordIndex.java
ofbiz/trunk/applications/manufacturing/groovyScripts/mrp/FindInventoryEventPlan.groovy
ofbiz/trunk/applications/party/groovyScripts/party/EditShoppingList.groovy
ofbiz/trunk/applications/party/groovyScripts/visit/ShowVisits.groovy
ofbiz/trunk/applications/product/groovyScripts/facility/shipment/FindShipment.groovy
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/KeywordIndex.java
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java
ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java
ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
ofbiz/trunk/framework/webtools/groovyScripts/entity/FindGeneric.groovy
ofbiz/trunk/specialpurpose/ecommerce/groovyScripts/catalog/PopularTags.groovy
ofbiz/trunk/specialpurpose/ecommerce/groovyScripts/shoppinglist/EditShoppingList.groovy
ofbiz/trunk/specialpurpose/lucene/src/org/ofbiz/content/search/ProductDocument.java
ofbiz/trunk/specialpurpose/passport/src/org/ofbiz/passport/event/GitHubEvents.java
ofbiz/trunk/specialpurpose/passport/src/org/ofbiz/passport/event/LinkedInEvents.java
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentKeywordIndex.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentKeywordIndex.java?rev=1749882&r1=1749881&r2=1749882&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentKeywordIndex.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentKeywordIndex.java Thu Jun 23 13:10:51 2016
@@ -198,7 +198,7 @@ public class ContentKeywordIndex {
}
List<GenericValue> toBeStored = new LinkedList<GenericValue>();
- int keywordMaxLength = Integer.parseInt(EntityUtilProperties.getPropertyValue("contentsearch", "content.keyword.max.length", delegator));
+ int keywordMaxLength = EntityUtilProperties.getPropertyAsInteger("contentsearch", "content.keyword.max.length", 0).intValue();
for (Map.Entry<String, Long> entry: keywords.entrySet()) {
if (entry.getKey().length() <= keywordMaxLength) {
GenericValue contentKeyword = delegator.makeValue("ContentKeyword", UtilMisc.toMap("contentId", content.getString("contentId"), "keyword", entry.getKey(), "relevancyWeight", entry.getValue()));
Modified: ofbiz/trunk/applications/manufacturing/groovyScripts/mrp/FindInventoryEventPlan.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/groovyScripts/mrp/FindInventoryEventPlan.groovy?rev=1749882&r1=1749881&r2=1749882&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/groovyScripts/mrp/FindInventoryEventPlan.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/groovyScripts/mrp/FindInventoryEventPlan.groovy Thu Jun 23 13:10:51 2016
@@ -69,7 +69,7 @@ context.paramList = paramList;
// set the page parameters
viewIndex = Integer.valueOf(parameters.VIEW_INDEX ?: 0);
-viewSize = Integer.valueOf(parameters.VIEW_SIZE ?: EntityUtilProperties.getPropertyValue("widget", "widget.form.defaultViewSize", "20", delegator));
+viewSize = parameters.VIEW_SIZE ?: EntityUtilProperties.getPropertyAsInteger("widget", "widget.form.defaultViewSize", 20);
listSize = 0;
if (inventoryList)
listSize = inventoryList.size();
Modified: ofbiz/trunk/applications/party/groovyScripts/party/EditShoppingList.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/groovyScripts/party/EditShoppingList.groovy?rev=1749882&r1=1749881&r2=1749882&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/groovyScripts/party/EditShoppingList.groovy (original)
+++ ofbiz/trunk/applications/party/groovyScripts/party/EditShoppingList.groovy Thu Jun 23 13:10:51 2016
@@ -104,7 +104,7 @@ if (shoppingListId) {
context.shoppingListItemDatas = shoppingListItemDatas;
// pagination for the shopping list
viewIndex = Integer.valueOf(parameters.VIEW_INDEX ?: 0);
- viewSize = Integer.valueOf(parameters.VIEW_SIZE ?: EntityUtilProperties.getPropertyValue("widget", "widget.form.defaultViewSize", "20", delegator));
+ viewSize = parameters.VIEW_SIZE ?: EntityUtilProperties.getPropertyAsInteger("widget", "widget.form.defaultViewSize", 20);
listSize = shoppingListItemDatas ? shoppingListItemDatas.size() : 0;
lowIndex = (viewIndex * viewSize) + 1;
Modified: ofbiz/trunk/applications/party/groovyScripts/visit/ShowVisits.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/groovyScripts/visit/ShowVisits.groovy?rev=1749882&r1=1749881&r2=1749882&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/groovyScripts/visit/ShowVisits.groovy (original)
+++ ofbiz/trunk/applications/party/groovyScripts/visit/ShowVisits.groovy Thu Jun 23 13:10:51 2016
@@ -43,7 +43,7 @@ try {
beganTransaction = TransactionUtil.begin();
viewIndex = Integer.valueOf(parameters.VIEW_INDEX ?: 1);
- viewSize = Integer.valueOf(parameters.VIEW_SIZE ?: EntityUtilProperties.getPropertyValue("widget", "widget.form.defaultViewSize", "20", delegator));
+ viewSize = parameters.VIEW_SIZE ?: EntityUtilProperties.getPropertyAsInteger("widget", "widget.form.defaultViewSize", 20);
context.viewIndex = viewIndex;
context.viewSize = viewSize;
Modified: ofbiz/trunk/applications/product/groovyScripts/facility/shipment/FindShipment.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/facility/shipment/FindShipment.groovy?rev=1749882&r1=1749881&r2=1749882&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/facility/shipment/FindShipment.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/facility/shipment/FindShipment.groovy Thu Jun 23 13:10:51 2016
@@ -40,7 +40,7 @@ maxDate = parameters.maxDate;
// set the page parameters
viewIndex = Integer.valueOf(parameters.VIEW_INDEX ?: 0);
-viewSize = Integer.valueOf(parameters.VIEW_SIZE ?: EntityUtilProperties.getPropertyValue("widget", "widget.form.defaultViewSize", "20", delegator));
+viewSize = parameters.VIEW_SIZE ?: EntityUtilProperties.getPropertyAsInteger("widget", "widget.form.defaultViewSize", 20);
context.viewIndex = viewIndex;
context.viewSize = viewSize;
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/KeywordIndex.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/KeywordIndex.java?rev=1749882&r1=1749881&r2=1749882&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/KeywordIndex.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/KeywordIndex.java Thu Jun 23 13:10:51 2016
@@ -88,7 +88,7 @@ public class KeywordIndex {
int pidWeight = 1;
try {
- pidWeight = Integer.parseInt(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.Product.productId", "0", delegator));
+ pidWeight = EntityUtilProperties.getPropertyAsInteger("prodsearch", "index.weight.Product.productId", 0).intValue();
} catch (Exception e) {
Debug.logWarning("Could not parse weight number: " + e.toString(), module);
}
@@ -149,7 +149,7 @@ public class KeywordIndex {
for (GenericValue variantProductAssoc: variantProductAssocs) {
int weight = 1;
try {
- weight = Integer.parseInt(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.Variant.Product.productId", "0", delegator));
+ weight = EntityUtilProperties.getPropertyAsInteger("prodsearch", "index.weight.Variant.Product.productId", 0).intValue();
} catch (Exception e) {
Debug.logWarning("Could not parse weight number: " + e.toString(), module);
}
@@ -165,7 +165,7 @@ public class KeywordIndex {
int weight = 1;
try {
// this is defaulting to a weight of 1 because you specified you wanted to index this type
- weight = Integer.parseInt(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductContent." + productContentTypeId, "1", delegator));
+ weight = EntityUtilProperties.getPropertyAsInteger("prodsearch", "index.weight.ProductContent." + productContentTypeId, 1).intValue();
} catch (Exception e) {
Debug.logWarning("Could not parse weight number: " + e.toString(), module);
}
@@ -189,7 +189,7 @@ public class KeywordIndex {
}
List<GenericValue> toBeStored = new LinkedList<GenericValue>();
- int keywordMaxLength = Integer.parseInt(EntityUtilProperties.getPropertyValue("prodsearch", "product.keyword.max.length", delegator));
+ int keywordMaxLength = EntityUtilProperties.getPropertyAsInteger("prodsearch", "product.keyword.max.length", 0).intValue();
for (Map.Entry<String, Long> entry: keywords.entrySet()) {
if (entry.getKey().length() <= keywordMaxLength) {
GenericValue productKeyword = delegator.makeValue("ProductKeyword", UtilMisc.toMap("productId", product.getString("productId"), "keyword", entry.getKey(), "keywordTypeId", "KWT_KEYWORD", "relevancyWeight", entry.getValue()));
@@ -228,7 +228,7 @@ public class KeywordIndex {
try {
Delegator delegator = value.getDelegator();
- weight = Integer.parseInt(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight." + value.getEntityName() + "." + fieldName, "1", delegator));
+ weight = EntityUtilProperties.getPropertyAsInteger("prodsearch", "index.weight." + value.getEntityName() + "." + fieldName, 1).intValue();
} catch (Exception e) {
Debug.logWarning("Could not parse weight number: " + e.toString(), module);
}
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java?rev=1749882&r1=1749881&r2=1749882&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java Thu Jun 23 13:10:51 2016
@@ -678,7 +678,7 @@ public class DhlServices {
} else {
// use default weight if available
try {
- packageWeight = new BigDecimal(EntityUtilProperties.getPropertyValue(shipmentPropertiesFile, "shipment.default.weight.value", delegator));
+ packageWeight = EntityUtilProperties.getPropertyAsBigDecimal(shipmentPropertiesFile, "shipment.default.weight.value", BigDecimal.ZERO);
} catch (NumberFormatException ne) {
Debug.logWarning("Default shippable weight not configured (shipment.default.weight.value)", module);
packageWeight = BigDecimal.ONE;
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java?rev=1749882&r1=1749881&r2=1749882&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java Thu Jun 23 13:10:51 2016
@@ -874,7 +874,7 @@ public class FedexServices {
// Use default weight if available
try {
- packageWeight = new BigDecimal(EntityUtilProperties.getPropertyValue(shipmentPropertiesFile, "shipment.default.weight.value", delegator));
+ packageWeight = EntityUtilProperties.getPropertyAsBigDecimal(shipmentPropertiesFile, "shipment.default.weight.value", BigDecimal.ZERO);
} catch (NumberFormatException ne) {
Debug.logWarning("Default shippable weight not configured (shipment.default.weight.value), assuming 1.0" + weightUomId , module);
packageWeight = BigDecimal.ONE;
Modified: ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java?rev=1749882&r1=1749881&r2=1749882&view=diff
==============================================================================
--- ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java (original)
+++ ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java Thu Jun 23 13:10:51 2016
@@ -242,11 +242,11 @@ public class LoginEvents {
}
if (useEncryption) {
// password encrypted, can't send, generate new password and email to user
- passwordToSend = RandomStringUtils.randomAlphanumeric(Integer.parseInt(EntityUtilProperties.getPropertyValue("security", "password.length.min", "5", delegator)));
+ passwordToSend = RandomStringUtils.randomAlphanumeric(EntityUtilProperties.getPropertyAsInteger("security", "password.length.min", 5).intValue());
if ("true".equals(EntityUtilProperties.getPropertyValue("security", "password.lowercase", delegator))){
passwordToSend=passwordToSend.toLowerCase();
}
- autoPassword = RandomStringUtils.randomAlphanumeric(Integer.parseInt(EntityUtilProperties.getPropertyValue("security", "password.length.min", "5", delegator)));
+ autoPassword = RandomStringUtils.randomAlphanumeric(EntityUtilProperties.getPropertyAsInteger("security", "password.length.min", 5).intValue());
EntityCrypto entityCrypto = new EntityCrypto(delegator,null);
try {
passwordToSend = entityCrypto.encrypt(keyValue, EncryptMethod.TRUE, (Object) autoPassword);
Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java?rev=1749882&r1=1749881&r2=1749882&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java Thu Jun 23 13:10:51 2016
@@ -57,7 +57,7 @@ public class WorkEffortKeywordIndex {
List<String> strings = new LinkedList<String>();
int widWeight = 1;
try {
- widWeight = Integer.parseInt(EntityUtilProperties.getPropertyValue("workeffort", "index.weight.WorkEffort.workEffortId", "1", delegator));
+ widWeight = EntityUtilProperties.getPropertyAsInteger("workeffort", "index.weight.WorkEffort.workEffortId", 1).intValue();
} catch (Exception e) {
Debug.logWarning("Could not parse weight number: " + e.toString(), module);
}
@@ -87,7 +87,7 @@ public class WorkEffortKeywordIndex {
for (String workEffortContentTypeId: workEffortContentTypes.split(",")) {
int weight = 1;
try {
- weight = Integer.parseInt(EntityUtilProperties.getPropertyValue("workeffort", "index.weight.WorkEffortContent." + workEffortContentTypeId, "1", delegator));
+ weight = EntityUtilProperties.getPropertyAsInteger("workeffort", "index.weight.WorkEffortContent." + workEffortContentTypeId, 1).intValue();
} catch (Exception e) {
Debug.logWarning("Could not parse weight number: " + e.toString(), module);
}
@@ -140,7 +140,7 @@ public class WorkEffortKeywordIndex {
int weight = 1;
try {
- weight = Integer.parseInt(EntityUtilProperties.getPropertyValue("workeffort", "index.weight." + value.getEntityName() + "." + fieldName, "1", delegator));
+ weight = EntityUtilProperties.getPropertyAsInteger("workeffort", "index.weight." + value.getEntityName() + "." + fieldName, 1).intValue();
} catch (Exception e) {
Debug.logWarning("Could not parse weight number: " + e.toString(), module);
}
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=1749882&r1=1749881&r2=1749882&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 Thu Jun 23 13:10:51 2016
@@ -428,7 +428,7 @@ public class LoginServices {
public static void createUserLoginPasswordHistory(Delegator delegator,String userLoginId, String currentPassword) throws GenericEntityException{
int passwordChangeHistoryLimit = 0;
try {
- passwordChangeHistoryLimit = Integer.parseInt(EntityUtilProperties.getPropertyValue("security", "password.change.history.limit", "0", delegator));
+ passwordChangeHistoryLimit = EntityUtilProperties.getPropertyAsInteger("security", "password.change.history.limit", 0).intValue();
} catch (NumberFormatException nfe) {
//No valid value is found so don't bother to save any password history
passwordChangeHistoryLimit = 0;
@@ -946,7 +946,7 @@ public class LoginServices {
int passwordChangeHistoryLimit = 0;
try {
- passwordChangeHistoryLimit = Integer.parseInt(EntityUtilProperties.getPropertyValue("security", "password.change.history.limit", "0", delegator));
+ passwordChangeHistoryLimit = EntityUtilProperties.getPropertyAsInteger("security", "password.change.history.limit", 0).intValue();
} catch (NumberFormatException nfe) {
//No valid value is found so don't bother to save any password history
passwordChangeHistoryLimit = 0;
@@ -979,7 +979,7 @@ public class LoginServices {
int minPasswordLength = 0;
try {
- minPasswordLength = Integer.parseInt(EntityUtilProperties.getPropertyValue("security", "password.length.min", "0", delegator));
+ minPasswordLength = EntityUtilProperties.getPropertyAsInteger("security", "password.length.min", 0).intValue();
} catch (NumberFormatException nfe) {
minPasswordLength = 0;
}
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=1749882&r1=1749881&r2=1749882&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 Thu Jun 23 13:10:51 2016
@@ -1199,8 +1199,8 @@ public class LoginWorker {
Delegator delegator = (Delegator) request.getAttribute("delegator");
String userName = request.getParameter("USERNAME");
Timestamp now = UtilDateTime.nowTimestamp();
- Integer reqToChangePwdInDays = Integer.valueOf(EntityUtilProperties.getPropertyValue("security", "user.change.password.days", "0", delegator));
- Integer passwordNoticePeriod = Integer.valueOf(EntityUtilProperties.getPropertyValue("security", "user.change.password.notification.days", "0", delegator));
+ Integer reqToChangePwdInDays = EntityUtilProperties.getPropertyAsInteger("security", "user.change.password.days", 0);
+ Integer passwordNoticePeriod = EntityUtilProperties.getPropertyAsInteger("security", "user.change.password.notification.days", 0);
if (reqToChangePwdInDays > 0) {
List<GenericValue> passwordHistories = null;
try {
Modified: ofbiz/trunk/framework/webtools/groovyScripts/entity/FindGeneric.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/groovyScripts/entity/FindGeneric.groovy?rev=1749882&r1=1749881&r2=1749882&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/groovyScripts/entity/FindGeneric.groovy (original)
+++ ofbiz/trunk/framework/webtools/groovyScripts/entity/FindGeneric.groovy Thu Jun 23 13:10:51 2016
@@ -123,7 +123,7 @@ context.viewIndexNext = viewIndex+1;
try {
viewSize = Integer.valueOf((String)parameters.get("VIEW_SIZE")).intValue();
} catch (NumberFormatException nfe) {
- viewSize = Integer.valueOf(EntityUtilProperties.getPropertyValue("widget", "widget.form.defaultViewSize", delegator)).intValue();
+ viewSize = (EntityUtilProperties.getPropertyAsInteger("widget", "widget.form.defaultViewSize", 0)).intValue();
}
context.viewSize = viewSize;
Modified: ofbiz/trunk/specialpurpose/ecommerce/groovyScripts/catalog/PopularTags.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/groovyScripts/catalog/PopularTags.groovy?rev=1749882&r1=1749881&r2=1749882&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/groovyScripts/catalog/PopularTags.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/groovyScripts/catalog/PopularTags.groovy Thu Jun 23 13:10:51 2016
@@ -29,9 +29,9 @@ import org.ofbiz.content.content.*;
import org.apache.commons.lang.StringEscapeUtils;
import org.ofbiz.entity.util.EntityUtilProperties;
-int minFontSize = Integer.parseInt(EntityUtilProperties.getPropertyValue("ecommerce", "tagcloud.min.fontsize", delegator));
-int maxFontSize = Integer.parseInt(EntityUtilProperties.getPropertyValue("ecommerce", "tagcloud.max.fontsize", delegator));
-int limitTagCloud = Integer.parseInt(EntityUtilProperties.getPropertyValue("ecommerce", "tagcloud.limit", delegator));
+int minFontSize = EntityUtilProperties.getPropertyAsInteger("ecommerce", "tagcloud.min.fontsize", 0).intValue();
+int maxFontSize = EntityUtilProperties.getPropertyAsInteger("ecommerce", "tagcloud.max.fontsize", 0).intValue();
+int limitTagCloud = EntityUtilProperties.getPropertyAsInteger("ecommerce", "tagcloud.limit", 0).intValue();
tagCloudList = [] as LinkedList;
tagList = [] as LinkedList;
Modified: ofbiz/trunk/specialpurpose/ecommerce/groovyScripts/shoppinglist/EditShoppingList.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/groovyScripts/shoppinglist/EditShoppingList.groovy?rev=1749882&r1=1749881&r2=1749882&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/groovyScripts/shoppinglist/EditShoppingList.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/groovyScripts/shoppinglist/EditShoppingList.groovy Thu Jun 23 13:10:51 2016
@@ -142,7 +142,7 @@ if (shoppingListId) {
context.shoppingListItemDatas = shoppingListItemDatas;
// pagination for the shopping list
viewIndex = Integer.valueOf(parameters.VIEW_INDEX ?: 1);
- viewSize = Integer.valueOf(parameters.VIEW_SIZE ?: EntityUtilProperties.getPropertyValue("widget", "widget.form.defaultViewSize", "20", delegator));
+ viewSize = parameters.VIEW_SIZE ?: EntityUtilProperties.getPropertyAsInteger("widget", "widget.form.defaultViewSize", 20);
listSize = shoppingListItemDatas ? shoppingListItemDatas.size() : 0;
lowIndex = ((viewIndex - 1) * viewSize) + 1;
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=1749882&r1=1749881&r2=1749882&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 Thu Jun 23 13:10:51 2016
@@ -185,7 +185,7 @@ public class ProductDocument implements
int weight = 1;
try {
// this is defaulting to a weight of 1 because you specified you wanted to index this type
- weight = Integer.parseInt(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductContent." + productContentTypeId, "1", delegator));
+ weight = EntityUtilProperties.getPropertyAsInteger("prodsearch", "index.weight.ProductContent." + productContentTypeId, 1).intValue();
} catch (Exception e) {
Debug.logWarning("Could not parse weight number: " + e.toString(), module);
}
@@ -287,7 +287,7 @@ public class ProductDocument implements
float weight = 0;
if (property != null) {
try {
- weight = Float.parseFloat(EntityUtilProperties.getPropertyValue("prodsearch", property, "0", delegator));
+ weight = EntityUtilProperties.getPropertyAsFloat("prodsearch", property, 0).floatValue();
} catch (Exception e) {
Debug.logWarning("Could not parse weight number: " + e.toString(), module);
}
Modified: ofbiz/trunk/specialpurpose/passport/src/org/ofbiz/passport/event/GitHubEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/passport/src/org/ofbiz/passport/event/GitHubEvents.java?rev=1749882&r1=1749881&r2=1749882&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/passport/src/org/ofbiz/passport/event/GitHubEvents.java (original)
+++ ofbiz/trunk/specialpurpose/passport/src/org/ofbiz/passport/event/GitHubEvents.java Thu Jun 23 13:10:51 2016
@@ -285,7 +285,7 @@ public class GitHubEvents {
String userLoginId = authn.createUser(userInfo);
userLogin = delegator.findOne("UserLogin", UtilMisc.toMap("userLoginId", userLoginId), false);
}
- String autoPassword = RandomStringUtils.randomAlphanumeric(Integer.parseInt(EntityUtilProperties.getPropertyValue("security", "password.length.min", "5", delegator)));
+ String autoPassword = RandomStringUtils.randomAlphanumeric(EntityUtilProperties.getPropertyAsInteger("security", "password.length.min", 5).intValue());
boolean useEncryption = "true".equals(UtilProperties.getPropertyValue("security", "password.encrypt"));
userLogin.set("currentPassword", useEncryption ? HashCrypt.digestHash(LoginServices.getHashType(), null, autoPassword) : autoPassword);
userLogin.store();
Modified: ofbiz/trunk/specialpurpose/passport/src/org/ofbiz/passport/event/LinkedInEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/passport/src/org/ofbiz/passport/event/LinkedInEvents.java?rev=1749882&r1=1749881&r2=1749882&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/passport/src/org/ofbiz/passport/event/LinkedInEvents.java (original)
+++ ofbiz/trunk/specialpurpose/passport/src/org/ofbiz/passport/event/LinkedInEvents.java Thu Jun 23 13:10:51 2016
@@ -292,7 +292,7 @@ public class LinkedInEvents {
String userLoginId = authn.createUser(userInfo);
userLogin = delegator.findOne("UserLogin", UtilMisc.toMap("userLoginId", userLoginId), false);
}
- String autoPassword = RandomStringUtils.randomAlphanumeric(Integer.parseInt(EntityUtilProperties.getPropertyValue("security", "password.length.min", "5", delegator)));
+ String autoPassword = RandomStringUtils.randomAlphanumeric(EntityUtilProperties.getPropertyAsInteger("security", "password.length.min", 5).intValue());
boolean useEncryption = "true".equals(UtilProperties.getPropertyValue("security", "password.encrypt"));
userLogin.set("currentPassword", useEncryption ? HashCrypt.digestHash(LoginServices.getHashType(), null, autoPassword) : autoPassword);
userLogin.store();