camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: CAMEL-7999: More components include documentation
Date Fri, 19 Dec 2014 13:27:36 GMT
CAMEL-7999: More components include documentation


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/fec552e9
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/fec552e9
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/fec552e9

Branch: refs/heads/master
Commit: fec552e91bcfaaaee45dfbfa74d65c1c6616a9f9
Parents: 3a29be6
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Dec 19 14:22:39 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Dec 19 14:27:21 2014 +0100

----------------------------------------------------------------------
 .../component/printer/PrinterComponent.java     |  8 ++++++--
 .../component/printer/PrinterConfiguration.java | 20 ++++++++++++++++++++
 .../component/printer/PrinterEndpoint.java      |  6 +++++-
 3 files changed, 31 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/fec552e9/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterComponent.java
b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterComponent.java
index 17b16a4..cd72c65 100644
--- a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterComponent.java
+++ b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterComponent.java
@@ -20,9 +20,13 @@ import java.net.URI;
 import java.util.Map;
 
 import org.apache.camel.Endpoint;
-import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.impl.UriEndpointComponent;
 
-public class PrinterComponent extends DefaultComponent {
+public class PrinterComponent extends UriEndpointComponent {
+
+    public PrinterComponent() {
+        super(PrinterEndpoint.class);
+    }
 
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object>
parameters) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/fec552e9/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterConfiguration.java
----------------------------------------------------------------------
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 a8357bf..cc9dca2 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
@@ -24,26 +24,46 @@ import javax.print.attribute.standard.MediaSizeName;
 import javax.print.attribute.standard.OrientationRequested;
 import javax.print.attribute.standard.Sides;
 
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.URISupport;
 
+@UriParams
 public class PrinterConfiguration {
     private URI uri;
+    @UriPath
     private String hostname;
+    @UriPath
     private int port;
+    @UriPath
     private String printername;
+    @UriParam
     private String printerPrefix;
+    @UriParam(defaultValue = "1")
     private int copies = 1;
+    @UriParam
     private String flavor;
+    @UriParam
     private DocFlavor docFlavor;
+    @UriParam
     private String mimeType;
+    @UriParam(defaultValue = "na-letter")
     private String mediaSize;
+    @UriParam
     private MediaSizeName mediaSizeName;
+    @UriParam(defaultValue = "one-sided")
     private String sides;
+    @UriParam
     private Sides internalSides;
+    @UriParam(defaultValue = "portrait")
     private String orientation;
+    @UriParam
     private OrientationRequested internalOrientation;
+    @UriParam(defaultValue = "true")
     private boolean sendToPrinter = true;
+    @UriParam
     private String mediaTray;
 
     public PrinterConfiguration() {

http://git-wip-us.apache.org/repos/asf/camel/blob/fec552e9/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterEndpoint.java
----------------------------------------------------------------------
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 28ef370..cf27bb2 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
@@ -21,11 +21,15 @@ import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
 
+@UriEndpoint(scheme = "printer", label = "printing")
 public class PrinterEndpoint extends DefaultEndpoint {
     
     public static final String JOB_NAME = "PrinterJobName";
-    
+
+    @UriParam
     private PrinterConfiguration config;
 
     public PrinterEndpoint() {


Mime
View raw message