You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by sh...@apache.org on 2015/08/21 12:03:11 UTC

svn commit: r1696921 - in /ofbiz/trunk: ./ framework/base/lib/ framework/common/ framework/common/config/ framework/common/servicedef/ framework/common/src/org/ofbiz/common/qrcode/ framework/common/webcommon/WEB-INF/ framework/images/webapp/images/ fra...

Author: shijh
Date: Fri Aug 21 10:03:11 2015
New Revision: 1696921

URL: http://svn.apache.org/r1696921
Log:
OFBIZ-4154 Use ZXing to generate QR 2d barcode.

1. Add zxing-core-3.2.0.jar to framework/base/lib and .classpath.
2. Add services_qrcode.xml and QRCodeService.java in framework/common/.
3. Add qrcode request in common-controller.xml and QRCodeEvents.java under framework/common/.
4. Add qrcode.properties and QRCodeUiLabels.xml under framework/common/.
5. Add a barcode example page in specialpurpose/example, entry is on page: /example/control/EditExample?exampleId=EX01, the example can be seen on page: /example/control/ExampleReportPdfBarcode?exampleId=EX01

Added:
    ofbiz/trunk/framework/base/lib/zxing-core-3.2.0.jar   (with props)
    ofbiz/trunk/framework/common/config/QRCodeUiLabels.xml   (with props)
    ofbiz/trunk/framework/common/config/qrcode.properties   (with props)
    ofbiz/trunk/framework/common/servicedef/services_qrcode.xml   (with props)
    ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/
    ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeEvents.java   (with props)
    ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeServices.java   (with props)
    ofbiz/trunk/framework/images/webapp/images/icons/famfamfam/ofbiz_barcode.png   (with props)
    ofbiz/trunk/framework/images/webapp/images/ofbiz.png   (with props)
    ofbiz/trunk/specialpurpose/example/webapp/example/reports/BarCode.fo.ftl   (with props)
Modified:
    ofbiz/trunk/.classpath
    ofbiz/trunk/framework/common/ofbiz-component.xml
    ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml
    ofbiz/trunk/specialpurpose/example/config/ExampleUiLabels.xml
    ofbiz/trunk/specialpurpose/example/webapp/example/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/example/widget/example/CommonScreens.xml
    ofbiz/trunk/specialpurpose/example/widget/example/ExampleScreens.xml

