You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/05/04 14:59:03 UTC
[1/3] camel git commit: Add component documentation.
Repository: camel
Updated Branches:
refs/heads/master 2999a50c6 -> df47d5e98
Add component documentation.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f082aed5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f082aed5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f082aed5
Branch: refs/heads/master
Commit: f082aed561db28c24410e989fb535b65b7a1a31d
Parents: 2999a50
Author: Claus Ibsen <da...@apache.org>
Authored: Mon May 4 14:34:59 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon May 4 14:34:59 2015 +0200
----------------------------------------------------------------------
.../component/geocoder/GeoCoderEndpoint.java | 22 ++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/f082aed5/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderEndpoint.java b/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderEndpoint.java
index 330039c..a4c07d5 100644
--- a/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderEndpoint.java
+++ b/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderEndpoint.java
@@ -30,9 +30,9 @@ import org.apache.camel.spi.UriPath;
@UriEndpoint(scheme = "geocoder", title = "Geocoder", syntax = "geocoder:address:latlng", producerOnly = true, label = "api,location")
public class GeoCoderEndpoint extends DefaultEndpoint {
- @UriPath(description = "The geo address which must prefix with address:")
+ @UriPath
private String address;
- @UriPath(description = "The geo coordinate which must prefix with latng:")
+ @UriPath
private String latlng;
@UriParam(defaultValue = "en")
private String language = "en";
@@ -66,6 +66,9 @@ public class GeoCoderEndpoint extends DefaultEndpoint {
return language;
}
+ /**
+ * The language to use.
+ */
public void setLanguage(String language) {
this.language = language;
}
@@ -74,6 +77,9 @@ public class GeoCoderEndpoint extends DefaultEndpoint {
return address;
}
+ /**
+ * The geo address which should be prefixed with <tt>address:</tt>
+ */
public void setAddress(String address) {
this.address = address;
}
@@ -82,6 +88,9 @@ public class GeoCoderEndpoint extends DefaultEndpoint {
return latlng;
}
+ /**
+ * The geo latitude and longitude which should be prefixed with <tt>latlng:</tt>
+ */
public void setLatlng(String latlng) {
this.latlng = latlng;
}
@@ -90,6 +99,9 @@ public class GeoCoderEndpoint extends DefaultEndpoint {
return headersOnly;
}
+ /**
+ * Whether to only enrich the Exchange with headers, and leave the body as-is.
+ */
public void setHeadersOnly(boolean headersOnly) {
this.headersOnly = headersOnly;
}
@@ -98,6 +110,9 @@ public class GeoCoderEndpoint extends DefaultEndpoint {
return clientId;
}
+ /**
+ * To use google premium with this client id
+ */
public void setClientId(String clientId) {
this.clientId = clientId;
}
@@ -106,6 +121,9 @@ public class GeoCoderEndpoint extends DefaultEndpoint {
return clientKey;
}
+ /**
+ * To use google premium with this client key
+ */
public void setClientKey(String clientKey) {
this.clientKey = clientKey;
}
[2/3] camel git commit: Add component documentation.
Posted by da...@apache.org.
Add component documentation.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4a861b0d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4a861b0d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4a861b0d
Branch: refs/heads/master
Commit: 4a861b0d1047c27b42c30c79f532b2ed80644f3f
Parents: f082aed
Author: Claus Ibsen <da...@apache.org>
Authored: Mon May 4 14:46:05 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon May 4 14:46:05 2015 +0200
----------------------------------------------------------------------
.../camel/component/pdf/PdfConfiguration.java | 58 ++++++++++++++++----
1 file changed, 48 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/4a861b0d/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfConfiguration.java b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfConfiguration.java
index 9b852fa..066d801 100644
--- a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfConfiguration.java
+++ b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfConfiguration.java
@@ -28,7 +28,14 @@ import org.apache.pdfbox.pdmodel.common.PDRectangle;
import org.apache.pdfbox.pdmodel.font.PDFont;
import org.apache.pdfbox.pdmodel.font.PDType1Font;
-import static org.apache.camel.component.pdf.PdfPageSizeConstant.*;
+import static org.apache.camel.component.pdf.PdfPageSizeConstant.PAGE_SIZE_A0;
+import static org.apache.camel.component.pdf.PdfPageSizeConstant.PAGE_SIZE_A1;
+import static org.apache.camel.component.pdf.PdfPageSizeConstant.PAGE_SIZE_A2;
+import static org.apache.camel.component.pdf.PdfPageSizeConstant.PAGE_SIZE_A3;
+import static org.apache.camel.component.pdf.PdfPageSizeConstant.PAGE_SIZE_A4;
+import static org.apache.camel.component.pdf.PdfPageSizeConstant.PAGE_SIZE_A5;
+import static org.apache.camel.component.pdf.PdfPageSizeConstant.PAGE_SIZE_A6;
+import static org.apache.camel.component.pdf.PdfPageSizeConstant.PAGE_SIZE_LETTER;
/**
* Handles pdf component configuration values.
@@ -48,23 +55,24 @@ public class PdfConfiguration {
PAGE_MAP.put(PAGE_SIZE_LETTER, PDPage.PAGE_SIZE_LETTER);
}
- @UriPath(description = "Operation type") @Metadata(required = "true")
+ @UriPath(description = "Operation type")
+ @Metadata(required = "true")
private PdfOperation operation;
- @UriParam
+ @UriParam(defaultValue = "20")
private int marginTop = 20;
- @UriParam
+ @UriParam(defaultValue = "20")
private int marginBottom = 20;
- @UriParam
+ @UriParam(defaultValue = "20")
private int marginLeft = 20;
- @UriParam
+ @UriParam(defaultValue = "40")
private int marginRight = 40;
- @UriParam
+ @UriParam(defaultValue = "14")
private float fontSize = 14;
- @UriParam
+ @UriParam(defaultValue = "PAGE_SIZE_A4", enums = "PAGE_SIZE_A0,PAGE_SIZE_A1,PAGE_SIZE_A2,PAGE_SIZE_A3,PAGE_SIZE_A4,PAGE_SIZE_A5,PAGE_SIZE_A6,PAGE_SIZE_LETTER")
private PDRectangle pageSize = PDPage.PAGE_SIZE_A4;
- @UriParam
+ @UriParam(defaultValue = "Helvetica")
private PDFont font = PDType1Font.HELVETICA;
- @UriParam
+ @UriParam(defaultValue = "lineTermination")
private TextProcessingFactory textProcessingFactory = TextProcessingFactory.lineTermination;
public PdfOperation getOperation() {
@@ -83,6 +91,9 @@ public class PdfConfiguration {
return marginTop;
}
+ /**
+ * Margin top in pixels
+ */
public void setMarginTop(int marginTop) {
this.marginTop = marginTop;
}
@@ -91,6 +102,9 @@ public class PdfConfiguration {
return marginBottom;
}
+ /**
+ * Margin bottom in pixels
+ */
public void setMarginBottom(int marginBottom) {
this.marginBottom = marginBottom;
}
@@ -99,6 +113,9 @@ public class PdfConfiguration {
return marginLeft;
}
+ /**
+ * Margin left in pixels
+ */
public void setMarginLeft(int marginLeft) {
this.marginLeft = marginLeft;
}
@@ -107,6 +124,9 @@ public class PdfConfiguration {
return marginRight;
}
+ /**
+ * Margin right in pixels
+ */
public void setMarginRight(int marginRight) {
this.marginRight = marginRight;
}
@@ -115,6 +135,9 @@ public class PdfConfiguration {
return fontSize;
}
+ /**
+ * Font size in pixels
+ */
public void setFontSize(float fontSize) {
this.fontSize = fontSize;
}
@@ -123,6 +146,9 @@ public class PdfConfiguration {
return pageSize;
}
+ /**
+ * Page size
+ */
public void setPageSize(PDRectangle pageSize) {
this.pageSize = pageSize;
}
@@ -135,6 +161,9 @@ public class PdfConfiguration {
return font;
}
+ /**
+ * Font
+ */
public void setFont(PDFont font) {
this.font = font;
}
@@ -147,6 +176,15 @@ public class PdfConfiguration {
return textProcessingFactory;
}
+ /**
+ * Text processing to use.
+ * <ul>
+ * <li>autoFormatting: Text is getting sliced by words, then max amount of words that fits in the line will
+ * be written into pdf document. With this strategy all words that doesn't fit in the line will be moved to the new line.</li>
+ * <li>lineTermination: Builds set of classes for line-termination writing strategy. Text getting sliced by line termination symbol
+ * and then it will be written regardless it fits in the line or not.</li>
+ * </ul>
+ */
public void setTextProcessingFactory(TextProcessingFactory textProcessingFactory) {
this.textProcessingFactory = textProcessingFactory;
}
[3/3] camel git commit: Add component documentation.
Posted by da...@apache.org.
Add component documentation.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/df47d5e9
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/df47d5e9
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/df47d5e9
Branch: refs/heads/master
Commit: df47d5e9824929b357b2a50968038c983cf70ae7
Parents: 4a861b0
Author: Claus Ibsen <da...@apache.org>
Authored: Mon May 4 15:00:24 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon May 4 15:00:24 2015 +0200
----------------------------------------------------------------------
.../component/xmlrpc/XmlRpcConfiguration.java | 44 ++++++++++++++++++++
.../camel/component/xmlrpc/XmlRpcEndpoint.java | 11 ++++-
2 files changed, 54 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/df47d5e9/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcConfiguration.java b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcConfiguration.java
index 40c93c6..28ec98c 100644
--- a/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcConfiguration.java
+++ b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcConfiguration.java
@@ -58,6 +58,9 @@ public class XmlRpcConfiguration {
return enabledForExtensions;
}
+ /**
+ * Whether extensions are enabled. By default, the client or server is strictly compliant to the XML-RPC specification and extensions are disabled.
+ */
public void setEnabledForExtensions(boolean enabledForExtensions) {
this.enabledForExtensions = enabledForExtensions;
}
@@ -66,6 +69,9 @@ public class XmlRpcConfiguration {
return contentLengthOptional;
}
+ /**
+ * Whether a "Content-Length" header may be omitted. The XML-RPC specification demands, that such a header be present.
+ */
public void setContentLengthOptional(boolean contentLengthOptional) {
this.contentLengthOptional = contentLengthOptional;
}
@@ -74,6 +80,9 @@ public class XmlRpcConfiguration {
return basicEncoding;
}
+ /**
+ * Sets the encoding for basic authentication, null means UTF-8 is chosen.
+ */
public void setBasicEncoding(String basicEncoding) {
this.basicEncoding = basicEncoding;
}
@@ -82,6 +91,9 @@ public class XmlRpcConfiguration {
return encoding;
}
+ /**
+ * Sets the requests encoding, null means UTF-8 is chosen.
+ */
public void setEncoding(String encoding) {
this.encoding = encoding;
}
@@ -90,6 +102,10 @@ public class XmlRpcConfiguration {
return timeZone;
}
+ /**
+ * The timezone, which is used to interpret date/time.
+ * Defaults to {@link TimeZone#getDefault()}.
+ */
public void setTimeZone(TimeZone timeZone) {
this.timeZone = timeZone;
}
@@ -98,6 +114,9 @@ public class XmlRpcConfiguration {
return gzipCompressing;
}
+ /**
+ * Whether gzip compression is being used for transmitting the request.
+ */
public void setGzipCompressing(boolean gzipCompressing) {
this.gzipCompressing = gzipCompressing;
}
@@ -106,6 +125,9 @@ public class XmlRpcConfiguration {
return gzipRequesting;
}
+ /**
+ * Whether gzip compression is being used for transmitting the request.
+ */
public void setGzipRequesting(boolean gzipRequesting) {
this.gzipRequesting = gzipRequesting;
}
@@ -114,6 +136,9 @@ public class XmlRpcConfiguration {
return basicUserName;
}
+ /**
+ * The user name for basic authentication.
+ */
public void setBasicUserName(String basicUserName) {
this.basicUserName = basicUserName;
}
@@ -122,6 +147,9 @@ public class XmlRpcConfiguration {
return basicPassword;
}
+ /**
+ * The password for basic authentication.
+ */
public void setBasicPassword(String basicPassword) {
this.basicPassword = basicPassword;
}
@@ -130,6 +158,9 @@ public class XmlRpcConfiguration {
return connectionTimeout;
}
+ /**
+ * Set the connection timeout in milliseconds, 0 is to disable it
+ */
public void setConnectionTimeout(int connectionTimeout) {
this.connectionTimeout = connectionTimeout;
}
@@ -138,6 +169,9 @@ public class XmlRpcConfiguration {
return replyTimeout;
}
+ /**
+ * Set the reply timeout in milliseconds, 0 is to disable it.
+ */
public void setReplyTimeout(int replyTimeout) {
this.replyTimeout = replyTimeout;
}
@@ -146,6 +180,10 @@ public class XmlRpcConfiguration {
return enabledForExceptions;
}
+ /**
+ * Whether the response should contain a "faultCause" element in case of errors.
+ * The "faultCause" is an exception, which the server has trapped and written into a byte stream as a serializable object.
+ */
public void setEnabledForExceptions(boolean enabledForExceptions) {
this.enabledForExceptions = enabledForExceptions;
}
@@ -154,6 +192,9 @@ public class XmlRpcConfiguration {
return xmlRpcServer;
}
+ /**
+ * To use a custom XmlRpcRequestProcessor as server.
+ */
public void setXmlRpcServer(XmlRpcRequestProcessor xmlRpcServer) {
this.xmlRpcServer = xmlRpcServer;
}
@@ -162,6 +203,9 @@ public class XmlRpcConfiguration {
return userAgent;
}
+ /**
+ * The http user agent header to set when doing xmlrpc requests
+ */
public void setUserAgent(String userAgent) {
this.userAgent = userAgent;
}
http://git-wip-us.apache.org/repos/asf/camel/blob/df47d5e9/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcEndpoint.java b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcEndpoint.java
index 6868a39..0576d0f 100644
--- a/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcEndpoint.java
+++ b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcEndpoint.java
@@ -104,10 +104,16 @@ public class XmlRpcEndpoint extends DefaultEndpoint {
return clientConfigurer;
}
+ /**
+ * To use a custom XmlRpcClientConfigurer to configure the client
+ */
public void setClientConfigurer(XmlRpcClientConfigurer configurer) {
this.clientConfigurer = configurer;
}
-
+
+ /**
+ * To use the given XmlRpcClientConfigImpl as configuration for the client.
+ */
public void setClientConfig(XmlRpcClientConfigImpl config) {
this.clientConfig = config;
}
@@ -120,6 +126,9 @@ public class XmlRpcEndpoint extends DefaultEndpoint {
return defaultMethodName;
}
+ /**
+ * The method name which would be used for the xmlrpc requests by default, if the Message header CamelXmlRpcMethodName is not set.
+ */
public void setDefaultMethodName(String defaultMethodName) {
this.defaultMethodName = defaultMethodName;
}