Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 19EB510E37 for ; Wed, 28 May 2014 19:18:22 +0000 (UTC) Received: (qmail 2413 invoked by uid 500); 28 May 2014 19:18:22 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 2363 invoked by uid 500); 28 May 2014 19:18:22 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 2356 invoked by uid 99); 28 May 2014 19:18:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2014 19:18:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2014 19:18:20 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CE1172388868 for ; Wed, 28 May 2014 19:17:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r910305 - in /websites/production/camel/content: barcode-data-format.data/ barcode-data-format.data/qr-code.png barcode-data-format.html cache/main.pageCache Date: Wed, 28 May 2014 19:17:59 -0000 To: commits@camel.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140528191759.CE1172388868@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: buildbot Date: Wed May 28 19:17:59 2014 New Revision: 910305 Log: Production update by buildbot for camel Added: websites/production/camel/content/barcode-data-format.data/ websites/production/camel/content/barcode-data-format.data/qr-code.png (with props) websites/production/camel/content/barcode-data-format.html Modified: websites/production/camel/content/cache/main.pageCache Added: websites/production/camel/content/barcode-data-format.data/qr-code.png ============================================================================== Binary file - no diff available. Propchange: websites/production/camel/content/barcode-data-format.data/qr-code.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: websites/production/camel/content/barcode-data-format.html ============================================================================== --- websites/production/camel/content/barcode-data-format.html (added) +++ websites/production/camel/content/barcode-data-format.html Wed May 28 19:17:59 2014 @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + Apache Camel: Barcode Data Format + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + +
+

As of Camel 2.14

The barcode data format is based on the zxing library. The goal of this component is to create a barcode image from a String (marshal) and a String from a barcode image (unmarshal). You're free to use all features that zxing offers.

Dependencies

To use Bindy in your camel routes you need to add the a dependency on camel-barcode which implements this data format.

If you use maven you could just add the following to your pom.xml, substituting the version number for the latest & greatest release (see the download page for the latest versions).

+ +

 

Using the Java DSL

First you have to initialize the barcode data fomat class. You can use the default constructor, or one of parameterized. The default values are:

ParameterDefault Value
image type (BarcodeImageType)PNG
width100 px
height100 px
encodingUTF-8
barcode format (BarcodeFormat)QR-Code
+ +

Marshalling

+ +

You can call the route from a test class with:

+ +

You should find inside the 'barcode_out' folder this image:

Unmarshalling

The unmarshaller is generic. For unmarshalling you can use any BarcodeDataFormat instance. If you've two instances, one for (generating) QR-Code and one for PDF417, it doesn't matter which one will be used.

+ +

If you'll paste the QR-Code image above into the 'barcode_in' folder, you should find 'This is a testmessage!' inside the mock. You can find the barcode data format as header variable:

NameTypeDescription
BarcodeFormat
StringValue of com.google.zxing.BarcodeFormat.

 

 

+
+ +
+ + +
+
+
+
+
+
+ +
+
+
+© 2004-2014 The Apache Software Foundation. +
+Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners. +
+Graphic Design By Hiram +
+ + + + + + + + Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available.