Reverting r1646165. It seems that changes that we did for <property-to-field> are not needed. I will commit the new changes soon.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1646191 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ashish Vijaywargiya
2014-12-17 10:49:41 +00:00
parent d3e50d1e18
commit f19b8bdfe7
40 changed files with 112 additions and 439 deletions
@@ -22,20 +22,8 @@ under the License.
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd">
<simple-method method-name="getArithmeticSettingsInline" short-description="getArithmeticSettingsInline">
<call-class-method method-name="getPropertyValue" ret-field="roundingDecimals" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="arithmetic"/>
<string value="finaccount.decimals"/>
<string value="2"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getPropertyValue" ret-field="roundingMode" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="arithmetic"/>
<string value="finaccount.roundingSimpleMethod"/>
<string value="HalfUp"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="arithmetic" property="finaccount.decimals" field="roundingDecimals" default="2"/>
<property-to-field resource="arithmetic" property="finaccount.roundingSimpleMethod" field="roundingMode" default="HalfUp"/>
<log level="verbose" message="Got settings from arithmetic.properties: roundingDecimals=${roundingDecimals}, roundingMode=${roundingMode}"/>
</simple-method>
@@ -59,12 +47,8 @@ under the License.
<!-- set the currency if none is already set -->
<if-empty field="newEntity.currencyUomId">
<call-class-method method-name="getMessage" ret-field="defaultCurrency" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general"/>
<string value="currency.uom.id.default"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="general" property="currency.uom.id.default" field="defaultCurrency"/>
<set field="newEntity.currencyUomId" from-field="defaultCurrency"/>
</if-empty>
@@ -710,13 +694,7 @@ under the License.
</call-service>
<set field="currencyUomId" from-field="partyAccountingPreference.baseCurrencyUomId"/>
<if-empty field="currencyUomId">
<call-class-method method-name="getMessage" ret-field="currencyUomId" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general"/>
<string value="currency.uom.id.default"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="general" property="currency.uom.id.default" field="currencyUomId"/>
</if-empty>
<set field="finAccountTransRunningTotal" value="${groovy:org.ofbiz.base.util.UtilFormatOut.formatCurrency(runningTotal, currencyUomId, parameters.locale)}"/>
<set field="endingBalance" value="${groovy:org.ofbiz.base.util.UtilFormatOut.formatCurrency(endingBalance, currencyUomId, parameters.locale)}"/>
@@ -692,12 +692,7 @@ under the License.
</call-service>
<set field="currencyUomId" from-field="partyAccountingPreference.baseCurrencyUomId"/>
<if-empty field="currencyUomId">
<call-class-method method-name="getMessage" ret-field="currencyUomId" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general"/>
<string value="currency.uom.id.default"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="general" property="currency.uom.id.default" field="currencyUomId"/>
</if-empty>
<set field="invoiceRunningTotal" value="${groovy:org.ofbiz.base.util.UtilFormatOut.formatCurrency(runningTotal, currencyUomId, parameters.locale)}"/>
<field-to-result field="invoiceRunningTotal"/>
@@ -928,12 +923,7 @@ under the License.
</entity-one>
<set field="invoicePerShipment" from-field="orderHeader.invoicePerShipment"/>
<if-empty field="invoicePerShipment">
<call-class-method method-name="getMessage" ret-field="invoicePerShipment" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="AccountingConfig"/>
<string value="create.invoice.per.shipment"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="AccountingConfig" property="create.invoice.per.shipment" field="invoicePerShipment"/>
</if-empty>
<if-compare operator="equals" value="N" field="invoicePerShipment">
<entity-and list="orderItemBilling" entity-name="OrderItemBilling">
@@ -2849,20 +2849,8 @@ under the License.
</simple-method>
<simple-method method-name="getGlArithmeticSettingsInline" short-description="getGlArithmeticSettingsInline">
<call-class-method method-name="getPropertyValue" ret-field="ledgerDecimals" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="arithmetic"/>
<string value="ledger.decimals"/>
<string value="4"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getPropertyValue" ret-field="roundingMode" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="arithmetic"/>
<string value="ledger.rounding"/>
<string value="HalfUp"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="arithmetic" property="ledger.decimals" field="ledgerDecimals" default="4"/>
<property-to-field resource="arithmetic" property="ledger.rounding" field="roundingMode" default="HalfUp"/>
<log level="info" message="Got settings from arithmetic.properties: ledgerDecimals=${ledgerDecimals}, roundingMode=${roundingMode}"/>
</simple-method>
@@ -603,12 +603,7 @@ under the License.
</call-service>
<set field="currencyUomId" from-field="partyAccountingPreference.baseCurrencyUomId"/>
<if-empty field="currencyUomId">
<call-class-method method-name="getMessage" ret-field="currencyUomId" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general"/>
<string value="currency.uom.id.default"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="general" property="currency.uom.id.default" field="currencyUomId"/>
</if-empty>
<set field="paymentRunningTotal" value="${groovy:org.ofbiz.base.util.UtilFormatOut.formatCurrency(runningTotal, currencyUomId, parameters.locale)}"/>
<field-to-result field="paymentRunningTotal"/>
@@ -902,13 +897,7 @@ under the License.
<entity-one value-field="orderHeader" entity-name="OrderHeader"/>
<if-compare operator="equals" value="PURCHASE_ORDER" field="orderHeader.orderTypeId">
<call-class-method method-name="getPropertyValue" ret-field="purchaseAutoCreate" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="AccountingConfig"/>
<string value="accounting.payment.purchaseorder.autocreate"/>
<string value="Y"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="AccountingConfig" property="accounting.payment.purchaseorder.autocreate" field="purchaseAutoCreate" default="Y"/>
<if-compare operator="not-equals" value="Y" field="purchaseAutoCreate">
<log level="info" message="payment not created from approved order because config (accounting.payment.purchaseorder.autocreate) is not set to Y (AccountingConfig.properties)"/>
<return/>
@@ -916,13 +905,7 @@ under the License.
</if-compare>
<if-compare operator="equals" value="SALES_ORDER" field="orderHeader.orderTypeId">
<call-class-method method-name="getPropertyValue" ret-field="salesAutoCreate" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="AccountingConfig"/>
<string value="accounting.payment.salesorder.autocreate"/>
<string value="Y"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="AccountingConfig" property="accounting.payment.salesorder.autocreate" field="salesAutoCreate" default="Y"/>
<if-compare operator="not-equals" value="Y" field="salesAutoCreate">
<log level="info" message="payment not created from approved order because config (accounting.payment.salesorder.autocreate) is not set to Y (AccountingConfig.properties)"/>
<return/>
@@ -1056,13 +1039,7 @@ under the License.
<simple-method method-name="createMatchingPaymentApplication" short-description="Create a payment application if either the invoice of payment could be found">
<call-class-method method-name="getPropertyValue" ret-field="autoCreate" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="AccountingConfig"/>
<string value="accounting.payment.application.autocreate"/>
<string value="Y"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="AccountingConfig" property="accounting.payment.application.autocreate" field="autoCreate" default="Y"/>
<if-compare operator="not-equals" value="Y" field="autoCreate">
<log level="info" message="payment application not automatically created because config is not set to Y"/>
<return/>
@@ -30,12 +30,7 @@ under the License.
<!-- set defaults -->
<if-empty field="parameters.rateCurrencyUomId">
<call-class-method method-name="getMessage" ret-field="parameters.rateCurrencyUomId" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general.properties"/>
<string value="currency.uom.id.default"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="general.properties" property="currency.uom.id.default" field="parameters.rateCurrencyUomId"/>
</if-empty>
<if-empty field="parameters.periodTypeId">
<set field="parameters.periodTypeId" value="RATE_HOUR"/>
@@ -86,12 +81,7 @@ under the License.
<!-- set defaults -->
<if-empty field="parameters.rateCurrencyUomId">
<call-class-method method-name="getMessage" ret-field="parameters.rateCurrencyUomId" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general.properties"/>
<string value="currency.uom.id.default"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="general.properties" property="currency.uom.id.default" field="parameters.rateCurrencyUomId"/>
</if-empty>
<if-empty field="parameters.periodTypeId">
<set field="parameters.periodTypeId" value="RATE_HOUR"/>
@@ -140,12 +130,7 @@ under the License.
Then will be checked if the requested periodTypeId and currency can be found, if not isue an error message
-->
<if-empty field="parameters.rateCurrencyUomId">
<call-class-method method-name="getMessage" ret-field="parameters.rateCurrencyUomId" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general.properties"/>
<string value="currency.uom.id.default"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="general.properties" property="currency.uom.id.default" field="parameters.rateCurrencyUomId"/>
</if-empty>
<if-empty field="parameters.periodTypeId">
<set field="parameters.periodTypeId" value="RATE_HOUR"/>
@@ -394,12 +379,7 @@ under the License.
<set-nonpk-fields value-field="posRate" map="rateAmount"/>
<set field="rateAmount.workeffortId" value="_NA_"/>
<set field="rateAmount.partyId" value="_NA_"/>
<call-class-method method-name="getMessage" ret-field="rateAmount.rateCurrencyUomId" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general.properties"/>
<string value="currency.uom.id.default"/>
<field field="locale" type="java.util.locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="general.properties" property="currency.uom.id.default" field="rateAmount.rateCurrencyUomId"/>
<create-value value-field="rateAmount"/>
</iterate>
<entity-condition entity-name="OldPartyRate" list="partyRates"/>
@@ -865,7 +865,7 @@ public class CCPaymentServices {
Element instructionsElement = UtilXml.addChildElement(engineDocElement, "Instructions", requestDocument);
String pipeline = "PaymentNoFraud";
if (EntityUtilProperties.propertyValueEqualsIgnoreCase(paymentConfig, "payment.clearcommerce.enableFraudShield", "Y", delegator)) {
if (UtilProperties.propertyValueEqualsIgnoreCase(paymentConfig, "payment.clearcommerce.enableFraudShield", "Y")) {
pipeline = "Payment";
}
UtilXml.addChildElementValue(instructionsElement, "Pipeline", pipeline, requestDocument);
@@ -977,12 +977,7 @@
<set field="pubPtContentId" from-field="parameters.pubPtContentId"/>
<call-object-method method-name="length" obj-field="parameters.textData" ret-field="textDataLen"/>
<log level="info" message="textDataLen:${textDataLen}"/>
<call-class-method method-name="getMessage" ret-field="descriptLen" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="forum"/>
<string value="descriptLen"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="forum" property="descriptLen" field="descriptLen"/>
<set field="descriptLen" from-field="descriptLen" type="Integer"/>
<log level="info" message="descriptLen:${descriptLen}"/>
<call-class-method method-name="min" class-name="java.lang.Math" ret-field="subStringLen">
@@ -561,12 +561,7 @@ under the License.
<simple-method method-name="attachUploadToDataResource" short-description="Attach an uploaded file to a data resource">
<set field="isUpdate" value="false"/>
<call-class-method method-name="getMessage" ret-field="forceLocal" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="content.properties"/>
<string value="content.upload.always.local.file"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="content.properties" property="content.upload.always.local.file" field="forceLocal"/>
<if>
<condition>
<!-- if (forceLocal && !("LOCAL_FILE".equals(parameters.dataResourceTypeId) || "OFBIZ_FILE".equals(parameters.dataResourceTypeId)) -->
@@ -1392,12 +1392,7 @@ under the License.
]]></call-bsh>
<set field="newAmount" from-field="parameters.amount" type="BigDecimal"/>
<set field="shippingAmount" from-field="parameters.shippingAmount" type="BigDecimal"/>
<call-class-method method-name="getMessage" ret-field="percentAllowed" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="shipment"/>
<string value="shipment.default.cost_actual_over_estimated_percent_allowed"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field field="percentAllowed" resource="shipment" property="shipment.default.cost_actual_over_estimated_percent_allowed"/>
<if-compare-field field="newAmount" operator="greater" to-field="shippingAmount" type="BigDecimal">
<set field="diffPercentage" value="${(newAmount - shippingAmount/shippingAmount)*100}" type="BigDecimal"/>
<else>
@@ -39,7 +39,7 @@ viewIndex = parameters.VIEW_INDEX;
currentCatalogId = CatalogWorker.getCurrentCatalogId(request);
// set the default view size
defaultViewSize = request.getAttribute("defaultViewSize") ?: EntityUtilProperties.getPropertyValue("widget", "widget.form.defaultViewSize", "20", delegator);
defaultViewSize = request.getAttribute("defaultViewSize") ?: UtilProperties.getPropertyValue("widget", "widget.form.defaultViewSize", "20");
context.defaultViewSize = defaultViewSize;
// set the limit view
@@ -321,13 +321,7 @@ under the License.
<set field="input.inputFields.infoString" from-field="parameters.address"/>
<set field="caseInsensitive" from-field="parameters.caseInsensitive"/>
<if-empty field="caseInsensitive">
<call-class-method method-name="getPropertyValue" ret-field="caseInsensitive" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general.properties"/>
<string value="mail.address.caseInsensitive"/>
<string value="N"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="general.properties" property="mail.address.caseInsensitive" field="caseInsensitive" default="N"/>
</if-empty>
<set field="input.inputFields.infoString_ic" from-field="caseInsensitive"/>
<if-empty field="parameters.fromDate">
@@ -26,20 +26,9 @@ under the License.
<set field="create_allow_password" value="false"/>
<set field="default_customer_password" value="ungssblepsswd"/>
<call-class-method method-name="getPropertyValue" ret-field="username_lowercase" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="security"/>
<string value="username.lowercase"/>
<string value="false"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getPropertyValue" ret-field="password_lowercase" method-name="getPropertyValue" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="security"/>
<string value="password.lowercase"/>
<string value="false"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="security" property="username.lowercase" default="false" field="username_lowercase"/>
<property-to-field resource="security" property="password.lowercase" default="false" field="password_lowercase"/>
<now-timestamp field="nowStamp"/>
<set field="parameters.roleTypeId" value="CUSTOMER"/>
@@ -35,20 +35,8 @@ under the License.
<set field="require_login" value="false"/>
<set field="create_allow_password" value="true"/>
<call-class-method method-name="getPropertyValue" ret-field="username_lowercase" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="security"/>
<string value="username.lowercase"/>
<string value="false"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getPropertyValue" ret-field="password_lowercase" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="security"/>
<string value="password.lowercase"/>
<string value="false"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="security" property="username.lowercase" default="false" field="username_lowercase"/>
<property-to-field resource="security" property="password.lowercase" default="false" field="password_lowercase"/>
<now-timestamp field="nowStamp"/>
<set field="parameters.roleTypeId" value="PROSPECT"/>
@@ -61,20 +49,8 @@ under the License.
<set field="require_login" value="true"/>
<set field="create_allow_password" value="true"/>
<call-class-method method-name="getPropertyValue" ret-field="username_lowercase" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="security"/>
<string value="username.lowercase"/>
<string value="false"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getPropertyValue" ret-field="password_lowercase" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="security"/>
<string value="password.lowercase"/>
<string value="false"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="security" property="username.lowercase" default="false" field="username_lowercase"/>
<property-to-field resource="security" property="password.lowercase" default="false" field="password_lowercase"/>
<now-timestamp field="nowStamp"/>
<set field="parameters.roleTypeId" value="EMPLOYEE"/>
@@ -82,20 +58,8 @@ under the License.
</simple-method>
<simple-method method-name="createUser" short-description="Create User" login-required="false">
<call-class-method method-name="getPropertyValue" ret-field="username_lowercase" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="security"/>
<string value="username.lowercase"/>
<string value="false"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getPropertyValue" ret-field="password_lowercase" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="security"/>
<string value="password.lowercase"/>
<string value="false"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="security" property="username.lowercase" default="false" field="username_lowercase"/>
<property-to-field resource="security" property="password.lowercase" default="false" field="password_lowercase"/>
<set field="default_user_password" value="ungssblepsswd"/>
<now-timestamp field="nowStamp"/>
@@ -359,11 +323,9 @@ under the License.
<set-current-user-login value-field="newUserLogin"/>
<!-- On successful user creation, create password history record if configured -->
<call-class-method method-name="getMessage" class-name="org.ofbiz.base.util.EntityUtilProperties" ret-field="autoPasswordChangeEnabled">
<call-class-method method-name="getPropertyValue" class-name="org.ofbiz.base.util.UtilProperties" ret-field="autoPasswordChangeEnabled">
<string value="security"/>
<string value="user.auto.change.password.enable"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<if-compare-field field="autoPasswordChangeEnabled" operator="equals" to-field="true">
<call-class-method method-name="createUserLoginPasswordHistory" class-name="org.ofbiz.common.login.LoginServices">
@@ -19,13 +19,12 @@
import org.ofbiz.base.util.*;
import org.ofbiz.entity.condition.*;
import org.ofbiz.entity.util.EntityUtilProperties;
if (context.noConditionFind == null) {
context.noConditionFind = parameters.noConditionFind;
}
if (context.noConditionFind == null) {
context.noConditionFind = EntityUtilProperties.getPropertyValue("widget", "widget.defaultNoConditionFind", delegator);
context.noConditionFind = UtilProperties.getPropertyValue("widget", "widget.defaultNoConditionFind");
}
if (context.filterByDate == null) {
context.filterByDate = parameters.filterByDate;
@@ -25,12 +25,7 @@ under the License.
<if-not-empty field="parameters.topCategory">
<set field="defaultTopCategoryId" from-field="parameters.topCategory"/>
<else>
<call-class-method method-name="getMessage" ret-field="defaultTopCategoryId" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="catalog"/>
<string value="top.category.default"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field property="top.category.default" field="defaultTopCategoryId" resource="catalog"/>
</else>
</if-not-empty>
<!-- set field="productCategoryContext.productCategoryId" from-field="defaultTopCategoryId"/>
@@ -555,20 +555,8 @@ under the License.
<set field="oldProductQuantity" value="${quantityOnHandTotal - parameters.quantityAccepted}" type="BigDecimal"/>
<set field="productAverageCostMap.averageCost" value="${((productAverageCost.averageCost * oldProductQuantity) + (inventoryItem.unitCost * parameters.quantityAccepted))/(quantityOnHandTotal)}" type="BigDecimal"/>
<call-class-method method-name="getPropertyValue" ret-field="roundingDecimals" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="arithmetic"/>
<string value="finaccount.decimals"/>
<string value="2"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getPropertyValue" ret-field="roundingMode" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="arithmetic"/>
<string value="finaccount.roundingSimpleMethod"/>
<string value="HalfUp"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="arithmetic" property="finaccount.decimals" field="roundingDecimals" default="2"/>
<property-to-field resource="arithmetic" property="finaccount.roundingSimpleMethod" field="roundingMode" default="HalfUp"/>
<calculate field="productAverageCostMap.averageCost" type="BigDecimal" decimal-scale="${roundingDecimals}" rounding-mode="${roundingMode}">
<calcop operator="get" field="productAverageCostMap.averageCost"/>
</calculate>
@@ -251,19 +251,8 @@ under the License.
if (statusId) return statusId[0];
}"/>
<call-class-method method-name="getMessage" ret-field="autoApproveImage" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="catalog.properties"/>
<string value="image.management.autoApproveImage"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getMessage" ret-field="multipleApproval" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="catalog.properties"/>
<string value="image.management.multipleApproval"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="catalog.properties" property="image.management.autoApproveImage" field="autoApproveImage"/>
<property-to-field resource="catalog.properties" property="image.management.multipleApproval" field="multipleApproval"/>
<if-compare field="autoApproveImage" operator="equals" value="Y">
<entity-and entity-name="ContentApproval" list="contentApprovals">
<field-map field-name="contentId" from-field="parameters.contentId"/>
@@ -239,12 +239,7 @@ under the License.
</call-service>
<set field="inventoryItem.currencyUomId" from-field="accPref.baseCurrencyUomId"/>
<if-empty field="inventoryItem.currencyUomId">
<call-class-method method-name="getMessage" ret-field="inventoryItem.currencyUomId" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general"/>
<string value="currency.uom.id.default"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="general" property="currency.uom.id.default" field="inventoryItem.currencyUomId"/>
</if-empty>
<!-- if inventoryItem's currencyUomId is still empty, return an error message -->
<if-empty field="inventoryItem.currencyUomId">
@@ -22,12 +22,7 @@ under the License.
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd">
<simple-method method-name="createFixedAssetAndLinkToProduct" short-description="Create an FixedAsset and link the asset to the product, used when a asset usage product is created">
<call-class-method method-name="getMessage" ret-field="autoCreate" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="AccountingConfig"/>
<string value="accounting.fixedasset.autocreate"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field field="autoCreate" resource="AccountingConfig" property="accounting.fixedasset.autocreate" no-locale="true"/>
<if-compare field="autoCreate" value="Y" operator="not-equals">
<return/>
</if-compare>
@@ -143,24 +143,13 @@ under the License.
<field-map field-name="partyId" value="${invoice.partyId}"/>
</entity-one>
<if-empty field="party.preferredCurrencyUomId">
<call-class-method method-name="getMessage" ret-field="party.preferredCurrencyUomId" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general"/>
<string value="currency.uom.id.default"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="general" property="currency.uom.id.default" field="party.preferredCurrencyUomId"/>
</if-empty>
<set field="updateInvoiceMap.invoiceId" from-field="parameters.invoiceId"/>
<set field="updateInvoiceMap.currencyUomId" from-field="party.preferredCurrencyUomId"/>
<now-timestamp field="updateInvoiceMap.invoiceDate"/>
<if-empty field="updateInvoiceMap.currencyUomId">
<call-class-method method-name="getPropertyValue" ret-field="invoice.currencyUomId" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general"/>
<string value="currency.uom.id.default"/>
<string value="USD"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field field="invoice.currencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
</if-empty>
<call-service service-name="updateInvoice" in-map-name="updateInvoiceMap"/>
<entity-one entity-name="Invoice" value-field="invoice"/>
@@ -51,13 +51,7 @@ under the License.
<if-not-empty field="emailTemplateSetting.fromAddress">
<set field="emailParams.sendFrom" from-field="emailTemplateSetting.fromAddress"/>
<else>
<call-class-method method-name="getPropertyValue" ret-field="emailParams.sendFrom" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general"/>
<string value="defaultFromEmailAddress"/>
<string value="ofbiztest@example.com"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="general" property="defaultFromEmailAddress" field="emailParams.sendFrom" default="ofbiztest@example.com"/>
</else>
</if-not-empty>
<set field="emailParams.sendCc" from-field="emailTemplateSetting.ccAddress"/>
@@ -238,7 +238,7 @@ public class EmailServices {
}
session = Session.getInstance(props);
boolean debug = EntityUtilProperties.propertyValueEqualsIgnoreCase("general.properties", "mail.debug.on", "Y", delegator);
boolean debug = UtilProperties.propertyValueEqualsIgnoreCase("general.properties", "mail.debug.on", "Y");
session.setDebug(debug);
mail = new MimeMessage(session);
@@ -36,20 +36,10 @@ under the License.
</call-class-method>
<assert><if-compare field="defaultFromEmailAddress" operator="equals" value="propertytest@example.com"></if-compare></assert>
<call-class-method method-name="getMessage" ret-field="currencyUomIdDefault" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general"/>
<string value="currency.uom.id.default"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="general" property="currency.uom.id.default" field="currencyUomIdDefault"/>
<assert><if-compare field="currencyUomIdDefault" operator="equals" value="THB"></if-compare></assert>
<call-class-method method-name="getMessage" ret-field="defaultFromEmailAddress" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general"/>
<string value="defaultFromEmailAddress"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="general" property="defaultFromEmailAddress" field="defaultFromEmailAddress"/>
<assert><if-compare field="defaultFromEmailAddress" operator="equals" value="propertytest@example.com"></if-compare></assert>
</simple-method>
</simple-methods>
@@ -88,19 +88,6 @@ public class EntityUtilProperties implements Serializable {
}
return value;
}
public static String getPropertyValue(String resource, String name, String defaultValue, Locale locale, Delegator delegator) {
String value = getSystemPropertyValue(resource, name, delegator);
if (UtilValidate.isEmpty(value)) {
if (UtilValidate.isNotEmpty(locale)) {
value = UtilProperties.getMessage(resource, name, locale);
}
if (UtilValidate.isEmpty(value)) {
value = UtilProperties.getPropertyValue(resource, name, defaultValue);
}
}
return value;
}
public static double getPropertyNumber(String resource, String name, double defaultValue) {
return UtilProperties.getPropertyNumber(resource, name, defaultValue);
@@ -237,7 +237,7 @@ public class LoginWorker {
// check if they have permission for this login attempt; if not log them out
if (userLogin != null) {
List<Object> errorMessageList = UtilGenerics.checkList(request.getAttribute("_ERROR_MESSAGE_LIST"));
if (!hasBasePermission(userLogin, request) || isFlaggedLoggedOut(userLogin, userLogin.getDelegator())) {
if (!hasBasePermission(userLogin, request) || isFlaggedLoggedOut(userLogin)) {
if (errorMessageList == null) {
errorMessageList = new LinkedList<Object>();
request.setAttribute("_ERROR_MESSAGE_LIST", errorMessageList);
@@ -1066,8 +1066,8 @@ public class LoginWorker {
return "success";
}
public static boolean isFlaggedLoggedOut(GenericValue userLogin, Delegator delegator) {
if ("true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security.properties", "login.disable.global.logout", delegator))) {
public static boolean isFlaggedLoggedOut(GenericValue userLogin) {
if ("true".equalsIgnoreCase(UtilProperties.getPropertyValue("security.properties", "login.disable.global.logout"))) {
return false;
}
if (userLogin == null || userLogin.get("userLoginId") == null) {
@@ -71,6 +71,8 @@ import org.python.modules.re;
public class RequestHandler {
public static final String module = RequestHandler.class.getName();
private static final boolean throwRequestHandlerExceptionOnMissingLocalRequest = UtilProperties.propertyValueEqualsIgnoreCase(
"requestHandler.properties", "throwRequestHandlerExceptionOnMissingLocalRequest", "Y");
private final String defaultStatusCodeString = UtilProperties.getPropertyValue("requestHandler.properties", "status-code", "302");
private final ViewFactory viewFactory;
private final EventFactory eventFactory;
@@ -129,8 +131,6 @@ public class RequestHandler {
public void doRequest(HttpServletRequest request, HttpServletResponse response, String chain,
GenericValue userLogin, Delegator delegator) throws RequestHandlerException, RequestHandlerExceptionAllowExternalRequests {
final boolean throwRequestHandlerExceptionOnMissingLocalRequest = EntityUtilProperties.propertyValueEqualsIgnoreCase(
"requestHandler.properties", "throwRequestHandlerExceptionOnMissingLocalRequest", "Y", delegator);
long startTime = System.currentTimeMillis();
HttpSession session = request.getSession();
@@ -280,7 +280,7 @@ public class RequestHandler {
}
}
if (enableHttps == null) {
enableHttps = EntityUtilProperties.propertyValueEqualsIgnoreCase("url.properties", "port.https.enabled", "Y", delegator);
enableHttps = UtilProperties.propertyValueEqualsIgnoreCase("url.properties", "port.https.enabled", "Y");
}
if (Boolean.FALSE.equals(enableHttps)) {
@@ -1024,11 +1024,11 @@ public class RequestHandler {
@Deprecated
public static String getDefaultServerRootUrl(HttpServletRequest request, boolean secure) {
Delegator delegator = (Delegator) request.getAttribute("delegator");
String httpsPort = 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 = UtilProperties.getPropertyValue("url.properties", "port.https", "443");
String httpsServer = UtilProperties.getPropertyValue("url.properties", "force.https.host");
String httpPort = UtilProperties.getPropertyValue("url.properties", "port.http", "80");
String httpServer = UtilProperties.getPropertyValue("url.properties", "force.http.host");
boolean useHttps = UtilProperties.propertyValueEqualsIgnoreCase("url.properties", "port.https.enabled", "Y");
if (Start.getInstance().getConfig().portOffset != 0) {
Integer httpPortValue = Integer.valueOf(httpPort);
@@ -37,7 +37,6 @@ import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.model.ModelEntity;
import org.ofbiz.entity.util.EntityQuery;
import org.ofbiz.entity.util.EntityUtilProperties;
import com.ibm.icu.util.Calendar;
@@ -214,7 +213,7 @@ public class ServerHitBin {
// put the copy at the first of the list, then put this object back on
if (bin.getNumberHits() > 0) {
// persist each bin when time ends if option turned on
if (EntityUtilProperties.propertyValueEqualsIgnoreCase("serverstats", "stats.persist." + ServerHitBin.typeIds[type] + ".bin", "true", delegator)) {
if (UtilProperties.propertyValueEqualsIgnoreCase("serverstats", "stats.persist." + ServerHitBin.typeIds[type] + ".bin", "true")) {
GenericValue serverHitBin = delegator.makeValue("ServerHitBin");
serverHitBin.set("contentId", bin.id);
serverHitBin.set("hitTypeId", ServerHitBin.typeIds[bin.type]);
@@ -466,8 +465,7 @@ public class ServerHitBin {
private void saveHit(HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin) throws GenericEntityException {
// persist record of hit in ServerHit entity if option turned on
Delegator delegator = (Delegator) request.getAttribute("delegator");
if (EntityUtilProperties.propertyValueEqualsIgnoreCase("serverstats", "stats.persist." + ServerHitBin.typeIds[type] + ".hit", "true", delegator)) {
if (UtilProperties.propertyValueEqualsIgnoreCase("serverstats", "stats.persist." + ServerHitBin.typeIds[type] + ".hit", "true")) {
// if the hit type is ENTITY and the name contains "ServerHit" don't
// persist; avoids the infinite loop and a bunch of annoying data
if (this.type == ENTITY && this.id.indexOf("ServerHit") > 0) {
@@ -36,7 +36,6 @@ import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.model.ModelEntity;
import org.ofbiz.entity.util.EntityQuery;
import org.ofbiz.entity.util.EntityUtilProperties;
/**
* Handles saving and maintaining visit information
@@ -205,8 +204,7 @@ public class VisitHandler {
public static GenericValue getVisitor(HttpServletRequest request, HttpServletResponse response) {
// this defaults to true: ie if anything but "false" it will be true
Delegator delegator = (Delegator) request.getAttribute("delegator");
if (!EntityUtilProperties.propertyValueEqualsIgnoreCase("serverstats", "stats.persist.visitor", "false", delegator)) {
if (!UtilProperties.propertyValueEqualsIgnoreCase("serverstats", "stats.persist.visitor", "false")) {
HttpSession session = request.getSession();
GenericValue visitor = (GenericValue) session.getAttribute("visitor");
@@ -214,6 +212,7 @@ public class VisitHandler {
synchronized (session) {
visitor = (GenericValue) session.getAttribute("visitor");
if (visitor == null) {
Delegator delegator = (Delegator) request.getAttribute("delegator");
String delegatorName = (String) session.getAttribute("delegatorName");
if (delegator == null && UtilValidate.isNotEmpty(delegatorName)) {
@@ -28,7 +28,6 @@ import org.ofbiz.service.ModelPermission;
import org.ofbiz.service.ServiceContainer;
import org.ofbiz.base.util.UtilHttp;
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.entity.util.EntityUtilProperties;
List getEcaListForService(String selectedService) {
ecaMap = org.ofbiz.service.eca.ServiceEcaUtil.getServiceEventMap(selectedService);
@@ -477,7 +476,7 @@ if (selectedService) {
if (showWsdl?.equals("true")) {
try {
wsdl = curServiceModel.toWSDL("http://${request.getServerName()}:${EntityUtilProperties.getPropertyValue("url.properties", "port.http", "80", delegator)}${parameters._CONTROL_PATH_}/SOAPService");
wsdl = curServiceModel.toWSDL("http://${request.getServerName()}:${UtilProperties.getPropertyValue("url.properties", "port.http", "80")}${parameters._CONTROL_PATH_}/SOAPService");
curServiceMap.wsdl = UtilXml.writeXmlDocument(wsdl);
} catch (WSDLException ex) {
curServiceMap.wsdl = ex.getLocalizedMessage();
@@ -35,20 +35,9 @@ under the License.
<set field="defaultPassword" value="ungssblepswd"/>
</if-empty>
<call-class-method method-name="getPropertyValue" ret-field="username_lowercase" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="security"/>
<string value="username.lowercase"/>
<string value="false"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getPropertyValue" ret-field="password_lowercase" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="security"/>
<string value="password.lowercase"/>
<string value="false"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="security" property="username.lowercase" default="false" field="username_lowercase"/>
<property-to-field resource="security" property="password.lowercase" default="false" field="password_lowercase"/>
<now-timestamp field="nowStamp"/>
<set value="CUSTOMER" field="parameters.roleTypeId"/>
@@ -36,19 +36,8 @@ under the License.
<set field="parameters.roleTypeId" value="CUSTOMER"/>
<call-class-method method-name="getPropertyValue" ret-field="username_lowercase" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="security"/>
<string value="username.lowercase"/>
<string value="false"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getPropertyValue" ret-field="password_lowercase" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="security"/>
<string value="password.lowercase"/>
<string value="false"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="security" property="username.lowercase" default="false" field="username_lowercase"/>
<property-to-field resource="security" property="password.lowercase" default="false" field="password_lowercase"/>
<set field="default_user_password" value="ungssblepsswd"/>
<now-timestamp field="nowStamp"/>
@@ -356,12 +345,11 @@ under the License.
<set field="faxPhoneContext.partyId" from-field="partyId"/>
<set field="mobilePhoneContext.partyId" from-field="partyId"/>
<set field="emailContext.partyId" from-field="partyId"/>
<set field="delegator" type="org.ofbiz.entity.Delegator"/>
<if-not-empty field="newUserLogin">
<!-- If password encryption is enabled, encrpyt it now -->
<call-bsh><![CDATA[
boolean useEncryption = "true".equals(org.ofbiz.entity.util.EntityUtilProperties.getPropertyValue("security", "password.encrypt", delegator));
boolean useEncryption = "true".equals(org.ofbiz.base.util.UtilProperties.getPropertyValue("security", "password.encrypt"));
if (useEncryption) { newUserLogin.set("currentPassword", org.ofbiz.base.crypto.HashCrypt.getDigestHash((String) newUserLogin.get("currentPassword"))); }
]]></call-bsh>
<!-- create the UserLogin manually to get around ordering and security constraints in the service -->
@@ -17,30 +17,30 @@
* under the License.
*/
import javolution.util.FastList
import org.ofbiz.entity.util.EntityUtilProperties
import org.ofbiz.base.util.UtilProperties
configList = []
str = EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStoreId", delegator)
str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStoreId")
productStoreIds = str.split(",")
str = EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.option.outOfStock", delegator)
str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.option.outOfStock")
outOfStock = str.split(",")
str = EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.option.backInStock", delegator)
str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.option.backInStock")
backInStock = str.split(",")
str = EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.webSiteUrl", delegator)
str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.webSiteUrl")
webSiteUrl = str.split(",")
str = EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.actionType", delegator)
str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.actionType")
actionType = str.split(",")
str = EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.statusId", delegator)
str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.statusId")
statusId = str.split(",")
str = EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.testMode", delegator)
str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.testMode")
testMode = str.split(",")
str = EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.webSiteMountPoint", delegator)
str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.webSiteMountPoint")
webSiteMountPoint = str.split(",")
str = EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.countryCode", delegator)
str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.countryCode")
countryCode = str.split(",")
str = EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.trackingCodeId", delegator)
str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.trackingCodeId")
trackingCodeId = str.split(",")
str = EntityUtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.allowRecommended", delegator)
str = UtilProperties.getPropertyValue("autoUpdateToGoogleBase.properties", "autoUpdateGoogleBase.productStore.allowRecommended")
allowRecommended = str.split(",")
productStoreIds.eachWithIndex{ productStoreId, i ->
@@ -66,42 +66,17 @@
</simple-method>
<simple-method method-name="createRequestUrl" short-description="" login-required="false">
<!-- Setup Url spec -->
<call-class-method method-name="getMessage" ret-field="basePostUrl" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="googleCheckout"/>
<string value="basePostUrl"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getMessage" ret-field="merchantId" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="googleCheckout"/>
<string value="merchantId"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getMessage" ret-field="request" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="googleCheckout"/>
<string value="request"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="googleCheckout" property="basePostUrl" field="basePostUrl"/>
<property-to-field resource="googleCheckout" property="merchantId" field="merchantId"/>
<property-to-field resource="googleCheckout" property="request" field="request"/>
<set field="urlSpec" value="${basePostUrl}${merchantId}"/>
<create-object class-name="java.net.URL" field="url">
<field field="urlSpec"/>
</create-object>
</simple-method>
<simple-method method-name="getHttpAuth" short-description="" login-required="false">
<call-class-method method-name="getMessage" ret-field="merchantId" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="googleCheckout"/>
<string value="merchantId"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getMessage" ret-field="merchantKey" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="googleCheckout"/>
<string value="merchantKey"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="googleCheckout" property="merchantId" field="merchantId"/>
<property-to-field resource="googleCheckout" property="merchantKey" field="merchantKey"/>
<set field="userNameAndPass" value="${merchantId}:${merchantKey}"/>
<call-class-method method-name="base64Encode" class-name="org.ofbiz.base.util.Base64" ret-field="encodedValue">
<field field="userNameAndPass"/>
@@ -141,12 +116,7 @@
<field field="xhtmlStringRenderer" type="org.ofbiz.widget.screen.ScreenStringRenderer"/>
</create-object>
<!-- get uri -->
<call-class-method method-name="getMessage" ret-field="screenUri" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="googleCheckout"/>
<string value="xmlTemplateUri"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="googleCheckout" property="xmlTemplateUri" field="screenUri"/>
<call-object-method method-name="render" obj-field="xscreens">
<field field="screenUri" type="String"/>
</call-object-method>
@@ -45,24 +45,9 @@
</simple-method>
<simple-method method-name="createCheckoutFlowSupport" short-description="" login-required="false">
<call-class-method method-name="getMessage" ret-field="flowSupport.editCartUrl" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="googleCheckout"/>
<string value="editCartUrl"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getMessage" ret-field="flowSupport.continueShoppingUrl" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="googleCheckout"/>
<string value="continueShoppingUrl"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getMessage" ret-field="flowSupport.requestPhone" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="googleCheckout"/>
<string value="requestPhone"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="googleCheckout" property="editCartUrl" field="flowSupport.editCartUrl"/>
<property-to-field resource="googleCheckout" property="continueShoppingUrl" field="flowSupport.continueShoppingUrl"/>
<property-to-field resource="googleCheckout" property="requestPhone" field="flowSupport.requestPhone"/>
<call-simple-method method-name="getTaxTables"/>
<set field="flowSupport.taxTables" from-field="taxTables"/>
@@ -94,7 +94,7 @@ public class LdapLoginWorker extends LoginWorker {
}
}
if (!hasBasePermission(userLogin, request) || isFlaggedLoggedOut(userLogin, userLogin.getDelegator()) || hasLdapLoggedOut) {
if (!hasBasePermission(userLogin, request) || isFlaggedLoggedOut(userLogin) || hasLdapLoggedOut) {
Debug.logInfo("User does not have permission or is flagged as logged out", module);
doBasicLogout(userLogin, request, response);
userLogin = null;
@@ -59,7 +59,7 @@ public class OagisInventoryServices {
public static final String resource = "OagisUiLabels";
public static final Double doubleZero = new Double(0.0);
public static final Double doubleOne = new Double(1.0);
public static final String syncInventoryFacilityId = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.SyncInventoryFacilityId");
public static Map<String, Object> oagisReceiveSyncInventory(DispatchContext ctx, Map<String, Object> context) {
Document doc = (Document) context.get("document");
@@ -69,7 +69,7 @@ public class OagisInventoryServices {
Locale locale = (Locale) context.get("locale");
List<Map<String, String>> errorMapList = FastList.newInstance();
List<Map<String, Object>> inventoryMapList = FastList.newInstance();
final String syncInventoryFacilityId = EntityUtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.SyncInventoryFacilityId", delegator);
GenericValue userLogin = null;
try {
userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", "system").queryOne();
@@ -82,6 +82,10 @@ public class OagisServices {
public static final String resource = "OagisUiLabels";
public static final String certAlias = UtilProperties.getPropertyValue("oagis.properties", "auth.client.certificate.alias");
public static final String basicAuthUsername = UtilProperties.getPropertyValue("oagis.properties", "auth.basic.username");
public static final String basicAuthPassword = UtilProperties.getPropertyValue("oagis.properties", "auth.basic.password");
public static final boolean debugSaveXmlOut = "true".equals(UtilProperties.getPropertyValue("oagis.properties", "Oagis.Debug.Save.Xml.Out"));
public static final boolean debugSaveXmlIn = "true".equals(UtilProperties.getPropertyValue("oagis.properties", "Oagis.Debug.Save.Xml.In"));
@@ -104,7 +108,7 @@ public class OagisServices {
Locale locale = (Locale) context.get("locale");
String errorReferenceId = (String) context.get("referenceId");
List<Map<String, String>> errorMapList = UtilGenerics.checkList(context.get("errorMapList"));
String sendToUrl = (String) context.get("sendToUrl");
if (UtilValidate.isEmpty(sendToUrl)) {
sendToUrl = EntityUtilProperties.getPropertyValue("oagis.properties", "url.send.confirmBod", delegator);
@@ -215,7 +219,7 @@ public class OagisServices {
Debug.logError(e, errMsg, module);
}
Map<String, Object> sendMessageReturn = OagisServices.sendMessageText(outText, out, sendToUrl, saveToDirectory, saveToFilename, locale, delegator);
Map<String, Object> sendMessageReturn = OagisServices.sendMessageText(outText, out, sendToUrl, saveToDirectory, saveToFilename, locale);
if (sendMessageReturn != null) {
return sendMessageReturn;
}
@@ -675,11 +679,8 @@ public class OagisServices {
return result;
}
public static Map<String, Object> sendMessageText(String outText, OutputStream out, String sendToUrl, String saveToDirectory, String saveToFilename, Locale locale, Delegator delegator) {
final String certAlias = EntityUtilProperties.getPropertyValue("oagis.properties", "auth.client.certificate.alias", delegator);
final String basicAuthUsername = EntityUtilProperties.getPropertyValue("oagis.properties", "auth.basic.username", delegator);
final String basicAuthPassword = EntityUtilProperties.getPropertyValue("oagis.properties", "auth.basic.password", delegator);
if (out != null) {
public static Map<String, Object> sendMessageText(String outText, OutputStream out, String sendToUrl, String saveToDirectory, String saveToFilename, Locale locale) {
if (out != null) {
Writer outWriter = new OutputStreamWriter(out);
try {
outWriter.write(outText);
@@ -80,6 +80,10 @@ public class OagisShipmentServices {
public static final String resource = "OagisUiLabels";
public static final String certAlias = UtilProperties.getPropertyValue("oagis.properties", "auth.client.certificate.alias");
public static final String basicAuthUsername = UtilProperties.getPropertyValue("oagis.properties", "auth.basic.username");
public static final String basicAuthPassword = UtilProperties.getPropertyValue("oagis.properties", "auth.basic.password");
public static final String oagisMainNamespacePrefix = "n";
public static final String oagisSegmentsNamespacePrefix = "os";
public static final String oagisFieldsNamespacePrefix = "of";
@@ -902,7 +906,7 @@ public class OagisShipmentServices {
Debug.logError(e, errMsg, module);
}
Map<String, Object> sendMessageReturn = OagisServices.sendMessageText(outText, out, sendToUrl, saveToDirectory, saveToFilename, locale, delegator);
Map<String, Object> sendMessageReturn = OagisServices.sendMessageText(outText, out, sendToUrl, saveToDirectory, saveToFilename, locale);
if (sendMessageReturn != null && ServiceUtil.isError(sendMessageReturn)) {
try {
Map<String, Object> uomiCtx = FastMap.newInstance();
@@ -1145,7 +1149,7 @@ public class OagisShipmentServices {
Debug.logError(e, errMsg, module);
}
Map<String, Object> sendMessageReturn = OagisServices.sendMessageText(outText, out, sendToUrl, saveToDirectory, saveToFilename, locale, delegator);
Map<String, Object> sendMessageReturn = OagisServices.sendMessageText(outText, out, sendToUrl, saveToDirectory, saveToFilename, locale);
if (sendMessageReturn != null && ServiceUtil.isError(sendMessageReturn)) {
try {
Map<String, Object> uomiCtx = FastMap.newInstance();
@@ -4179,20 +4179,8 @@
<entity-one entity-name="UserLogin" value-field="systemUserLogin">
<field-map field-name="userLoginId" value="system"/>
</entity-one>
<call-class-method method-name="getPropertyValue" ret-field="username_lowercase" method-name="getPropertyValue" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="security"/>
<string value="username.lowercase"/>
<string value="false"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<call-class-method method-name="getPropertyValue" ret-field="password_lowercase" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="security"/>
<string value="password.lowercase"/>
<string value="false"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="security" property="username.lowercase" default="false" field="username_lowercase"/>
<property-to-field resource="security" property="password.lowercase" default="false" field="password_lowercase"/>
<call-simple-method method-name="validateQuickAddPartyInfo"/>
<check-errors/>
@@ -4240,7 +4228,6 @@
<set field="newUserLogin.userLoginId" from-field="userLoginContext.userLoginId"/>
<set field="newUserLogin.currentPassword" from-field="userLoginContext.currentPassword"/>
<set field="newUserLogin.passwordHint" from-field="userLoginContext.passwordHint"/>
<set field="delegator" type="org.ofbiz.entity.Delegator"/>
<!-- Check the password, etc for validity -->
<call-bsh><![CDATA[
@@ -4251,7 +4238,7 @@
]]></call-bsh>
<!-- If password encryption is enabled, encrpyt it now -->
<call-bsh><![CDATA[
boolean useEncryption = "true".equals(org.ofbiz.entity.util.EntityUtilProperties.getPropertyValue("security", "password.encrypt", delegator));
boolean useEncryption = "true".equals(org.ofbiz.base.util.UtilProperties.getPropertyValue("security", "password.encrypt"));
if (useEncryption) { newUserLogin.set("currentPassword", org.ofbiz.base.crypto.HashCrypt.getDigestHash((String) newUserLogin.get("currentPassword"))); }
]]></call-bsh>
@@ -1432,12 +1432,7 @@
<field-map field-name="partyId" value="${invoice.partyId}"/>
</entity-one>
<if-empty field="party.preferredCurrencyUomId">
<call-class-method method-name="getMessage" ret-field="party.preferredCurrencyUomId" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general"/>
<string value="currency.uom.id.default"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field resource="general" property="currency.uom.id.default" field="party.preferredCurrencyUomId"/>
</if-empty>
<set field="updateInvoiceMap.invoiceId" from-field="parameters.invoiceId"/>
<set field="updateInvoiceMap.currencyUomId" from-field="party.preferredCurrencyUomId"/>
@@ -1448,13 +1443,7 @@
</else>
</if-not-empty>
<if-empty field="updateInvoiceMap.currencyUomId">
<call-class-method method-name="getPropertyValue" ret-field="invoice.currencyUomId" class-name="org.ofbiz.entity.util.EntityUtilProperties">
<string value="general"/>
<string value="currency.uom.id.default"/>
<string value="USD"/>
<field field="locale" type="java.util.Locale"/>
<field field="delegator" type="org.ofbiz.entity.Delegator"/>
</call-class-method>
<property-to-field field="invoice.currencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
</if-empty>
<call-service service-name="updateInvoice" in-map-name="updateInvoiceMap"/>
<entity-one entity-name="Invoice" value-field="invoice"/>