Modified: ofbiz/trunk/.classpath
URL: http://svn.apache.org/viewvc/ofbiz/trunk/.classpath?rev=1696921&r1=1696920&r2=1696921&view=diff
==============================================================================
--- ofbiz/trunk/.classpath (original)
+++ ofbiz/trunk/.classpath Fri Aug 21 10:03:11 2015
@@ -1,186 +1,187 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-    <classpathentry kind="lib" path="applications/content/lib/dom4j-1.6.1.jar"/>
-    <classpathentry kind="lib" path="applications/content/lib/pdfbox-1.8.5.jar"/>
-    <classpathentry kind="lib" path="applications/content/lib/jempbox-1.8.5.jar"/>
-    <classpathentry kind="lib" path="applications/content/lib/fontbox-1.8.5.jar"/>
-    <classpathentry kind="lib" path="applications/content/lib/poi-3.10.1-20140818.jar"/>
-    <classpathentry kind="lib" path="applications/content/lib/tika-core-1.7.jar"/>
-    <classpathentry kind="lib" path="applications/content/lib/tika-parsers-1.7.jar"/>
-    <classpathentry kind="lib" path="applications/product/lib/dozer-4.2.1.jar"/>
-    <classpathentry kind="lib" path="applications/product/lib/watermarker-0.0.4.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/ant-1.9.0-ant.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/ant-1.9.0-ant-junit.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/ant-1.9.0-ant-launcher.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/avalon-framework-4.2.0.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/barcode4j-2.1-barcode4j-fop-ext-complete.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/batik-all-1.8.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/clhm-release-1.0-lru.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/esapi-2.1.0.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/fop-2.0.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/freemarker-2.3.22.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/hamcrest-all-1.2.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/httpclient-4.3.6.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/httpclient-cache-4.3.6.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/httpcore-4.3.3.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/httpunit-1.7.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/ical4j-1.0-rc2.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/icu4j-52_1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/ivy-2.2.0.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/jackson-annotations-2.4.0.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/jackson-core-2.4.2.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/jackson-databind-2.4.2.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/javolution-5.4.3.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/jdbm-1.0-SNAPSHOT.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/jdom-1.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/jpim-0.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/juel-impl-2.2.7.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/juel-spi-2.2.7.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/junit-dep-4.10.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/log4j-api-2.3.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/mail-1.5.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/nekohtml-1.9.16.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/resolver-2.9.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/serializer-2.9.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/shiro-core-1.2.3.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/slf4j-api-1.6.4.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/ws-commons-java5-1.0.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/ws-commons-util-1.0.2.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/xercesImpl-2.9.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/xmlgraphics-commons-2.0.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/xmlrpc-client-3.1.2.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/xmlrpc-common-3.1.2.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/xmlrpc-server-3.1.2.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/xml-apis-2.9.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/xml-apis-ext-1.3.04.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/xpp3-1.1.4c.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/xstream-1.4.6.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/ant/ant-1.9.0-ant-apache-bsf.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/commons/commons-beanutils-core-1.8.3.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/commons/commons-codec-1.10.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/commons/commons-collections-3.2.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/commons/commons-compress-1.9.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/commons/commons-csv-1.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/commons/commons-el-1.0.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/commons/commons-fileupload-1.3.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/commons/commons-io-2.4.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/commons/commons-lang-2.6.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/commons/commons-logging-1.2.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/commons/commons-net-3.3.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/commons/commons-pool2-2.3.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/commons/commons-validator-1.4.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-activation_1.0.2_spec-1.0.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-j2ee-connector_1.5_spec-2.0.0.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-jaxrpc_1.1_spec-1.0.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-jaxr_1.0_spec-1.0.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-jms_1.1_spec-1.1.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-jta_1.1_spec-1.1.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-saaj_1.3_spec-1.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/annotations-api-3.0.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/el-api-2.2.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/jsp-api-2.2.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/servlet-api-3.0.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/scripting/antlr-2.7.6.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/scripting/asm-3.2.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/scripting/bsf-2.4.0.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/scripting/bsh-2.0b4.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/scripting/groovy-all-2.2.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/scripting/jakarta-oro-2.0.8.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/scripting/jython-nooro.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/ecj-4.4.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.59-catalina.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.59-catalina-ha.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.59-catalina-tribes.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.59-jasper.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.59-tomcat-api.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.59-tomcat-coyote.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.59-tomcat-util.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-extras-7.0.59-tomcat-juli.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-extras-7.0.59-tomcat-juli-adapters.jar"/>
-    <classpathentry kind="lib" path="framework/entity/lib/commons-dbcp2-2.1.jar"/>
-    <classpathentry kind="lib" path="framework/geronimo/lib/geronimo-transaction-3.1.1.jar"/>
-    <classpathentry kind="lib" path="framework/service/lib/axiom-api-1.2.9.jar"/>
-    <classpathentry kind="lib" path="framework/service/lib/axiom-impl-1.2.9.jar"/>
-    <classpathentry kind="lib" path="framework/service/lib/axis2-kernel-1.5.2.jar"/>
-    <classpathentry kind="lib" path="framework/service/lib/axis2-transport-http-1.5.2.jar"/>
-    <classpathentry kind="lib" path="framework/service/lib/axis2-transport-local-1.5.2.jar"/>
-    <classpathentry kind="lib" path="framework/service/lib/commons-httpclient-3.1.jar"/>
-    <classpathentry kind="lib" path="framework/service/lib/neethi-2.0.4.jar"/>
-    <classpathentry kind="lib" path="framework/service/lib/wsdl4j-1.6.2.jar"/>
-    <classpathentry kind="lib" path="framework/service/lib/XmlSchema-1.4.3.jar"/>
-    <classpathentry kind="lib" path="framework/testtools/lib/org.springframework.core-3.1.0.M2.jar"/>
-    <classpathentry kind="lib" path="framework/testtools/lib/org.springframework.test-3.1.0.M2.jar"/>
-    <classpathentry kind="lib" path="framework/webapp/lib/ezmorph-0.9.1.jar"/>
-    <classpathentry kind="lib" path="framework/webapp/lib/iText-2.1.7.jar"/>
-    <classpathentry kind="lib" path="framework/webapp/lib/rome-0.9.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/birt/lib/axis-1.4.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/birt/lib/axis-ant-1.4.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/birt/lib/commons-discovery-0.5.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/birt/lib/org.eclipse.birt.runtime_4.3.1.v20130918-1142.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/birt/lib/org.eclipse.core.runtime_3.9.0.v20130326-1255.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/birt/lib/org.eclipse.equinox.common_3.6.200.v20130402-1505.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/birt/lib/org.eclipse.equinox.registry_3.5.301.v20130717-1549.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/birt/lib/org.eclipse.osgi_3.9.1.v20130814-1242.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/birt/lib/viewservlets.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/ebaystore/lib/attributes.jar"/>
-    <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/googlecheckout/lib/checkout-sdk-0.8.8.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/ldap/lib/cas-server-core-3.3.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/pos/lib/jcl.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/pos/lib/jpos18-controls.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/pos/lib/looks-2.0.2.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/pos/lib/XuiCoreSwing-v3.2rc2b.jar"/>
-    <classpathentry kind="lib" path="specialpurpose/pos/lib/XuiOptional-v3.2rc2b.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 kind="src" path="applications/accounting/src" excluding="org/ofbiz/accounting/thirdparty/cybersource/**|org/ofbiz/accounting/thirdparty/verisign/**|org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java|org/ofbiz/accounting/thirdparty/orbital/**|org/ofbiz/accounting/thirdparty/securepay/**|org/ofbiz/accounting/thirdparty/ideal/**"/>
-    <classpathentry kind="src" path="applications/content/src" excluding="org/ofbiz/content/openoffice/|org/ofbiz/content/report/"/>
-    <classpathentry kind="src" path="applications/manufacturing/src"/>
-    <classpathentry kind="src" path="applications/marketing/src"/>
-    <classpathentry kind="src" path="applications/order/src" excluding="org/ofbiz/order/thirdparty/taxware/**"/>
-    <classpathentry kind="src" path="applications/party/src"/>
-    <classpathentry kind="src" path="applications/product/src" excluding="ShipmentScaleApplet.java"/>
-    <classpathentry kind="src" path="applications/securityext/src" excluding="org/ofbiz/securityext/thirdparty/truition/TruitionCoReg.java"/>
-    <classpathentry kind="src" path="applications/humanres/src"/>
-    <classpathentry kind="src" path="applications/workeffort/src"/>
-    <classpathentry kind="src" path="framework/base/config"/>
-    <classpathentry kind="src" path="framework/base/src" excluding="org/ofbiz/base/config/CoberturaInstrumenter.java"/>
-    <classpathentry kind="src" path="framework/catalina/src"/>
-    <classpathentry kind="src" path="framework/common/src"/>
-    <classpathentry kind="src" path="framework/datafile/src"/>
-    <classpathentry kind="src" path="framework/entity/src"/>
-    <classpathentry kind="src" path="framework/entityext/src"/>
-    <classpathentry kind="src" path="framework/geronimo/src"/>
-    <classpathentry kind="src" path="framework/minilang/src"/>
-    <classpathentry kind="src" path="framework/security/src"/>
-    <classpathentry kind="src" path="framework/service/src"/>
-    <classpathentry kind="src" path="framework/start/src"/>
-    <classpathentry kind="src" path="framework/testtools/src"/>
-    <classpathentry kind="src" path="framework/webapp/src" excluding="org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java|org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java|org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java|org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java"/>
-    <classpathentry kind="src" path="framework/webtools/src"/>
-    <classpathentry kind="src" path="framework/widget/src"/>
-    <classpathentry kind="src" path="specialpurpose/assetmaint/src"/>
-    <classpathentry kind="src" path="specialpurpose/birt/src"/>
-    <classpathentry kind="src" path="specialpurpose/ebay/src"/>
-    <classpathentry kind="src" path="specialpurpose/ebaystore/src"/>
-    <classpathentry kind="src" path="specialpurpose/ecommerce/src"/>
-    <classpathentry kind="src" path="specialpurpose/example/src"/>
-    <classpathentry kind="src" path="specialpurpose/googlebase/src"/>
-    <classpathentry kind="src" path="specialpurpose/googlecheckout/src"/>
-    <classpathentry kind="src" path="specialpurpose/hhfacility/src"/>
-    <classpathentry kind="src" path="specialpurpose/ldap/src"/>
-    <classpathentry kind="src" path="specialpurpose/lucene/src"/>
-    <classpathentry kind="src" path="specialpurpose/oagis/src"/>
-    <classpathentry kind="src" path="specialpurpose/pos/src"/>
-    <classpathentry kind="src" path="specialpurpose/projectmgr/src"/>
-    <classpathentry kind="src" path="specialpurpose/scrum/src"/>
-    <classpathentry kind="src" path="specialpurpose/webpos/src"/>
-    <classpathentry kind="src" path="specialpurpose/passport/src"/>
-    <classpathentry kind="con" path="GROOVY_SUPPORT" exported="true"/>
-    <classpathentry kind="con" path="GROOVY_DSL_SUPPORT" exported="true"/>
-    <classpathentry kind="output" path="bin"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="lib" path="applications/content/lib/dom4j-1.6.1.jar"/>
+	<classpathentry kind="lib" path="applications/content/lib/pdfbox-1.8.5.jar"/>
+	<classpathentry kind="lib" path="applications/content/lib/jempbox-1.8.5.jar"/>
+	<classpathentry kind="lib" path="applications/content/lib/fontbox-1.8.5.jar"/>
+	<classpathentry kind="lib" path="applications/content/lib/poi-3.10.1-20140818.jar"/>
+	<classpathentry kind="lib" path="applications/content/lib/tika-core-1.7.jar"/>
+	<classpathentry kind="lib" path="applications/content/lib/tika-parsers-1.7.jar"/>
+	<classpathentry kind="lib" path="applications/product/lib/dozer-4.2.1.jar"/>
+	<classpathentry kind="lib" path="applications/product/lib/watermarker-0.0.4.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/ant-1.9.0-ant.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/ant-1.9.0-ant-junit.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/ant-1.9.0-ant-launcher.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/avalon-framework-4.2.0.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/barcode4j-2.1-barcode4j-fop-ext-complete.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/batik-all-1.8.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/clhm-release-1.0-lru.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/esapi-2.1.0.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/fop-2.0.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/freemarker-2.3.22.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/hamcrest-all-1.2.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/httpclient-4.3.6.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/httpclient-cache-4.3.6.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/httpcore-4.3.3.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/httpunit-1.7.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/ical4j-1.0-rc2.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/icu4j-52_1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/ivy-2.2.0.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/jackson-annotations-2.4.0.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/jackson-core-2.4.2.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/jackson-databind-2.4.2.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/javolution-5.4.3.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/jdbm-1.0-SNAPSHOT.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/jdom-1.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/jpim-0.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/juel-impl-2.2.7.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/juel-spi-2.2.7.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/junit-dep-4.10.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/log4j-api-2.3.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/mail-1.5.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/nekohtml-1.9.16.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/resolver-2.9.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/serializer-2.9.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/shiro-core-1.2.3.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/slf4j-api-1.6.4.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/ws-commons-java5-1.0.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/ws-commons-util-1.0.2.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/xercesImpl-2.9.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/xmlgraphics-commons-2.0.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/xmlrpc-client-3.1.2.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/xmlrpc-common-3.1.2.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/xmlrpc-server-3.1.2.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/xml-apis-2.9.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/xml-apis-ext-1.3.04.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/xpp3-1.1.4c.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/xstream-1.4.6.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/ant/ant-1.9.0-ant-apache-bsf.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/commons/commons-beanutils-core-1.8.3.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/commons/commons-codec-1.10.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/commons/commons-collections-3.2.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/commons/commons-compress-1.9.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/commons/commons-csv-1.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/commons/commons-el-1.0.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/commons/commons-fileupload-1.3.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/commons/commons-io-2.4.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/commons/commons-lang-2.6.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/commons/commons-logging-1.2.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/commons/commons-net-3.3.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/commons/commons-pool2-2.3.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/commons/commons-validator-1.4.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-activation_1.0.2_spec-1.0.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-j2ee-connector_1.5_spec-2.0.0.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-jaxrpc_1.1_spec-1.0.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-jaxr_1.0_spec-1.0.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-jms_1.1_spec-1.1.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-jta_1.1_spec-1.1.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-saaj_1.3_spec-1.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/j2eespecs/annotations-api-3.0.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/j2eespecs/el-api-2.2.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/j2eespecs/jsp-api-2.2.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/j2eespecs/servlet-api-3.0.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/scripting/antlr-2.7.6.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/scripting/asm-3.2.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/scripting/bsf-2.4.0.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/scripting/bsh-2.0b4.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/scripting/groovy-all-2.2.1.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/scripting/jakarta-oro-2.0.8.jar"/>
+	<classpathentry kind="lib" path="framework/base/lib/scripting/jython-nooro.jar"/>
+	<classpathentry kind="lib" path="framework/catalina/lib/ecj-4.4.jar"/>
+	<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.59-catalina.jar"/>
+	<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.59-catalina-ha.jar"/>
+	<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.59-catalina-tribes.jar"/>
+	<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.59-jasper.jar"/>
+	<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.59-tomcat-api.jar"/>
+	<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.59-tomcat-coyote.jar"/>
+	<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.59-tomcat-util.jar"/>
+	<classpathentry kind="lib" path="framework/catalina/lib/tomcat-extras-7.0.59-tomcat-juli.jar"/>
+	<classpathentry kind="lib" path="framework/catalina/lib/tomcat-extras-7.0.59-tomcat-juli-adapters.jar"/>
+	<classpathentry kind="lib" path="framework/entity/lib/commons-dbcp2-2.1.jar"/>
+	<classpathentry kind="lib" path="framework/geronimo/lib/geronimo-transaction-3.1.1.jar"/>
+	<classpathentry kind="lib" path="framework/service/lib/axiom-api-1.2.9.jar"/>
+	<classpathentry kind="lib" path="framework/service/lib/axiom-impl-1.2.9.jar"/>
+	<classpathentry kind="lib" path="framework/service/lib/axis2-kernel-1.5.2.jar"/>
+	<classpathentry kind="lib" path="framework/service/lib/axis2-transport-http-1.5.2.jar"/>
+	<classpathentry kind="lib" path="framework/service/lib/axis2-transport-local-1.5.2.jar"/>
+	<classpathentry kind="lib" path="framework/service/lib/commons-httpclient-3.1.jar"/>
+	<classpathentry kind="lib" path="framework/service/lib/neethi-2.0.4.jar"/>
+	<classpathentry kind="lib" path="framework/service/lib/wsdl4j-1.6.2.jar"/>
+	<classpathentry kind="lib" path="framework/service/lib/XmlSchema-1.4.3.jar"/>
+	<classpathentry kind="lib" path="framework/testtools/lib/org.springframework.core-3.1.0.M2.jar"/>
+	<classpathentry kind="lib" path="framework/testtools/lib/org.springframework.test-3.1.0.M2.jar"/>
+	<classpathentry kind="lib" path="framework/webapp/lib/ezmorph-0.9.1.jar"/>
+	<classpathentry kind="lib" path="framework/webapp/lib/iText-2.1.7.jar"/>
+	<classpathentry kind="lib" path="framework/webapp/lib/rome-0.9.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/birt/lib/axis-1.4.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/birt/lib/axis-ant-1.4.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/birt/lib/commons-discovery-0.5.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/birt/lib/org.eclipse.birt.runtime_4.3.1.v20130918-1142.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/birt/lib/org.eclipse.core.runtime_3.9.0.v20130326-1255.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/birt/lib/org.eclipse.equinox.common_3.6.200.v20130402-1505.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/birt/lib/org.eclipse.equinox.registry_3.5.301.v20130717-1549.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/birt/lib/org.eclipse.osgi_3.9.1.v20130814-1242.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/birt/lib/viewservlets.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/ebaystore/lib/attributes.jar"/>
+	<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/googlecheckout/lib/checkout-sdk-0.8.8.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/ldap/lib/cas-server-core-3.3.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/pos/lib/jcl.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/pos/lib/jpos18-controls.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/pos/lib/looks-2.0.2.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/pos/lib/XuiCoreSwing-v3.2rc2b.jar"/>
+	<classpathentry kind="lib" path="specialpurpose/pos/lib/XuiOptional-v3.2rc2b.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 kind="lib" path="framework/base/lib/zxing-core-3.2.0.jar"/>
+	<classpathentry excluding="org/ofbiz/accounting/thirdparty/cybersource/**|org/ofbiz/accounting/thirdparty/verisign/**|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"/>
+	<classpathentry kind="src" path="applications/marketing/src"/>
+	<classpathentry excluding="org/ofbiz/order/thirdparty/taxware/**" kind="src" path="applications/order/src"/>
+	<classpathentry kind="src" path="applications/party/src"/>
+	<classpathentry excluding="ShipmentScaleApplet.java" kind="src" path="applications/product/src"/>
+	<classpathentry excluding="org/ofbiz/securityext/thirdparty/truition/TruitionCoReg.java" kind="src" path="applications/securityext/src"/>
+	<classpathentry kind="src" path="applications/humanres/src"/>
+	<classpathentry kind="src" path="applications/workeffort/src"/>
+	<classpathentry kind="src" path="framework/base/config"/>
+	<classpathentry excluding="org/ofbiz/base/config/CoberturaInstrumenter.java" kind="src" path="framework/base/src"/>
+	<classpathentry kind="src" path="framework/catalina/src"/>
+	<classpathentry kind="src" path="framework/common/src"/>
+	<classpathentry kind="src" path="framework/datafile/src"/>
+	<classpathentry kind="src" path="framework/entity/src"/>
+	<classpathentry kind="src" path="framework/entityext/src"/>
+	<classpathentry kind="src" path="framework/geronimo/src"/>
+	<classpathentry kind="src" path="framework/minilang/src"/>
+	<classpathentry kind="src" path="framework/security/src"/>
+	<classpathentry kind="src" path="framework/service/src"/>
+	<classpathentry kind="src" path="framework/start/src"/>
+	<classpathentry kind="src" path="framework/testtools/src"/>
+	<classpathentry excluding="org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java|org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java|org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java|org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java" kind="src" path="framework/webapp/src"/>
+	<classpathentry kind="src" path="framework/webtools/src"/>
+	<classpathentry kind="src" path="framework/widget/src"/>
+	<classpathentry kind="src" path="specialpurpose/assetmaint/src"/>
+	<classpathentry kind="src" path="specialpurpose/birt/src"/>
+	<classpathentry kind="src" path="specialpurpose/ebay/src"/>
+	<classpathentry kind="src" path="specialpurpose/ebaystore/src"/>
+	<classpathentry kind="src" path="specialpurpose/ecommerce/src"/>
+	<classpathentry kind="src" path="specialpurpose/example/src"/>
+	<classpathentry kind="src" path="specialpurpose/googlebase/src"/>
+	<classpathentry kind="src" path="specialpurpose/googlecheckout/src"/>
+	<classpathentry kind="src" path="specialpurpose/hhfacility/src"/>
+	<classpathentry kind="src" path="specialpurpose/ldap/src"/>
+	<classpathentry kind="src" path="specialpurpose/lucene/src"/>
+	<classpathentry kind="src" path="specialpurpose/oagis/src"/>
+	<classpathentry kind="src" path="specialpurpose/pos/src"/>
+	<classpathentry kind="src" path="specialpurpose/projectmgr/src"/>
+	<classpathentry kind="src" path="specialpurpose/scrum/src"/>
+	<classpathentry kind="src" path="specialpurpose/webpos/src"/>
+	<classpathentry kind="src" path="specialpurpose/passport/src"/>
+	<classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
+	<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
+	<classpathentry kind="output" path="bin"/>
 </classpath>

Added: ofbiz/trunk/framework/base/lib/zxing-core-3.2.0.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/zxing-core-3.2.0.jar?rev=1696921&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/base/lib/zxing-core-3.2.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/common/config/QRCodeUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/QRCodeUiLabels.xml?rev=1696921&view=auto
==============================================================================
--- ofbiz/trunk/framework/common/config/QRCodeUiLabels.xml (added)
+++ ofbiz/trunk/framework/common/config/QRCodeUiLabels.xml Fri Aug 21 10:03:11 2015
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <property key="QRTypeNotSupported">
+        <value xml:lang="en">The QRCode type {0} is not supported!</value>
+        <value xml:lang="zh">二维码不支持{0}类型!</value>
+    </property>
+    <property key="ParameterCannotEmpty">
+        <value xml:lang="en">The {0} parameter cannot be empty in generateQRCodeImage service!</value>
+        <value xml:lang="zh">在generateQRCodeImage服务中,参数{0}不能为空!</value>
+    </property>
+    <property key="SizeOutOfBorderError">
+        <value xml:lang="en">Error: the value of {0} parameter is {1}, it is not between {2} and {3}!</value>
+        <value xml:lang="zh">错误:参数{0}的值是{1},不在{2}和{3}之间的范围内!</value>
+    </property>
+    <property key="ErrorGenerateQRCode">
+        <value xml:lang="en">Error while generating QRCode: {0}</value>
+        <value xml:lang="zh">生成二维码时出错:{0}</value>
+    </property>
+    <property key="ErrorFormatNotSupported">
+        <value xml:lang="en">Error: format {0} is not supported.</value>
+        <value xml:lang="zh">错误:不支持格式{0}。</value>
+    </property>
+    <property key="ErrorWriteFormatToFile">
+        <value xml:lang="en">Could not write an image of format {0}.</value>
+        <value xml:lang="zh">无法写格式为{0}的图片。</value>
+    </property>
+    <property key="ErrorVerifyQRCode">
+        <value xml:lang="en">Error while verifying QR code: {0}</value>
+        <value xml:lang="zh">验证二维码时出错:{0}</value>
+    </property>
+    <property key="GeneratedTextNotMatchOriginal">
+        <value xml:lang="en">The text in generated QR code doesn't match the original: <br/>[Text in QR code]{0} <br/>[Original text]{1}</value>
+        <value xml:lang="zh">二维码中的文字信息与原信息不一致:<br/>[二维码中文字]{0}<br/>[原信息文字]{1}</value>
+    </property>
+</resource>

Propchange: ofbiz/trunk/framework/common/config/QRCodeUiLabels.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/common/config/QRCodeUiLabels.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/framework/common/config/QRCodeUiLabels.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/framework/common/config/qrcode.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/qrcode.properties?rev=1696921&view=auto
==============================================================================
--- ofbiz/trunk/framework/common/config/qrcode.properties (added)
+++ ofbiz/trunk/framework/common/config/qrcode.properties Fri Aug 21 10:03:11 2015
@@ -0,0 +1,29 @@
+###############################################################################
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+###############################################################################
+
+# QRCode default size
+qrcode.default.width=200
+qrcode.default.height=200
+
+# QRCode default format
+qrcode.default.format=png
+qrcode.formats.supported=jpg|png|bmp
+
+# default logo image to put in the center of a QRCode
+qrcode.default.logoimage=component://images/webapp/images/ofbiz.png

Propchange: ofbiz/trunk/framework/common/config/qrcode.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/common/config/qrcode.properties
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/framework/common/config/qrcode.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/framework/common/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/ofbiz-component.xml?rev=1696921&r1=1696920&r2=1696921&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/ofbiz-component.xml (original)
+++ ofbiz/trunk/framework/common/ofbiz-component.xml Fri Aug 21 10:03:11 2015
@@ -65,6 +65,7 @@ under the License.
     <service-resource type="model" loader="main" location="servicedef/services.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services_cdyne.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services_email.xml"/>
+    <service-resource type="model" loader="main" location="servicedef/services_qrcode.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services_security.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services_test.xml"/>
     <service-resource type="group" loader="main" location="servicedef/groups_test.xml"/>

Added: ofbiz/trunk/framework/common/servicedef/services_qrcode.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/servicedef/services_qrcode.xml?rev=1696921&view=auto
==============================================================================
--- ofbiz/trunk/framework/common/servicedef/services_qrcode.xml (added)
+++ ofbiz/trunk/framework/common/servicedef/services_qrcode.xml Fri Aug 21 10:03:11 2015
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
+    <description>QRCode Services</description>
+    <vendor>OFBiz</vendor>
+    <version>1.0</version>
+
+    <service name="generateQRCodeImage" engine="java" require-new-transaction="true" max-retry="3"
+        auth="false" location="org.ofbiz.common.qrcode.QRCodeServices"
+        invoke="generateQRCodeImage">
+        <description>Generate a QRCode image according to </description>
+        <attribute name="message" type="String" mode="IN" optional="false"/>
+        <attribute name="format" type="String" mode="IN" optional="true"/>
+        <attribute name="height" type="Integer" mode="IN" optional="true"/>
+        <attribute name="width" type="Integer" mode="IN" optional="true"/>
+        <attribute name="encoding" type="String" mode="IN" optional="true"/>
+        <attribute name="logoImage" type="java.awt.image.BufferedImage" mode="IN" optional="true"/>
+        <attribute name="logoImageMaxWidth" type="Integer" mode="IN" optional="true"/>
+        <attribute name="logoImageMaxHeight" type="Integer" mode="IN" optional="true"/>
+        <attribute name="verifyOutput" type="Boolean" mode="IN" optional="true"/>
+        <attribute name="bufferedImage" type="java.awt.image.BufferedImage" mode="OUT" optional="true"/>
+    </service>
+
+</services>
\ No newline at end of file

Propchange: ofbiz/trunk/framework/common/servicedef/services_qrcode.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/common/servicedef/services_qrcode.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/framework/common/servicedef/services_qrcode.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeEvents.java?rev=1696921&view=auto
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeEvents.java (added)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeEvents.java Fri Aug 21 10:03:11 2015
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.ofbiz.common.qrcode;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Locale;
+import java.util.Map;
+import java.lang.Integer;
+
+import javax.imageio.ImageIO;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.ofbiz.base.util.UtilHttp;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.entity.GenericValue;
+import org.ofbiz.service.GenericServiceException;
+import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.service.ServiceUtil;
+
+/**
+ * Events for QRCode.
+ */
+public class QRCodeEvents {
+
+    public static final String module = QRCodeEvents.class.getName();
+    
+    /** Streams QR Code to the output. */
+    public static String serveQRCodeImage(HttpServletRequest request, HttpServletResponse response) {
+        HttpSession session = ((HttpServletRequest) request).getSession();
+        LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
+        Map<String, Object> parameters = UtilHttp.getParameterMap(request);
+        String message = (String) parameters.get("message");
+        GenericValue userLogin = (GenericValue) request.getAttribute("userLogin");
+        if (userLogin == null) userLogin = (GenericValue) session.getAttribute("userLogin");
+        if (userLogin == null) userLogin = (GenericValue) session.getAttribute("autoUserLogin");
+        Locale locale = UtilHttp.getLocale(request);
+        
+        if (UtilValidate.isEmpty(message)) {
+            message = "Error get message parameter.";
+        }
+        String format = (String) parameters.get("format");
+        if (UtilValidate.isEmpty(format)) {
+            format = "jpg";
+        }
+        String mimeType = "image/" + format;
+        String width = (String) parameters.get("width");
+        String height = (String) parameters.get("height");
+        String encoding = (String) parameters.get("encoding");
+        Boolean verifyOutput = Boolean.valueOf((String) parameters.get("verifyOutput"));
+        String logoImageMaxWidth = (String) parameters.get("logoImageMaxWidth");
+        String logoImageMaxHeight = (String) parameters.get("logoImageMaxHeight");
+
+        try {
+            if (mimeType != null) {
+                response.setContentType(mimeType);
+            }
+            OutputStream os = response.getOutputStream();
+            Map<String, Object> context = UtilMisc.<String, Object>toMap("message", message, "format", format, "userLogin", userLogin, "locale", locale);
+            if (UtilValidate.isNotEmpty(width)) {
+            	try {
+                    context.put("width", Integer.parseInt(width));
+            	} catch (NumberFormatException e) {
+            		// do nothing
+            	}
+                if (UtilValidate.isEmpty(height)) {
+                	try {
+                        context.put("height", Integer.parseInt(width));
+                	} catch (NumberFormatException e) {
+                		// do nothing
+                	}
+                }
+            }
+            if (UtilValidate.isNotEmpty(height)) {
+            	try {
+                    context.put("height", Integer.parseInt(height));
+            	} catch (NumberFormatException e) {
+            		// do nothing
+            	}
+                if (UtilValidate.isEmpty(width)) {
+                	try {
+                        context.put("width", Integer.parseInt(height));
+                	} catch (NumberFormatException e) {
+                		// do nothing
+                	}
+                }
+            }
+            if (UtilValidate.isNotEmpty(encoding)) {
+                context.put("encoding", encoding);
+            }
+            if (UtilValidate.isNotEmpty(verifyOutput) && verifyOutput.booleanValue()) {
+            	context.put("verifyOutput", verifyOutput);
+            }
+            if (UtilValidate.isNotEmpty(logoImageMaxWidth)) {
+            	try {
+                    context.put("logoImageMaxWidth", Integer.parseInt(logoImageMaxWidth));
+            	} catch (NumberFormatException e) {
+            		// do nothing
+            	}
+            }
+            if (UtilValidate.isNotEmpty(logoImageMaxHeight)) {
+            	try {
+                    context.put("logoImageMaxHeight", Integer.parseInt(logoImageMaxHeight));
+            	} catch (NumberFormatException e) {
+            		// do nothing
+            	}
+            }
+            Map<String, Object> results = dispatcher.runSync("generateQRCodeImage", context);
+            if (!ServiceUtil.isError(results)) {
+                BufferedImage bufferedImage = (BufferedImage) results.get("bufferedImage");
+                if (!ImageIO.write(bufferedImage, format, os)) {
+                    String errMsg = UtilProperties.getMessage("QRCodeUiLabels", "ErrorWriteFormatToFile", new Object[] { format }, locale);
+                    request.setAttribute("_ERROR_MESSAGE_", errMsg);
+                    return "error";
+                }
+                os.flush();
+            } else {
+                String errMsg = ServiceUtil.getErrorMessage(results);
+                request.setAttribute("_ERROR_MESSAGE_", errMsg);
+                return "error";
+            }
+        } catch (IOException e) {
+            String errMsg = UtilProperties.getMessage("QRCodeUiLabels", "ErrorGenerateQRCode", new Object[] { e.getMessage() }, locale);
+            request.setAttribute("_ERROR_MESSAGE_", errMsg);
+            return "error";
+        } catch (GenericServiceException e) {
+            String errMsg = UtilProperties.getMessage("QRCodeUiLabels", "ErrorGenerateQRCode", new Object[] { e.getMessage() }, locale);
+            request.setAttribute("_ERROR_MESSAGE_", errMsg);
+            return "error";
+        }
+        return "success";
+    }
+}

