This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch CAMEL-23832-printer in repository https://gitbox.apache.org/repos/asf/camel.git
commit 4bae1d7f5e9b9f99bfc9fddba5f6a760ca1bd49c Author: Claus Ibsen <[email protected]> AuthorDate: Fri Nov 27 10:31:11 2026 +0100 CAMEL-23832: camel-printer - improve the component and option descriptions This commit rewrites the component description and the texts of 13 endpoint options and 1 header of lpr. The new texts say how the producer looks up the printer by name, which values flavor, mimeType, mediaSize, sides and mediaTray take, and when a value fails the producer start. The old mediaTray text named the wrong javax.print class and example values, the old port text did not say that the port is not used, and the sendToPrinter text was cut off. Documentation only, no behavior change. The component JSON, the catalog copy, the doc page header and the DSL are regenerated. camel-printer is marked as done in tasks/component-descriptions.md. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../org/apache/camel/catalog/components/lpr.json | 30 ++--- .../apache/camel/catalog/docs/lpr-component.adoc | 2 +- .../org/apache/camel/component/printer/lpr.json | 30 ++--- .../camel-printer/src/main/docs/lpr-component.adoc | 2 +- .../component/printer/PrinterConfiguration.java | 100 ++++++++-------- .../camel/component/printer/PrinterEndpoint.java | 6 +- .../component/ComponentsBuilderFactory.java | 3 +- .../component/dsl/LprComponentBuilderFactory.java | 6 +- .../builder/endpoint/EndpointHeaderBuilders.java | 3 +- .../builder/endpoint/StaticEndpointBuilders.java | 36 ++++-- .../dsl/PrinterEndpointBuilderFactory.java | 126 +++++++++++++++------ tasks/component-descriptions.md | 2 +- 12 files changed, 213 insertions(+), 133 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/lpr.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/lpr.json index fc084787089c..6a509b9027fb 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/lpr.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/lpr.json @@ -3,7 +3,7 @@ "kind": "component", "name": "lpr", "title": "Printer", - "description": "Send print jobs to printers.", + "description": "Send documents as print jobs to local or network printers by using the Java Print Service API.", "deprecated": false, "firstVersion": "2.1.0", "label": "document", @@ -28,26 +28,26 @@ "autowiredEnabled": { "index": 1, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] }, "headers": { - "PrinterJobName": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the job", "constantName": "org.apache.camel.component.printer.PrinterEndpoint#JOB_NAME" } + "PrinterJobName": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the print job, sent to the print service as the JobName attribute. If not set, the job is named Camel: lpr.", "constantName": "org.apache.camel.component.printer.PrinterEndpoint#JOB_NAME" } }, "bodyTypes": { "producerIn": { "carriers": [ "text", "bytes", "stream", "file" ], "description": "The document to print, read as a stream: text, bytes, a stream or a file, in the format of the mimeType and flavor options. A Map, a POJO, a number or no body fails with an InvalidPayloadException" }, "producerOut": { "carriers": [ "unchanged" ] } }, "properties": { - "hostname": { "index": 0, "kind": "path", "displayName": "Hostname", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "Hostname of the printer" }, - "port": { "index": 1, "kind": "path", "displayName": "Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "Port number of the printer" }, - "printername": { "index": 2, "kind": "path", "displayName": "Printername", "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": "Name of the printer" }, - "copies": { "index": 3, "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": { "index": 4, "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": { "index": 5, "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." }, - "mediaSize": { "index": 6, "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.Me [...] - "mediaTray": { "index": 7, "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": { "index": 8, "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": { "index": 9, "kind": "parameter", "displayName": "Orientation", "group": "producer", "label": "", "required": false, "type": "enum", "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 [...] - "printerPrefix": { "index": 10, "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": { "index": 11, "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": { "index": 12, "kind": "parameter", "displayName": "Sides", "group": "producer", "label": "", "required": false, "type": "enum", "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 s [...] + "hostname": { "index": 0, "kind": "path", "displayName": "Hostname", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "The host name of the printer. With localhost, the producer looks up a printer of this machine by printername alone, or uses the de [...] + "port": { "index": 1, "kind": "path", "displayName": "Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "The port of the printer. The producer does not use it, as it looks up the printer by name. It is only part of the service location of the endpoint." }, + "printername": { "index": 2, "kind": "path", "displayName": "Printername", "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": "The name of the printer, for example default or sales\/salesprinter, as the print services of this machine (javax.print.Pri [...] + "copies": { "index": 3, "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": "The number of copies to print, sent as the Copies attribute of the print request. The producer fails to start when the va [...] + "docFlavor": { "index": 4, "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": "The doc flavor as a javax.print.DocFlavor, for example a reference to a bean. When set, it replaces the doc flavor t [...] + "flavor": { "index": 5, "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": "The representation class of the doc flavor, as the name of a nested class of javax.print.DocFlavor: DocFlavor.BYTE_ARRAY, DocFla [...] + "mediaSize": { "index": 6, "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": "The paper size, as the name that javax.print.attribute.standard.MediaSizeName gives it, for [...] + "mediaTray": { "index": 7, "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": "The name of the input tray to take the paper from, as javax.print.attribute.standard.MediaTray gives it with spaces repla [...] + "mimeType": { "index": 8, "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": "The format of the document, as the name of a doc flavor constant of javax.print.DocFlavor, for example AUTOSENSE, PDF, POST [...] + "orientation": { "index": 9, "kind": "parameter", "displayName": "Orientation", "group": "producer", "label": "", "required": false, "type": "enum", "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": "The orientatio [...] + "printerPrefix": { "index": 10, "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": "A text that the producer puts before hostname\/printername to form the name of the printer to look up. It is not [...] + "sendToPrinter": { "index": 11, "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": "Whether to send the print job to the printer. If false, the producer writes the document to a fil [...] + "sides": { "index": 12, "kind": "parameter", "displayName": "Sides", "group": "producer", "label": "", "required": false, "type": "enum", "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": "Whether to [...] "lazyStartProducer": { "index": 13, "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 produ [...] } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/lpr-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/lpr-component.adoc index 5143d1b8cfa2..19441e1ea7ac 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/lpr-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/lpr-component.adoc @@ -2,7 +2,7 @@ :doctitle: Printer :shortname: lpr :artifactid: camel-printer -:description: Send print jobs to printers. +:description: Send documents as print jobs to local or network printers by using the Java Print Service API. :since: 2.1 :supportlevel: Stable :tabs-sync-option: diff --git a/components/camel-printer/src/generated/resources/META-INF/org/apache/camel/component/printer/lpr.json b/components/camel-printer/src/generated/resources/META-INF/org/apache/camel/component/printer/lpr.json index fc084787089c..6a509b9027fb 100644 --- a/components/camel-printer/src/generated/resources/META-INF/org/apache/camel/component/printer/lpr.json +++ b/components/camel-printer/src/generated/resources/META-INF/org/apache/camel/component/printer/lpr.json @@ -3,7 +3,7 @@ "kind": "component", "name": "lpr", "title": "Printer", - "description": "Send print jobs to printers.", + "description": "Send documents as print jobs to local or network printers by using the Java Print Service API.", "deprecated": false, "firstVersion": "2.1.0", "label": "document", @@ -28,26 +28,26 @@ "autowiredEnabled": { "index": 1, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] }, "headers": { - "PrinterJobName": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the job", "constantName": "org.apache.camel.component.printer.PrinterEndpoint#JOB_NAME" } + "PrinterJobName": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the print job, sent to the print service as the JobName attribute. If not set, the job is named Camel: lpr.", "constantName": "org.apache.camel.component.printer.PrinterEndpoint#JOB_NAME" } }, "bodyTypes": { "producerIn": { "carriers": [ "text", "bytes", "stream", "file" ], "description": "The document to print, read as a stream: text, bytes, a stream or a file, in the format of the mimeType and flavor options. A Map, a POJO, a number or no body fails with an InvalidPayloadException" }, "producerOut": { "carriers": [ "unchanged" ] } }, "properties": { - "hostname": { "index": 0, "kind": "path", "displayName": "Hostname", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "Hostname of the printer" }, - "port": { "index": 1, "kind": "path", "displayName": "Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "Port number of the printer" }, - "printername": { "index": 2, "kind": "path", "displayName": "Printername", "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": "Name of the printer" }, - "copies": { "index": 3, "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": { "index": 4, "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": { "index": 5, "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." }, - "mediaSize": { "index": 6, "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.Me [...] - "mediaTray": { "index": 7, "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": { "index": 8, "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": { "index": 9, "kind": "parameter", "displayName": "Orientation", "group": "producer", "label": "", "required": false, "type": "enum", "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 [...] - "printerPrefix": { "index": 10, "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": { "index": 11, "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": { "index": 12, "kind": "parameter", "displayName": "Sides", "group": "producer", "label": "", "required": false, "type": "enum", "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 s [...] + "hostname": { "index": 0, "kind": "path", "displayName": "Hostname", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "The host name of the printer. With localhost, the producer looks up a printer of this machine by printername alone, or uses the de [...] + "port": { "index": 1, "kind": "path", "displayName": "Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.printer.PrinterConfiguration", "configurationField": "config", "description": "The port of the printer. The producer does not use it, as it looks up the printer by name. It is only part of the service location of the endpoint." }, + "printername": { "index": 2, "kind": "path", "displayName": "Printername", "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": "The name of the printer, for example default or sales\/salesprinter, as the print services of this machine (javax.print.Pri [...] + "copies": { "index": 3, "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": "The number of copies to print, sent as the Copies attribute of the print request. The producer fails to start when the va [...] + "docFlavor": { "index": 4, "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": "The doc flavor as a javax.print.DocFlavor, for example a reference to a bean. When set, it replaces the doc flavor t [...] + "flavor": { "index": 5, "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": "The representation class of the doc flavor, as the name of a nested class of javax.print.DocFlavor: DocFlavor.BYTE_ARRAY, DocFla [...] + "mediaSize": { "index": 6, "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": "The paper size, as the name that javax.print.attribute.standard.MediaSizeName gives it, for [...] + "mediaTray": { "index": 7, "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": "The name of the input tray to take the paper from, as javax.print.attribute.standard.MediaTray gives it with spaces repla [...] + "mimeType": { "index": 8, "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": "The format of the document, as the name of a doc flavor constant of javax.print.DocFlavor, for example AUTOSENSE, PDF, POST [...] + "orientation": { "index": 9, "kind": "parameter", "displayName": "Orientation", "group": "producer", "label": "", "required": false, "type": "enum", "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": "The orientatio [...] + "printerPrefix": { "index": 10, "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": "A text that the producer puts before hostname\/printername to form the name of the printer to look up. It is not [...] + "sendToPrinter": { "index": 11, "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": "Whether to send the print job to the printer. If false, the producer writes the document to a fil [...] + "sides": { "index": 12, "kind": "parameter", "displayName": "Sides", "group": "producer", "label": "", "required": false, "type": "enum", "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": "Whether to [...] "lazyStartProducer": { "index": 13, "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 produ [...] } } diff --git a/components/camel-printer/src/main/docs/lpr-component.adoc b/components/camel-printer/src/main/docs/lpr-component.adoc index 5143d1b8cfa2..19441e1ea7ac 100644 --- a/components/camel-printer/src/main/docs/lpr-component.adoc +++ b/components/camel-printer/src/main/docs/lpr-component.adoc @@ -2,7 +2,7 @@ :doctitle: Printer :shortname: lpr :artifactid: camel-printer -:description: Send print jobs to printers. +:description: Send documents as print jobs to local or network printers by using the Java Print Service API. :since: 2.1 :supportlevel: Stable :tabs-sync-option: 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 bbddc3738568..b87ac5d2243f 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 @@ -38,32 +38,65 @@ public class PrinterConfiguration { private Sides internalSides; private OrientationRequested internalOrientation; - @UriPath + @UriPath(description = "The host name of the printer. With localhost, the producer looks up a printer of this machine " + + "by printername alone, or uses the default printer of this machine when printername is default. " + + "With another host, it looks up the printer by hostname/printername.") @Metadata(required = true) private String hostname; - @UriPath + @UriPath(description = "The port of the printer. The producer does not use it, as it looks up the printer by name. It " + + "is only part of the service location of the endpoint.") private int port; - @UriPath + @UriPath(description = "The name of the printer, for example default or sales/salesprinter, as the print services of " + + "this machine (javax.print.PrintServiceLookup) know it, so a remote printer must be installed on " + + "this machine. A print service matches when its name ends with the looked-up name or the other " + + "way round, ignoring case and treating / and \\ alike. The producer fails to start when no print " + + "service matches.") private String printername; - @UriParam + @UriParam(description = "A text that the producer puts before hostname/printername to form the name of the printer to " + + "look up. It is not used when the host is localhost.") private String printerPrefix; - @UriParam(defaultValue = "1") + @UriParam(defaultValue = "1", + description = "The number of copies to print, sent as the Copies attribute of the print request. The producer " + + "fails to start when the value is less than 1.") private int copies = 1; - @UriParam + @UriParam(description = "The representation class of the doc flavor, as the name of a nested class of " + + "javax.print.DocFlavor: DocFlavor.BYTE_ARRAY, DocFlavor.INPUT_STREAM or DocFlavor.URL, and for " + + "the mimeType TEXT_HTML or TEXT_PLAIN DocFlavor.CHAR_ARRAY, DocFlavor.READER or " + + "DocFlavor.STRING. If not set, DocFlavor.BYTE_ARRAY is used. Together with mimeType it selects " + + "the doc flavor, and a combination that the component does not know selects " + + "DocFlavor.BYTE_ARRAY.AUTOSENSE.") private String flavor; - @UriParam + @UriParam(description = "The doc flavor as a javax.print.DocFlavor, for example a reference to a bean. When set, it " + + "replaces the doc flavor that the flavor and mimeType options select.") private DocFlavor docFlavor; - @UriParam + @UriParam(description = "The format of the document, as the name of a doc flavor constant of javax.print.DocFlavor, for " + + "example AUTOSENSE, PDF, POSTSCRIPT, PCL, GIF, JPEG, TEXT_PLAIN_UTF_8 or TEXT_HTML. If not set, " + + "AUTOSENSE is used, which lets the print service detect the format. With sendToPrinter set to " + + "false, it also selects the extension of the written file.") private String mimeType; - @UriParam(defaultValue = "na-letter") + @UriParam(defaultValue = "na-letter", + description = "The paper size, as the name that javax.print.attribute.standard.MediaSizeName gives it, for " + + "example na-letter, na-legal, iso-a4 or japanese-postcard. Case is ignored and _ may be used for " + + "-, so ISO_A4 works too. An unknown size fails the creation of the endpoint.") private String mediaSize; - @UriParam(defaultValue = "one-sided", enums = "one-sided,duplex,tumble,two-sided-short-edge,two-sided-long-edge") + @UriParam(defaultValue = "one-sided", enums = "one-sided,duplex,tumble,two-sided-short-edge,two-sided-long-edge", + description = "Whether to print on one side or on both sides of the paper, as a value of " + + "javax.print.attribute.standard.Sides. The value duplex is the same as two-sided-long-edge, and " + + "tumble the same as two-sided-short-edge.") private String sides; - @UriParam(defaultValue = "portrait", enums = "portrait,landscape,reverse-portrait,reverse-landscape") + @UriParam(defaultValue = "portrait", enums = "portrait,landscape,reverse-portrait,reverse-landscape", + description = "The orientation of the printed pages, as a value of " + + "javax.print.attribute.standard.OrientationRequested.") private String orientation; - @UriParam(defaultValue = "true") + @UriParam(defaultValue = "true", + description = "Whether to send the print job to the printer. If false, the producer writes the document to a " + + "file named PrintOutput_ followed by a random UUID in the target directory of the working " + + "directory, with the extension gif, jpeg, pdf or txt that matches mimeType. The producer still " + + "looks up the printer when it starts, and the printer must support the doc flavor.") private boolean sendToPrinter = true; - @UriParam + @UriParam(description = "The name of the input tray to take the paper from, as javax.print.attribute.standard.MediaTray " + + "gives it with spaces replaced by _, for example top, middle, bottom or manual. The name must " + + "match, with the same case, a tray that the printer reports, or the producer fails to start.") private String mediaTray; public PrinterConfiguration() { @@ -244,9 +277,6 @@ public class PrinterConfiguration { return hostname; } - /** - * Hostname of the printer - */ public void setHostname(String hostname) { this.hostname = hostname; } @@ -255,9 +285,6 @@ public class PrinterConfiguration { return port; } - /** - * Port number of the printer - */ public void setPort(int port) { this.port = port; } @@ -266,9 +293,6 @@ public class PrinterConfiguration { return printername; } - /** - * Name of the printer - */ public void setPrintername(String printername) { this.printername = printername; } @@ -277,9 +301,6 @@ public class PrinterConfiguration { return copies; } - /** - * Number of copies to print - */ public void setCopies(int copies) { this.copies = copies; } @@ -288,9 +309,6 @@ public class PrinterConfiguration { return flavor; } - /** - * Sets DocFlavor to use. - */ public void setFlavor(String flavor) { this.flavor = flavor; } @@ -299,9 +317,6 @@ public class PrinterConfiguration { return docFlavor; } - /** - * Sets DocFlavor to use. - */ public void setDocFlavor(DocFlavor docFlavor) { this.docFlavor = docFlavor; } @@ -310,11 +325,6 @@ public class PrinterConfiguration { return mediaSize; } - /** - * Sets the stationary as defined by enumeration names in the javax.print.attribute.standard.MediaSizeName API. The - * default setting is to use North American Letter sized stationary. The value's case is ignored, e.g. values of - * iso_a4 and ISO_A4 may be used. - */ public void setMediaSize(String mediaSize) { this.mediaSize = mediaSize; } @@ -323,9 +333,6 @@ public class PrinterConfiguration { return sides; } - /** - * Sets one sided or two sided printing based on the javax.print.attribute.standard.Sides API - */ public void setSides(String sides) { this.sides = sides; } @@ -358,9 +365,6 @@ public class PrinterConfiguration { return orientation; } - /** - * Sets the page orientation. - */ public void setOrientation(String orientation) { this.orientation = orientation; } @@ -369,9 +373,6 @@ public class PrinterConfiguration { return mimeType; } - /** - * Sets mimeTypes supported by the javax.print.DocFlavor API - */ public void setMimeType(String mimeType) { this.mimeType = mimeType; } @@ -380,9 +381,6 @@ public class PrinterConfiguration { return sendToPrinter; } - /** - * etting this option to false prevents sending of the print data to the printer - */ public void setSendToPrinter(boolean sendToPrinter) { this.sendToPrinter = sendToPrinter; } @@ -391,9 +389,6 @@ public class PrinterConfiguration { return mediaTray; } - /** - * Sets MediaTray supported by the javax.print.DocFlavor API, for example upper,middle etc. - */ public void setMediaTray(String mediaTray) { this.mediaTray = mediaTray; } @@ -402,9 +397,6 @@ public class PrinterConfiguration { return printerPrefix; } - /** - * Sets the prefix name of the printer, it is useful when the printer name does not start with //hostname/printer - */ public void setPrinterPrefix(String printerPrefix) { this.printerPrefix = printerPrefix; } diff --git a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterEndpoint.java b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterEndpoint.java index 08784d1b1a81..0a9f6f75e648 100644 --- a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterEndpoint.java +++ b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterEndpoint.java @@ -31,7 +31,7 @@ import org.apache.camel.spi.UriParam; import org.apache.camel.support.DefaultEndpoint; /** - * Send print jobs to printers. + * Send documents as print jobs to local or network printers by using the Java Print Service API. * * Obviously the payload has to be a formatted piece of payload in order for the component to appropriately print it. * The objective is to be able to direct specific payloads as jobs to a line printer in a camel flow. @@ -48,7 +48,9 @@ import org.apache.camel.support.DefaultEndpoint; producerOut = @BodyType(Carrier.UNCHANGED)) public class PrinterEndpoint extends DefaultEndpoint implements EndpointServiceLocation { - @Metadata(label = "producer", description = "The name of the job", javaType = "String") + @Metadata(label = "producer", description = "The name of the print job, sent to the print service as the JobName" + + " attribute. If not set, the job is named Camel: lpr.", + javaType = "String") public static final String JOB_NAME = "PrinterJobName"; @UriParam diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java index 65c4b8de31b6..8c4cc88dd48f 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java @@ -3564,7 +3564,8 @@ public interface ComponentsBuilderFactory { } /** * Printer (camel-printer) - * Send print jobs to printers. + * Send documents as print jobs to local or network printers by using the + * Java Print Service API. * * Category: document * Since: 2.1 diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LprComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LprComponentBuilderFactory.java index d2755bdab043..8b855c38ed32 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LprComponentBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LprComponentBuilderFactory.java @@ -24,7 +24,8 @@ import org.apache.camel.builder.component.ComponentBuilder; import org.apache.camel.component.printer.PrinterComponent; /** - * Send print jobs to printers. + * Send documents as print jobs to local or network printers by using the Java + * Print Service API. * * Generated by camel build tools - do NOT edit this file! */ @@ -33,7 +34,8 @@ public interface LprComponentBuilderFactory { /** * Printer (camel-printer) - * Send print jobs to printers. + * Send documents as print jobs to local or network printers by using the + * Java Print Service API. * * Category: document * Since: 2.1 diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java index 2d9d252c0c1c..1362bbd9f2bc 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java @@ -2863,7 +2863,8 @@ public class EndpointHeaderBuilders { } /** * Printer (camel-printer) - * Send print jobs to printers. + * Send documents as print jobs to local or network printers by using the + * Java Print Service API. * * Category: document * Since: 2.1 diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java index 5f5c53661751..d1af8c81a56c 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java @@ -11792,7 +11792,8 @@ public class StaticEndpointBuilders { } /** * Printer (camel-printer) - * Send print jobs to printers. + * Send documents as print jobs to local or network printers by using the + * Java Print Service API. * * Category: document * Since: 2.1 @@ -11801,13 +11802,22 @@ public class StaticEndpointBuilders { * Syntax: <code>lpr:hostname:port/printername</code> * * Path parameter: hostname (required) - * Hostname of the printer + * The host name of the printer. With localhost, the producer looks up a + * printer of this machine by printername alone, or uses the default printer + * of this machine when printername is default. With another host, it looks + * up the printer by hostname/printername. * * Path parameter: port - * Port number of the printer + * The port of the printer. The producer does not use it, as it looks up the + * printer by name. It is only part of the service location of the endpoint. * * Path parameter: printername - * Name of the printer + * The name of the printer, for example default or sales/salesprinter, as + * the print services of this machine (javax.print.PrintServiceLookup) know + * it, so a remote printer must be installed on this machine. A print + * service matches when its name ends with the looked-up name or the other + * way round, ignoring case and treating / and \ alike. The producer fails + * to start when no print service matches. * * @param path hostname:port/printername * @return the dsl builder @@ -11817,7 +11827,8 @@ public class StaticEndpointBuilders { } /** * Printer (camel-printer) - * Send print jobs to printers. + * Send documents as print jobs to local or network printers by using the + * Java Print Service API. * * Category: document * Since: 2.1 @@ -11826,13 +11837,22 @@ public class StaticEndpointBuilders { * Syntax: <code>lpr:hostname:port/printername</code> * * Path parameter: hostname (required) - * Hostname of the printer + * The host name of the printer. With localhost, the producer looks up a + * printer of this machine by printername alone, or uses the default printer + * of this machine when printername is default. With another host, it looks + * up the printer by hostname/printername. * * Path parameter: port - * Port number of the printer + * The port of the printer. The producer does not use it, as it looks up the + * printer by name. It is only part of the service location of the endpoint. * * Path parameter: printername - * Name of the printer + * The name of the printer, for example default or sales/salesprinter, as + * the print services of this machine (javax.print.PrintServiceLookup) know + * it, so a remote printer must be installed on this machine. A print + * service matches when its name ends with the looked-up name or the other + * way round, ignoring case and treating / and \ alike. The producer fails + * to start when no print service matches. * * @param componentName to use a custom component name for the endpoint * instead of the default name diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PrinterEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PrinterEndpointBuilderFactory.java index 5725269508d6..e136a83c2e90 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PrinterEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PrinterEndpointBuilderFactory.java @@ -27,7 +27,8 @@ import org.apache.camel.builder.EndpointProducerBuilder; import org.apache.camel.builder.endpoint.AbstractEndpointBuilder; /** - * Send print jobs to printers. + * Send documents as print jobs to local or network printers by using the Java + * Print Service API. * * Generated by camel build tools - do NOT edit this file! */ @@ -45,7 +46,9 @@ public interface PrinterEndpointBuilderFactory { } /** - * Number of copies to print. + * The number of copies to print, sent as the Copies attribute of the + * print request. The producer fails to start when the value is less + * than 1. * * The option is a: <code>int</code> type. * @@ -60,7 +63,9 @@ public interface PrinterEndpointBuilderFactory { return this; } /** - * Number of copies to print. + * The number of copies to print, sent as the Copies attribute of the + * print request. The producer fails to start when the value is less + * than 1. * * The option will be converted to a <code>int</code> type. * @@ -75,7 +80,9 @@ public interface PrinterEndpointBuilderFactory { return this; } /** - * Sets DocFlavor to use. + * The doc flavor as a javax.print.DocFlavor, for example a reference to + * a bean. When set, it replaces the doc flavor that the flavor and + * mimeType options select. * * The option is a: <code>javax.print.DocFlavor</code> type. * @@ -89,7 +96,9 @@ public interface PrinterEndpointBuilderFactory { return this; } /** - * Sets DocFlavor to use. + * The doc flavor as a javax.print.DocFlavor, for example a reference to + * a bean. When set, it replaces the doc flavor that the flavor and + * mimeType options select. * * The option will be converted to a <code>javax.print.DocFlavor</code> * type. @@ -104,7 +113,13 @@ public interface PrinterEndpointBuilderFactory { return this; } /** - * Sets DocFlavor to use. + * The representation class of the doc flavor, as the name of a nested + * class of javax.print.DocFlavor: DocFlavor.BYTE_ARRAY, + * DocFlavor.INPUT_STREAM or DocFlavor.URL, and for the mimeType + * TEXT_HTML or TEXT_PLAIN DocFlavor.CHAR_ARRAY, DocFlavor.READER or + * DocFlavor.STRING. If not set, DocFlavor.BYTE_ARRAY is used. Together + * with mimeType it selects the doc flavor, and a combination that the + * component does not know selects DocFlavor.BYTE_ARRAY.AUTOSENSE. * * The option is a: <code>java.lang.String</code> type. * @@ -118,10 +133,11 @@ public interface PrinterEndpointBuilderFactory { return this; } /** - * Sets the stationary as defined by enumeration names in the - * javax.print.attribute.standard.MediaSizeName API. The default setting - * is to use North American Letter sized stationary. The value's case is - * ignored, e.g. values of iso_a4 and ISO_A4 may be used. + * The paper size, as the name that + * javax.print.attribute.standard.MediaSizeName gives it, for example + * na-letter, na-legal, iso-a4 or japanese-postcard. Case is ignored and + * _ may be used for -, so ISO_A4 works too. An unknown size fails the + * creation of the endpoint. * * The option is a: <code>java.lang.String</code> type. * @@ -136,8 +152,11 @@ public interface PrinterEndpointBuilderFactory { return this; } /** - * Sets MediaTray supported by the javax.print.DocFlavor API, for - * example upper,middle etc. + * The name of the input tray to take the paper from, as + * javax.print.attribute.standard.MediaTray gives it with spaces + * replaced by _, for example top, middle, bottom or manual. The name + * must match, with the same case, a tray that the printer reports, or + * the producer fails to start. * * The option is a: <code>java.lang.String</code> type. * @@ -151,7 +170,12 @@ public interface PrinterEndpointBuilderFactory { return this; } /** - * Sets mimeTypes supported by the javax.print.DocFlavor API. + * The format of the document, as the name of a doc flavor constant of + * javax.print.DocFlavor, for example AUTOSENSE, PDF, POSTSCRIPT, PCL, + * GIF, JPEG, TEXT_PLAIN_UTF_8 or TEXT_HTML. If not set, AUTOSENSE is + * used, which lets the print service detect the format. With + * sendToPrinter set to false, it also selects the extension of the + * written file. * * The option is a: <code>java.lang.String</code> type. * @@ -165,7 +189,8 @@ public interface PrinterEndpointBuilderFactory { return this; } /** - * Sets the page orientation. + * The orientation of the printed pages, as a value of + * javax.print.attribute.standard.OrientationRequested. * * The option is a: <code>java.lang.String</code> type. * @@ -180,8 +205,9 @@ public interface PrinterEndpointBuilderFactory { return this; } /** - * Sets the prefix name of the printer, it is useful when the printer - * name does not start with //hostname/printer. + * A text that the producer puts before hostname/printername to form the + * name of the printer to look up. It is not used when the host is + * localhost. * * The option is a: <code>java.lang.String</code> type. * @@ -195,8 +221,12 @@ public interface PrinterEndpointBuilderFactory { return this; } /** - * etting this option to false prevents sending of the print data to the - * printer. + * Whether to send the print job to the printer. If false, the producer + * writes the document to a file named PrintOutput_ followed by a random + * UUID in the target directory of the working directory, with the + * extension gif, jpeg, pdf or txt that matches mimeType. The producer + * still looks up the printer when it starts, and the printer must + * support the doc flavor. * * The option is a: <code>boolean</code> type. * @@ -211,8 +241,12 @@ public interface PrinterEndpointBuilderFactory { return this; } /** - * etting this option to false prevents sending of the print data to the - * printer. + * Whether to send the print job to the printer. If false, the producer + * writes the document to a file named PrintOutput_ followed by a random + * UUID in the target directory of the working directory, with the + * extension gif, jpeg, pdf or txt that matches mimeType. The producer + * still looks up the printer when it starts, and the printer must + * support the doc flavor. * * The option will be converted to a <code>boolean</code> type. * @@ -227,8 +261,10 @@ public interface PrinterEndpointBuilderFactory { return this; } /** - * Sets one sided or two sided printing based on the - * javax.print.attribute.standard.Sides API. + * Whether to print on one side or on both sides of the paper, as a + * value of javax.print.attribute.standard.Sides. The value duplex is + * the same as two-sided-long-edge, and tumble the same as + * two-sided-short-edge. * * The option is a: <code>java.lang.String</code> type. * @@ -305,7 +341,8 @@ public interface PrinterEndpointBuilderFactory { public interface PrinterBuilders { /** * Printer (camel-printer) - * Send print jobs to printers. + * Send documents as print jobs to local or network printers by using + * the Java Print Service API. * * Category: document * Since: 2.1 @@ -318,7 +355,8 @@ public interface PrinterEndpointBuilderFactory { } /** * Printer (camel-printer) - * Send print jobs to printers. + * Send documents as print jobs to local or network printers by using + * the Java Print Service API. * * Category: document * Since: 2.1 @@ -327,13 +365,24 @@ public interface PrinterEndpointBuilderFactory { * Syntax: <code>lpr:hostname:port/printername</code> * * Path parameter: hostname (required) - * Hostname of the printer + * The host name of the printer. With localhost, the producer looks up a + * printer of this machine by printername alone, or uses the default + * printer of this machine when printername is default. With another + * host, it looks up the printer by hostname/printername. * * Path parameter: port - * Port number of the printer + * The port of the printer. The producer does not use it, as it looks up + * the printer by name. It is only part of the service location of the + * endpoint. * * Path parameter: printername - * Name of the printer + * The name of the printer, for example default or sales/salesprinter, + * as the print services of this machine + * (javax.print.PrintServiceLookup) know it, so a remote printer must be + * installed on this machine. A print service matches when its name ends + * with the looked-up name or the other way round, ignoring case and + * treating / and \ alike. The producer fails to start when no print + * service matches. * * @param path hostname:port/printername * @return the dsl builder @@ -343,7 +392,8 @@ public interface PrinterEndpointBuilderFactory { } /** * Printer (camel-printer) - * Send print jobs to printers. + * Send documents as print jobs to local or network printers by using + * the Java Print Service API. * * Category: document * Since: 2.1 @@ -352,13 +402,24 @@ public interface PrinterEndpointBuilderFactory { * Syntax: <code>lpr:hostname:port/printername</code> * * Path parameter: hostname (required) - * Hostname of the printer + * The host name of the printer. With localhost, the producer looks up a + * printer of this machine by printername alone, or uses the default + * printer of this machine when printername is default. With another + * host, it looks up the printer by hostname/printername. * * Path parameter: port - * Port number of the printer + * The port of the printer. The producer does not use it, as it looks up + * the printer by name. It is only part of the service location of the + * endpoint. * * Path parameter: printername - * Name of the printer + * The name of the printer, for example default or sales/salesprinter, + * as the print services of this machine + * (javax.print.PrintServiceLookup) know it, so a remote printer must be + * installed on this machine. A print service matches when its name ends + * with the looked-up name or the other way round, ignoring case and + * treating / and \ alike. The producer fails to start when no print + * service matches. * * @param componentName to use a custom component name for the endpoint * instead of the default name @@ -381,7 +442,8 @@ public interface PrinterEndpointBuilderFactory { public static final PrinterHeaderNameBuilder INSTANCE = new PrinterHeaderNameBuilder(); /** - * The name of the job. + * The name of the print job, sent to the print service as the JobName + * attribute. If not set, the job is named Camel: lpr. * * The option is a: {@code String} type. * diff --git a/tasks/component-descriptions.md b/tasks/component-descriptions.md index 9d11d365b24e..1f3de942c16a 100644 --- a/tasks/component-descriptions.md +++ b/tasks/component-descriptions.md @@ -309,7 +309,7 @@ or removes its row. | camel-platform-http | platform-http | | | camel-plc4x | plc4x | | | camel-pqc | pqc | | -| camel-printer | lpr | | +| camel-printer | lpr | yes | | camel-pubnub | pubnub | | | camel-pulsar | pulsar | | | camel-qdrant | qdrant | |
