This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch df2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 1a644f5666a21c4f40ceeb6ab5e52dfffafdd2c3
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Aug 18 13:31:42 2025 +0200

    CAMEL-22354: dataformats - Align all data formats getter setters to model
---
 .../barcode/BarcodeDataFormatConfigurer.java       | 36 +++++++++-
 .../apache/camel/dataformat/barcode/barcode.json   |  8 +--
 .../dataformat/barcode/BarcodeDataFormat.java      | 84 +++++++++++++---------
 .../barcode/BarcodeDataFormatCamelTest.java        | 16 +----
 .../dataformat/barcode/BarcodeDataFormatTest.java  | 17 +++++
 .../dataformat/barcode/barcodeDataformatSpring.xml |  3 +-
 .../org/apache/camel/model/dataformat/barcode.json |  8 +--
 .../camel/model/dataformat/BarcodeDataFormat.java  |  6 +-
 .../dataformat/BarcodeDataFormatReifier.java       |  2 +-
 .../java/org/apache/camel/xml/out/ModelWriter.java |  8 +--
 .../org/apache/camel/yaml/out/ModelWriter.java     |  8 +--
 .../ROOT/pages/camel-4x-upgrade-guide-4_15.adoc    |  7 ++
 .../modules/ROOT/pages/camel-4x-upgrade-guide.adoc |  1 +
 13 files changed, 130 insertions(+), 74 deletions(-)

diff --git 
a/components/camel-barcode/src/generated/java/org/apache/camel/dataformat/barcode/BarcodeDataFormatConfigurer.java
 
b/components/camel-barcode/src/generated/java/org/apache/camel/dataformat/barcode/BarcodeDataFormatConfigurer.java
index 0584e37628b..d4bf7e93878 100644
--- 
a/components/camel-barcode/src/generated/java/org/apache/camel/dataformat/barcode/BarcodeDataFormatConfigurer.java
+++ 
b/components/camel-barcode/src/generated/java/org/apache/camel/dataformat/barcode/BarcodeDataFormatConfigurer.java
@@ -22,12 +22,25 @@ public class BarcodeDataFormatConfigurer extends 
org.apache.camel.support.compon
     private static final Map<String, Object> ALL_OPTIONS;
     static {
         Map<String, Object> map = new CaseInsensitiveMap();
+        map.put("BarcodeFormat", com.google.zxing.BarcodeFormat.class);
+        map.put("Height", java.lang.Integer.class);
+        map.put("ImageType", 
org.apache.camel.dataformat.barcode.BarcodeImageType.class);
+        map.put("Width", java.lang.Integer.class);
         ALL_OPTIONS = map;
     }
 
     @Override
     public boolean configure(CamelContext camelContext, Object obj, String 
name, Object value, boolean ignoreCase) {
-        return false;
+        BarcodeDataFormat target = (BarcodeDataFormat) obj;
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "barcodeformat":
+        case "barcodeFormat": target.setBarcodeFormat(property(camelContext, 
com.google.zxing.BarcodeFormat.class, value)); return true;
+        case "height": target.setHeight(property(camelContext, 
java.lang.Integer.class, value)); return true;
+        case "imagetype":
+        case "imageType": target.setImageType(property(camelContext, 
org.apache.camel.dataformat.barcode.BarcodeImageType.class, value)); return 
true;
+        case "width": target.setWidth(property(camelContext, 
java.lang.Integer.class, value)); return true;
+        default: return false;
+        }
     }
 
     @Override
@@ -37,12 +50,29 @@ public class BarcodeDataFormatConfigurer extends 
org.apache.camel.support.compon
 
     @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
-        return null;
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "barcodeformat":
+        case "barcodeFormat": return com.google.zxing.BarcodeFormat.class;
+        case "height": return java.lang.Integer.class;
+        case "imagetype":
+        case "imageType": return 
org.apache.camel.dataformat.barcode.BarcodeImageType.class;
+        case "width": return java.lang.Integer.class;
+        default: return null;
+        }
     }
 
     @Override
     public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