Propchange: ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeEvents.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeEvents.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeEvents.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeServices.java?rev=1696921&view=auto
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeServices.java (added)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeServices.java Fri Aug 21 10:03:11 2015
@@ -0,0 +1,289 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.ofbiz.common.qrcode;
+
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+import java.awt.image.AffineTransformOp;
+import java.awt.image.BufferedImage;
+import java.util.Arrays;
+import java.util.EnumMap;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.io.IOException;
+import java.lang.Integer;
+
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.FileUtil;
+import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.common.image.ImageTransform;
+import org.ofbiz.service.DispatchContext;
+import org.ofbiz.service.ServiceUtil;
+
+import com.google.zxing.BarcodeFormat;
+import com.google.zxing.ChecksumException;
+import com.google.zxing.DecodeHintType;
+import com.google.zxing.EncodeHintType;
+import com.google.zxing.FormatException;
+import com.google.zxing.MultiFormatWriter;
+import com.google.zxing.NotFoundException;
+import com.google.zxing.WriterException;
+import com.google.zxing.common.BitMatrix;
+import com.google.zxing.common.DecoderResult;
+import com.google.zxing.common.DetectorResult;
+import com.google.zxing.qrcode.decoder.Decoder;
+import com.google.zxing.qrcode.detector.Detector;
+
+import freemarker.template.utility.StringUtil;
+
+/**
+ * Services for QRCode.
+ */
+public class QRCodeServices {
+
+    public static final String module = QRCodeServices.class.getName();
+
+    public static final String QRCODE_DEFAULT_WIDTH = UtilProperties.getPropertyValue("qrcode.properties", "qrcode.default.width", "200");
+
+    public static final String QRCODE_DEFAULT_HEIGHT = UtilProperties.getPropertyValue("qrcode.properties", "qrcode.default.height", "200");
+
+    public static final String QRCODE_DEFAULT_FORMAT = UtilProperties.getPropertyValue("qrcode.properties", "qrcode.default.format", "jpg");
+
+    public static final String QRCODE_FORMAT_SUPPORTED = UtilProperties.getPropertyValue("qrcode.properties", "qrcode.format.supported", "jpg|png|bmp");
+    
+    public static final String QRCODE_DEFAULT_LOGOIMAGE = UtilProperties.getPropertyValue("qrcode.properties", "qrcode.default.logoimage");
+    
+    public static BufferedImage defaultLogoImage;
+    
+    public static final String[] FORMAT_NAMES = StringUtil.split(QRCODE_FORMAT_SUPPORTED, '|');
+    
+    public static final List<String> FORMATS_SUPPORTED = Arrays.asList(FORMAT_NAMES);
+
+    public static final int MIN_SIZE = 20;
+
+    public static final int MAX_SIZE = 500;
+
+    private static final int BLACK = 0xFF000000;
+
+    private static final int WHITE = 0xFFFFFFFF;
+    
+    static {
+        if (UtilValidate.isNotEmpty(QRCODE_DEFAULT_LOGOIMAGE)) {
+            try {
+                Map<String, Object> logoImageResult = ImageTransform.getBufferedImage(FileUtil.getFile(QRCODE_DEFAULT_LOGOIMAGE).getAbsolutePath(), Locale.getDefault());
+                defaultLogoImage = (BufferedImage) logoImageResult.get("bufferedImage");
+                if (UtilValidate.isEmpty(defaultLogoImage)) {
+                	Debug.logError("Your logo image file(" + QRCODE_DEFAULT_LOGOIMAGE + ") cannot be read by javax.imageio.ImageIO. Please use png, jpeg formats instead of ico and etc.", module);
+                }
+            } catch (IllegalArgumentException e) {
+                defaultLogoImage = null;
+            } catch (IOException e) {
+                defaultLogoImage = null;
+            }
+        }
+    }
+
+    /** Streams QR Code to the result. */
+    public static Map<String, Object> generateQRCodeImage(DispatchContext ctx,Map<String, Object> context) {
+        Locale locale = (Locale) context.get("locale");
+        String message = (String) context.get("message");
+        Integer width = (Integer) context.get("width");
+        Integer height = (Integer) context.get("height");
+        String format = (String) context.get("format");
+        String encoding = (String) context.get("encoding");
+        Boolean verifyOutput = (Boolean) context.get("verifyOutput");
+        String logoImage = (String) context.get("logoImage");
+        Integer logoImageMaxWidth = (Integer) context.get("logoImageMaxWidth");
+        Integer logoImageMaxHeight = (Integer) context.get("logoImageMaxHeight");
+
+        if (UtilValidate.isEmpty(message)) {
+            return ServiceUtil.returnError(UtilProperties.getMessage("QRCodeUiLabels", "ParameterCannotEmpty", new Object[] { "message" }, locale));
+        }
+        if (width == null) {
+            width = Integer.parseInt(QRCODE_DEFAULT_WIDTH);
+        }
+        if (width.intValue() < MIN_SIZE || width.intValue() > MAX_SIZE) {
+            return ServiceUtil.returnError(UtilProperties.getMessage("QRCodeUiLabels", "SizeOutOfBorderError", new Object[] {"width", String.valueOf(width), String.valueOf(MIN_SIZE), String.valueOf(MAX_SIZE)}, locale));
+        }
+        if (height == null) {
+            height = Integer.parseInt(QRCODE_DEFAULT_HEIGHT);
+        }
+        if (height.intValue() < MIN_SIZE || height.intValue() > MAX_SIZE) {
+            return ServiceUtil.returnError(UtilProperties.getMessage("QRCodeUiLabels", "SizeOutOfBorderError", 
+                    new Object[] { "height", String.valueOf(height), String.valueOf(MIN_SIZE), String.valueOf(MAX_SIZE) }, locale));
+        }
+        if (UtilValidate.isEmpty(format)) {
+            format = QRCODE_DEFAULT_FORMAT;
+        }
+        if (!FORMATS_SUPPORTED.contains(format)) {
+            return ServiceUtil.returnError(UtilProperties.getMessage("QRCodeUiLabels", "ErrorFormatNotSupported", new Object[] { format }, locale));
+        }
+        Map<EncodeHintType, Object> encodeHints = null;
+        if (UtilValidate.isNotEmpty(encoding)) {
+            encodeHints = new EnumMap<>(EncodeHintType.class);
+            encodeHints.put(EncodeHintType.CHARACTER_SET, encoding);
+        }
+
+        try {
+            BitMatrix bitMatrix = new MultiFormatWriter().encode(message, BarcodeFormat.QR_CODE, width, height, encodeHints);
+            BufferedImage bufferedImage = toBufferedImage(bitMatrix, format);
+            BufferedImage logoBufferedImage = null;
+            if (UtilValidate.isNotEmpty(logoImage)) {
+                Map<String, Object> logoImageResult;
+                try {
+                    logoImageResult = ImageTransform.getBufferedImage(FileUtil.getFile(logoImage).getAbsolutePath(), locale);
+                    logoBufferedImage = (BufferedImage) logoImageResult.get("bufferedImage");
+                } catch (IllegalArgumentException e) {
+                    // do nothing
+                } catch (IOException e) {
+                    // do nothing
+                }
+            }
+            if (UtilValidate.isEmpty(logoBufferedImage)) {
+                logoBufferedImage = defaultLogoImage;
+            }
+            
+            BufferedImage newBufferedImage = null;
+            if (UtilValidate.isNotEmpty(logoBufferedImage)) {
+                if (UtilValidate.isNotEmpty(logoImageMaxWidth) && UtilValidate.isNotEmpty(logoImageMaxHeight) && (logoBufferedImage.getWidth() > logoImageMaxWidth.intValue() || logoBufferedImage.getHeight() > logoImageMaxHeight.intValue())) {
+                	Map<String, String> typeMap = new HashMap<String, String>();
+                	typeMap.put("width", logoImageMaxWidth.toString());
+                	typeMap.put("height", logoImageMaxHeight.toString());
+                	Map<String, Map<String, String>> dimensionMap = new HashMap<String, Map<String, String>>();
+                	dimensionMap.put("QRCode", typeMap);
+                    Map<String, Object> logoImageResult = ImageTransform.scaleImage(logoBufferedImage, (double) logoBufferedImage.getWidth(), (double) logoBufferedImage.getHeight(), dimensionMap, "QRCode", locale);
+                    logoBufferedImage = (BufferedImage) logoImageResult.get("bufferedImage");
+                }
+                BitMatrix newBitMatrix = bitMatrix.clone();
+                newBufferedImage = toBufferedImage(newBitMatrix, format);
+                Graphics2D graphics = newBufferedImage.createGraphics();
+                graphics.drawImage(logoBufferedImage, new AffineTransformOp(AffineTransform.getTranslateInstance(1, 1), null), (newBufferedImage.getWidth() - logoBufferedImage.getWidth())/2, (newBufferedImage.getHeight() - logoBufferedImage.getHeight())/2);
+                graphics.dispose();
+            }
+            
+            if (UtilValidate.isNotEmpty(verifyOutput) && verifyOutput.booleanValue()) {
+                // Debug.logInfo("Original Message:[" + message + "]", module);
+                Decoder decoder = new Decoder();
+                Map<DecodeHintType, Object> decodeHints = new EnumMap<>(DecodeHintType.class);
+                decodeHints.put(DecodeHintType.TRY_HARDER, Boolean.TRUE);
+                if (UtilValidate.isNotEmpty(encoding)) {
+                    decodeHints.put(DecodeHintType.CHARACTER_SET, encoding);
+                }
+                DetectorResult detectorResult = null;
+                if (UtilValidate.isNotEmpty(newBufferedImage)) {
+                	BitMatrix newBitMatrix = createMatrixFromImage(newBufferedImage);
+                    DecoderResult result = null;
+                    try {
+                        detectorResult = new Detector(newBitMatrix).detect(decodeHints);
+                		result = decoder.decode(detectorResult.getBits(), decodeHints);
+                    } catch (ChecksumException e) {
+                        // do nothing
+                    } catch (FormatException e) {
+                        // do nothing
+                    } catch (NotFoundException e) {
+                        // do nothing
+                    }
+                    // Debug.logInfo("Text in QR Code with logo:[" + result.getText() + "]", module);
+                    if (UtilValidate.isNotEmpty(result) && !result.getText().equals(message)) {
+                        detectorResult = new Detector(bitMatrix).detect(decodeHints);
+                        result = decoder.decode(detectorResult.getBits(), decodeHints);
+                        // Debug.logInfo("Text in QR Code without logo:[" + result.getText() + "]", module);
+                        if (!result.getText().equals(message)) {
+                            return ServiceUtil.returnError(UtilProperties.getMessage("QRCodeUiLabels", "GeneratedTextNotMatchOriginal", new Object[]{result.getText(), message}, locale));
+                        }
+                    } else {
+                        bufferedImage = newBufferedImage;
+                    }
+                } else {
+                    detectorResult = new Detector(bitMatrix).detect(decodeHints);
+                    DecoderResult result = decoder.decode(detectorResult.getBits(), decodeHints);
+                    // Debug.logInfo("Text in QR Code:[" + result.getText() + "]", module);
+                    if (!result.getText().equals(message)) {
+                        return ServiceUtil.returnError(UtilProperties.getMessage("QRCodeUiLabels", "GeneratedTextNotMatchOriginal", new Object[]{result.getText(), message}, locale));
+                    }
+                }
+            } else if (UtilValidate.isNotEmpty(newBufferedImage)) {
+                bufferedImage = newBufferedImage;
+            }
+
+            Map<String, Object> result = ServiceUtil.returnSuccess();
+            result.put("bufferedImage", bufferedImage);
+            return result;
+        } catch (WriterException e) {
+            return ServiceUtil.returnError(UtilProperties.getMessage("QRCodeUiLabels", "ErrorGenerateQRCode", new Object[] { e.toString() }, locale));
+        } catch (ChecksumException e) {
+            return ServiceUtil.returnError(UtilProperties.getMessage("QRCodeUiLabels", "ErrorVerifyQRCode", new Object[] { e.toString() }, locale));
+        } catch (FormatException e) {
+            return ServiceUtil.returnError(UtilProperties.getMessage("QRCodeUiLabels", "ErrorVerifyQRCode", new Object[] { e.toString() }, locale));
+        } catch (NotFoundException e) {
+            return ServiceUtil.returnError(UtilProperties.getMessage("QRCodeUiLabels", "ErrorVerifyQRCode", new Object[] { e.toString() }, locale));
+        }
+    }
+
+    /**
+     * Renders a {@link BitMatrix} as an image, where "false" bits are rendered
+     * as white, and "true" bits are rendered as black.
+     * 
+     * This is to replace MatrixToImageWriter.toBufferedImage(bitMatrix) if you
+     * find the output image is not right, you can change BufferedImage image =
+     * new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); to
+     * BufferedImage image = new BufferedImage(width, height,
+     * BufferedImage.TYPE_INT_RGB); or others to make it work correctly.
+     */
+    private static BufferedImage toBufferedImage(BitMatrix matrix, String format) {
+        int width = matrix.getWidth();
+        int height = matrix.getHeight();
+        BufferedImage image = null;
+        String osName = System.getProperty("os.name").toLowerCase();
+        image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
+        if (osName.startsWith("mac os") && format.equals("png")) {
+            image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
+        }
+        for (int x = 0; x < width; x++) {
+            for (int y = 0; y < height; y++) {
+                image.setRGB(x, y, matrix.get(x, y) ? BLACK : WHITE);
+            }
+        }
+        return image;
+    }
+
+    private static BitMatrix createMatrixFromImage(BufferedImage image) {
+        int width = image.getWidth();
+        int height = image.getHeight();
+        int[] pixels = new int[width * height];
+        image.getRGB(0, 0, width, height, pixels, 0, width);
+
+        BitMatrix matrix = new BitMatrix(width, height);
+        for (int y = 0; y < height; y++) {
+            for (int x = 0; x < width; x++) {
+                int pixel = pixels[y * width + x];
+                int luminance = (306 * ((pixel >> 16) & 0xFF) +
+                    601 * ((pixel >> 8) & 0xFF) +
+                    117 * (pixel & 0xFF)) >> 10;
+                if (luminance <= 0x7F) {
+                    matrix.set(x, y);
+                }
+            }
+        }
+        return matrix;
+    }
+}

