Author: jleroux
Date: Mon Jul 7 06:50:24 2014 New Revision: 1608347 URL: http://svn.apache.org/r1608347 Log: Keeps in sync with OFBiz trunk HEAD Added: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/test/FinAccountTest.java - copied unchanged from r1608345, ofbiz/trunk/applications/order/src/org/ofbiz/order/test/FinAccountTest.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/testdef/FinAccountTests.xml - copied unchanged from r1608345, ofbiz/trunk/applications/order/testdef/FinAccountTests.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/lib/freemarker-2.3-gae-d4ffa9e3727b83b95fd546591aa15dbad0118bd0.jar - copied unchanged from r1608345, ofbiz/trunk/framework/base/lib/freemarker-2.3-gae-d4ffa9e3727b83b95fd546591aa15dbad0118bd0.jar ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/test/EntityCryptoTestSuite.java - copied unchanged from r1608345, ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityCryptoTestSuite.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/lib/lucene-analyzers-common-4.9.0.jar - copied unchanged from r1608345, ofbiz/trunk/specialpurpose/lucene/lib/lucene-analyzers-common-4.9.0.jar ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/lib/lucene-core-4.9.0.jar - copied unchanged from r1608345, ofbiz/trunk/specialpurpose/lucene/lib/lucene-core-4.9.0.jar ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/lib/lucene-queryparser-4.9.0.jar - copied unchanged from r1608345, ofbiz/trunk/specialpurpose/lucene/lib/lucene-queryparser-4.9.0.jar ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/tools/demo-backup/ - copied from r1608345, ofbiz/trunk/tools/demo-backup/ Removed: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/lib/ant/ant-nodeps-1.8.1.jar ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/lib/freemarker-2.3.19-null-wildcards.jar ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/lib/lucene-analyzers-common-4.7.0.jar ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/lib/lucene-core-4.7.0.jar ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/lib/lucene-queryparser-4.7.0.jar Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/ (props changed) ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/.classpath ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/LICENSE ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/ant.bat ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/InvoiceForms.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/ReportFinancialSummaryForms.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/script/org/ofbiz/marketing/tracking/TrackingCodeServices.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/servicedef/services.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/build.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/ofbiz-component.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java (contents, props changed) ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/config/PartyUiLabels.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/servicedef/services.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/build.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoControlServlet.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogAltUrlSeoTransform.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/common.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/build.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/StringUtil.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/UtilIO.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/test/UtilIOTests.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/bi/build.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/email/EmailServices.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/dtd/entitymodel.xsd ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/entitydef/entitymodel_test.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/Delegator.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/GenericDelegator.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/GenericEntity.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityCondition.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBuilder.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityConditionFunction.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityConditionList.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityConditionListBase.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityConditionValue.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityDateFilterCondition.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityExpr.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityFieldMap.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityFunction.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/condition/EntityWhereString.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/GenericHelper.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/GenericHelperDAO.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/datasource/MemoryHelper.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/SQLProcessor.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/model/ModelField.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityCrypto.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/testdef/entitytests.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/sql/build.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/build.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/setup.properties ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/WebAppUtil.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntitySQLProcessor.groovy ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/macros.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/LICENSE ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/appserver/config/ofbiz-containers.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/webapp/ecommerce/index.jsp ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/src/org/ofbiz/content/search/SearchWorker.java Propchange: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk:r1604703-1608345 Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/.classpath URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/.classpath?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/.classpath (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/.classpath Mon Jul 7 06:50:24 2014 @@ -23,7 +23,7 @@ <classpathentry kind="lib" path="framework/base/lib/clhm-release-1.0-lru.jar"/> <classpathentry kind="lib" path="framework/base/lib/hamcrest-all-1.2.jar"/> <classpathentry kind="lib" path="framework/base/lib/fop-1.1.jar"/> - <classpathentry kind="lib" path="framework/base/lib/freemarker-2.3.19-null-wildcards.jar"/> + <classpathentry kind="lib" path="framework/base/lib/freemarker-2.3-gae-d4ffa9e3727b83b95fd546591aa15dbad0118bd0.jar"/> <classpathentry kind="lib" path="framework/base/lib/httpclient-4.2.1.jar"/> <classpathentry kind="lib" path="framework/base/lib/httpclient-cache-4.2.1.jar"/> <classpathentry kind="lib" path="framework/base/lib/httpcore-4.2.1.jar"/> @@ -158,9 +158,9 @@ <classpathentry kind="lib" path="specialpurpose/ebaystore/lib/ebaycalls.jar"/> <classpathentry kind="lib" path="specialpurpose/ebaystore/lib/ebaysdkcore.jar"/> <classpathentry kind="lib" path="specialpurpose/ebaystore/lib/helper.jar"/> - <classpathentry kind="lib" path="specialpurpose/lucene/lib/lucene-analyzers-common-4.7.0.jar"/> - <classpathentry kind="lib" path="specialpurpose/lucene/lib/lucene-core-4.7.0.jar"/> - <classpathentry kind="lib" path="specialpurpose/lucene/lib/lucene-queryparser-4.7.0.jar"/> + <classpathentry kind="lib" path="specialpurpose/lucene/lib/lucene-analyzers-common-4.9.0.jar"/> + <classpathentry kind="lib" path="specialpurpose/lucene/lib/lucene-core-4.9.0.jar"/> + <classpathentry kind="lib" path="specialpurpose/lucene/lib/lucene-queryparser-4.9.0.jar"/> <classpathentry excluding="org/ofbiz/accounting/thirdparty/cybersource/**|org/ofbiz/accounting/thirdparty/verisign/**|org/ofbiz/accounting/thirdparty/worldpay/**|org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java|org/ofbiz/accounting/thirdparty/orbital/**|org/ofbiz/accounting/thirdparty/securepay/**|org/ofbiz/accounting/thirdparty/ideal/**" kind="src" path="applications/accounting/src"/> <classpathentry excluding="org/ofbiz/content/openoffice/|org/ofbiz/content/report/" kind="src" path="applications/content/src"/> <classpathentry kind="src" path="applications/manufacturing/src"/> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/LICENSE URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/LICENSE?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/LICENSE (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/LICENSE Mon Jul 7 06:50:24 2014 @@ -14,7 +14,6 @@ framework/base/lib/ant-1.9.0-ant-launche framework/base/lib/ant-1.9.0-ant.jar framework/base/lib/ant-1.9.0-ant-junit.jar framework/base/lib/ant/ant-1.9.0-ant-apache-bsf.jar -framework/base/lib/ant/ant-nodeps-1.8.1.jar framework/base/lib/avalon-framework-4.2.0.jar framework/base/lib/avalon-util-exception-1.0.0.jar framework/base/lib/batik-all-1.7.jar @@ -444,7 +443,7 @@ BSD License: applications/content/lib/dom4j-1.6.1.jar framework/base/lib/antisamy-bin.1.2.jar framework/base/lib/bsh-engine-modified.jar -framework/base/lib/freemarker-2.3.19-null-wildcards.jar +framework/base/lib/freemarker-2.3-gae-d4ffa9e3727b83b95fd546591aa15dbad0118bd0.jar framework/base/lib/hamcrest-all-1.2.jar framework/base/lib/httpunit-1.7.jar framework/base/lib/ical4j-1.0-rc2.jar Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/ant.bat URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/ant.bat?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/ant.bat (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/ant.bat Mon Jul 7 06:50:24 2014 @@ -19,5 +19,21 @@ REM # under the License. REM ##################################################################### ECHO ON -"%JAVA_HOME%\bin\java" -jar framework/base/lib/ant-1.9.0-ant-launcher.jar -lib framework/base/lib/ant %1 %2 %3 %4 %5 %6 +IF DEFINED JAVA_HOME ( + SET JAVA="%JAVA_HOME%\bin\java" +) ELSE ( + SET JAVA="java" +) + +SET TOP=%~dp0 +SET LAUNCHER_JAR= +SET BASE_LIB=%TOP%\framework\base\lib +SET ANT_LIB=%BASE_LIB%\ant +FOR %%G IN (%BASE_LIB%\ant-*-ant-launcher.jar) DO SET LAUNCHER_JAR=%%G +ECHO %LAUNCHER_JAR% +IF [%LAUNCHER_JAR%] == [] ( + ECHO "Couldn't find ant-launcher.jar" +) ELSE ( + %JAVA% -jar "%LAUNCHER_JAR%" -lib "%ANT_LIB%" %1 %2 %3 %4 %5 %6 +) Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/InvoiceForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/InvoiceForms.xml?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/InvoiceForms.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/InvoiceForms.xml Mon Jul 7 06:50:24 2014 @@ -143,7 +143,7 @@ under the License. odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> <row-actions> <set field="quantity" value="${groovy: quantity ?: 1}" type="BigDecimal"/> - <set field="total" value="${quantity * amount ?: 0}" type="BigDecimal"/> + <set field="total" value="${groovy: quantity * amount ?: 0}" type="BigDecimal"/> </row-actions> <auto-fields-entity entity-name="InvoiceItem" default-field-type="display"/> <field name="invoiceId"><hidden/></field> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/ReportFinancialSummaryForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/ReportFinancialSummaryForms.xml?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/ReportFinancialSummaryForms.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/ReportFinancialSummaryForms.xml Mon Jul 7 06:50:24 2014 @@ -532,6 +532,7 @@ under the License. <drop-down> <entity-options entity-name="CustomTimePeriod" key-field-name="customTimePeriodId" description="${periodName}: ${fromDate} - ${thruDate}" filter-by-date="false"> <entity-constraint name="periodTypeId" operator="like" value="FISCAL_%"/> + <entity-constraint name="organizationPartyId" operator="equals" value="${organizationPartyId}"/> <entity-order-by field-name="-thruDate"/> <entity-order-by field-name="periodNum"/> </entity-options> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml Mon Jul 7 06:50:24 2014 @@ -20,98 +20,6 @@ under the License. <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd"> - <!-- MarketingCampaign methods --> - <simple-method method-name="createMarketingCampaign" short-description="Create an MarketingCampaign"> - <check-permission permission="MARKETING" action="_CREATE"> - <fail-property resource="MarketingUiLabels.xml" property="MarketingCreatePermissionError"/> - </check-permission> - <check-errors/> - - <make-value entity-name="MarketingCampaign" value-field="newEntity"/> - <set-nonpk-fields map="parameters" value-field="newEntity"/> - - <!-- MarketingCampaign uses a sequenced id, so get the next one now and set it... --> - <sequenced-id sequence-name="MarketingCampaign" field="newEntity.marketingCampaignId"/> - - <create-value value-field="newEntity"/> - - <field-to-result field="newEntity.marketingCampaignId" result-name="marketingCampaignId"/> - </simple-method> - <simple-method method-name="updateMarketingCampaign" short-description="Update an MarketingCampaign"> - <check-permission permission="MARKETING" action="_UPDATE"> - <fail-property resource="MarketingUiLabels.xml" property="MarketingUpdatePermissionError"/> - </check-permission> - <check-errors/> - - <make-value entity-name="MarketingCampaign" value-field="lookupPKMap"/> - <set-pk-fields map="parameters" value-field="lookupPKMap"/> - <find-by-primary-key entity-name="MarketingCampaign" map="lookupPKMap" value-field="lookedUpValue"/> - <set-nonpk-fields map="parameters" value-field="lookedUpValue"/> - - <store-value value-field="lookedUpValue"/> - </simple-method> - <simple-method method-name="deleteMarketingCampaign" short-description="Delete an MarketingCampaign"> - <check-permission permission="MARKETING" action="_DELETE"> - <fail-property resource="MarketingUiLabels.xml" property="MarketingDeletePermissionError"/> - </check-permission> - <check-errors/> - <!-- FIXME: This does not work due to related entities --> - <make-value entity-name="MarketingCampaign" value-field="lookupPKMap"/> - <set-pk-fields map="parameters" value-field="lookupPKMap"/> - <find-by-primary-key entity-name="MarketingCampaign" map="lookupPKMap" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> - - <!-- MarketingCampaignPrice methods --> - <simple-method method-name="addPriceRuleToMarketingCampaign" short-description="Add PriceRule To MarketingCampaign"> - <check-permission permission="MARKETING" action="_CREATE"> - <fail-property resource="MarketingUiLabels.xml" property="MarketingCreatePermissionError"/> - </check-permission> - <check-errors/> - - <make-value entity-name="MarketingCampaignPrice" value-field="newEntity"/> - <!-- no non-pk fields in this entity, but there may be later... <set-nonpk-fields map="parameters" value-field="newEntity"/> --> - <set-pk-fields map="parameters" value-field="newEntity"/> - - <create-value value-field="newEntity"/> - </simple-method> - <simple-method method-name="removePriceRuleFromMarketingCampaign" short-description="Remove PriceRule from MarketingCampaign"> - <check-permission permission="MARKETING" action="_DELETE"> - <fail-property resource="MarketingUiLabels.xml" property="MarketingDeletePermissionError"/> - </check-permission> - <check-errors/> - - <make-value entity-name="MarketingCampaignPrice" value-field="lookupPKMap"/> - <set-pk-fields map="parameters" value-field="lookupPKMap"/> - <find-by-primary-key entity-name="MarketingCampaignPrice" map="lookupPKMap" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> - - <!-- MarketingCampaignPromo methods --> - <simple-method method-name="addPromoToMarketingCampaign" short-description="Add Promo To MarketingCampaign"> - <check-permission permission="MARKETING" action="_CREATE"> - <fail-property resource="MarketingUiLabels.xml" property="MarketingCreatePermissionError"/> - </check-permission> - <check-errors/> - - <make-value entity-name="MarketingCampaignPromo" value-field="newEntity"/> - <!-- no non-pk fields in this entity, but there may be later... <set-nonpk-fields map="parameters" value-field="newEntity"/> --> - <set-pk-fields map="parameters" value-field="newEntity"/> - - <create-value value-field="newEntity"/> - </simple-method> - <simple-method method-name="removePromoFromMarketingCampaign" short-description="Remove Promo from MarketingCampaign"> - <check-permission permission="MARKETING" action="_DELETE"> - <fail-property resource="MarketingUiLabels.xml" property="MarketingDeletePermissionError"/> - </check-permission> - <check-errors/> - - <make-value entity-name="MarketingCampaignPromo" value-field="lookupPKMap"/> - <set-pk-fields map="parameters" value-field="lookupPKMap"/> - <find-by-primary-key entity-name="MarketingCampaignPromo" map="lookupPKMap" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> - <!-- MarketingCampaignRole methods --> <simple-method method-name="createMarketingCampaignRole" short-description="Add Role To MarketingCampaign"> <!-- allow if userLogin.partyId = parameters.partyId or has permission --> @@ -135,14 +43,4 @@ under the License. <check-errors /> </if-empty> </simple-method> - - <simple-method method-name="deleteMarketingCampaignRole" short-description="Remove Role from MarketingCampaign"> - <check-permission permission="MARKETING" action="_DELETE"> - <fail-property resource="MarketingUiLabels.xml" property="MarketingDeletePermissionError"/> - </check-permission> - <check-errors/> - <entity-one entity-name="MarketingCampaignRole" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> - </simple-methods> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml Mon Jul 7 06:50:24 2014 @@ -38,25 +38,6 @@ under the License. <set-nonpk-fields map="parameters" value-field="newEntity"/> <create-value value-field="newEntity"/> </simple-method> - <simple-method method-name="updateContactList" short-description="Update an ContactList"> - <check-permission permission="MARKETING" action="_UPDATE"> - <fail-property resource="MarketingUiLabels.xml" property="MarketingUpdatePermissionError"/> - </check-permission> - <check-errors/> - - <entity-one entity-name="ContactList" value-field="lookedUpValue" auto-field-map="true"/> - <set-nonpk-fields map="parameters" value-field="lookedUpValue"/> - <store-value value-field="lookedUpValue"/> - </simple-method> - <simple-method method-name="removeContactList" short-description="Delete an ContactList"> - <check-permission permission="MARKETING" action="_DELETE"> - <fail-property resource="MarketingUiLabels.xml" property="MarketingDeletePermissionError"/> - </check-permission> - <check-errors/> - - <entity-one entity-name="ContactList" value-field="lookedUpValue" auto-field-map="true"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> <!-- ContactListParty methods --> <simple-method method-name="inlineCheckContactListMechType" short-description="inlineCheckContactListMechType"> @@ -282,15 +263,6 @@ under the License. <store-value value-field="contactlistparty"/> </iterate> </simple-method> - <simple-method method-name="deleteContactListParty" short-description="Remove Party from ContactList"> - <check-permission permission="MARKETING" action="_DELETE"> - <fail-property resource="MarketingUiLabels.xml" property="MarketingDeletePermissionError"/> - </check-permission> - <check-errors/> - - <entity-one entity-name="ContactListParty" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> <simple-method method-name="createContactListPartyStatus" short-description="Create ContactListParty Status"> <!-- allow if userLogin.partyId = parameters.partyId or has permission --> <if> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/script/org/ofbiz/marketing/tracking/TrackingCodeServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/script/org/ofbiz/marketing/tracking/TrackingCodeServices.xml?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/script/org/ofbiz/marketing/tracking/TrackingCodeServices.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/script/org/ofbiz/marketing/tracking/TrackingCodeServices.xml Mon Jul 7 06:50:24 2014 @@ -20,57 +20,6 @@ under the License. <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd"> - <!-- TrackingCode methods --> - <simple-method method-name="createTrackingCode" short-description="Create an TrackingCode"> - <check-permission permission="MARKETING" action="_CREATE"> - <fail-property resource="MarketingUiLabels.xml" property="MarketingCreatePermissionError"/> - </check-permission> - <check-errors/> - - <now-timestamp field="nowStamp"/> - - <make-value value-field="newEntity" entity-name="TrackingCode"/> - <set-nonpk-fields map="parameters" value-field="newEntity"/> - <set-pk-fields map="parameters" value-field="newEntity"/> - - <!-- set the history/audit info --> - <set from-field="userLogin.userLoginId" field="newEntity.createdByUserLogin"/> - <set from-field="nowStamp" field="newEntity.createdDate"/> - <set from-field="userLogin.userLoginId" field="newEntity.lastModifiedByUserLogin"/> - <set from-field="lastModifiedDate" field="newEntity.createdDate"/> - - <create-value value-field="newEntity"/> - </simple-method> - <simple-method method-name="updateTrackingCode" short-description="Update an TrackingCode"> - <check-permission permission="MARKETING" action="_UPDATE"> - <fail-property resource="MarketingUiLabels.xml" property="MarketingUpdatePermissionError"/> - </check-permission> - <check-errors/> - - <now-timestamp field="nowStamp"/> - - <make-value entity-name="TrackingCode" value-field="lookupPKMap"/> - <set-pk-fields map="parameters" value-field="lookupPKMap"/> - <find-by-primary-key entity-name="TrackingCode" map="lookupPKMap" value-field="lookedUpValue"/> - <set-nonpk-fields map="parameters" value-field="lookedUpValue"/> - - <!-- set the history/audit info --> - <set from-field="userLogin.userLoginId" field="newEntity.lastModifiedByUserLogin"/> - <set from-field="lastModifiedDate" field="newEntity.createdDate"/> - - <store-value value-field="lookedUpValue"/> - </simple-method> - <simple-method method-name="deleteTrackingCode" short-description="Delete an TrackingCode"> - <check-permission permission="MARKETING" action="_DELETE"> - <fail-property resource="MarketingUiLabels.xml" property="MarketingDeletePermissionError"/> - </check-permission> - <check-errors/> - - <make-value entity-name="TrackingCode" value-field="lookupPKMap"/> - <set-pk-fields map="parameters" value-field="lookupPKMap"/> - <find-by-primary-key entity-name="TrackingCode" map="lookupPKMap" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> <!-- TrackingCodeType methods --> <simple-method method-name="createTrackingCodeType" short-description="Create an TrackingCodeType"> <check-permission permission="MARKETING" action="_CREATE"> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/servicedef/services.xml?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/servicedef/services.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/marketing/servicedef/services.xml Mon Jul 7 06:50:24 2014 @@ -25,48 +25,40 @@ under the License. <version>1.0</version> <!-- MarketingCampaign Services --> - <service name="createMarketingCampaign" default-entity-name="MarketingCampaign" engine="simple" - location="component://marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml" invoke="createMarketingCampaign" auth="true"> + <service name="createMarketingCampaign" default-entity-name="MarketingCampaign" engine="entity-auto" invoke="create" auth="true"> <description>Create a MarketingCampaign record</description> <permission-service service-name="marketingPermissionService" main-action="CREATE"/> <auto-attributes include="pk" mode="OUT" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> - <service name="updateMarketingCampaign" default-entity-name="MarketingCampaign" engine="simple" - location="component://marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml" invoke="updateMarketingCampaign" auth="true"> + <service name="updateMarketingCampaign" default-entity-name="MarketingCampaign" engine="entity-auto" invoke="update" auth="true"> <description>Update a MarketingCampaign record</description> <permission-service service-name="marketingPermissionService" main-action="UPDATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> - <service name="deleteMarketingCampaign" default-entity-name="MarketingCampaign" engine="simple" - location="component://marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml" invoke="deleteMarketingCampaign" auth="true"> + <service name="deleteMarketingCampaign" default-entity-name="MarketingCampaign" engine="entity-auto" invoke="delete" auth="true"> <description>Remove a MarketingCampaign record</description> <permission-service service-name="marketingPermissionService" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> <!-- MarketingCampaignPrice Services --> - <service name="addPriceRuleToMarketingCampaign" default-entity-name="MarketingCampaignPrice" engine="simple" - location="component://marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml" invoke="addPriceRuleToMarketingCampaign" auth="true"> + <service name="addPriceRuleToMarketingCampaign" default-entity-name="MarketingCampaignPrice" engine="entity-auto" invoke="create" auth="true"> <description>Add PriceRule to MarketingCampaign</description> <auto-attributes include="pk" mode="IN" optional="false"/> </service> - <service name="removePriceRuleFromMarketingCampaign" default-entity-name="MarketingCampaignPrice" engine="simple" - location="component://marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml" invoke="removePriceRuleFromMarketingCampaign" auth="true"> + <service name="removePriceRuleFromMarketingCampaign" default-entity-name="MarketingCampaignPrice" engine="entity-auto" invoke="delete" auth="true"> <description>Remove PriceRule from MarketingCampaign</description> <auto-attributes include="pk" mode="IN" optional="false"/> </service> <!-- MarketingCampaignPromo Services --> - <service name="addPromoToMarketingCampaign" default-entity-name="MarketingCampaignPromo" engine="simple" - location="component://marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml" invoke="addPromoToMarketingCampaign" auth="true"> + <service name="addPromoToMarketingCampaign" default-entity-name="MarketingCampaignPromo" engine="entity-auto" invoke="create" auth="true"> <description>Add Promo to MarketingCampaign</description> <auto-attributes include="pk" mode="IN" optional="false"/> </service> - <service name="removePromoFromMarketingCampaign" default-entity-name="MarketingCampaignPromo" engine="simple" - location="component://marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml" invoke="removePromoFromMarketingCampaign" auth="true"> + <service name="removePromoFromMarketingCampaign" default-entity-name="MarketingCampaignPromo" engine="entity-auto" invoke="delete" auth="true"> <description>Remove Promo from MarketingCampaign</description> <auto-attributes include="pk" mode="IN" optional="false"/> </service> @@ -104,8 +96,7 @@ under the License. <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> - <service name="deleteMarketingCampaignRole" default-entity-name="MarketingCampaignRole" engine="simple" - location="component://marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml" invoke="deleteMarketingCampaignRole" auth="true"> + <service name="deleteMarketingCampaignRole" default-entity-name="MarketingCampaignRole" engine="entity-auto" invoke="delete" auth="true"> <description>Remove Role from Campaign</description> <auto-attributes include="pk" mode="IN" optional="false"/> </service> @@ -119,17 +110,14 @@ under the License. <override name="contactListTypeId" optional="false"/> <override name="contactListName" optional="false"/> </service> - <service name="updateContactList" default-entity-name="ContactList" engine="simple" - location="component://marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml" invoke="updateContactList" auth="true"> + <service name="updateContactList" default-entity-name="ContactList" engine="entity-auto" invoke="update" auth="true"> <description>Update a ContactList record</description> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> - <service name="removeContactList" default-entity-name="ContactList" engine="simple" - location="component://marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml" invoke="removeContactList" auth="true"> + <service name="removeContactList" default-entity-name="ContactList" engine="entity-auto" invoke="delete" auth="true"> <description>Remove a ContactList record</description> <auto-attributes include="pk" mode="IN" optional="false"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> <!-- ContactListParty Services --> @@ -173,8 +161,7 @@ under the License. <attribute name="contactMechId" type="String" mode="IN" optional="false"/> <attribute name="oldContactMechId" type="String" mode="IN" optional="false"/> </service> - <service name="deleteContactListParty" default-entity-name="ContactListParty" engine="simple" - location="component://marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml" invoke="deleteContactListParty" auth="true"> + <service name="deleteContactListParty" default-entity-name="ContactListParty" engine="entity-auto" invoke="delete" auth="true"> <description>Remove Party from ContactList</description> <auto-attributes include="pk" mode="IN" optional="false"/> </service> @@ -264,22 +251,19 @@ under the License. </service> <!-- TrackingCode Services --> - <service name="createTrackingCode" default-entity-name="TrackingCode" engine="simple" - location="component://marketing/script/org/ofbiz/marketing/tracking/TrackingCodeServices.xml" invoke="createTrackingCode" auth="true"> + <service name="createTrackingCode" default-entity-name="TrackingCode" engine="entity-auto" invoke="create" auth="true"> <description>Create a TrackingCode record</description> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> <override name="trackingCodeTypeId" optional="false"/> </service> - <service name="updateTrackingCode" default-entity-name="TrackingCode" engine="simple" - location="component://marketing/script/org/ofbiz/marketing/tracking/TrackingCodeServices.xml" invoke="updateTrackingCode" auth="true"> + <service name="updateTrackingCode" default-entity-name="TrackingCode" engine="entity-auto" invoke="update" auth="true"> <description>Update a TrackingCode record</description> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> - <service name="deleteTrackingCode" default-entity-name="TrackingCode" engine="simple" - location="component://marketing/script/org/ofbiz/marketing/tracking/TrackingCodeServices.xml" invoke="deleteTrackingCode" auth="true"> - <description>Update a TrackingCode record</description> + <service name="deleteTrackingCode" default-entity-name="TrackingCode" engine="entity-auto" invoke="delete" auth="true"> + <description>Delete a TrackingCode record</description> <auto-attributes include="pk" mode="IN" optional="false"/> </service> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/build.xml?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/build.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/build.xml Mon Jul 7 06:50:24 2014 @@ -56,10 +56,10 @@ under the License. <!-- ================================================================== --> <target name="classes" depends="prepare"> - <javac16> + <javac17> <!-- exclude the payment processor packages; comment if you have libs --> <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> - </javac16> + </javac17> </target> <target name="jar" depends="classes"> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/ofbiz-component.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/ofbiz-component.xml?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/ofbiz-component.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/ofbiz-component.xml Mon Jul 7 06:50:24 2014 @@ -52,6 +52,7 @@ under the License. <service-resource type="model" loader="main" location="servicedef/services_olap.xml"/> <service-resource type="eca" loader="main" location="servicedef/secas.xml"/> + <test-suite loader="main" location="testdef/FinAccountTests.xml"/> <test-suite loader="main" location="testdef/OrderTest.xml"/> <test-suite loader="main" location="testdef/CustRequestTests.xml"/> <test-suite loader="main" location="testdef/quotetests.xml"/> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java Mon Jul 7 06:50:24 2014 @@ -140,14 +140,8 @@ public class FinAccountHelper { } finAccountCode = finAccountCode.toUpperCase().replaceAll("[^0-9A-Z]", ""); - // now we need to get the encrypted version of the fin account code the user passed in to look up against FinAccount - // we do this by making a temporary generic entity with same finAccountCode and then doing a match - GenericValue encryptedFinAccount = delegator.makeValue("FinAccount", UtilMisc.toMap("finAccountCode", finAccountCode)); - delegator.encryptFields(encryptedFinAccount); - String encryptedFinAccountCode = encryptedFinAccount.getString("finAccountCode"); - // now look for the account - List<GenericValue> accounts = delegator.findByAnd("FinAccount", UtilMisc.toMap("finAccountCode", encryptedFinAccountCode), null, false); + List<GenericValue> accounts = delegator.findByAnd("FinAccount", UtilMisc.toMap("finAccountCode", finAccountCode), null, false); accounts = EntityUtil.filterByDate(accounts); if (UtilValidate.isEmpty(accounts)) { Propchange: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java ------------------------------------------------------------------------------ Merged /ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java:r1542707-1608345 Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Mon Jul 7 06:50:24 2014 @@ -904,9 +904,14 @@ public class ShoppingCartEvents { HttpSession session = request.getSession(); GenericValue userLogin = (GenericValue) session.getAttribute("userLogin"); if (userLogin != null && "anonymous".equals(userLogin.get("userLoginId"))) { + Locale locale = UtilHttp.getLocale(session); + // here we want to do a full logout, but not using the normal logout stuff because it saves things in the UserLogin record that we don't want changed for the anonymous user session.invalidate(); session = request.getSession(true); + if (null != locale) { + UtilHttp.setLocale(session, locale); + } // to allow the display of the order confirmation page put the userLogin in the request, but leave it out of the session request.setAttribute("temporaryAnonymousUserLogin", userLogin); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java Mon Jul 7 06:50:24 2014 @@ -315,6 +315,10 @@ public class ShoppingCartHelper { String orderItemSeqId = (String) value; orderItem = orderHelper.getOrderItem(orderItemSeqId); } + // do not include PROMO items + if (orderItem.get("isPromo") != null && "Y".equals(orderItem.getString("isPromo"))) { + continue; + } orderItemTypeId = orderItem.getString("orderItemTypeId"); productId = orderItem.getString("productId"); // do not store rental items Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/config/PartyUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/config/PartyUiLabels.xml?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/config/PartyUiLabels.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/config/PartyUiLabels.xml Mon Jul 7 06:50:24 2014 @@ -1542,7 +1542,7 @@ <value xml:lang="de">Anrede</value> <value xml:lang="en">Salutation</value> <value xml:lang="es">Saludo</value> - <value xml:lang="fr">Salutation</value> + <value xml:lang="fr">Civilité</value> <value xml:lang="hi_IN">ठà¤à¤¿à¤µà¤¾à¤¦à¤¨</value> <value xml:lang="it">Saluto</value> <value xml:lang="ja">æ¨æ¶æ</value> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/servicedef/services.xml?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/servicedef/services.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/servicedef/services.xml Mon Jul 7 06:50:24 2014 @@ -749,6 +749,7 @@ under the License. <attribute name="statusId" type="String" mode="IN" optional="false"/> <attribute name="oldStatusId" type="String" mode="OUT" optional="true"/> <attribute name="setRoleStatusToComplete" mode="IN" type="String" default-value="N"/> + <attribute name="partyIdFrom" type="String" mode="IN" optional="true"/> </service> <service name="setCommunicationEventRoleStatus" engine="simple" default-entity-name="CommunicationEventRole" location="component://party/script/org/ofbiz/party/communication/CommunicationEventServices.xml" invoke="setCommunicationEventRoleStatus" auth="true"> @@ -935,6 +936,7 @@ under the License. location="org.ofbiz.party.communication.CommunicationEventServices" invoke="setCommEventComplete" auth="true"> <description>Sets the status of a communication event to COM_COMPLETE using the updateCommunicationEvent service</description> <attribute name="communicationEventId" type="String" mode="IN" optional="false"/> + <attribute name="partyIdFrom" type="String" mode="IN" optional="true"/> </service> <service name="sendEmailDated" engine="simple" use-transaction="false" Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java Mon Jul 7 06:50:24 2014 @@ -233,7 +233,7 @@ public class CommunicationEventServices return ServiceUtil.returnError(e.getMessage()); } - Map<String, Object> completeResult = dispatcher.runSync("setCommEventComplete", UtilMisc.<String, Object>toMap("communicationEventId", communicationEventId, "userLogin", userLogin)); + Map<String, Object> completeResult = dispatcher.runSync("setCommEventComplete", UtilMisc.<String, Object>toMap("communicationEventId", communicationEventId, "partyIdFrom", communicationEvent.getString("partyIdFrom"), "userLogin", userLogin)); if (ServiceUtil.isError(completeResult)) { errorMessages.add(ServiceUtil.getErrorMessage(completeResult)); } @@ -506,10 +506,11 @@ public class CommunicationEventServices LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue) context.get("userLogin"); String communicationEventId = (String) context.get("communicationEventId"); + String partyIdFrom = (String) context.get("partyIdFrom"); try { Map<String, Object> result = dispatcher.runSync("updateCommunicationEvent", UtilMisc.<String, Object>toMap("communicationEventId", communicationEventId, - "statusId", "COM_COMPLETE", "userLogin", userLogin)); + "partyIdFrom", partyIdFrom, "statusId", "COM_COMPLETE", "userLogin", userLogin)); if (ServiceUtil.isError(result)) { return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result)); } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/build.xml?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/build.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/build.xml Mon Jul 7 06:50:24 2014 @@ -49,6 +49,7 @@ under the License. <fileset dir="../content/build/lib" includes="*.jar"/> <fileset dir="../party/build/lib" includes="*.jar"/> <fileset dir="lib" includes="*.jar"/> + <fileset dir="../../framework/catalina/lib" includes="*.jar"/> </path> <target name="init"> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java Mon Jul 7 06:50:24 2014 @@ -22,19 +22,24 @@ import static org.ofbiz.base.util.UtilGe import java.io.IOException; import java.net.URL; +import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; +import javax.servlet.ServletRegistration; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javolution.util.FastSet; + import org.apache.oro.text.regex.Pattern; import org.apache.oro.text.regex.Perl5Matcher; import org.ofbiz.base.util.Debug; @@ -64,10 +69,30 @@ import org.ofbiz.webapp.website.WebSiteW public class SeoContextFilter extends ContextFilter { public static final String module = SeoContextFilter.class.getName(); + + protected Set<String> WebServlets = FastSet.newInstance(); + + public void init(FilterConfig config) throws ServletException { + super.init(config); + + Map<String, ? extends ServletRegistration> servletRegistrations = config.getServletContext().getServletRegistrations(); + for (String key : servletRegistrations.keySet()) { + Collection<String> servlets = servletRegistrations.get(key).getMappings(); + for (String servlet : servlets) { + if (servlet.endsWith("/*")) { + servlet = servlet.substring(0, servlet.length() - 2); + if (UtilValidate.isNotEmpty(servlet) && !WebServlets.contains(servlet)) { + WebServlets.add(servlet); + } + } + } + } + } /** * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) */ + @SuppressWarnings("deprecation") public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpRequest = (HttpServletRequest) request; HttpServletResponse httpResponse = (HttpServletResponse) response; @@ -166,10 +191,10 @@ public class SeoContextFilter extends Co String errorCode = config.getInitParameter("errorCode"); List<String> allowList = StringUtil.split(allowedPath, ":"); - allowList.add("/"); // No path is allowed. - if (UtilValidate.isNotEmpty(httpRequest.getServletPath())) { - allowList.add(""); // No path is allowed if servlet path is not empty. - } + // allowList.add("/"); // No path is allowed. + // if (UtilValidate.isNotEmpty(httpRequest.getServletPath())) { + // allowList.add(""); // No path is allowed if servlet path is not empty. + // } if (debug) Debug.logInfo("[Domain]: " + httpRequest.getServerName() + " [Request]: " + httpRequest.getRequestURI(), module); @@ -206,17 +231,21 @@ public class SeoContextFilter extends Co if (pathItemList != null) { viewName = pathItemList.get(0); } + + String requestUri = UtilHttp.getRequestUriFromTarget(httpRequest.getRequestURI()); // Verbose Debugging if (Debug.verboseOn()) { for (String allow : allowList) { Debug.logVerbose("[Allow]: " + allow, module); } + Debug.logVerbose("[View Name]: " + viewName, module); + Debug.logVerbose("[Request Uri]: " + requestUri, module); Debug.logVerbose("[Request path]: " + requestPath, module); Debug.logVerbose("[Request info]: " + requestInfo, module); Debug.logVerbose("[Servlet path]: " + httpRequest.getServletPath(), module); Debug.logVerbose( - "[Not In AllowList]: " + (!allowList.contains(requestPath) && !allowList.contains(requestInfo) && !allowList.contains(httpRequest.getServletPath())), + "[Not In AllowList]: " + (!allowList.contains(requestPath) && !allowList.contains(requestInfo) && !allowList.contains(httpRequest.getServletPath()) && !allowList.contains(requestUri) && !allowList.contains("/" + viewName)), module); Debug.logVerbose("[Not In controller]: " + (UtilValidate.isEmpty(requestPath) && UtilValidate.isEmpty(httpRequest.getServletPath()) && !uris.contains(viewName)), module); @@ -224,6 +253,7 @@ public class SeoContextFilter extends Co // check to make sure the requested url is allowed if (!allowList.contains(requestPath) && !allowList.contains(requestInfo) && !allowList.contains(httpRequest.getServletPath()) + && !allowList.contains(requestUri) && !allowList.contains("/" + viewName) && (UtilValidate.isEmpty(requestPath) && UtilValidate.isEmpty(httpRequest.getServletPath()) && !uris.contains(viewName))) { String filterMessage = "[Filtered request]: " + contextUri; @@ -263,6 +293,10 @@ public class SeoContextFilter extends Co } Debug.logWarning(filterMessage, module); return; + } else if ((allowList.contains(requestPath) || allowList.contains(requestInfo) || allowList.contains(httpRequest.getServletPath()) + || allowList.contains(requestUri) || allowList.contains("/" + viewName)) + && !WebServlets.contains(httpRequest.getServletPath())) { + request.setAttribute(SeoControlServlet.REQUEST_IN_ALLOW_LIST, Boolean.TRUE); } } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoControlServlet.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoControlServlet.java?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoControlServlet.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoControlServlet.java Mon Jul 7 06:50:24 2014 @@ -18,10 +18,15 @@ *******************************************************************************/ package org.ofbiz.product.category; +import java.io.IOException; import javax.servlet.ServletConfig; import javax.servlet.ServletContext; import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.catalina.servlets.DefaultServlet; +import org.apache.jasper.servlet.JspServlet; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.webapp.control.ControlServlet; @@ -35,6 +40,8 @@ public class SeoControlServlet extends C protected static String defaultPage = null; protected static String controlServlet = null; + + public static final String REQUEST_IN_ALLOW_LIST = "_REQUEST_IN_ALLOW_LIST_"; public SeoControlServlet() { super(); @@ -61,4 +68,20 @@ public class SeoControlServlet extends C SeoConfigUtil.init(); } + + public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + if (request.getAttribute(REQUEST_IN_ALLOW_LIST) != null) { + if (request.getRequestURI().toLowerCase().endsWith(".jsp") || request.getRequestURI().toLowerCase().endsWith(".jspx") ) { + JspServlet jspServlet = new JspServlet(); + jspServlet.init(this.getServletConfig()); + jspServlet.service(request, response); + } else { + DefaultServlet defaultServlet = new DefaultServlet(); + defaultServlet.init(this.getServletConfig()); + defaultServlet.service(request, response); + } + return; + } + super.doGet(request, response); + } } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogAltUrlSeoTransform.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogAltUrlSeoTransform.java?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogAltUrlSeoTransform.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogAltUrlSeoTransform.java Mon Jul 7 06:50:24 2014 @@ -140,16 +140,31 @@ public class CatalogAltUrlSeoTransform i Delegator delegator = FreeMarkerWorker.getWrappedObject("delegator", env); LocalDispatcher dispatcher = FreeMarkerWorker.getWrappedObject("dispatcher", env); Locale locale = (Locale) args.get("locale"); + String prefixString = ((StringModel) prefix).getAsString(); + prefixString = prefixString.replaceAll("/", "/"); + String contextPath = prefixString; + int lastSlashIndex = prefixString.lastIndexOf("/"); + if (lastSlashIndex > -1 && lastSlashIndex < prefixString.length()) { + contextPath = prefixString.substring(prefixString.lastIndexOf("/")); + } if (UtilValidate.isNotEmpty(productId)) { GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), false); ProductContentWrapper wrapper = new ProductContentWrapper(dispatcher, product, locale, "text/html"); - url = CatalogUrlFilter.makeProductUrl(delegator, wrapper, null, ((StringModel) prefix).getAsString(), previousCategoryId, productCategoryId, - productId); + if (SeoConfigUtil.isCategoryUrlEnabled(contextPath)) { + url = CatalogUrlSeoTransform.makeProductUrl(delegator, wrapper, prefixString, contextPath, productCategoryId, previousCategoryId, productId); + } else { + url = CatalogUrlFilter.makeProductUrl(delegator, wrapper, null, prefixString, previousCategoryId, productCategoryId, + productId); + } } else { GenericValue productCategory = delegator.findOne("ProductCategory", UtilMisc.toMap("productCategoryId", productCategoryId), false); CategoryContentWrapper wrapper = new CategoryContentWrapper(dispatcher, productCategory, locale, "text/html"); - url = CatalogUrlFilter.makeCategoryUrl(delegator, wrapper, null, ((StringModel) prefix).getAsString(), previousCategoryId, productCategoryId, - productId, viewSize, viewIndex, viewSort, searchString); + if (SeoConfigUtil.isCategoryUrlEnabled(contextPath)) { + url = CatalogUrlSeoTransform.makeCategoryUrl(delegator, wrapper, prefixString, productCategoryId, previousCategoryId, productId, viewSize, viewIndex, viewSort, searchString); + } else { + url = CatalogUrlFilter.makeCategoryUrl(delegator, wrapper, null, prefixString, previousCategoryId, productCategoryId, + productId, viewSize, viewIndex, viewSort, searchString); + } } out.write(url.toString()); } else { Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java Mon Jul 7 06:50:24 2014 @@ -667,4 +667,174 @@ public class CatalogUrlSeoTransform impl return false; } + /** + * This is used when building product url in services. + * + * @param delegator + * @param wrapper + * @param prefix + * @param contextPath + * @param productCategoryId + * @param previousCategoryId + * @param productId + * @return + */ + public static String makeProductUrl(Delegator delegator, ProductContentWrapper wrapper, String prefix, String contextPath, String currentCategoryId, String previousCategoryId, + String productId) { + StringBuilder urlBuilder = new StringBuilder(); + GenericValue product = null; + urlBuilder.append(prefix); + if (urlBuilder.charAt(urlBuilder.length() - 1) != '/') { + urlBuilder.append("/"); + } + if (UtilValidate.isNotEmpty(productId)) { + try { + product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), true); + } catch (GenericEntityException e) { + Debug.logError(e, "Error looking up product info for productId [" + productId + "]: " + e.toString(), module); + } + } + if (product != null) { + urlBuilder.append(CatalogUrlServlet.PRODUCT_REQUEST + "/"); + } + + if (UtilValidate.isNotEmpty(currentCategoryId)) { + List<String> trail = null; + trail = CategoryWorker.adjustTrail(trail, currentCategoryId, previousCategoryId); + if (!SeoConfigUtil.isCategoryUrlEnabled(contextPath)) { + for (String trailCategoryId: trail) { + if ("TOP".equals(trailCategoryId)) continue; + urlBuilder.append("/"); + urlBuilder.append(trailCategoryId); + } + } else { + if (trail != null && trail.size() > 1) { + String lastCategoryId = trail.get(trail.size() - 1); + if (!"TOP".equals(lastCategoryId)) { + if (SeoConfigUtil.isCategoryNameEnabled()) { + String categoryName = CatalogUrlSeoTransform.getCategoryIdNameMap().get(lastCategoryId); + if (UtilValidate.isNotEmpty(categoryName)) { + urlBuilder.append(categoryName); + if (product != null) { + urlBuilder.append(URL_HYPHEN); + } + } + } + } + } + } + } + + if (UtilValidate.isNotEmpty(productId)) { + if (product != null) { + String productName = product.getString("productName"); + productName = SeoUrlUtil.replaceSpecialCharsUrl(productName); + if (UtilValidate.isNotEmpty(productName)) { + urlBuilder.append(productName + URL_HYPHEN); + } else { + StringWrapper alternativeUrl = wrapper.get("ALTERNATIVE_URL"); + if (UtilValidate.isNotEmpty(alternativeUrl) && UtilValidate.isNotEmpty(alternativeUrl.toString())) { + productName = SeoUrlUtil.replaceSpecialCharsUrl(alternativeUrl.toString()); + if (UtilValidate.isNotEmpty(productName)) { + urlBuilder.append(productName + URL_HYPHEN); + } + } + } + } + try { + //SeoConfigUtil.addSpecialProductId(productId); + urlBuilder.append(productId); + } catch (Exception e) { + urlBuilder.append(productId); + } + } + + if (!urlBuilder.toString().endsWith("/") && UtilValidate.isNotEmpty(SeoConfigUtil.getCategoryUrlSuffix())) { + urlBuilder.append(SeoConfigUtil.getCategoryUrlSuffix()); + } + + return urlBuilder.toString(); + } + + /** + * This is used when building category url in services. + * + * @param delegator + * @param wrapper + * @param prefix + * @param productCategoryId + * @param previousCategoryId + * @param productId + * @param viewSize + * @param viewIndex + * @param viewSort + * @param searchString + * @return + */ + public static String makeCategoryUrl(Delegator delegator, CategoryContentWrapper wrapper, String prefix, + String currentCategoryId, String previousCategoryId, String productId, String viewSize, String viewIndex, + String viewSort, String searchString) { + StringBuilder urlBuilder = new StringBuilder(); + urlBuilder.append(prefix); + if (urlBuilder.charAt(urlBuilder.length() - 1) != '/') { + urlBuilder.append("/"); + } + urlBuilder.append(CatalogUrlServlet.CATEGORY_REQUEST + "/"); + + if (UtilValidate.isNotEmpty(currentCategoryId)) { + List<String> trail = null; + trail = CategoryWorker.adjustTrail(trail, currentCategoryId, previousCategoryId); + if (trail != null && trail.size() > 1) { + String lastCategoryId = trail.get(trail.size() - 1); + if (!"TOP".equals(lastCategoryId)) { + String categoryName = CatalogUrlSeoTransform.getCategoryIdNameMap().get(lastCategoryId); + if (UtilValidate.isNotEmpty(categoryName)) { + urlBuilder.append(categoryName); + urlBuilder.append(URL_HYPHEN); + urlBuilder.append(lastCategoryId.trim().replaceAll(" ", URL_HYPHEN)); + } else { + urlBuilder.append(lastCategoryId.trim().replaceAll(" ", URL_HYPHEN)); + } + } + } + } + + if (!urlBuilder.toString().endsWith("/") && UtilValidate.isNotEmpty(SeoConfigUtil.getCategoryUrlSuffix())) { + urlBuilder.append(SeoConfigUtil.getCategoryUrlSuffix()); + } + + // append view index + if (UtilValidate.isNotEmpty(viewIndex)) { + if (!urlBuilder.toString().endsWith("?") && !urlBuilder.toString().endsWith("&")) { + urlBuilder.append("?"); + } + urlBuilder.append("viewIndex=" + viewIndex + "&"); + } + // append view size + if (UtilValidate.isNotEmpty(viewSize)) { + if (!urlBuilder.toString().endsWith("?") && !urlBuilder.toString().endsWith("&")) { + urlBuilder.append("?"); + } + urlBuilder.append("viewSize=" + viewSize + "&"); + } + // append view sort + if (UtilValidate.isNotEmpty(viewSort)) { + if (!urlBuilder.toString().endsWith("?") && !urlBuilder.toString().endsWith("&")) { + urlBuilder.append("?"); + } + urlBuilder.append("viewSort=" + viewSort + "&"); + } + // append search string + if (UtilValidate.isNotEmpty(searchString)) { + if (!urlBuilder.toString().endsWith("?") && !urlBuilder.toString().endsWith("&")) { + urlBuilder.append("?"); + } + urlBuilder.append("searchString=" + searchString + "&"); + } + if (urlBuilder.toString().endsWith("&")) { + return urlBuilder.toString().substring(0, urlBuilder.toString().length()-1); + } + + return urlBuilder.toString(); + } } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java Mon Jul 7 06:50:24 2014 @@ -49,11 +49,11 @@ public class InventoryItemTransferTest e } public void testCreateInventoryItemsTransfer() throws Exception { + // create Map<String, Object> ctx = FastMap.newInstance(); - String statusId = "IXF_REQUESTED"; String inventoryItemId = "9005"; ctx.put("inventoryItemId", inventoryItemId); - ctx.put("statusId", statusId); + ctx.put("statusId", "IXF_REQUESTED"); ctx.put("facilityId", "WebStoreWarehouse"); ctx.put("facilityIdTo", "WebStoreWarehouse"); ctx.put("receiveDate", UtilDateTime.nowTimestamp()); @@ -62,17 +62,14 @@ public class InventoryItemTransferTest e Map<String, Object> resp = dispatcher.runSync("createInventoryTransfer", ctx); inventoryTransferId = (String) resp.get("inventoryTransferId"); assertNotNull(inventoryTransferId); - } - public void testUpdateInventoryItemTransfer() throws Exception { - Map<String, Object> ctx = FastMap.newInstance(); - String statusId = "IXF_COMPLETE"; + // transfer + ctx = FastMap.newInstance(); ctx.put("inventoryTransferId", inventoryTransferId); - String inventoryItemId = delegator.findOne("InventoryTransfer", UtilMisc.toMap("inventoryTransferId", inventoryTransferId), false).getString("inventoryItemId"); ctx.put("inventoryItemId", inventoryItemId); - ctx.put("statusId", statusId); + ctx.put("statusId", "IXF_COMPLETE"); ctx.put("userLogin", userLogin); - Map<String, Object> resp = dispatcher.runSync("updateInventoryTransfer", ctx); + resp = dispatcher.runSync("updateInventoryTransfer", ctx); String respMsg = (String) resp.get("responseMessage"); assertNotSame("error", respMsg); } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml Mon Jul 7 06:50:24 2014 @@ -22,6 +22,12 @@ under the License. xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:sonar="antlib:org.sonar.ant:sonar"> + <taskdef uri="antlib:org.apache.ivy.ant" resource="org/apache/ivy/ant/antlib.xml"> + <classpath> + <pathelement location="framework/base/lib/ivy-2.2.0.jar"/> + </classpath> + </taskdef> + <import file="macros.xml"/> <property name="site.dir" value="../site"/> <property name="memory.initial.param" value="-Xms128M"/> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/common.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/common.xml?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/common.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/common.xml Mon Jul 7 06:50:24 2014 @@ -88,7 +88,7 @@ under the License. <!-- ================================================================== --> <target name="classes" depends="prepare"> - <javac16/> + <javac17/> </target> <target name="jar" depends="classes"> @@ -129,21 +129,13 @@ under the License. <run-junit/> </target> + <patternset id="cobertura-src-dirs"> + <include name="src"/> + </patternset> + <target name="tests-cobertura" depends="jar"> <mkdir dir="${build.dir}/cobertura-lib"/> - <taskdef resource="tasks.properties"> - <classpath> - <fileset dir="${ofbiz.home.dir}/framework/base/lib"> - <include name="cobertura-1.9.4.1.jar" /> - <include name="log4j-1.2.16.jar" /> - </fileset> - <fileset dir="${ofbiz.home.dir}/framework/base/lib/scripting"> - <include name="asm-3.2.jar" /> - <include name="asm-tree-3.2.jar" /> - <include name="jakarta-oro-2.0.8.jar" /> - </fileset> - </classpath> - </taskdef> + <taskdef resource="tasks.properties" classpathref="cobertura.class.path"/> <delete file="${build.dir}/test-results/cobertura.dat"/> <cobertura-instrument datafile="${build.dir}/test-results/cobertura.dat" todir="${build.dir}/cobertura-lib"> <fileset dir="${build.dir}/lib"> @@ -155,8 +147,7 @@ under the License. <mkdir dir="${build.dir}/test-results/cobertura-report"/> <cobertura-report datafile="${build.dir}/test-results/cobertura.dat" destdir="${build.dir}/test-results/cobertura-report"> <dirset dir="."> - <patternset refid="src-dirs"/> - <include name="src"/> + <patternset refid="cobertura-src-dirs"/> </dirset> <include name="**/*.java"/> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/build.xml?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/build.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/build.xml Mon Jul 7 06:50:24 2014 @@ -36,9 +36,6 @@ under the License. <fileset dir="${lib.dir}/scripting" includes="*.jar"/> <fileset dir="../start/build/lib" includes="*.jar"/> </path> - <patternset id="src-dirs"> - <include name="build/gen-src/javacc"/> - </patternset> <filelist id="test.classes" dir="${src.dir}"> <file name="org/ofbiz/base/lang/test/ComparableRangeTests.java"/> @@ -63,6 +60,11 @@ under the License. <file name="org/ofbiz/base/concurrent/test/TTLCachedObjectTest.java"/> </filelist> + <patternset id="cobertura-src-dirs"> + <include name="build/gen-src"/> + <include name="src"/> + </patternset> + <target name="init"> <!-- make sure we have crypto packages available --> <condition property="exclude.crypto" value="org/ofbiz/base/crypto/**"> @@ -72,7 +74,7 @@ under the License. </condition> <condition property="exclude.cobertura" value="org/ofbiz/base/config/Cobertura*.java"> <not> - <available classname="net.sourceforge.cobertura.instrument.ClassInstrumenter" classpathref="local.class.path"/> + <available classname="net.sourceforge.cobertura.instrument.ClassInstrumenter" classpathref="cobertura.class.path"/> </not> </condition> <patternset id="src.exc.set"> @@ -87,7 +89,13 @@ under the License. </target> <target name="classes" depends="prepare,gen-src"> - <javac16/> + <javac17> + <sourcepath> + <dirset dir="build/gen-src"> + <include name="javacc"/> + </dirset> + </sourcepath> + </javac17> </target> <target name="jar" depends="classes"> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/StringUtil.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/StringUtil.java?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/StringUtil.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/StringUtil.java Mon Jul 7 06:50:24 2014 @@ -311,7 +311,7 @@ public class StringUtil { * @return a Map of name/value pairs */ public static Map<String, String> strToMap(String str, boolean trim) { - return strToMap(str, null, trim); + return strToMap(str, "|", trim); } /** @@ -330,7 +330,7 @@ public class StringUtil { * @return a Map of name/value pairs */ public static Map<String, String> strToMap(String str) { - return strToMap(str, null, false); + return strToMap(str, "|", false); } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/UtilIO.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/UtilIO.java?rev=1608347&r1=1608346&r2=1608347&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/UtilIO.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/UtilIO.java Mon Jul 7 06:50:24 2014 @@ -382,6 +382,9 @@ public final class UtilIO { if (buffer[length - 1] == '\n') { length--; } + if (buffer[length - 1] == '\r') { + length--; + } return convertObject(String.class, new String(buffer, i + 1, length - i - 1), type); } } catch (Exception e) { |
Free forum by Nabble | Edit this page |