-        return null;
+        BarcodeDataFormat target = (BarcodeDataFormat) obj;
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "barcodeformat":
+        case "barcodeFormat": return target.getBarcodeFormat();
+        case "height": return target.getHeight();
+        case "imagetype":
+        case "imageType": return target.getImageType();
+        case "width": return target.getWidth();
+        default: return null;
+        }
     }
 }
 
diff --git 
a/components/camel-barcode/src/generated/resources/META-INF/org/apache/camel/dataformat/barcode/barcode.json
 
b/components/camel-barcode/src/generated/resources/META-INF/org/apache/camel/dataformat/barcode/barcode.json
index cd912372eaa..9466fcd737a 100644
--- 
a/components/camel-barcode/src/generated/resources/META-INF/org/apache/camel/dataformat/barcode/barcode.json
+++ 
b/components/camel-barcode/src/generated/resources/META-INF/org/apache/camel/dataformat/barcode/barcode.json
@@ -17,9 +17,9 @@
   },
   "properties": {
     "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": 
"common", "required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
id of this node" },
-    "barcodeFormat": { "index": 1, "kind": "attribute", "displayName": 
"Barcode Format", "group": "common", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Barcode format such as QR-Code" },
-    "imageType": { "index": 2, "kind": "attribute", "displayName": "Image 
Type", "group": "common", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "Image type of the barcode such as png" },
-    "width": { "index": 3, "kind": "attribute", "displayName": "Width", 
"group": "common", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"description": "Width of the barcode" },
-    "height": { "index": 4, "kind": "attribute", "displayName": "Height", 
"group": "common", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"description": "Height of the barcode" }
+    "barcodeFormat": { "index": 1, "kind": "attribute", "displayName": 
"Barcode Format", "group": "common", "required": false, "type": "enum", 
"javaType": "java.lang.String", "enum": [ "AZTEC", "CODABAR", "CODE_39", 
"CODE_93", "CODE_128", "DATA_MATRIX", "EAN_8", "EAN_13", "ITF", "MAXICODE", 
"PDF_417", "QR_CODE", "RSS_14", "RSS_EXPANDED", "UPC_A", "UPC_E", 
"UPC_EAN_EXTENSION" ], "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": "QR_CODE", "description": "Barcode fo [...]
+    "imageType": { "index": 2, "kind": "attribute", "displayName": "Image 
Type", "group": "common", "required": false, "type": "enum", "javaType": 
"java.lang.String", "enum": [ "JPG", "GIF", "PNG" ], "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "PNG", "description": 
"Image type of the barcode such as png" },
+    "width": { "index": 3, "kind": "attribute", "displayName": "Width", 
"group": "common", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "100", "description": "Width of the barcode" },
+    "height": { "index": 4, "kind": "attribute", "displayName": "Height", 
"group": "common", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "100", "description": "Height of the barcode" }
   }
 }
diff --git 
a/components/camel-barcode/src/main/java/org/apache/camel/dataformat/barcode/BarcodeDataFormat.java
 
b/components/camel-barcode/src/main/java/org/apache/camel/dataformat/barcode/BarcodeDataFormat.java
index ecf31a7ba59..6ea130c112b 100644
--- 
a/components/camel-barcode/src/main/java/org/apache/camel/dataformat/barcode/BarcodeDataFormat.java
+++ 
b/components/camel-barcode/src/main/java/org/apache/camel/dataformat/barcode/BarcodeDataFormat.java
@@ -58,6 +58,11 @@ public class BarcodeDataFormat extends ServiceSupport 
implements DataFormat, Dat
 
     private static final Logger LOG = 
LoggerFactory.getLogger(BarcodeDataFormat.class);
 
+    private BarcodeFormat barcodeFormat;
+    private BarcodeImageType imageType;
+    private Integer width;
+    private Integer height;
+
     /**
      * The bean for the default parameters.
      */
@@ -77,8 +82,6 @@ public class BarcodeDataFormat extends ServiceSupport 
implements DataFormat, Dat
      * Create instance with default parameters.
      */
     public BarcodeDataFormat() {
-        this.setDefaultParameters();
-        this.optimizeHints();
     }
 
     /**
@@ -87,9 +90,7 @@ public class BarcodeDataFormat extends ServiceSupport 
implements DataFormat, Dat
      * @param format the barcode format
      */
     public BarcodeDataFormat(final BarcodeFormat format) {
-        this.setDefaultParameters();
-        this.params.setFormat(format);
-        this.optimizeHints();
+        setBarcodeFormat(format);
     }
 
     /**
@@ -99,10 +100,8 @@ public class BarcodeDataFormat extends ServiceSupport 
implements DataFormat, Dat
      * @param width  the image width
      */
     public BarcodeDataFormat(final int width, final int height) {
-        this.setDefaultParameters();
-        this.params.setHeight(height);
-        this.params.setWidth(width);
-        this.optimizeHints();
+        setWidth(width);
+        setHeight(height);
     }
 
     /**
@@ -111,9 +110,7 @@ public class BarcodeDataFormat extends ServiceSupport 
implements DataFormat, Dat
      * @param type the type (format) of the image. e.g. PNG
      */
     public BarcodeDataFormat(final BarcodeImageType type) {
-        this.setDefaultParameters();
-        this.params.setType(type);
-        this.optimizeHints();
+        setImageType(type);
     }
 
     /**
@@ -125,12 +122,10 @@ public class BarcodeDataFormat extends ServiceSupport 
implements DataFormat, Dat
      * @param format the barcode format
      */
     public BarcodeDataFormat(final int width, final int height, final 
BarcodeImageType type, final BarcodeFormat format) {
-        this.setDefaultParameters();
-        this.params.setHeight(height);
-        this.params.setWidth(width);
-        this.params.setType(type);
-        this.params.setFormat(format);
-        this.optimizeHints();
+        setWidth(width);
+        setHeight(height);
+        setImageType(type);
+        setBarcodeFormat(format);
     }
 
     @Override
@@ -154,13 +149,6 @@ public class BarcodeDataFormat extends ServiceSupport 
implements DataFormat, Dat
         return this.readImage(exchange, stream);
     }
 
-    /**
-     * Sets the default parameters.
-     */
-    protected final void setDefaultParameters() {
-        this.params = new BarcodeParameters();
-    }
-
     /**
      * Sets hints optimized for different barcode types.
      */
@@ -295,28 +283,54 @@ public class BarcodeDataFormat extends ServiceSupport 
implements DataFormat, Dat
         return readerHintMap;
     }
 