Propchange: ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeServices.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeServices.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/framework/common/src/org/ofbiz/common/qrcode/QRCodeServices.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml?rev=1696921&r1=1696920&r2=1696921&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml (original)
+++ ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml Fri Aug 21 10:03:11 2015
@@ -255,6 +255,13 @@ under the License.
         <response name="error" type="request" value="json"/>
     </request-map>
     
+    <request-map uri="qrcode">
+        <security auth="true" https="false" />
+        <event type="java" path="org.ofbiz.common.qrcode.QRCodeEvents" invoke="serveQRCodeImage"/>
+        <response name="success" type="none" />
+        <response name="error" type="none" />
+    </request-map>
+
     <!--========================== AJAX events =====================-->
 
     <!-- View Mappings -->

Added: ofbiz/trunk/framework/images/webapp/images/icons/famfamfam/ofbiz_barcode.png
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/icons/famfamfam/ofbiz_barcode.png?rev=1696921&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/images/webapp/images/icons/famfamfam/ofbiz_barcode.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: ofbiz/trunk/framework/images/webapp/images/ofbiz.png
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/ofbiz.png?rev=1696921&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/images/webapp/images/ofbiz.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Modified: ofbiz/trunk/specialpurpose/example/config/ExampleUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/example/config/ExampleUiLabels.xml?rev=1696921&r1=1696920&r2=1696921&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/example/config/ExampleUiLabels.xml (original)
+++ ofbiz/trunk/specialpurpose/example/config/ExampleUiLabels.xml Fri Aug 21 10:03:11 2015
@@ -1112,6 +1112,20 @@
         <value xml:lang="en">PDF With Password</value>
         <value xml:lang="zh">有密码的PDF</value>
     </property>
