This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-13870
in repository https://gitbox.apache.org/repos/asf/camel.git

commit d00b92c77ae482826440451debb7c9e41446ab84
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Wed Aug 21 05:14:28 2019 +0200

    CAMEL-13870: Fast property configuration of Camel endpoints. Work in 
progress.
---
 .../camel/component/cmis/CMISSessionFacade.java    | 28 ++++++++++++++++++++++
 .../camel/component/jetty/JettyHttpComponent.java  |  2 +-
 .../camel/component/jetty/JettyHttpEndpoint.java   |  9 ++-----
 .../camel-jetty/src/main/docs/jetty-component.adoc |  4 ++--
 .../camel/component/jetty/CustomFiltersTest.java   |  2 +-
 5 files changed, 34 insertions(+), 11 deletions(-)

diff --git 
a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
 
b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
index 7ce83d7..557304e 100644
--- 
a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
+++ 
b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
@@ -236,6 +236,10 @@ public class CMISSessionFacade {
         return session.createOperationContext();
     }
 
+    public String getUsername() {
+        return username;
+    }
+
     /**
      * Username for the cmis repository
      */
@@ -243,6 +247,10 @@ public class CMISSessionFacade {
         this.username = username;
     }
 
+    public String getPassword() {
+        return password;
+    }
+
     /**
      * Password for the cmis repository
      */
@@ -250,6 +258,10 @@ public class CMISSessionFacade {
         this.password = password;
     }
 
+    public String getRepositoryId() {
+        return repositoryId;
+    }
+
     /**
      * The Id of the repository to use. If not specified the first available 
repository is used
      */
@@ -257,6 +269,10 @@ public class CMISSessionFacade {
         this.repositoryId = repositoryId;
     }
 
+    public boolean isReadContent() {
+        return readContent;
+    }
+
     /**
      * If set to true, the content of document node will be retrieved in 
addition to the properties
      */
@@ -264,6 +280,10 @@ public class CMISSessionFacade {
         this.readContent = readContent;
     }
 
+    public int getReadCount() {
+        return readCount;
+    }
+
     /**
      * Max number of nodes to read
      */
@@ -271,6 +291,10 @@ public class CMISSessionFacade {
         this.readCount = readCount;
     }
 
+    public String getQuery() {
+        return query;
+    }
+
     /**
      * The cmis query to execute against the repository.
      * If not specified, the consumer will retrieve every node from the 
content repository by iterating the content tree recursively
@@ -279,6 +303,10 @@ public class CMISSessionFacade {
         this.query = query;
     }
 
+    public int getPageSize() {
+        return pageSize;
+    }
+
     /**
      * Number of nodes to retrieve per page
      */
diff --git 
a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
 
b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
index b251411..0ae7136 100644
--- 
a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
+++ 
b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
@@ -176,7 +176,7 @@ public abstract class JettyHttpComponent extends 
HttpCommonComponent implements
         Boolean enableMultipartFilter = getAndRemoveParameter(parameters, 
"enableMultipartFilter",
                                                               Boolean.class, 
true);
         Filter multipartFilter = 
resolveAndRemoveReferenceParameter(parameters, "multipartFilterRef", 
Filter.class);
-        List<Filter> filters = 
resolveAndRemoveReferenceListParameter(parameters, "filtersRef", Filter.class);
+        List<Filter> filters = 
resolveAndRemoveReferenceListParameter(parameters, "filters", Filter.class);
         Boolean enableCors = getAndRemoveParameter(parameters, "enableCORS", 
Boolean.class, false);
         HeaderFilterStrategy headerFilterStrategy = 
resolveAndRemoveReferenceParameter(parameters, "headerFilterStrategy", 
HeaderFilterStrategy.class);
         UrlRewrite urlRewrite = resolveAndRemoveReferenceParameter(parameters, 
"urlRewrite", UrlRewrite.class);
diff --git 
a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpEndpoint.java
 