-    // these set method is used for BarcodeDataFormat XML DSL
-    public void setBarcodeImageType(BarcodeImageType type) {
-        this.params.setType(type);
-        this.optimizeHints();
+    public BarcodeFormat getBarcodeFormat() {
+        return barcodeFormat;
     }
 
-    public void setBarcodeFormat(BarcodeFormat format) {
-        this.params.setFormat(format);
-        this.optimizeHints();
+    public void setBarcodeFormat(BarcodeFormat barcodeFormat) {
+        this.barcodeFormat = barcodeFormat;
+    }
+
+    public BarcodeImageType getImageType() {
+        return imageType;
+    }
+
+    public void setImageType(BarcodeImageType imageType) {
+        this.imageType = imageType;
+    }
+
+    public Integer getWidth() {
+        return width;
     }
 
     public void setWidth(Integer width) {
-        this.params.setWidth(width);
+        this.width = width;
+    }
+
+    public Integer getHeight() {
+        return height;
     }
 
     public void setHeight(Integer height) {
-        this.params.setHeight(height);
+        this.height = height;
     }
 
     @Override
     protected void doStart() throws Exception {
-        // noop
+        this.params = new BarcodeParameters();
+        if (barcodeFormat != null) {
+            this.params.setFormat(barcodeFormat);
+        }
+        if (imageType != null) {
+            this.params.setType(imageType);
+        }
+        if (width != null) {
+            this.params.setWidth(width);
+        }
+        if (height != null) {
+            this.params.setHeight(height);
+        }
+        this.optimizeHints();
     }
 
     @Override
diff --git 
a/components/camel-barcode/src/test/java/org/apache/camel/dataformat/barcode/BarcodeDataFormatCamelTest.java
 
b/components/camel-barcode/src/test/java/org/apache/camel/dataformat/barcode/BarcodeDataFormatCamelTest.java
index e7817e7dc0d..35f31a6be68 100644
--- 
a/components/camel-barcode/src/test/java/org/apache/camel/dataformat/barcode/BarcodeDataFormatCamelTest.java
+++ 
b/components/camel-barcode/src/test/java/org/apache/camel/dataformat/barcode/BarcodeDataFormatCamelTest.java
@@ -27,9 +27,6 @@ import org.apache.camel.test.junit5.TestSupport;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.io.TempDir;
 
-/**
- * This class tests all Camel dependend cases for {@link BarcodeDataFormat}.
- */
 public class BarcodeDataFormatCamelTest extends BarcodeTestBase {
 
     @TempDir
@@ -37,8 +34,6 @@ public class BarcodeDataFormatCamelTest extends 
BarcodeTestBase {
 
     /**
      * tests barcode (QR-Code) generation and reading.
-     *
-     * @throws Exception
      */
     @Test
     void testDefaultQRCode() throws Exception {
@@ -54,8 +49,6 @@ public class BarcodeDataFormatCamelTest extends 
BarcodeTestBase {
 
     /**
      * tests barcode (QR-Code) generation with modified size and reading.
-     *
-     * @throws Exception
      */
     @Test
     void testQRCodeWithModifiedSize() throws Exception {
@@ -71,8 +64,6 @@ public class BarcodeDataFormatCamelTest extends 
BarcodeTestBase {
 
     /**
      * tests barcode (QR-Code) generation with modified image type and reading.
-     *
-     * @throws Exception
      */
     @Test
     void testQRCodeWithJPEGType() throws Exception {
@@ -87,9 +78,7 @@ public class BarcodeDataFormatCamelTest extends 
BarcodeTestBase {
     }
 
     /**
-     * tests barcode (PDF-417) with modiefied size and image taype generation 
and reading.
-     *
-     * @throws Exception
+     * tests barcode (PDF-417) with modified size and image type generation 
and reading.
      */
     @Test
     void testPDF417CodeWidthModifiedSizeAndImageType() throws Exception {
@@ -105,9 +94,6 @@ public class BarcodeDataFormatCamelTest extends 
BarcodeTestBase {
 
     /**
      * tests barcode (AZTEC).
-     *
-     * @throws Exception
-     * @see              CAMEL-7681
      */
     @Test
     void testAZTECWidthModifiedSizeAndImageType() throws Exception {
diff --git 
a/components/camel-barcode/src/test/java/org/apache/camel/dataformat/barcode/BarcodeDataFormatTest.java
 
b/components/camel-barcode/src/test/java/org/apache/camel/dataformat/barcode/BarcodeDataFormatTest.java
index 417a237f6fc..870ac12961b 100644
--- 
a/components/camel-barcode/src/test/java/org/apache/camel/dataformat/barcode/BarcodeDataFormatTest.java
+++ 
b/components/camel-barcode/src/test/java/org/apache/camel/dataformat/barcode/BarcodeDataFormatTest.java
@@ -40,6 +40,7 @@ public class BarcodeDataFormatTest {
     @Test
     final void testDefaultConstructor() throws IOException {
         try (BarcodeDataFormat barcodeDataFormat = new BarcodeDataFormat()) {
+            barcodeDataFormat.start();
             this.checkParams(BarcodeParameters.IMAGE_TYPE, 
BarcodeParameters.WIDTH, BarcodeParameters.HEIGHT,
                     BarcodeParameters.FORMAT, barcodeDataFormat.getParams());
         }
@@ -51,6 +52,7 @@ public class BarcodeDataFormatTest {
     @Test
     final void testConstructorWithBarcodeFormat() throws IOException {
         try (BarcodeDataFormat barcodeDataFormat = new 
BarcodeDataFormat(BarcodeFormat.AZTEC)) {
+            barcodeDataFormat.start();
             this.checkParams(BarcodeParameters.IMAGE_TYPE, 
BarcodeParameters.WIDTH, BarcodeParameters.HEIGHT,
                     BarcodeFormat.AZTEC, barcodeDataFormat.getParams());
         }
@@ -62,6 +64,7 @@ public class BarcodeDataFormatTest {
     @Test
     final void testConstructorWithSize() throws IOException {
         try (BarcodeDataFormat barcodeDataFormat = new BarcodeDataFormat(200, 
250)) {
+            barcodeDataFormat.start();
             this.checkParams(BarcodeParameters.IMAGE_TYPE, 200, 250, 
BarcodeParameters.FORMAT, barcodeDataFormat.getParams());
         }
     }
@@ -72,6 +75,7 @@ public class BarcodeDataFormatTest {
     @Test
     final void testConstructorWithImageType() throws IOException {
         try (BarcodeDataFormat barcodeDataFormat = new 
BarcodeDataFormat(BarcodeImageType.JPG)) {
+            barcodeDataFormat.start();
             this.checkParams(BarcodeImageType.JPG, BarcodeParameters.WIDTH, 
BarcodeParameters.HEIGHT, BarcodeParameters.FORMAT,
                     barcodeDataFormat.getParams());
         }
@@ -83,6 +87,7 @@ public class BarcodeDataFormatTest {
     @Test
     final void testConstructorWithAll() throws IOException {
         try (BarcodeDataFormat barcodeDataFormat = new BarcodeDataFormat(200, 
250, BarcodeImageType.JPG, BarcodeFormat.AZTEC)) {
+            barcodeDataFormat.start();
             this.checkParams(BarcodeImageType.JPG, 200, 250, 
BarcodeFormat.AZTEC, barcodeDataFormat.getParams());
         }
     }
@@ -93,6 +98,7 @@ public class BarcodeDataFormatTest {
     @Test
     final void testOptimizeHints() throws IOException {
         try (BarcodeDataFormat instance = new BarcodeDataFormat()) {
+            instance.start();
             
assertTrue(instance.getWriterHintMap().containsKey(EncodeHintType.ERROR_CORRECTION));
             
assertTrue(instance.getReaderHintMap().containsKey(DecodeHintType.TRY_HARDER));
         }
@@ -104,6 +110,7 @@ public class BarcodeDataFormatTest {
     @Test
     final void testOptimizieHintsForDataMatrix() throws IOException {
         try (BarcodeDataFormat instance = new 
BarcodeDataFormat(BarcodeFormat.DATA_MATRIX)) {
+            instance.start();
             
assertTrue(instance.getWriterHintMap().containsKey(EncodeHintType.DATA_MATRIX_SHAPE),
                     "data matrix shape hint incorrect.");
             
assertTrue(instance.getReaderHintMap().containsKey(DecodeHintType.TRY_HARDER), 
"try harder hint incorrect.");
@@ -117,11 +124,14 @@ public class BarcodeDataFormatTest {
     final void testReOptimizeHints() throws IOException {
         // DATA-MATRIX
         try (BarcodeDataFormat instance = new 
BarcodeDataFormat(BarcodeFormat.DATA_MATRIX)) {
+            instance.start();
             
assertTrue(instance.getWriterHintMap().containsKey(EncodeHintType.DATA_MATRIX_SHAPE));
             
assertTrue(instance.getReaderHintMap().containsKey(DecodeHintType.TRY_HARDER));
 
+            instance.stop();
             // -> QR-CODE
             instance.setBarcodeFormat(BarcodeFormat.QR_CODE);
+            instance.start();
             
assertFalse(instance.getWriterHintMap().containsKey(EncodeHintType.DATA_MATRIX_SHAPE));
             
assertTrue(instance.getReaderHintMap().containsKey(DecodeHintType.TRY_HARDER));
         }
@@ -135,6 +145,7 @@ public class BarcodeDataFormatTest {
         EncodeHintType hintType = EncodeHintType.MARGIN;
         Object value = 10;
         try (BarcodeDataFormat instance = new BarcodeDataFormat()) {
+            instance.start();
             instance.addToHintMap(hintType, value);
             assertTrue(instance.getWriterHintMap().containsKey(hintType));
             assertEquals(instance.getWriterHintMap().get(hintType), value);
@@ -149,6 +160,7 @@ public class BarcodeDataFormatTest {
         DecodeHintType hintType = DecodeHintType.CHARACTER_SET;
         Object value = "UTF-8";
         try (BarcodeDataFormat instance = new BarcodeDataFormat()) {
+            instance.start();
             instance.addToHintMap(hintType, value);
             assertTrue(instance.getReaderHintMap().containsKey(hintType));
             assertEquals(instance.getReaderHintMap().get(hintType), value);
@@ -162,6 +174,7 @@ public class BarcodeDataFormatTest {
     final void testRemoveFromHintMapEncodeHintType() throws IOException {
         EncodeHintType hintType = EncodeHintType.ERROR_CORRECTION;
         try (BarcodeDataFormat instance = new BarcodeDataFormat()) {
+            instance.start();
             instance.removeFromHintMap(hintType);
             assertFalse(instance.getWriterHintMap().containsKey(hintType));
         }
@@ -174,6 +187,7 @@ public class BarcodeDataFormatTest {
     final void testRemoveFromHintMapDecodeHintType() throws IOException {
         DecodeHintType hintType = DecodeHintType.TRY_HARDER;
         try (BarcodeDataFormat instance = new BarcodeDataFormat()) {
+            instance.start();
             instance.removeFromHintMap(hintType);
             assertFalse(instance.getReaderHintMap().containsKey(hintType));
         }
@@ -185,6 +199,7 @@ public class BarcodeDataFormatTest {
     @Test
     final void testGetParams() throws IOException {
         try (BarcodeDataFormat instance = new BarcodeDataFormat()) {
+            instance.start();
             BarcodeParameters result = instance.getParams();
             assertNotNull(result);
         }
@@ -196,6 +211,7 @@ public class BarcodeDataFormatTest {
     @Test
     final void testGetWriterHintMap() throws IOException {
         try (BarcodeDataFormat instance = new BarcodeDataFormat()) {
+            instance.start();
             Map<EncodeHintType, Object> result = instance.getWriterHintMap();
             assertNotNull(result);
         }
@@ -207,6 +223,7 @@ public class BarcodeDataFormatTest {
     @Test
     final void testGetReaderHintMap() throws IOException {
         try (BarcodeDataFormat instance = new BarcodeDataFormat()) {
+            instance.start();
             Map<DecodeHintType, Object> result = instance.getReaderHintMap();
             assertNotNull(result);
         }
diff --git 
a/components/camel-barcode/src/test/resources/org/apache/camel/dataformat/barcode/barcodeDataformatSpring.xml
 
b/components/camel-barcode/src/test/resources/org/apache/camel/dataformat/barcode/barcodeDataformatSpring.xml
index ffdb99d89df..7240a04d6f7 100644
--- 
a/components/camel-barcode/src/test/resources/org/apache/camel/dataformat/barcode/barcodeDataformatSpring.xml
+++ 
b/components/camel-barcode/src/test/resources/org/apache/camel/dataformat/barcode/barcodeDataformatSpring.xml
@@ -27,14 +27,13 @@
 
 <!-- START SNIPPET: e1 -->
   <camelContext xmlns="http://camel.apache.org/schema/spring";>
-    <!-- setup beanio data format -->
+    <!-- setup data format -->
     <dataFormats>
       <barcode id="code1"/>
       <barcode id="code2" width="200" height="200" />
       <barcode id="code3" imageType="JPG" />
       <barcode id="code4" width="200" height="200" imageType="JPG" 
barcodeFormat="PDF_417"/>
       <barcode id="code5" width="200" height="200" imageType="PNG" 
barcodeFormat="AZTEC"/>
-      
     </dataFormats>
 
     <route>
diff --git 
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/barcode.json
 
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/barcode.json
index efbb00c4563..aa8806c7b47 100644
--- 
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/barcode.json
+++ 
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/barcode.json
@@ -14,9 +14,9 @@
   },
   "properties": {
     "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": 
"common", "required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
id of this node" },
-    "barcodeFormat": { "index": 1, "kind": "attribute", "displayName": 
"Barcode Format", "group": "common", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Barcode format such as QR-Code" },
-    "imageType": { "index": 2, "kind": "attribute", "displayName": "Image 
Type", "group": "common", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "Image type of the barcode such as png" },
-    "width": { "index": 3, "kind": "attribute", "displayName": "Width", 
"group": "common", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"description": "Width of the barcode" },
-    "height": { "index": 4, "kind": "attribute", "displayName": "Height", 
"group": "common", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"description": "Height of the barcode" }
+    "barcodeFormat": { "index": 1, "kind": "attribute", "displayName": 
"Barcode Format", "group": "common", "required": false, "type": "enum", 
"javaType": "java.lang.String", "enum": [ "AZTEC", "CODABAR", "CODE_39", 
"CODE_93", "CODE_128", "DATA_MATRIX", "EAN_8", "EAN_13", "ITF", "MAXICODE", 
"PDF_417", "QR_CODE", "RSS_14", "RSS_EXPANDED", "UPC_A", "UPC_E", 
"UPC_EAN_EXTENSION" ], "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": "QR_CODE", "description": "Barcode fo [...]
+    "imageType": { "index": 2, "kind": "attribute", "displayName": "Image 
Type", "group": "common", "required": false, "type": "enum", "javaType": 
"java.lang.String", "enum": [ "JPG", "GIF", "PNG" ], "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "PNG", "description": 
"Image type of the barcode such as png" },
+    "width": { "index": 3, "kind": "attribute", "displayName": "Width", 
"group": "common", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "100", "description": "Width of the barcode" },
+    "height": { "index": 4, "kind": "attribute", "displayName": "Height", 
"group": "common", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "100", "description": "Height of the barcode" }
   }
 }
diff --git 
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BarcodeDataFormat.java
 
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BarcodeDataFormat.java
index 288338d918b..77202577548 100644
--- 
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BarcodeDataFormat.java
+++ 
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/BarcodeDataFormat.java
@@ -35,14 +35,16 @@ import org.apache.camel.spi.Metadata;
 public class BarcodeDataFormat extends DataFormatDefinition {
 
     @XmlAttribute
+    @Metadata(enums = 
"AZTEC,CODABAR,CODE_39,CODE_93,CODE_128,DATA_MATRIX,EAN_8,EAN_13,ITF,MAXICODE,PDF_417,QR_CODE,RSS_14,RSS_EXPANDED,UPC_A,UPC_E,UPC_EAN_EXTENSION",
 defaultValue = "QR_CODE")
     private String barcodeFormat;
     @XmlAttribute
+    @Metadata(enums = "JPG,GIF,PNG", defaultValue = "PNG")
     private String imageType;
     @XmlAttribute
-    @Metadata(javaType = "java.lang.Integer")
+    @Metadata(javaType = "java.lang.Integer", defaultValue = "100")
     private String width;
     @XmlAttribute
-    @Metadata(javaType = "java.lang.Integer")
+    @Metadata(javaType = "java.lang.Integer", defaultValue = "100")
     private String height;
 
     public BarcodeDataFormat() {
diff --git 
a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/BarcodeDataFormatReifier.java
 
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/BarcodeDataFormatReifier.java
index 060c7772045..690f6ae4d65 100644
--- 
a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/BarcodeDataFormatReifier.java
+++ 
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/BarcodeDataFormatReifier.java
@@ -32,7 +32,7 @@ public class BarcodeDataFormatReifier extends 
DataFormatReifier<BarcodeDataForma
     protected void prepareDataFormatConfig(Map<String, Object> properties) {
         properties.put("width", definition.getWidth());
         properties.put("height", definition.getHeight());
-        properties.put("barcodeImageType", definition.getImageType());
+        properties.put("imageType", definition.getImageType());
         properties.put("barcodeFormat", definition.getBarcodeFormat());
     }
 
diff --git 
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
 
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
index 1ce7c77f9e3..3756c8fb2de 100644
--- 
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
+++ 
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
@@ -2419,10 +2419,10 @@ public class ModelWriter extends BaseWriter {
     protected void doWriteBarcodeDataFormat(String name, BarcodeDataFormat 
def) throws IOException {
         startElement(name);
         doWriteIdentifiedTypeAttributes(def);
-        doWriteAttribute("barcodeFormat", def.getBarcodeFormat(), null);
-        doWriteAttribute("width", def.getWidth(), null);
-        doWriteAttribute("imageType", def.getImageType(), null);
-        doWriteAttribute("height", def.getHeight(), null);
+        doWriteAttribute("barcodeFormat", def.getBarcodeFormat(), "QR_CODE");
+        doWriteAttribute("width", def.getWidth(), "100");
+        doWriteAttribute("imageType", def.getImageType(), "PNG");
+        doWriteAttribute("height", def.getHeight(), "100");
         endElement(name);
     }
     protected void doWriteBase64DataFormat(String name, Base64DataFormat def) 
throws IOException {
diff --git 
a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
 
b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
index b6e49bdab16..f3c38429c25 100644
--- 
a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
+++ 
b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
@@ -2419,10 +2419,10 @@ public class ModelWriter extends BaseWriter {
     protected void doWriteBarcodeDataFormat(String name, BarcodeDataFormat 
def) throws IOException {
         startElement(name);
         doWriteIdentifiedTypeAttributes(def);
-        doWriteAttribute("barcodeFormat", def.getBarcodeFormat(), null);
-        doWriteAttribute("width", def.getWidth(), null);
-        doWriteAttribute("imageType", def.getImageType(), null);
-        doWriteAttribute("height", def.getHeight(), null);
+        doWriteAttribute("barcodeFormat", def.getBarcodeFormat(), "QR_CODE");
+        doWriteAttribute("width", def.getWidth(), "100");
+        doWriteAttribute("imageType", def.getImageType(), "PNG");
+        doWriteAttribute("height", def.getHeight(), "100");
         endElement(name);
     }
     protected void doWriteBase64DataFormat(String name, Base64DataFormat def) 
throws IOException {
diff --git 
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_15.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_15.adoc
new file mode 100644
index 00000000000..9e5dca4e16f
--- /dev/null
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_15.adoc
@@ -0,0 +1,7 @@
+= Apache Camel 4.x Upgrade Guide
+
+This document is for helping you upgrade your Apache Camel application
+from Camel 4.x to 4.y. For example, if you are upgrading Camel 4.0 to 4.2, 
then you should follow the guides
+from both 4.0 to 4.1 and 4.1 to 4.2.
+
+== Upgrading Camel 4.14 to 4.15
diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide.adoc
index aa6e2fb5184..887826ed135 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide.adoc
@@ -23,3 +23,4 @@ You can find the upgrade guide for each release in the 
following pages:
 - xref:camel-4x-upgrade-guide-4_12.adoc[Upgrade guide 4.11 -> 4.12]
 - xref:camel-4x-upgrade-guide-4_13.adoc[Upgrade guide 4.12 -> 4.13]
 - xref:camel-4x-upgrade-guide-4_14.adoc[Upgrade guide 4.13 -> 4.14]
+- xref:camel-4x-upgrade-guide-4_15.adoc[Upgrade guide 4.14 -> 4.15]

Reply via email to