+    <property key="ExamplePdfBarcode">
+        <value xml:lang="de">Barcode</value>
+        <value xml:lang="en">Barcode</value>
+        <value xml:lang="es">Código de barra</value>
+        <value xml:lang="fr">Code barre</value>
+        <value xml:lang="it">Codice a barre</value>
+        <value xml:lang="ja">バーコード</value>
+        <value xml:lang="ro">Cod bara</value>
+        <value xml:lang="ru">Баркод</value>
+        <value xml:lang="th">บาร์โคด</value>
+        <value xml:lang="vi">Mã vạch (Barcode)</value>
+        <value xml:lang="zh">条形码</value>
+        <value xml:lang="zh-TW">條形碼</value>
+    </property>
     <property key="PageTitleSetExamplePdfPassword">
         <value xml:lang="en">Set PDF Protected By Password</value>
         <value xml:lang="zh">设置有密码保护的PDF</value>

Modified: ofbiz/trunk/specialpurpose/example/webapp/example/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/example/webapp/example/WEB-INF/controller.xml?rev=1696921&r1=1696920&r2=1696921&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/example/webapp/example/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/example/webapp/example/WEB-INF/controller.xml Fri Aug 21 10:03:11 2015
@@ -231,6 +231,12 @@ under the License.
         <response name="success" type="view" value="ExampleReportPdfOptions"/>
     </request-map>
     
