You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2015/11/12 10:22:39 UTC
svn commit: r1713985 [1/2] - in /ofbiz/trunk:
applications/accounting/src/org/ofbiz/accounting/finaccount/
applications/accounting/src/org/ofbiz/accounting/payment/
applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/
applications/a...
Author: jleroux
Date: Thu Nov 12 09:22:38 2015
New Revision: 1713985
URL: http://svn.apache.org/viewvc?rev=1713985&view=rev
Log:
A modified patch from Pierre Smits for "Remove superfluous .properties extension from EntityUtilProperties requests" https://issues.apache.org/jira/browse/OFBIZ-6719
Currently many EntityUtilProperties requests have the .properties extension in the parameters for the resource, but this is not needed as it is stripped later on.
jleroux: I found 5 others, replaced also
Modified:
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java
ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java
ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
ofbiz/trunk/applications/content/src/org/ofbiz/content/output/OutputServices.java
ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java
ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java
ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java
ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java
ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/thirdparty/truition/TruitionCoReg.java
ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonEvents.java
ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java
ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java
ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LdapAuthenticationServices.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/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java
ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/commons/AbstractOFBizAuthenticationHandler.java
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/guiapp/xui/XuiContainer.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java Thu Nov 12 09:22:38 2015
@@ -537,7 +537,7 @@ public class FinAccountPaymentServices {
}
String currencyUom = (String) context.get("currency");
if (UtilValidate.isEmpty(currencyUom)) {
- currencyUom = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currencyUom = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
// validate the amount
@@ -630,7 +630,7 @@ public class FinAccountPaymentServices {
}
String currencyUom = (String) context.get("currency");
if (UtilValidate.isEmpty(currencyUom)) {
- currencyUom = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currencyUom = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
GenericValue finAccount;
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java Thu Nov 12 09:22:38 2015
@@ -118,7 +118,7 @@ public class FinAccountProductServices {
// make sure we have a currency
if (currency == null) {
- currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currency = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
// get the product store
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java Thu Nov 12 09:22:38 2015
@@ -72,7 +72,7 @@ public class GiftCertificateServices {
}
String currencyUom = (String) context.get("currency");
if (UtilValidate.isEmpty(currencyUom)) {
- currencyUom = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currencyUom = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
String cardNumber = null;
@@ -175,7 +175,7 @@ public class GiftCertificateServices {
}
String currencyUom = (String) context.get("currency");
if (UtilValidate.isEmpty(currencyUom)) {
- currencyUom = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currencyUom = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
String finAccountId = null;
@@ -265,7 +265,7 @@ public class GiftCertificateServices {
}
String currencyUom = (String) context.get("currency");
if (UtilValidate.isEmpty(currencyUom)) {
- currencyUom = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currencyUom = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
// validate the amount
@@ -354,7 +354,7 @@ public class GiftCertificateServices {
}
// TODO: get the real currency from context
- //String currencyUom = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ //String currencyUom = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
// get the balance
BigDecimal balance = finAccount.get("availableBalance") == null ? BigDecimal.ZERO : finAccount.getBigDecimal("availableBalance");
@@ -374,7 +374,7 @@ public class GiftCertificateServices {
String currency = (String) context.get("currency");
// make sure we have a currency
if (currency == null) {
- currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currency = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
// get the authorizations
@@ -473,7 +473,7 @@ public class GiftCertificateServices {
// make sure we have a currency
if (currency == null) {
- currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currency = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
// obtain the order information
@@ -653,7 +653,7 @@ public class GiftCertificateServices {
// make sure we have a currency
if (currency == null) {
- currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currency = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
Map<String, Object> refundCtx = new HashMap<String, Object>();
@@ -720,7 +720,7 @@ public class GiftCertificateServices {
// make sure we have a currency
if (currency == null) {
- currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currency = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
// get the product store
@@ -969,7 +969,7 @@ public class GiftCertificateServices {
// make sure we have a currency
if (currency == null) {
- currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currency = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
// get the product store
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Thu Nov 12 09:22:38 2015
@@ -3074,7 +3074,7 @@ public class PaymentGatewayServices {
// this record is not to be stored, just passed to the service for use
// get the default currency
- String currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ String currency = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
// prepare the auth context
Map<String, Object> authContext = new HashMap<String, Object>();
@@ -3239,7 +3239,7 @@ public class PaymentGatewayServices {
requestContext.put("billToParty", orh.getBillToParty());
requestContext.put("billToEmail", billToEmail);
requestContext.put("referenceCode", referenceCode);
- String currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ String currency = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
requestContext.put("currency", currency);
requestContext.put("creditAmount", context.get("amount"));
} else {
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java Thu Nov 12 09:22:38 2015
@@ -536,7 +536,7 @@ public class IcsPaymentServices {
private static void processAuthResult(Map<String, Object> reply, Map<String, Object> result, Delegator delegator) {
String decision = getDecision(reply);
- String checkModeStatus = EntityUtilProperties.getPropertyValue("payment.properties", "payment.cybersource.ignoreStatus", delegator);
+ String checkModeStatus = EntityUtilProperties.getPropertyValue("payment", "payment.cybersource.ignoreStatus", delegator);
if ("ACCEPT".equalsIgnoreCase(decision)) {
result.put("authCode", reply.get("ccAuthReply_authorizationCode"));
result.put("authResult", Boolean.TRUE);
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java Thu Nov 12 09:22:38 2015
@@ -822,7 +822,7 @@ public class ValueLinkServices {
// make sure we have a currency
if (currency == null) {
- currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currency = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
Map<String, Object> redeemCtx = new HashMap<String, Object>();
@@ -915,7 +915,7 @@ public class ValueLinkServices {
// make sure we have a currency
if (currency == null) {
- currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currency = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
Map<String, Object> redeemCtx = new HashMap<String, Object>();
@@ -980,7 +980,7 @@ public class ValueLinkServices {
// make sure we have a currency
if (currency == null) {
- currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currency = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
Map<String, Object> refundCtx = new HashMap<String, Object>();
@@ -1046,7 +1046,7 @@ public class ValueLinkServices {
// make sure we have a currency
if (currency == null) {
- currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currency = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
// get the product store
@@ -1330,7 +1330,7 @@ public class ValueLinkServices {
// make sure we have a currency
if (currency == null) {
- currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currency = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
// get the product store
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java Thu Nov 12 09:22:38 2015
@@ -77,7 +77,7 @@ public class DataEvents {
}
// get the permission service required for streaming data; default is always the genericContentPermission
- String permissionService = EntityUtilProperties.getPropertyValue("content.properties", "stream.permission.service", "genericContentPermission", delegator);
+ String permissionService = EntityUtilProperties.getPropertyValue("content", "stream.permission.service", "genericContentPermission", delegator);
// get the content record
GenericValue content;
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java Thu Nov 12 09:22:38 2015
@@ -481,7 +481,7 @@ public class DataResourceWorker impleme
}
public static String getDataResourceContentUploadPath(Delegator delegator, boolean absolute) {
- String initialPath = EntityUtilProperties.getPropertyValue("content.properties", "content.upload.path.prefix", delegator);
+ String initialPath = EntityUtilProperties.getPropertyValue("content", "content.upload.path.prefix", delegator);
double maxFiles = UtilProperties.getPropertyNumber("content.properties", "content.upload.max.files");
if (maxFiles < 1) {
maxFiles = 250;
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/output/OutputServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/output/OutputServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/output/OutputServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/output/OutputServices.java Thu Nov 12 09:22:38 2015
@@ -239,7 +239,7 @@ public class OutputServices {
fileName += ".txt";
}
if (UtilValidate.isEmpty(filePath)) {
- filePath = EntityUtilProperties.getPropertyValue("content.properties", "content.output.path", "/output", delegator);
+ filePath = EntityUtilProperties.getPropertyValue("content", "content.output.path", "/output", delegator);
}
File file = new File(filePath, fileName);
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java Thu Nov 12 09:22:38 2015
@@ -155,7 +155,7 @@ public class SimpleContentViewHandler ex
isPublic = "N";
}
// get the permission service required for streaming data; default is always the genericContentPermission
- String permissionService = EntityUtilProperties.getPropertyValue("content.properties", "stream.permission.service", "genericContentPermission", delegator);
+ String permissionService = EntityUtilProperties.getPropertyValue("content", "stream.permission.service", "genericContentPermission", delegator);
// not public check security
if (!"Y".equalsIgnoreCase(isPublic)) {
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java Thu Nov 12 09:22:38 2015
@@ -409,7 +409,7 @@ public class ProductionRun {
taskTime = task.getDouble("estimatedMilliSeconds").doubleValue();
}
totalTaskTime = (setupTime + taskTime * quantity.doubleValue());
-
+
if (task.get("estimateCalcMethod") != null) {
String serviceName = null;
try {
Modified: ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java (original)
+++ ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java Thu Nov 12 09:22:38 2015
@@ -264,7 +264,7 @@ public class VCard {
}
ContactIOFactory ciof = Pim.getContactIOFactory();
ContactMarshaller marshaller = ciof.createContactMarshaller();
- String saveToDirectory = EntityUtilProperties.getPropertyValue("sfa.properties", "save.outgoing.directory", "", delegator);
+ String saveToDirectory = EntityUtilProperties.getPropertyValue("sfa", "save.outgoing.directory", "", delegator);
if (UtilValidate.isEmpty(saveToDirectory)) {
saveToDirectory = System.getProperty("ofbiz.home");
}
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Thu Nov 12 09:22:38 2015
@@ -334,7 +334,7 @@ public class OrderReturnServices {
for (GenericValue returnHeader : returnHeaders) {
String returnId = returnHeader.getString("returnId");
Timestamp entryDate = returnHeader.getTimestamp("entryDate");
- String daysTillCancelStr = EntityUtilProperties.getPropertyValue("order.properties", "daysTillCancelReplacementOrder", "30", delegator);
+ String daysTillCancelStr = EntityUtilProperties.getPropertyValue("order", "daysTillCancelReplacementOrder", "30", delegator);
int daysTillCancel = 0;
try {
daysTillCancel = Integer.parseInt(daysTillCancelStr);
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Thu Nov 12 09:22:38 2015
@@ -261,7 +261,7 @@ public class ShoppingCart implements Ite
this.productStoreId = productStoreId;
this.webSiteId = webSiteId;
this.locale = (locale != null) ? locale : Locale.getDefault();
- this.currencyUom = (currencyUom != null) ? currencyUom : EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ this.currencyUom = (currencyUom != null) ? currencyUom : EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
this.billToCustomerPartyId = billToCustomerPartyId;
this.billFromVendorPartyId = billFromVendorPartyId;
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java Thu Nov 12 09:22:38 2015
@@ -230,7 +230,7 @@ public class ShoppingCartHelper {
// get order item attributes
Map<String, String> orderItemAttributes = new HashMap<String, String>();
- String orderItemAttributePrefix = EntityUtilProperties.getPropertyValue("order.properties", "order.item.attr.prefix", delegator);
+ String orderItemAttributePrefix = EntityUtilProperties.getPropertyValue("order", "order.item.attr.prefix", delegator);
for (Entry<String, ? extends Object> entry : context.entrySet()) {
if (entry.getKey().toString().contains(orderItemAttributePrefix) && UtilValidate.isNotEmpty(entry.getValue())) {
orderItemAttributes.put(entry.getKey().replaceAll(orderItemAttributePrefix, ""), entry.getValue().toString());
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Thu Nov 12 09:22:38 2015
@@ -1186,7 +1186,7 @@ public class ShoppingCartItem implements
}
}
}
- if ("true".equals(EntityUtilProperties.getPropertyValue("catalog.properties", "convertProductPriceCurrency", delegator))){
+ if ("true".equals(EntityUtilProperties.getPropertyValue("catalog", "convertProductPriceCurrency", delegator))){
priceContext.put("currencyUomIdTo", cart.getCurrency());
} else {
priceContext.put("currencyUomId", cart.getCurrency());
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java Thu Nov 12 09:22:38 2015
@@ -302,10 +302,10 @@ public class ShippingEvents {
// invoke the external shipping estimate service
BigDecimal externalShipAmt = null;
if (serviceName != null) {
- String doEstimates = EntityUtilProperties.getPropertyValue("shipment.properties", "shipment.doratecheck", "true", delegator);
+ String doEstimates = EntityUtilProperties.getPropertyValue("shipment", "shipment.doratecheck", "true", delegator);
//If all estimates are not turned off, check for the individual one
if ("true".equals(doEstimates)) {
- String dothisEstimate = EntityUtilProperties.getPropertyValue("shipment.properties", "shipment.doratecheck." + serviceName, "true", delegator);
+ String dothisEstimate = EntityUtilProperties.getPropertyValue("shipment", "shipment.doratecheck." + serviceName, "true", delegator);
if ("false".equals(dothisEstimate))
serviceName = null;
} else {
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java Thu Nov 12 09:22:38 2015
@@ -588,7 +588,7 @@ public class ShoppingListServices {
} catch (GenericEntityException e) {
Debug.logError(e.getMessage(), module);
}
- String maxDaysStr = EntityUtilProperties.getPropertyValue("order.properties", "autosave.max.age", "30", delegator);
+ String maxDaysStr = EntityUtilProperties.getPropertyValue("order", "autosave.max.age", "30", delegator);
int maxDays = 0;
try {
maxDays = Integer.parseInt(maxDaysStr);
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java Thu Nov 12 09:22:38 2015
@@ -229,7 +229,7 @@ public class ZipSalesServices {
List<List<GenericValue>> itemAdjustments = new LinkedList<List<GenericValue>>();
// check for a valid state/province geo
- String validStates = EntityUtilProperties.getPropertyValue("zipsales.properties", "zipsales.valid.states", delegator);
+ String validStates = EntityUtilProperties.getPropertyValue("zipsales", "zipsales.valid.states", delegator);
if (UtilValidate.isNotEmpty(validStates)) {
List<String> stateSplit = StringUtil.split(validStates, "|");
if (!stateSplit.contains(stateProvince)) {
Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java Thu Nov 12 09:22:38 2015
@@ -716,8 +716,8 @@ public class CommunicationEventServices
if (Debug.verboseOn()) Debug.logVerbose("Processing Incoming Email " + aboutThisEmail, module);
// ignore the message when the spam status = yes
- String spamHeaderName = EntityUtilProperties.getPropertyValue("general.properties", "mail.spam.name", "N", delegator);
- String configHeaderValue = EntityUtilProperties.getPropertyValue("general.properties", "mail.spam.value", delegator);
+ String spamHeaderName = EntityUtilProperties.getPropertyValue("general", "mail.spam.name", "N", delegator);
+ String configHeaderValue = EntityUtilProperties.getPropertyValue("general", "mail.spam.value", delegator);
// only execute when config file has been set && header variable found
if (!spamHeaderName.equals("N") && wrapper.getHeader(spamHeaderName) != null && wrapper.getHeader(spamHeaderName).length > 0) {
String msgHeaderValue = wrapper.getHeader(spamHeaderName)[0];
@@ -1123,7 +1123,7 @@ public class CommunicationEventServices
Map<String, Object> result = null;
Delegator delegator = dispatcher.getDelegator();
List<Map<String, Object>> tempResults = new LinkedList<Map<String,Object>>();
- String caseInsensitiveEmail = EntityUtilProperties.getPropertyValue("general.properties", "mail.address.caseInsensitive", "N", delegator);
+ String caseInsensitiveEmail = EntityUtilProperties.getPropertyValue("general", "mail.address.caseInsensitive", "N", delegator);
if (addresses != null) {
for (Address addr: addresses) {
Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java Thu Nov 12 09:22:38 2015
@@ -820,7 +820,7 @@ public class ContactMechWorker {
String addr2 = postalAddress.getString("address2");
// get the matching string from general.properties
- String matcher = EntityUtilProperties.getPropertyValue("general.properties", "usps.address.match", postalAddress.getDelegator());
+ String matcher = EntityUtilProperties.getPropertyValue("general", "usps.address.match", postalAddress.getDelegator());
if (UtilValidate.isNotEmpty(matcher)) {
if (addr1 != null && addr1.toLowerCase().matches(matcher)) {
return true;
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java Thu Nov 12 09:22:38 2015
@@ -525,7 +525,7 @@ public class PriceServices {
}
// Convert the value to the price currency, if required
- if ("true".equals(EntityUtilProperties.getPropertyValue("catalog.properties", "convertProductPriceCurrency", delegator))) {
+ if ("true".equals(EntityUtilProperties.getPropertyValue("catalog", "convertProductPriceCurrency", delegator))) {
if (UtilValidate.isNotEmpty(currencyDefaultUomId) && UtilValidate.isNotEmpty(currencyUomIdTo) && !currencyDefaultUomId.equals(currencyUomIdTo)) {
if (UtilValidate.isNotEmpty(result)) {
Map<String, Object> convertPriceMap = new HashMap<String, Object>();
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java Thu Nov 12 09:22:38 2015
@@ -900,7 +900,7 @@ public class ProductServices {
public static Map<String, Object> updateProductIfAvailableFromShipment(DispatchContext dctx, Map<String, ? extends Object> context) {
Delegator delegator = dctx.getDelegator();
- if ("Y".equals(EntityUtilProperties.getPropertyValue("catalog.properties", "reactivate.product.from.receipt", "N", delegator))) {
+ if ("Y".equals(EntityUtilProperties.getPropertyValue("catalog", "reactivate.product.from.receipt", "N", delegator))) {
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue) context.get("userLogin");
String inventoryItemId = (String) context.get("inventoryItemId");
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java Thu Nov 12 09:22:38 2015
@@ -163,7 +163,7 @@ public class ShipmentWorker {
LocalDispatcher dispatcher = dctx.getDispatcher();
Delegator delegator = dctx.getDelegator();
BigDecimal totalWeight = BigDecimal.ZERO;
- String defaultWeightUomId = EntityUtilProperties.getPropertyValue("shipment.properties", "shipment.default.weight.uom", delegator);
+ String defaultWeightUomId = EntityUtilProperties.getPropertyValue("shipment", "shipment.default.weight.uom", delegator);
for (Map.Entry<String, BigDecimal> entry: packageMap.entrySet()) {
String productId = entry.getKey();
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=1713985&r1=1713984&r2=1713985&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 Nov 12 09:22:38 2015
@@ -524,7 +524,7 @@ public class FedexServices {
} else if (UtilValidate.isNotEmpty(shipmentRouteSegment.getString("currencyUomId"))) {
currencyCode = shipment.getString("currencyUomId");
} else {
- currencyCode = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currencyCode = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
// Get and validate origin postal address
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java Thu Nov 12 09:22:38 2015
@@ -305,7 +305,7 @@ public class UpsServices {
} else if (UtilValidate.isNotEmpty(shipment.getString("currencyUomId"))) {
currencyCode = shipment.getString("currencyUomId");
} else {
- currencyCode = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
+ currencyCode = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator);
}
// Okay, start putting the XML together...
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java Thu Nov 12 09:22:38 2015
@@ -151,7 +151,7 @@ public class WeightPackageServices {
Map<String, Object> response = new HashMap<String, Object>();
try {
- String getActualShippingQuoteFromUps = EntityUtilProperties.getPropertyValue("shipment.properties", "shipment.ups.shipping", "N", delegator);
+ String getActualShippingQuoteFromUps = EntityUtilProperties.getPropertyValue("shipment", "shipment.ups.shipping", "N", delegator);
String result = weightPackageSession.complete(orderId, locale, getActualShippingQuoteFromUps);
if ("showWarningForm".equals(result)) {
response.put("showWarningForm", true);
@@ -176,7 +176,7 @@ public class WeightPackageServices {
Map<String, Object> response = new HashMap<String, Object>();
try {
- String getActualShippingQuoteFromUps = EntityUtilProperties.getPropertyValue("shipment.properties", "shipment.ups.shipping", "N", delegator);
+ String getActualShippingQuoteFromUps = EntityUtilProperties.getPropertyValue("shipment", "shipment.ups.shipping", "N", delegator);
if (weightPackageSession.completeShipment(orderId, getActualShippingQuoteFromUps)) {
response.put("shipmentId", shipmentId);
} else {
@@ -195,7 +195,7 @@ public class WeightPackageServices {
String orderId = (String) context.get("orderId");
- String getActualShippingQuoteFromUps = EntityUtilProperties.getPropertyValue("shipment.properties", "shipment.ups.shipping", "N", delegator);
+ String getActualShippingQuoteFromUps = EntityUtilProperties.getPropertyValue("shipment", "shipment.ups.shipping", "N", delegator);
try {
weightPackageSession.savePackagesInfo(orderId, getActualShippingQuoteFromUps);
} catch (GeneralException e) {
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=1713985&r1=1713984&r2=1713985&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 Nov 12 09:22:38 2015
@@ -78,10 +78,10 @@ public class LoginEvents {
String username = request.getParameter("USERNAME");
String password = request.getParameter("PASSWORD");
- if ((username != null) && ("true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security.properties", "username.lowercase", delegator)))) {
+ if ((username != null) && ("true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security", "username.lowercase", delegator)))) {
username = username.toLowerCase();
}
- if ((password != null) && ("true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security.properties", "password.lowercase", delegator)))) {
+ if ((password != null) && ("true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security", "password.lowercase", delegator)))) {
password = password.toLowerCase();
}
@@ -127,7 +127,7 @@ public class LoginEvents {
String userLoginId = request.getParameter("USERNAME");
String errMsg = null;
- if ((userLoginId != null) && ("true".equals(EntityUtilProperties.getPropertyValue("security.properties", "username.lowercase", delegator)))) {
+ if ((userLoginId != null) && ("true".equals(EntityUtilProperties.getPropertyValue("security", "username.lowercase", delegator)))) {
userLoginId = userLoginId.toLowerCase();
}
@@ -183,11 +183,11 @@ public class LoginEvents {
String errMsg = null;
- boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.encrypt", delegator));
+ boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security", "password.encrypt", delegator));
String userLoginId = request.getParameter("USERNAME");
- if ((userLoginId != null) && ("true".equals(EntityUtilProperties.getPropertyValue("security.properties", "username.lowercase", delegator)))) {
+ if ((userLoginId != null) && ("true".equals(EntityUtilProperties.getPropertyValue("security", "username.lowercase", delegator)))) {
userLoginId = userLoginId.toLowerCase();
}
@@ -212,12 +212,12 @@ 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)));
- if ("true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.lowercase", delegator))){
+ if ("true".equals(EntityUtilProperties.getPropertyValue("security", "password.lowercase", delegator))){
passwordToSend=passwordToSend.toLowerCase();
}
supposedUserLogin.set("currentPassword", HashCrypt.cryptUTF8(LoginServices.getHashType(), null, passwordToSend));
supposedUserLogin.set("passwordHint", "Auto-Generated Password");
- if ("true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.email_password.require_password_change", delegator))){
+ if ("true".equals(EntityUtilProperties.getPropertyValue("security", "password.email_password.require_password_change", delegator))){
supposedUserLogin.set("requirePasswordChange", "Y");
}
} else {
@@ -302,7 +302,7 @@ public class LoginEvents {
serviceContext.put("sendFrom", emailTemplateSetting.get("fromAddress"));
} else {
serviceContext.put("subject", UtilProperties.getMessage(resource, "loginservices.password_reminder_subject", UtilMisc.toMap("userLoginId", userLoginId), UtilHttp.getLocale(request)));
- serviceContext.put("sendFrom", EntityUtilProperties.getPropertyValue("general.properties", "defaultFromEmailAddress", delegator));
+ serviceContext.put("sendFrom", EntityUtilProperties.getPropertyValue("general", "defaultFromEmailAddress", delegator));
}
}
serviceContext.put("sendTo", emails.toString());
@@ -386,7 +386,7 @@ public class LoginEvents {
public static void setUsername(HttpServletRequest request, HttpServletResponse response) {
HttpSession session = request.getSession();
Delegator delegator = (Delegator) request.getAttribute("delegator");
- String domain = EntityUtilProperties.getPropertyValue("url.properties", "cookie.domain", delegator);
+ String domain = EntityUtilProperties.getPropertyValue("url", "cookie.domain", delegator);
// first try to get the username from the cookie
synchronized (session) {
if (UtilValidate.isEmpty(getUsername(request))) {
Modified: ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/thirdparty/truition/TruitionCoReg.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/thirdparty/truition/TruitionCoReg.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/thirdparty/truition/TruitionCoReg.java (original)
+++ ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/thirdparty/truition/TruitionCoReg.java Thu Nov 12 09:22:38 2015
@@ -60,9 +60,9 @@ public class TruitionCoReg {
}
// locate the domain/cookie name setting
- String domainName = EntityUtilProperties.getPropertyValue("truition.properties", "truition.domain.name", delegator);
- String cookiePath = EntityUtilProperties.getPropertyValue("truition.properties", "truition.cookie.path", delegator);
- String cookieName = EntityUtilProperties.getPropertyValue("truition.properties", "truition.cookie.name", delegator);
+ String domainName = EntityUtilProperties.getPropertyValue("truition", "truition.domain.name", delegator);
+ String cookiePath = EntityUtilProperties.getPropertyValue("truition", "truition.cookie.path", delegator);
+ String cookieName = EntityUtilProperties.getPropertyValue("truition", "truition.cookie.name", delegator);
int time = (int) UtilProperties.getPropertyNumber("truition.properties", "truition.cookie.time");
if (UtilValidate.isEmpty(domainName)) {
Debug.logError("Truition is not properly configured; domainName missing; see truition.properties", module);
@@ -106,8 +106,8 @@ public class TruitionCoReg {
public static String truitionLogoff(HttpServletRequest req, HttpServletResponse resp) {
Delegator delegator = (Delegator) req.getAttribute("delegator");
// locate the domain/cookie name setting
- String domainName = EntityUtilProperties.getPropertyValue("truition.properties", "truition.domain.name", delegator);
- String cookieName = EntityUtilProperties.getPropertyValue("truition.properties", "truition.cookie.name", delegator);
+ String domainName = EntityUtilProperties.getPropertyValue("truition", "truition.domain.name", delegator);
+ String cookieName = EntityUtilProperties.getPropertyValue("truition", "truition.cookie.name", delegator);
if (UtilValidate.isEmpty(domainName)) {
Debug.logError("Truition is not properly configured; domainName missing; see truition.properties", module);
return "error";
@@ -134,7 +134,7 @@ public class TruitionCoReg {
public static String truitionRedirect(HttpServletRequest req, HttpServletResponse resp) {
Delegator delegator = (Delegator) req.getAttribute("delegator");
// redirect URL form field
- String redirectUrlName = EntityUtilProperties.getPropertyValue("truition.properties", "truition.redirect.urlName", delegator);
+ String redirectUrlName = EntityUtilProperties.getPropertyValue("truition", "truition.redirect.urlName", delegator);
String redirectUrl = req.getParameter(redirectUrlName);
Debug.logInfo("Redirect to : " + redirectUrl, module);
if (truitionEnabled() && redirectUrl != null) {
@@ -154,8 +154,8 @@ public class TruitionCoReg {
public static boolean makeTruitionCookie(GenericValue userLogin, StringBuffer cookieName, StringBuffer cookieValue) {
Delegator delegator = userLogin.getDelegator();
- String domainName = EntityUtilProperties.getPropertyValue("truition.properties", "truition.domain.name", delegator);
- String siteId = EntityUtilProperties.getPropertyValue("truition.properties", "truition.siteId", delegator);
+ String domainName = EntityUtilProperties.getPropertyValue("truition", "truition.domain.name", delegator);
+ String siteId = EntityUtilProperties.getPropertyValue("truition", "truition.siteId", delegator);
if (UtilValidate.isEmpty(domainName)) {
Debug.logError("Truition is not properly configured; domainName missing; see truition.properties!", module);
Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonEvents.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonEvents.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonEvents.java Thu Nov 12 09:22:38 2015
@@ -395,7 +395,7 @@ public class CommonEvents {
try {
Delegator delegator = (Delegator) request.getAttribute("delegator");
final String captchaSizeConfigName = StringUtils.defaultIfEmpty(request.getParameter("captchaSize"), "default");
- final String captchaSizeConfig = EntityUtilProperties.getPropertyValue("captcha.properties", "captcha." + captchaSizeConfigName, delegator);
+ final String captchaSizeConfig = EntityUtilProperties.getPropertyValue("captcha", "captcha." + captchaSizeConfigName, delegator);
final String[] captchaSizeConfigs = captchaSizeConfig.split("\\|");
final String captchaCodeId = StringUtils.defaultIfEmpty(request.getParameter("captchaCodeId"), ""); // this is used to uniquely identify in the user session the attribute where the captcha code for the last captcha for the form is stored
@@ -403,7 +403,7 @@ public class CommonEvents {
final int height = Integer.parseInt(captchaSizeConfigs[1]);
final int width = Integer.parseInt(captchaSizeConfigs[2]);
final int charsToPrint = UtilProperties.getPropertyAsInteger("captcha.properties", "captcha.code_length", 6);
- final char[] availableChars = EntityUtilProperties.getPropertyValue("captcha.properties", "captcha.characters", delegator).toCharArray();
+ final char[] availableChars = EntityUtilProperties.getPropertyValue("captcha", "captcha.characters", delegator).toCharArray();
//It is possible to pass the font size, image width and height with the request as well
Color backgroundColor = Color.gray;
Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java Thu Nov 12 09:22:38 2015
@@ -43,7 +43,7 @@ public class CommonWorkers {
public static List<GenericValue> getCountryList(Delegator delegator) {
List<GenericValue> geoList = new LinkedList<GenericValue>();
- String defaultCountry = EntityUtilProperties.getPropertyValue("general.properties", "country.geo.id.default", delegator);
+ String defaultCountry = EntityUtilProperties.getPropertyValue("general", "country.geo.id.default", delegator);
GenericValue defaultGeo = null;
if (UtilValidate.isNotEmpty(defaultCountry)) {
try {
@@ -54,7 +54,7 @@ public class CommonWorkers {
}
List<EntityExpr> exprs = UtilMisc.toList(EntityCondition.makeCondition("geoTypeId", EntityOperator.EQUALS, "COUNTRY"));
- List<String> countriesAvailable = StringUtil.split(EntityUtilProperties.getPropertyValue("general.properties", "countries.geo.id.available", delegator), ",");
+ List<String> countriesAvailable = StringUtil.split(EntityUtilProperties.getPropertyValue("general", "countries.geo.id.available", delegator), ",");
if (UtilValidate.isNotEmpty(countriesAvailable)) {
// only available countries (we don't verify the list of geoId in countries.geo.id.available)
exprs.add(EntityCondition.makeCondition("geoId", EntityOperator.IN, countriesAvailable));
@@ -108,7 +108,7 @@ public class CommonWorkers {
public static List<GenericValue> getAssociatedStateList(Delegator delegator, String country, String listOrderBy) {
if (UtilValidate.isEmpty(country)) {
// Load the system default country
- country = EntityUtilProperties.getPropertyValue("general.properties", "country.geo.id.default", delegator);
+ country = EntityUtilProperties.getPropertyValue("general", "country.geo.id.default", delegator);
}
if (UtilValidate.isEmpty(listOrderBy)) {
Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java Thu Nov 12 09:22:38 2015
@@ -135,7 +135,7 @@ public class EmailServices {
String sendBcc = (String) context.get("sendBcc");
// check to see if we should redirect all mail for testing
- String redirectAddress = EntityUtilProperties.getPropertyValue("general.properties", "mail.notifications.redirectTo", delegator);
+ String redirectAddress = EntityUtilProperties.getPropertyValue("general", "mail.notifications.redirectTo", delegator);
if (UtilValidate.isNotEmpty(redirectAddress)) {
String originalRecipients = " [To: " + sendTo + ", Cc: " + sendCc + ", Bcc: " + sendBcc + "]";
subject += originalRecipients;
@@ -167,34 +167,34 @@ public class EmailServices {
if (sendType == null || sendType.equals("mail.smtp.host")) {
sendType = "mail.smtp.host";
if (UtilValidate.isEmpty(sendVia)) {
- sendVia = EntityUtilProperties.getPropertyValue("general.properties", "mail.smtp.relay.host", "localhost", delegator);
+ sendVia = EntityUtilProperties.getPropertyValue("general", "mail.smtp.relay.host", "localhost", delegator);
}
if (UtilValidate.isEmpty(authUser)) {
- authUser = EntityUtilProperties.getPropertyValue("general.properties", "mail.smtp.auth.user", delegator);
+ authUser = EntityUtilProperties.getPropertyValue("general", "mail.smtp.auth.user", delegator);
}
if (UtilValidate.isEmpty(authPass)) {
- authPass = EntityUtilProperties.getPropertyValue("general.properties", "mail.smtp.auth.password", delegator);
+ authPass = EntityUtilProperties.getPropertyValue("general", "mail.smtp.auth.password", delegator);
}
if (UtilValidate.isNotEmpty(authUser)) {
useSmtpAuth = true;
}
if (UtilValidate.isEmpty(port)) {
- port = EntityUtilProperties.getPropertyValue("general.properties", "mail.smtp.port", delegator);
+ port = EntityUtilProperties.getPropertyValue("general", "mail.smtp.port", delegator);
}
if (UtilValidate.isEmpty(socketFactoryPort)) {
- socketFactoryPort = EntityUtilProperties.getPropertyValue("general.properties", "mail.smtp.socketFactory.port", delegator);
+ socketFactoryPort = EntityUtilProperties.getPropertyValue("general", "mail.smtp.socketFactory.port", delegator);
}
if (UtilValidate.isEmpty(socketFactoryClass)) {
- socketFactoryClass = EntityUtilProperties.getPropertyValue("general.properties", "mail.smtp.socketFactory.class", delegator);
+ socketFactoryClass = EntityUtilProperties.getPropertyValue("general", "mail.smtp.socketFactory.class", delegator);
}
if (UtilValidate.isEmpty(socketFactoryFallback)) {
- socketFactoryFallback = EntityUtilProperties.getPropertyValue("general.properties", "mail.smtp.socketFactory.fallback", "false", delegator);
+ socketFactoryFallback = EntityUtilProperties.getPropertyValue("general", "mail.smtp.socketFactory.fallback", "false", delegator);
}
if (sendPartial == null) {
- sendPartial = EntityUtilProperties.propertyValueEqualsIgnoreCase("general.properties", "mail.smtp.sendpartial", "true", delegator) ? true : false;
+ sendPartial = EntityUtilProperties.propertyValueEqualsIgnoreCase("general", "mail.smtp.sendpartial", "true", delegator) ? true : false;
}
if (isStartTLSEnabled == null) {
- isStartTLSEnabled = EntityUtilProperties.propertyValueEqualsIgnoreCase("general.properties", "mail.smtp.starttls.enable", "true", delegator);
+ isStartTLSEnabled = EntityUtilProperties.propertyValueEqualsIgnoreCase("general", "mail.smtp.starttls.enable", "true", delegator);
}
} else if (sendVia == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "CommonEmailSendMissingParameterSendVia", locale));
@@ -238,7 +238,7 @@ public class EmailServices {
}
session = Session.getInstance(props);
- boolean debug = EntityUtilProperties.propertyValueEqualsIgnoreCase("general.properties", "mail.debug.on", "Y", delegator);
+ boolean debug = EntityUtilProperties.propertyValueEqualsIgnoreCase("general", "mail.debug.on", "Y", delegator);
session.setDebug(debug);
mail = new MimeMessage(session);
@@ -309,7 +309,7 @@ public class EmailServices {
}
// check to see if sending mail is enabled
- String mailEnabled = EntityUtilProperties.getPropertyValue("general.properties", "mail.notifications.enabled", "N", delegator);
+ String mailEnabled = EntityUtilProperties.getPropertyValue("general", "mail.notifications.enabled", "N", delegator);
if (!"Y".equalsIgnoreCase(mailEnabled)) {
// no error; just return as if we already processed
Debug.logImportant("Mail notifications disabled in general.properties; mail with subject [" + subject + "] not sent to addressee [" + sendTo + "]", module);
Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LdapAuthenticationServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LdapAuthenticationServices.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LdapAuthenticationServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LdapAuthenticationServices.java Thu Nov 12 09:22:38 2015
@@ -95,7 +95,7 @@ public class LdapAuthenticationServices
}
// Synchronize user's OFBiz password with user's LDAP password
if (userLogin != null) {
- boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.encrypt", delegator));
+ boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security", "password.encrypt", delegator));
String currentPassword = userLogin.getString("currentPassword");
boolean samePassword;
if (useEncryption) {
Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java?rev=1713985&r1=1713984&r2=1713985&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 Nov 12 09:22:38 2015
@@ -92,7 +92,7 @@ public class LoginServices {
}
Map<String, Object> result = new LinkedHashMap<String, Object>();
- boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.encrypt", delegator));
+ boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security", "password.encrypt", delegator));
// if isServiceAuth is not specified, default to not a service auth
boolean isServiceAuth = context.get("isServiceAuth") != null && ((Boolean) context.get("isServiceAuth")).booleanValue();
@@ -112,10 +112,10 @@ public class LoginServices {
errMsg = UtilProperties.getMessage(resource,"loginservices.password_missing", locale);
} else {
- if ("true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security.properties", "username.lowercase", delegator))) {
+ if ("true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security", "username.lowercase", delegator))) {
username = username.toLowerCase();
}
- if ("true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security.properties", "password.lowercase", delegator))) {
+ if ("true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security", "password.lowercase", delegator))) {
password = password.toLowerCase();
}
@@ -155,7 +155,7 @@ public class LoginServices {
}
if (userLogin != null) {
- String ldmStr = EntityUtilProperties.getPropertyValue("security.properties", "login.disable.minutes", delegator);
+ String ldmStr = EntityUtilProperties.getPropertyValue("security", "login.disable.minutes", delegator);
long loginDisableMinutes = 30;
try {
@@ -265,7 +265,7 @@ public class LoginServices {
userLogin.set("successiveFailedLogins", currentFailedLogins);
// if failed logins over amount in properties file, disable account
- String mflStr = EntityUtilProperties.getPropertyValue("security.properties", "max.failed.logins", delegator);
+ String mflStr = EntityUtilProperties.getPropertyValue("security", "max.failed.logins", delegator);
long maxFailedLogins = 3;
try {
maxFailedLogins = Long.parseLong(mflStr);
@@ -302,11 +302,11 @@ public class LoginServices {
userLogin.store();
}
- if ("true".equals(EntityUtilProperties.getPropertyValue("security.properties", "store.login.history", delegator))) {
+ if ("true".equals(EntityUtilProperties.getPropertyValue("security", "store.login.history", delegator))) {
boolean createHistory = true;
// only save info on service auth if option set to true to do so
- if (isServiceAuth && !"true".equals(EntityUtilProperties.getPropertyValue("security.properties", "store.login.history.on.service.auth", delegator))) {
+ if (isServiceAuth && !"true".equals(EntityUtilProperties.getPropertyValue("security", "store.login.history.on.service.auth", delegator))) {
createHistory = false;
}
@@ -320,7 +320,7 @@ public class LoginServices {
}
// ONLY save the password if it was incorrect
- if ("N".equals(successfulLogin) && !"false".equals(EntityUtilProperties.getPropertyValue("security.properties", "store.login.history.incorrect.password", delegator))) {
+ if ("N".equals(successfulLogin) && !"false".equals(EntityUtilProperties.getPropertyValue("security", "store.login.history.incorrect.password", delegator))) {
ulhCreateMap.put("passwordUsed", password);
}
@@ -425,7 +425,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.properties", "password.change.history.limit", "0", delegator));
+ passwordChangeHistoryLimit = Integer.parseInt(EntityUtilProperties.getPropertyValue("security", "password.change.history.limit", "0", delegator));
} catch (NumberFormatException nfe) {
//No valid value is found so don't bother to save any password history
passwordChangeHistoryLimit = 0;
@@ -460,7 +460,7 @@ public class LoginServices {
// save this password in history
GenericValue userLoginPwdHistToCreate = delegator.makeValue("UserLoginPasswordHistory", UtilMisc.toMap("userLoginId", userLoginId,"fromDate", nowTimestamp));
- boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.encrypt", delegator));
+ boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security", "password.encrypt", delegator));
userLoginPwdHistToCreate.set("currentPassword", useEncryption ? HashCrypt.cryptUTF8(getHashType(), null, currentPassword) : currentPassword);
userLoginPwdHistToCreate.create();
}
@@ -478,7 +478,7 @@ public class LoginServices {
List<String> errorMessageList = new LinkedList<String>();
Locale locale = (Locale) context.get("locale");
- boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.encrypt", delegator));
+ boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security", "password.encrypt", delegator));
String userLoginId = (String) context.get("userLoginId");
String partyId = (String) context.get("partyId");
@@ -581,7 +581,7 @@ public class LoginServices {
AuthHelper.loadAuthenticators(ctx.getDispatcher());
}
- boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.encrypt", delegator));
+ boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security", "password.encrypt", delegator));
boolean adminUser = false;
String userLoginId = (String) context.get("userLoginId");
@@ -648,7 +648,7 @@ public class LoginServices {
}
}
- if ("true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.lowercase", delegator))) {
+ if ("true".equals(EntityUtilProperties.getPropertyValue("security", "password.lowercase", delegator))) {
currentPassword = currentPassword.toLowerCase();
newPassword = newPassword.toLowerCase();
newPasswordVerify = newPasswordVerify.toLowerCase();
@@ -713,7 +713,7 @@ public class LoginServices {
String userLoginId = (String) context.get("userLoginId");
String errMsg = null;
- if ((userLoginId != null) && ("true".equals(EntityUtilProperties.getPropertyValue("security.properties", "username.lowercase", delegator)))) {
+ if ((userLoginId != null) && ("true".equals(EntityUtilProperties.getPropertyValue("security", "username.lowercase", delegator)))) {
userLoginId = userLoginId.toLowerCase();
}
@@ -890,7 +890,7 @@ public class LoginServices {
public static void checkNewPassword(GenericValue userLogin, String currentPassword, String newPassword, String newPasswordVerify, String passwordHint, List<String> errorMessageList, boolean ignoreCurrentPassword, Locale locale) {
Delegator delegator = userLogin.getDelegator();
- boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security.properties", "password.encrypt", delegator));
+ boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security", "password.encrypt", delegator));
String errMsg = null;
@@ -919,7 +919,7 @@ public class LoginServices {
int passwordChangeHistoryLimit = 0;
try {
- passwordChangeHistoryLimit = Integer.parseInt(EntityUtilProperties.getPropertyValue("security.properties", "password.change.history.limit", "0", delegator));
+ passwordChangeHistoryLimit = Integer.parseInt(EntityUtilProperties.getPropertyValue("security", "password.change.history.limit", "0", delegator));
} catch (NumberFormatException nfe) {
//No valid value is found so don't bother to save any password history
passwordChangeHistoryLimit = 0;
@@ -952,15 +952,15 @@ public class LoginServices {
int minPasswordLength = 0;
try {
- minPasswordLength = Integer.parseInt(EntityUtilProperties.getPropertyValue("security.properties", "password.length.min", "0", delegator));
+ minPasswordLength = Integer.parseInt(EntityUtilProperties.getPropertyValue("security", "password.length.min", "0", delegator));
} catch (NumberFormatException nfe) {
minPasswordLength = 0;
}
if (newPassword != null) {
// Matching password with pattern
- String passwordPattern = EntityUtilProperties.getPropertyValue("security.properties", "security.login.password.pattern", "^.*(?=.{5,}).*$", delegator);
- boolean usePasswordPattern = UtilProperties.getPropertyAsBoolean("security.properties", "security.login.password.pattern.enable", true);
+ String passwordPattern = EntityUtilProperties.getPropertyValue("security", "security.login.password.pattern", "^.*(?=.{5,}).*$", delegator);
+ boolean usePasswordPattern = UtilProperties.getPropertyAsBoolean("security", "security.login.password.pattern.enable", true);
if (usePasswordPattern) {
Pattern pattern = Pattern.compile(passwordPattern);
Matcher matcher = pattern.matcher(newPassword);
@@ -968,7 +968,7 @@ public class LoginServices {
if (!matched) {
// This is a mix to handle the OOTB pattern which is only a fixed length
Map<String, String> messageMap = UtilMisc.toMap("minPasswordLength", Integer.toString(minPasswordLength));
- String passwordPatternMessage = EntityUtilProperties.getPropertyValue("security.properties",
+ String passwordPatternMessage = EntityUtilProperties.getPropertyValue("security",
"security.login.password.pattern.description", "loginservices.password_must_be_least_characters_long", delegator);
errMsg = UtilProperties.getMessage(resource, passwordPatternMessage, messageMap, locale);
messageMap = UtilMisc.toMap("passwordPatternMessage", errMsg);
@@ -994,7 +994,7 @@ public class LoginServices {
}
public static String getHashType() {
- String hashType = UtilProperties.getPropertyValue("security.properties", "password.encrypt.hash.type");
+ String hashType = UtilProperties.getPropertyValue("security", "password.encrypt.hash.type");
if (UtilValidate.isEmpty(hashType)) {
Debug.logWarning("Password encrypt hash type is not specified in security.properties, use SHA", module);
@@ -1013,7 +1013,7 @@ public class LoginServices {
passwordMatches = oldPassword.equals(currentPassword);
}
}
- if (!passwordMatches && "true".equals(UtilProperties.getPropertyValue("security.properties", "password.accept.encrypted.and.plain"))) {
+ if (!passwordMatches && "true".equals(UtilProperties.getPropertyValue("security", "password.accept.encrypted.and.plain"))) {
passwordMatches = currentPassword.equals(oldPassword);
}
return passwordMatches;
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=1713985&r1=1713984&r2=1713985&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 Nov 12 09:22:38 2015
@@ -545,7 +545,7 @@ public class LoginWorker {
if (userLogin != null && "Y".equals(userLogin.getString("requirePasswordChange"))) {
return "requirePasswordChange";
}
- String autoChangePassword = EntityUtilProperties.getPropertyValue("security.properties", "user.auto.change.password.enable", "false", delegator);
+ String autoChangePassword = EntityUtilProperties.getPropertyValue("security", "user.auto.change.password.enable", "false", delegator);
if ("true".equalsIgnoreCase(autoChangePassword)) {
if ("requirePasswordChange".equals(autoChangePassword(request, response))) {
return "requirePasswordChange";
@@ -735,7 +735,7 @@ public class LoginWorker {
Delegator delegator = (Delegator) request.getAttribute("delegator");
HttpSession session = request.getSession();
GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
- String domain = EntityUtilProperties.getPropertyValue("url.properties", "cookie.domain", delegator);
+ String domain = EntityUtilProperties.getPropertyValue("url", "cookie.domain", delegator);
if (userLogin != null) {
Cookie autoLoginCookie = new Cookie(getAutoLoginCookieName(request), userLogin.getString("userLoginId"));
autoLoginCookie.setMaxAge(60 * 60 * 24 * 365);
@@ -870,7 +870,7 @@ 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) {
Delegator delegator = (Delegator) request.getAttribute("delegator");
- String httpHeader = EntityUtilProperties.getPropertyValue("security.properties", "security.login.http.header", null, delegator);
+ String httpHeader = EntityUtilProperties.getPropertyValue("security", "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)) {
@@ -918,7 +918,7 @@ 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) {
Delegator delegator = (Delegator) request.getAttribute("delegator");
- boolean doCheck = "true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security.properties", "security.login.cert.allow", "true", delegator));
+ boolean doCheck = "true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security", "security.login.cert.allow", "true", delegator));
if (doCheck) {
HttpSession session = request.getSession();
GenericValue currentUserLogin = (GenericValue) session.getAttribute("userLogin");
@@ -929,7 +929,7 @@ public class LoginWorker {
}
}
- String cnPattern = EntityUtilProperties.getPropertyValue("security.properties", "security.login.cert.pattern", "(.*)", delegator);
+ String cnPattern = EntityUtilProperties.getPropertyValue("security", "security.login.cert.pattern", "(.*)", delegator);
Pattern pattern = Pattern.compile(cnPattern);
//Debug.logInfo("CN Pattern: " + cnPattern, module);
@@ -1067,7 +1067,7 @@ public class LoginWorker {
}
public static boolean isFlaggedLoggedOut(GenericValue userLogin, Delegator delegator) {
- if ("true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security.properties", "login.disable.global.logout", delegator))) {
+ if ("true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security", "login.disable.global.logout", delegator))) {
return false;
}
if (userLogin == null || userLogin.get("userLoginId") == null) {
@@ -1175,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(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));
+ 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));
if (reqToChangePwdInDays > 0) {
List<GenericValue> passwordHistories = null;
try {
Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=1713985&r1=1713984&r2=1713985&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Thu Nov 12 09:22:38 2015
@@ -279,7 +279,7 @@ public class RequestHandler {
}
}
if (enableHttps == null) {
- enableHttps = EntityUtilProperties.propertyValueEqualsIgnoreCase("url.properties", "port.https.enabled", "Y", delegator);
+ enableHttps = EntityUtilProperties.propertyValueEqualsIgnoreCase("url", "port.https.enabled", "Y", delegator);
}
if (Boolean.FALSE.equals(enableHttps)) {
@@ -396,7 +396,7 @@ public class RequestHandler {
if (protectView != null) {
overrideViewUri = protectView;
} else {
- overrideViewUri = EntityUtilProperties.getPropertyValue("security.properties", "default.error.response.view", delegator);
+ overrideViewUri = EntityUtilProperties.getPropertyValue("security", "default.error.response.view", delegator);
overrideViewUri = overrideViewUri.replace("view:", "");
if ("none:".equals(overrideViewUri)) {
interruptRequest = true;
@@ -1025,11 +1025,11 @@ public class RequestHandler {
@Deprecated
public static String getDefaultServerRootUrl(HttpServletRequest request, boolean secure) {
Delegator delegator = (Delegator) request.getAttribute("delegator");
- String httpsPort = EntityUtilProperties.getPropertyValue("url.properties", "port.https", "443", delegator);
- String httpsServer = EntityUtilProperties.getPropertyValue("url.properties", "force.https.host", delegator);
- String httpPort = EntityUtilProperties.getPropertyValue("url.properties", "port.http", "80", delegator);
- String httpServer = EntityUtilProperties.getPropertyValue("url.properties", "force.http.host", delegator);
- boolean useHttps = EntityUtilProperties.propertyValueEqualsIgnoreCase("url.properties", "port.https.enabled", "Y", delegator);
+ String httpsPort = EntityUtilProperties.getPropertyValue("url", "port.https", "443", delegator);
+ String httpsServer = EntityUtilProperties.getPropertyValue("url", "force.https.host", delegator);
+ String httpPort = EntityUtilProperties.getPropertyValue("url", "port.http", "80", delegator);
+ String httpServer = EntityUtilProperties.getPropertyValue("url", "force.http.host", delegator);
+ boolean useHttps = EntityUtilProperties.propertyValueEqualsIgnoreCase("url", "port.https.enabled", "Y", delegator);
if (Start.getInstance().getConfig().portOffset != 0) {
Integer httpPortValue = Integer.valueOf(httpPort);