You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/06/19 12:54:15 UTC

[camel] 14/21: (chores) camel-printer: removed unused parameters

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

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

commit 37747bc6717262e5d416765e68d2984d9a45fb77
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Sun Jun 19 11:26:14 2022 +0200

    (chores) camel-printer: removed unused parameters
---
 .../generated/resources/org/apache/camel/component/printer/lpr.json | 4 ++--
 .../java/org/apache/camel/component/printer/DocFlavorAssigner.java  | 6 +++---
 .../org/apache/camel/component/printer/PrinterConfiguration.java    | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/components/camel-printer/src/generated/resources/org/apache/camel/component/printer/lpr.json b/components/camel-printer/src/generated/resources/org/apache/camel/component/printer/lpr.json
index 9920835bda5..83fd8629772 100644
--- a/components/camel-printer/src/generated/resources/org/apache/camel/component/printer/lpr.json
+++ b/components/camel-printer/src/generated/resources/org/apache/camel/component/printer/lpr.json
@@ -35,13 +35,13 @@
     "copies": { "kind": "parameter", "displayName": "Copies", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1, "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "Number of copies to print" },
     "docFlavor": { "kind": "parameter", "displayName": "Doc Flavor", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "javax.print.DocFlavor", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "Sets DocFlavor to use." },
     "flavor": { "kind": "parameter", "displayName": "Flavor", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "Sets DocFlavor to use." },
+    "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during sta [...]
     "mediaSize": { "kind": "parameter", "displayName": "Media Size", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "na-letter", "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "Sets the stationary as defined by enumeration names in the javax.print.attribute.standard.MediaSizeName  [...]
     "mediaTray": { "kind": "parameter", "displayName": "Media Tray", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "Sets MediaTray supported by the javax.print.DocFlavor API, for example upper,middle etc." },
     "mimeType": { "kind": "parameter", "displayName": "Mime Type", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "Sets mimeTypes supported by the javax.print.DocFlavor API" },
     "orientation": { "kind": "parameter", "displayName": "Orientation", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "portrait", "landscape", "reverse-portrait", "reverse-landscape" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "portrait", "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "Sets the page orientation." },
     "printerPrefix": { "kind": "parameter", "displayName": "Printer Prefix", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "Sets the prefix name of the printer, it is useful when the printer name does not start with \/\/hostname\/printer" },
     "sendToPrinter": { "kind": "parameter", "displayName": "Send To Printer", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "etting this option to false prevents sending of the print data to the printer" },
-    "sides": { "kind": "parameter", "displayName": "Sides", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "one-sided", "duplex", "tumble", "two-sided-short-edge", "two-sided-long-edge" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "one-sided", "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "Sets one sided or two [...]
-    "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may other [...]
+    "sides": { "kind": "parameter", "displayName": "Sides", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "one-sided", "duplex", "tumble", "two-sided-short-edge", "two-sided-long-edge" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "one-sided", "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "Sets one sided or two [...]
   }
 }
diff --git a/components/camel-printer/src/main/java/org/apache/camel/component/printer/DocFlavorAssigner.java b/components/camel-printer/src/main/java/org/apache/camel/component/printer/DocFlavorAssigner.java
index 67ae45eb1b9..3f1aee3ac55 100644
--- a/components/camel-printer/src/main/java/org/apache/camel/component/printer/DocFlavorAssigner.java
+++ b/components/camel-printer/src/main/java/org/apache/camel/component/printer/DocFlavorAssigner.java
@@ -247,15 +247,15 @@ public class DocFlavorAssigner {
         return d;
     }
 
-    public DocFlavor forMimeTypePAGEABLE(String flavor) {
+    public DocFlavor forMimeTypePAGEABLE() {
         return d = DocFlavor.SERVICE_FORMATTED.PAGEABLE;
     }
 
-    public DocFlavor forMimeTypePRINTABLE(String flavor) {
+    public DocFlavor forMimeTypePRINTABLE() {
         return d = DocFlavor.SERVICE_FORMATTED.PRINTABLE;
     }
 
-    public DocFlavor forMimeTypeRENDERABLEIMAGE(String flavor) {
+    public DocFlavor forMimeTypeRENDERABLEIMAGE() {
         return d = DocFlavor.SERVICE_FORMATTED.RENDERABLE_IMAGE;
     }
 }
diff --git a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterConfiguration.java b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterConfiguration.java
index 63b9ad66e57..7856cc99075 100644
--- a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterConfiguration.java
+++ b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterConfiguration.java
@@ -169,11 +169,11 @@ public class PrinterConfiguration {
         } else if (mimeType.equalsIgnoreCase("TEXT_PLAIN")) {
             d = docFlavorAssigner.forMimeTypeBasic(flavor, mimeType);
         } else if (mimeType.equalsIgnoreCase("PAGEABLE")) {
-            d = docFlavorAssigner.forMimeTypePAGEABLE(flavor);
+            d = docFlavorAssigner.forMimeTypePAGEABLE();
         } else if (mimeType.equalsIgnoreCase("PRINTABLE")) {
-            d = docFlavorAssigner.forMimeTypePRINTABLE(flavor);
+            d = docFlavorAssigner.forMimeTypePRINTABLE();
         } else if (mimeType.equalsIgnoreCase("RENDERABLE_IMAGE")) {
-            d = docFlavorAssigner.forMimeTypeRENDERABLEIMAGE(flavor);
+            d = docFlavorAssigner.forMimeTypeRENDERABLEIMAGE();
         }
 
         return d;