+    <!-- Barcode/QRCode example requests -->
+    <request-map uri="ExampleReportPdfBarcode">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="ExampleReportPdfBarcode"/>
+    </request-map>
+    
     <!-- end of request mappings -->
 
     <!-- View Mappings -->
@@ -243,6 +249,7 @@ under the License.
     <view-map name="EditExampleFeatureAppls" type="screen" page="component://example/widget/example/ExampleScreens.xml#EditExampleFeatureAppls"/>
     <view-map name="ExampleReportHtml" type="screen" page="component://example/widget/example/ExampleScreens.xml#ExampleReport"/>
     <view-map name="ExampleReportPdf" type="screenfop" page="component://example/widget/example/ExampleScreens.xml#ExampleReport" content-type="application/pdf" encoding="none"/>
+    <view-map name="ExampleReportPdfBarcode" type="screenfop" page="component://example/widget/example/ExampleScreens.xml#ExampleReportPdfBarcode" content-type="application/pdf" encoding="none"/>
 
     <view-map name="FindExampleFeature" type="screen" page="component://example/widget/example/ExampleFeatureScreens.xml#FindExampleFeature"/>
     <view-map name="EditExampleFeature" type="screen" page="component://example/widget/example/ExampleFeatureScreens.xml#EditExampleFeature"/>

