camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: Added javadoc
Date Mon, 29 Jun 2015 08:26:31 GMT
Repository: camel
Updated Branches:
  refs/heads/master ab563b040 -> 364161d1e


Added javadoc


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

Branch: refs/heads/master
Commit: 364161d1ed90e4be8dc42bf5c54945d54fc335cc
Parents: ab563b0
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Jun 29 10:32:15 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Jun 29 10:32:35 2015 +0200

----------------------------------------------------------------------
 .../rest/RestOperationParamDefinition.java      | 42 ++++++++++++++++++--
 .../RestOperationResponseMsgDefinition.java     | 16 ++++++--
 2 files changed, 51 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/364161d1/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
b/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
index 75bd8f5..ea379d6 100644
--- a/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
@@ -79,11 +79,11 @@ public class RestOperationParamDefinition {
     @Metadata(defaultValue = "")
     private String paramAccess;
 
-    public RestOperationParamDefinition(VerbDefinition verb) {
-        this.verb = verb;
+    public RestOperationParamDefinition() {
     }
 
-    public RestOperationParamDefinition() {
+    public RestOperationParamDefinition(VerbDefinition verb) {
+        this.verb = verb;
     }
 
     public RestParamType getParamType() {
@@ -189,57 +189,91 @@ public class RestOperationParamDefinition {
         this.paramAccess = paramAccess;
     }
 
+    /**
+     * Name of the parameter.
+     * <p/>
+     * This option is mandatory.
+     */
     public RestOperationParamDefinition name(String name) {
         setName(name);
         return this;
     }
 
+    /**
+     * Description of the parameter.
+     */
     public RestOperationParamDefinition description(String name) {
         setDescription(name);
         return this;
     }
 
+    /**
+     * The default value of the parameter.
+     */
     public RestOperationParamDefinition defaultValue(String name) {
         setDefaultValue(name);
         return this;
     }
 
+    /**
+     * Whether the parameter is required
+     */
     public RestOperationParamDefinition required(Boolean required) {
         setRequired(required);
         return this;
     }
 
+    /**
+     * Whether the parameter can be used multiple times
+     */
     public RestOperationParamDefinition allowMultiple(Boolean allowMultiple) {
         setAllowMultiple(allowMultiple);
         return this;
     }
 
+    /**
+     * The data type of the parameter such as string,int
+     */
     public RestOperationParamDefinition dataType(String type) {
         setDataType(type);
         return this;
     }
 
+    /**
+     * Allowed values of the parameter when its an enum type
+     */
     public RestOperationParamDefinition allowableValues(List<String> allowableValues)
{
         setAllowableValues(allowableValues);
         return this;
     }
 
+    /**
+     * Allowed values of the parameter when its an enum type
+     */
     public RestOperationParamDefinition allowableValues(String... allowableValues) {
         setAllowableValues(Arrays.asList(allowableValues));
         return this;
     }
 
-
+    /**
+     * The parameter type such as body, form, header, path, query
+     */
     public RestOperationParamDefinition type(RestParamType type) {
         setParamType(type);
         return this;
     }
 
+    /**
+     * A flag to hide the parameter if set to false
+     */
     public RestOperationParamDefinition paramAccess(String paramAccess) {
         setParamAccess(paramAccess);
         return this;
     }
 
+    /**
+     * Ends the configuration of this parameter
+     */
     public RestDefinition endParam() {
         verb.getParams().add(this);
         return verb.getRest();

http://git-wip-us.apache.org/repos/asf/camel/blob/364161d1/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationResponseMsgDefinition.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationResponseMsgDefinition.java
b/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationResponseMsgDefinition.java
index dc2ce85..ddd08bb 100644
--- a/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationResponseMsgDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationResponseMsgDefinition.java
@@ -49,7 +49,6 @@ public class RestOperationResponseMsgDefinition {
     @Metadata(defaultValue = "")
     private String responseModel;
 
-
     public RestOperationResponseMsgDefinition(VerbDefinition verb) {
         this.verb = verb;
     }
@@ -57,10 +56,10 @@ public class RestOperationResponseMsgDefinition {
     public RestOperationResponseMsgDefinition() {
     }
 
-
     public int getCode() {
         return code != 0 ? code : 200;
     }
+
     /**
      * Sets the Swagger Operation's ResponseMessage code
      */
@@ -90,22 +89,33 @@ public class RestOperationResponseMsgDefinition {
         this.message = message;
     }
 
-
+    /**
+     * The return code
+     */
     public RestOperationResponseMsgDefinition code(int code) {
         setCode(code);
         return this;
     }
 
+    /**
+     * The return message
+     */
     public RestOperationResponseMsgDefinition message(String msg) {
         setMessage(msg);
         return this;
     }
 
+    /**
+     * The response model
+     */
     public RestOperationResponseMsgDefinition responseModel(Class<?> type) {
         setResponseModel(type.getCanonicalName());
         return this;
     }
 
+    /**
+     * Ends the configuration of this response message
+     */
     public RestDefinition endResponseMessage() {
         verb.getResponseMsgs().add(this);
         return verb.getRest();


Mime
View raw message