b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpEndpoint.java
index 45d3f03..c7f5f01 100644
--- 
a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpEndpoint.java
+++ 
b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpEndpoint.java
@@ -60,24 +60,19 @@ public abstract class JettyHttpEndpoint extends 
HttpCommonEndpoint {
     @UriParam(label = "consumer",
             description = "If the option is true, Jetty server will setup the 
CrossOriginFilter which supports the CORS out of box.")
     private boolean enableCORS;
-    @UriParam(label = "consumer,advanced", javaType = "java.lang.String",
+    @UriParam(label = "consumer,advanced",
             description = "Specifies a comma-delimited set of Handler 
instances to lookup in your Registry."
             + " These handlers are added to the Jetty servlet context (for 
example, to add security)."
             + " Important: You can not use different handlers with different 
Jetty endpoints using the same port number."
             + " The handlers is associated to the port number. If you need 
different handlers, then use different port numbers.")
     private List<Handler> handlers;
-    @UriParam(label = "consumer,advanced", javaType = "java.lang.String", name 
= "filtersRef",
+    @UriParam(label = "consumer,advanced",
             description = "Allows using a custom filters which is putted into 
a list and can be find in the Registry."
             + " Multiple values can be separated by comma.")
     private List<Filter> filters;
     @UriParam(label = "consumer,advanced", prefix = "filter.", multiValue = 
true,
             description = "Configuration of the filter init parameters. These 
parameters will be applied to the filter list before starting the jetty 
server.")
     private Map<String, String> filterInitParameters;
-
-//    @UriParam(label = "consumer,advanced",
-//            description = "Option to disable throwing the 
HttpOperationFailedException in case of failed responses from the remote 
server."
-//            + " This allows you to get all responses regardless of the HTTP 
status code.")
-
     @UriParam(label = "consumer,advanced",
             description = "Allows using a custom multipart filter. Note: 
setting multipartFilterRef forces the value of enableMultipartFilter to true.")
     private Filter multipartFilter;
diff --git a/components/camel-jetty/src/main/docs/jetty-component.adoc 
b/components/camel-jetty/src/main/docs/jetty-component.adoc
index 296f30c..9c7430e 100644
--- a/components/camel-jetty/src/main/docs/jetty-component.adoc
+++ b/components/camel-jetty/src/main/docs/jetty-component.adoc
@@ -147,8 +147,8 @@ with the following path and query parameters:
 | *exceptionHandler* (consumer) | To let the consumer use a custom 
ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this 
option is not in use. By default the consumer will deal with exceptions, that 
will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
 | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer 
creates an exchange. |  | ExchangePattern
 | *filterInitParameters* (consumer) | Configuration of the filter init 
parameters. These parameters will be applied to the filter list before starting 
the jetty server. |  | Map
-| *filtersRef* (consumer) | Allows using a custom filters which is putted into 
a list and can be find in the Registry. Multiple values can be separated by 
comma. |  | String
-| *handlers* (consumer) | Specifies a comma-delimited set of Handler instances 
to lookup in your Registry. These handlers are added to the Jetty servlet 
context (for example, to add security). Important: You can not use different 
handlers with different Jetty endpoints using the same port number. The 
handlers is associated to the port number. If you need different handlers, then 
use different port numbers. |  | String
+| *filters* (consumer) | Allows using a custom filters which is putted into a 
list and can be find in the Registry. Multiple values can be separated by 
comma. |  | List
+| *handlers* (consumer) | Specifies a comma-delimited set of Handler instances 
to lookup in your Registry. These handlers are added to the Jetty servlet 
context (for example, to add security). Important: You can not use different 
handlers with different Jetty endpoints using the same port number. The 
handlers is associated to the port number. If you need different handlers, then 
use different port numbers. |  | List
 | *multipartFilter* (consumer) | Allows using a custom multipart filter. Note: 
setting multipartFilterRef forces the value of enableMultipartFilter to true. | 
 | Filter
 | *optionsEnabled* (consumer) | Specifies whether to enable HTTP OPTIONS for 
this Servlet consumer. By default OPTIONS is turned off. | false | boolean
 | *traceEnabled* (consumer) | Specifies whether to enable HTTP TRACE for this 
Servlet consumer. By default TRACE is turned off. | false | boolean
diff --git 
a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/CustomFiltersTest.java
 
b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/CustomFiltersTest.java
index 0fafe2b..74e4874 100644
--- 
a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/CustomFiltersTest.java
+++ 
b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/CustomFiltersTest.java
@@ -100,7 +100,7 @@ public class CustomFiltersTest extends BaseJettyTest {
             public void configure() throws Exception {
 
                 // Test the filter list options
-                
from("jetty://http://localhost:{{port}}/testFilters?filtersRef=myFilters&filterInit.keyWord=KEY";).process(new
 Processor() {
+                
from("jetty://http://localhost:{{port}}/testFilters?filters=myFilters&filterInit.keyWord=KEY";).process(new
 Processor() {
                     public void process(Exchange exchange) throws Exception {
                         Message in = exchange.getIn();
                         String request = in.getBody(String.class);

Reply via email to