Added: ofbiz/trunk/specialpurpose/example/webapp/example/reports/BarCode.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/example/webapp/example/reports/BarCode.fo.ftl?rev=1696921&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/example/webapp/example/reports/BarCode.fo.ftl (added)
+++ ofbiz/trunk/specialpurpose/example/webapp/example/reports/BarCode.fo.ftl Fri Aug 21 10:03:11 2015
@@ -0,0 +1,63 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#escape x as x?xml>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+    <fo:layout-master-set>
+        <fo:simple-page-master master-name="main" page-height="4in" page-width="8in"
+                               margin-top="0.5in" margin-bottom="0.25in" margin-left="0.25in" margin-right="0.25in">
+            <fo:region-body margin-top="0in"/>
+            <fo:region-before extent="0in"/>
+            <fo:region-after extent="0in"/>
+        </fo:simple-page-master>
+    </fo:layout-master-set>
+
+    <fo:page-sequence master-reference="main">
+        <fo:flow flow-name="xsl-region-body" font-family="Helvetica">
+            <fo:block text-align="center">
+                 ${example.exampleName!}
+            </fo:block>
+            <fo:block text-align="center">
+                <fo:instream-foreign-object>
+                    <barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns"
+                                     message="${exampleId}">
+                        <barcode:code39>
+                            <barcode:height>0.75in</barcode:height>
+                            <barcode:module-width>.375mm</barcode:module-width>
+                        </barcode:code39>
+                        <barcode:human-readable>
+                            <barcode:placement>bottom</barcode:placement>
+                            <barcode:font-name>Helvetica</barcode:font-name>
+                            <barcode:font-size>18pt</barcode:font-size>
+                            <barcode:display-start-stop>false</barcode:display-start-stop>
+                            <barcode:display-checksum>false</barcode:display-checksum>
+                        </barcode:human-readable>
+                    </barcode:barcode>
+                </fo:instream-foreign-object>
+            </fo:block>
+            <fo:block><fo:leader/></fo:block>
+            <fo:block text-align="center">
+                <#setting url_escaping_charset='UTF-8'>
+                <fo:external-graphic src="/example/control/qrcode;jsessionid=${session.id}?message=${example.exampleName?url}&amp;format=bmp&amp;encoding=UTF-8&amp;verifyOutput=true&amp;logoImageMaxWidth=20&amp;logoImageMaxHeight=20" overflow="hidden" height="1.5in" content-height="scale-to-fit"/>
+            </fo:block>
+        </fo:flow>
+    </fo:page-sequence>
+</fo:root>
+</#escape>

