CAMEL-11021: Add missing docs
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f9d021a5 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f9d021a5 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f9d021a5 Branch: refs/heads/master Commit: f9d021a59e8755d5780fb6f4ab468259254871cc Parents: 6c284f7 Author: Claus Ibsen <davscl...@apache.org> Authored: Fri Apr 7 10:29:48 2017 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Fri Apr 7 10:29:48 2017 +0200 ---------------------------------------------------------------------- .../camel/model/rest/RestBindingDefinition.java | 39 +++++++------- .../apache/camel/model/rest/VerbDefinition.java | 56 ++++++++++---------- 2 files changed, 47 insertions(+), 48 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/f9d021a5/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java b/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java index 1c037d4..17f195e 100644 --- a/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java @@ -244,8 +244,8 @@ public class RestBindingDefinition extends OptionalIdentifiedDefinition<RestBind /** * Adds a default value for the query parameter * - * @param paramName query parameter name. - * @param defaultValue the default value. + * @param paramName query parameter name + * @param defaultValue the default value */ public void addDefaultValue(String paramName, String defaultValue) { if (defaultValues == null) { @@ -262,7 +262,7 @@ public class RestBindingDefinition extends OptionalIdentifiedDefinition<RestBind } /** - * @param component name of the component that this definition will apply to. + * Sets the component name that this definition will apply to */ public void setComponent(String component) { this.component = component; @@ -273,7 +273,7 @@ public class RestBindingDefinition extends OptionalIdentifiedDefinition<RestBind } /** - * @param consumes the HTTP Content Type of the input data, such as {@code application/xml} or {@code application/json}. + * To define the content type what the REST service consumes (accept as input), such as application/xml or application/json */ public void setConsumes(String consumes) { this.consumes = consumes; @@ -284,7 +284,7 @@ public class RestBindingDefinition extends OptionalIdentifiedDefinition<RestBind } /** - * @param produces the HTTP Content Type of the output data, such as {@code application/xml} or {@code application/json}. + * To define the content type what the REST service produces (uses for output), such as application/xml or application/json */ public void setProduces(String produces) { this.produces = produces; @@ -295,9 +295,9 @@ public class RestBindingDefinition extends OptionalIdentifiedDefinition<RestBind } /** - * @param bindingMode the binding mode to use. The default value is {@code RestBindingMode.off}. - * - * @see RestBindingMode + * Sets the binding mode to use. + * <p/> + * The default value is off */ public void setBindingMode(RestBindingMode bindingMode) { this.bindingMode = bindingMode; @@ -309,9 +309,9 @@ public class RestBindingDefinition extends OptionalIdentifiedDefinition<RestBind /** * Sets the class name to use for binding from input to POJO for the incoming data - * - * @param type the canonical name of the class of the input data. Append a {@code []} to the end - * of the canonical name if you want the input to be an array of {@code type}. + * <p/> + * The canonical name of the class of the input data. Append a [] to the end of the canonical name + * if you want the input to be an array type. */ public void setType(String type) { this.type = type; @@ -323,9 +323,9 @@ public class RestBindingDefinition extends OptionalIdentifiedDefinition<RestBind /** * Sets the class name to use for binding from POJO to output for the outgoing data - * - * @param outType the canonical name of the class of the output data. Append a {@code []} to the end - * of the canonical name if you want the output to be an array of {@code outType}. + * <p/> + * The canonical name of the class of the input data. Append a [] to the end of the canonical name + * if you want the input to be an array type. */ public void setOutType(String outType) { this.outType = outType; @@ -336,11 +336,8 @@ public class RestBindingDefinition extends OptionalIdentifiedDefinition<RestBind } /** - * @param skipBindingOnErrorCode set to {@code true} to ignore the specified binding mode on output if there - * is a custom HTTP error code header. This allows to build custom error messages - * that do not bind to json / xml etc, as success messages otherwise will do. - * - * @see VerbDefinition#setBindingMode(RestBindingMode) + * Whether to skip binding on output if there is a custom HTTP error code header. + * This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. */ public void setSkipBindingOnErrorCode(Boolean skipBindingOnErrorCode) { this.skipBindingOnErrorCode = skipBindingOnErrorCode; @@ -351,7 +348,9 @@ public class RestBindingDefinition extends OptionalIdentifiedDefinition<RestBind } /** - * @param enableCORS set to {@code true} to enable CORS headers in the HTTP response. The default value is {@code false}. + * Whether to enable CORS headers in the HTTP response. + * <p/> + * The default value is false. */ public void setEnableCORS(Boolean enableCORS) { this.enableCORS = enableCORS; http://git-wip-us.apache.org/repos/asf/camel/blob/f9d021a5/camel-core/src/main/java/org/apache/camel/model/rest/VerbDefinition.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/VerbDefinition.java b/camel-core/src/main/java/org/apache/camel/model/rest/VerbDefinition.java index 35f66e9..f9c8d3f 100644 --- a/camel-core/src/main/java/org/apache/camel/model/rest/VerbDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/rest/VerbDefinition.java @@ -140,7 +140,7 @@ public class VerbDefinition extends OptionalIdentifiedDefinition<VerbDefinition> } /** - * @param method the HTTP verb name such as {@code get, post, put, patch, delete, head}. + * The HTTP verb such as GET, POST, DELETE, etc. */ public void setMethod(String method) { this.method = method; @@ -151,7 +151,7 @@ public class VerbDefinition extends OptionalIdentifiedDefinition<VerbDefinition> } /** - * @param uri the query path for this REST service, such as {@code /{id}}. + * Uri template of this REST service such as /{id}. */ public void setUri(String uri) { this.uri = uri; @@ -162,8 +162,8 @@ public class VerbDefinition extends OptionalIdentifiedDefinition<VerbDefinition> } /** - * @param consumes the HTTP Content Type of the input data, such as {@code application/xml} or {@code application/json}. - * This option will override what may be configured on a parent level. + * To define the content type what the REST service consumes (accept as input), such as application/xml or application/json. + * This option will override what may be configured on a parent level */ public void setConsumes(String consumes) { this.consumes = consumes; @@ -174,8 +174,8 @@ public class VerbDefinition extends OptionalIdentifiedDefinition<VerbDefinition> } /** - * @param produces the HTTP Content Type of the output data, such as {@code application/xml} or {@code application/json}. - * This option will override what may be configured on a parent level. + * To define the content type what the REST service produces (uses for output), such as application/xml or application/json + * This option will override what may be configured on a parent level */ public void setProduces(String produces) { this.produces = produces; @@ -186,10 +186,10 @@ public class VerbDefinition extends OptionalIdentifiedDefinition<VerbDefinition> } /** - * @param bindingMode the binding mode to use. The default value is {@code RestBindingMode.auto}. - * This option will override what may be configured on a parent level. - * - * @see RestBindingMode + * Sets the binding mode to use. + * This option will override what may be configured on a parent level + * <p/> + * The default value is auto */ public void setBindingMode(RestBindingMode bindingMode) { this.bindingMode = bindingMode; @@ -200,12 +200,9 @@ public class VerbDefinition extends OptionalIdentifiedDefinition<VerbDefinition> } /** - * @param skipBindingOnErrorCode set to {@code true} to ignore the specified binding mode on output if there - * is a custom HTTP error code header. This allows to build custom error messages - * that do not bind to json / xml etc, as success messages otherwise will do. - * This option will override what may be configured on a parent level. - * - * @see VerbDefinition#setBindingMode(RestBindingMode) + * Whether to skip binding on output if there is a custom HTTP error code header. + * This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. + * This option will override what may be configured on a parent level */ public void setSkipBindingOnErrorCode(Boolean skipBindingOnErrorCode) { this.skipBindingOnErrorCode = skipBindingOnErrorCode; @@ -216,8 +213,10 @@ public class VerbDefinition extends OptionalIdentifiedDefinition<VerbDefinition> } /** - * @param enableCORS set to {@code true} to enable CORS headers in the HTTP response. The default value is {@code false}. - * This option will override what may be configured on a parent level. + * Whether to enable CORS headers in the HTTP response. + * This option will override what may be configured on a parent level + * <p/> + * The default value is false. */ public void setEnableCORS(Boolean enableCORS) { this.enableCORS = enableCORS; @@ -230,9 +229,9 @@ public class VerbDefinition extends OptionalIdentifiedDefinition<VerbDefinition> /** * Sets the class name to use for binding from input to POJO for the incoming data * This option will override what may be configured on a parent level. - * - * @param type the canonical name of the class of the input data. Append a {@code []} to the end - * of the canonical name if you want the input to be an array of {@code type}. + * <p/> + * The canonical name of the class of the input data. Append a [] to the end of the canonical name + * if you want the input to be an array type. */ public void setType(String type) { this.type = type; @@ -244,10 +243,10 @@ public class VerbDefinition extends OptionalIdentifiedDefinition<VerbDefinition> /** * Sets the class name to use for binding from POJO to output for the outgoing data - * This option will override what may be configured on a parent level. - * - * @param outType the canonical name of the class of the output data. Append a {@code []} to the end - * of the canonical name if you want the output to be an array of {@code outType}. + * This option will override what may be configured on a parent level + * <p/> + * The canonical name of the class of the input data. Append a [] to the end of the canonical name + * if you want the input to be an array type. */ public void setOutType(String outType) { this.outType = outType; @@ -258,7 +257,7 @@ public class VerbDefinition extends OptionalIdentifiedDefinition<VerbDefinition> } /** - * @param routeId the route id this rest-dsl is using (read-only). + * The route id this rest-dsl is using (read-only) */ public void setRouteId(String routeId) { this.routeId = routeId; @@ -269,8 +268,9 @@ public class VerbDefinition extends OptionalIdentifiedDefinition<VerbDefinition> } /** - * @param apiDocs set to {@code true} to include or exclude the VerbDefinition in API documentation. - * The default value is true. + * Whether to include or exclude the VerbDefinition in API documentation. + * <p/> + * The default value is true. */ public void setApiDocs(Boolean apiDocs) { this.apiDocs = apiDocs;