Propchange: ofbiz/trunk/specialpurpose/example/webapp/example/reports/BarCode.fo.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/example/webapp/example/reports/BarCode.fo.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/specialpurpose/example/webapp/example/reports/BarCode.fo.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/specialpurpose/example/widget/example/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/example/widget/example/CommonScreens.xml?rev=1696921&r1=1696920&r2=1696921&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/example/widget/example/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/example/widget/example/CommonScreens.xml Fri Aug 21 10:03:11 2015
@@ -107,6 +107,10 @@ under the License.
                                                 <parameter param-name="exampleId"/>
                                                 <image url-mode="raw" src="${iconsLocation}/page_white_acrobat.png"/>
                                             </link>
+                                            <link target="ExampleReportPdfBarcode" text="${uiLabelMap.ExamplePdfBarcode}" style="buttontext">
+                                                <parameter param-name="exampleId"/>
+                                                <image url-mode="raw" src="${iconsLocation}/ofbiz_barcode.png"/>
+                                            </link>
                                             <link target="help" text="${uiLabelMap.CommonHelp}" style="buttontext" target-window="_blank">
                                                 <parameter param-name="topic" value="ExampleEditHelp"/>
                                                 <image url-mode="raw" src="${iconsLocation}/help.png"/>

Modified: ofbiz/trunk/specialpurpose/example/widget/example/ExampleScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/example/widget/example/ExampleScreens.xml?rev=1696921&r1=1696920&r2=1696921&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/example/widget/example/ExampleScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/example/widget/example/ExampleScreens.xml Fri Aug 21 10:03:11 2015
@@ -511,4 +511,22 @@ under the License.
             </widgets>
         </section>
     </screen>
+
+    <screen name="ExampleReportPdfBarcode">
+        <section>
+            <actions>
+                <!-- base/top/specific map first, then more common map added for shared labels -->
+                <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+
+                <set field="exampleId" from-field="parameters.exampleId"/>
+                <entity-one entity-name="Example" value-field="example"/>
+            </actions>
+            <widgets>
+                <platform-specific>
+                    <xsl-fo><html-template location="component://example/webapp/example/reports/BarCode.fo.ftl"/></xsl-fo>
+                </platform-specific>
+            </widgets>
+        </section>
+    </screen>
 </screens>