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
The following commit(s) were added to refs/heads/CAMEL-13870 by this push:
new 1958631 CAMEL-13870: Fast property configuration of Camel endpoints.
Work in progress.
1958631 is described below
commit 19586315ec731543344991fccaaf5c70b2e0fd90
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Aug 21 09:30:51 2019 +0200
CAMEL-13870: Fast property configuration of Camel endpoints. Work in
progress.
---
.../component/olingo2/Olingo2Configuration.java | 2 +-
.../camel/component/olingo2/Olingo2Endpoint.java | 2 +-
.../component/olingo4/Olingo4Configuration.java | 2 +-
.../camel/component/olingo4/Olingo4Endpoint.java | 2 +-
.../component/optaplanner/OptaPlannerEndpoint.java | 20 ++++++++++++++------
.../camel-pubnub/src/main/docs/pubnub-component.adoc | 2 +-
.../camel/component/pubnub/PubNubConfiguration.java | 4 ++--
.../camel/component/pubnub/PubNubConsumer.java | 2 +-
.../camel-pulsar/src/main/docs/pulsar-component.adoc | 2 +-
.../pulsar/configuration/PulsarConfiguration.java | 18 +++++++++---------
.../src/main/docs/restlet-component.adoc | 2 +-
.../camel/component/restlet/RestletComponent.java | 6 +++---
.../camel/component/restlet/RestletEndpoint.java | 11 ++++++-----
.../component/salesforce/SalesforceConsumer.java | 2 +-
.../component/salesforce/SalesforceEndpoint.java | 8 ++++----
.../salesforce/SalesforceEndpointConfig.java | 2 +-
.../processor/AbstractSalesforceProcessor.java | 2 +-
.../src/main/docs/servicenow-component.adoc | 6 +++---
.../servicenow/ServiceNowConfiguration.java | 14 +++++++++++---
.../endpoint/dsl/PubNubEndpointBuilderFactory.java | 6 +++---
.../endpoint/dsl/PulsarEndpointBuilderFactory.java | 10 ++--------
.../endpoint/dsl/RestletEndpointBuilderFactory.java | 20 ++------------------
22 files changed, 70 insertions(+), 75 deletions(-)
diff --git
a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Configuration.java
b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Configuration.java
index 28eae8e..9e7fbf2 100644
---
a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Configuration.java
+++
b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Configuration.java
@@ -191,7 +191,7 @@ public class Olingo2Configuration {
/**
* Filter flag for filtering out already seen results
*/
- public boolean getFilterAlreadySeen() {
+ public boolean isFilterAlreadySeen() {
return filterAlreadySeen;
}
diff --git
a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
index f6ec580..a0dd86a 100644
---
a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
+++
b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
@@ -172,7 +172,7 @@ public class Olingo2Endpoint extends
AbstractApiEndpoint<Olingo2ApiName, Olingo2
properties.put(EDM_PROPERTY, apiProxy.getEdm());
// handle filterAlreadySeen property
- properties.put(FILTER_ALREADY_SEEN,
configuration.getFilterAlreadySeen());
+ properties.put(FILTER_ALREADY_SEEN,
configuration.isFilterAlreadySeen());
// handle keyPredicate
final String keyPredicate = (String)
properties.get(KEY_PREDICATE_PROPERTY);
diff --git
a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Configuration.java
b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Configuration.java
index 8938816..9306bbf 100644
---
a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Configuration.java
+++
b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Configuration.java
@@ -190,7 +190,7 @@ public class Olingo4Configuration {
/**
* Filter flag for filtering out already seen results
*/
- public boolean getFilterAlreadySeen() {
+ public boolean isFilterAlreadySeen() {
return filterAlreadySeen;
}
diff --git
a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
index 8c4cc2b..8046695 100644
---
a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
+++
b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
@@ -172,7 +172,7 @@ public class Olingo4Endpoint extends
AbstractApiEndpoint<Olingo4ApiName, Olingo4
properties.put(EDM_PROPERTY, apiProxy.getEdm(endpointHttpHeaders));
// handle filterAlreadySeen property
- properties.put(FILTER_ALREADY_SEEN,
configuration.getFilterAlreadySeen());
+ properties.put(FILTER_ALREADY_SEEN,
configuration.isFilterAlreadySeen());
// handle keyPredicate
final String keyPredicate =
(String)properties.get(KEY_PREDICATE_PROPERTY);
diff --git
a/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java
b/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java
index 876ed29..aed9ee5 100644
---
a/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java
+++
b/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java
@@ -36,18 +36,18 @@ import org.optaplanner.core.api.solver.SolverFactory;
public class OptaPlannerEndpoint extends DefaultEndpoint {
private static final Map<String, Solver<Object>> SOLVERS = new HashMap<>();
- @UriParam
- private OptaPlannerConfiguration configuration;
private SolverFactory<Object> solverFactory;
- public OptaPlannerEndpoint() {
- }
+ @UriParam
+ private OptaPlannerConfiguration configuration;
public OptaPlannerEndpoint(String uri, Component component,
OptaPlannerConfiguration configuration) {
super(uri, component);
this.configuration = configuration;
- ClassLoader classLoader =
getCamelContext().getApplicationContextClassLoader();
- solverFactory =
SolverFactory.createFromXmlResource(configuration.getConfigFile(), classLoader);
+ }
+
+ public OptaPlannerConfiguration getConfiguration() {
+ return configuration;
}
protected Solver<Object> getOrCreateSolver(String solverId) throws
Exception {
@@ -82,6 +82,14 @@ public class OptaPlannerEndpoint extends DefaultEndpoint {
}
@Override
+ protected void doStart() throws Exception {
+ super.doStart();
+
+ ClassLoader classLoader =
getCamelContext().getApplicationContextClassLoader();
+ solverFactory =
SolverFactory.createFromXmlResource(configuration.getConfigFile(), classLoader);
+ }
+
+ @Override
protected void doStop() throws Exception {
synchronized (SOLVERS) {
for (Solver<Object> solver : SOLVERS.values()) {
diff --git a/components/camel-pubnub/src/main/docs/pubnub-component.adoc
b/components/camel-pubnub/src/main/docs/pubnub-component.adoc
index 06db5b9..57c6b90 100644
--- a/components/camel-pubnub/src/main/docs/pubnub-component.adoc
+++ b/components/camel-pubnub/src/main/docs/pubnub-component.adoc
@@ -92,7 +92,7 @@ with the following path and query parameters:
| *pubnub* (advanced) | Reference to a Pubnub client in the registry. | |
PubNub
| *synchronous* (advanced) | Sets whether synchronous processing should be
strictly used, or Camel is allowed to use asynchronous processing (if
supported). | false | boolean
| *authKey* (security) | If Access Manager is utilized, client will use this
authKey in all restricted requests. | | String
-| *cipherKey* (security) | If cipher is passed, all communicatons to/from
PubNub will be encrypted. | | String
+| *cipherKey* (security) | If cipher is passed, all communications to/from
PubNub will be encrypted. | | String
| *publishKey* (security) | The publish key obtained from your PubNub account.
Required when publishing messages. | | String
| *secretKey* (security) | The secret key used for message signing. | | String
| *secure* (security) | Use SSL for secure transmission. | true | boolean
diff --git
a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConfiguration.java
b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConfiguration.java
index 504d1f6..47f583d 100644
---
a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConfiguration.java
+++
b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConfiguration.java
@@ -100,7 +100,7 @@ public class PubNubConfiguration {
}
/**
- * If cipher is passed, all communicatons to/from PubNub will be encrypted.
+ * If cipher is passed, all communications to/from PubNub will be
encrypted.
*/
public String getCipherKey() {
return cipherKey;
@@ -170,7 +170,7 @@ public class PubNubConfiguration {
this.withPresence = withPresence;
}
- public boolean withPresence() {
+ public boolean isWithPresence() {
return withPresence;
}
diff --git
a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConsumer.java
b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConsumer.java
index 9a8940f..2688caa 100644
---
a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConsumer.java
+++
b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConsumer.java
@@ -48,7 +48,7 @@ public class PubNubConsumer extends DefaultConsumer {
private void initCommunication() throws Exception {
endpoint.getPubnub().addListener(new PubNubCallback());
- if (pubNubConfiguration.withPresence()) {
+ if (pubNubConfiguration.isWithPresence()) {
endpoint.getPubnub().subscribe().channels(Arrays.asList(pubNubConfiguration.getChannel())).withPresence().execute();
} else {
endpoint.getPubnub().subscribe().channels(Arrays.asList(pubNubConfiguration.getChannel())).execute();
diff --git a/components/camel-pulsar/src/main/docs/pulsar-component.adoc
b/components/camel-pulsar/src/main/docs/pulsar-component.adoc
index 7b929f9..f8c82ad 100644
--- a/components/camel-pulsar/src/main/docs/pulsar-component.adoc
+++ b/components/camel-pulsar/src/main/docs/pulsar-component.adoc
@@ -91,7 +91,7 @@ with the following path and query parameters:
| *batchingMaxMessages* (producer) | Set the maximum number of messages
permitted in a batch. Default 1,000. | 1000 | int
| *batchingMaxPublishDelay Micros* (producer) | Set the time period within
which the messages sent will be batched if batch messages are enabled. If set
to a non zero value, messages will be queued until either: this time interval
expires the max number of messages in a batch is reached Default is 1ms. | 1000
| long
| *blockIfQueueFull* (producer) | Set whether the send and asyncSend
operations should block when the outgoing message queue is full. If set to
false, send operations will immediately fail with ProducerQueueIsFullError when
there is no space left in the pending queue. Default is false. | false | boolean
-| *compressionType* (producer) | Set the compression type for the producer.
Supported compression types are: NONE: No compression LZ4: Compress with LZ4
algorithm. Faster but lower compression than ZLib ZLI: Standard ZLib
compression Default is NONE | NONE | CompressionType
+| *compressionType* (producer) | Set the compression type for the producer. |
NONE | CompressionType
| *initialSequenceId* (producer) | Set the baseline for the sequence ids for
messages published by the producer. First message will be using
(initialSequenceId 1) as its sequence id and subsequent messages will be
assigned incremental sequence ids, if not otherwise specified. | -1 | long
| *lazyStartProducer* (producer) | Whether the producer should be started lazy
(on the first message). By starting lazy you can use this to allow CamelContext
and routes to startup in situations where a producer may otherwise fail during
starting and cause the route to fail being started. By deferring this startup
to be lazy then the startup failure can be handled during routing messages via
Camel's routing error handlers. Beware that when the first message is processed
then creating and [...]
| *maxPendingMessages* (producer) | Set the max size of the queue holding the
messages pending to receive an acknowledgment from the broker. Default is 1000.
| 1000 | int
diff --git
a/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/configuration/PulsarConfiguration.java
b/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/configuration/PulsarConfiguration.java
index 388460c..223c124 100644
---
a/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/configuration/PulsarConfiguration.java
+++
b/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/configuration/PulsarConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.pulsar.configuration;
import java.util.concurrent.TimeUnit;
+import org.apache.camel.component.pulsar.PulsarMessageReceipt;
import org.apache.camel.component.pulsar.utils.consumers.SubscriptionType;
import org.apache.camel.spi.UriParam;
import org.apache.camel.spi.UriParams;
@@ -66,7 +67,7 @@ public class PulsarConfiguration {
private boolean batchingEnabled = true;
@UriParam(label = "producer", description = "The first message published
will have a sequence Id of initialSequenceId 1.", defaultValue = "-1")
private long initialSequenceId = -1;
- @UriParam(label = "producer", description = "Compression type to use,
defaults to NONE from [NONE, LZ4, ZLIB]", defaultValue = "NONE")
+ @UriParam(label = "producer", description = "Compression type to use",
defaultValue = "NONE")
private CompressionType compressionType = CompressionType.NONE;
public String getSubscriptionName() {
@@ -288,20 +289,19 @@ public class PulsarConfiguration {
}
/**
- *
* Set the compression type for the producer.
- * Supported compression types are:
- * <ul>
- * <li>NONE: No compression</li>
- * <li>LZ4: Compress with LZ4 algorithm. Faster but lower compression
than ZLib</li>
- * <li>ZLI: Standard ZLib compression</li>
- * </ul>
- * Default is NONE
*/
public void setCompressionType(String compressionType) {
this.compressionType =
CompressionType.valueOf(compressionType.toUpperCase());
}
+ /**
+ * Set the compression type for the producer.
+ */
+ public void setCompressionType(CompressionType compressionType) {
+ this.compressionType = compressionType;
+ }
+
public CompressionType getCompressionType() {
return compressionType;
}
diff --git a/components/camel-restlet/src/main/docs/restlet-component.adoc
b/components/camel-restlet/src/main/docs/restlet-component.adoc
index 3e7ca83..7f595c0 100644
--- a/components/camel-restlet/src/main/docs/restlet-component.adoc
+++ b/components/camel-restlet/src/main/docs/restlet-component.adoc
@@ -124,7 +124,7 @@ with the following path and query parameters:
| Name | Description | Default | Type
| *restletMethod* (common) | On a producer endpoint, specifies the request
method to use. On a consumer endpoint, specifies that the endpoint consumes
only restletMethod requests. | GET | Method
| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the
Camel routing Error Handler, which mean any exceptions occurred while the
consumer is trying to pickup incoming messages, or the likes, will now be
processed as a message and handled by the routing Error Handler. By default the
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with
exceptions, that will be logged at WARN or ERROR level and ignored. | false |
boolean
-| *restletMethods* (consumer) | Specify one or more methods separated by
commas (e.g. restletMethods=post,put) to be serviced by a restlet consumer
endpoint. If both restletMethod and restletMethods options are specified, the
restletMethod setting is ignored. The possible methods are:
ALL,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE | | String
+| *restletMethods* (consumer) | Specify one or more methods separated by
commas (e.g. restletMethods=post,put) to be serviced by a restlet consumer
endpoint. If both restletMethod and restletMethods options are specified, the
restletMethod setting is ignored. The possible methods are:
ALL,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE. Multiple methods can
be separated by comma. | | String
| *disableStreamCache* (consumer) | Determines whether or not the raw input
stream from Restlet is cached or not (Camel will read the stream into a in
memory/overflow to file, Stream caching) cache. By default Camel will cache the
Restlet input stream to support reading it multiple times to ensure Camel can
retrieve all data from the stream. However you can set this option to true when
you for example need to access the raw stream, such as streaming it directly to
a file or other persist [...]
| *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
diff --git
a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java
index ebcbfe2..2b66257 100644
---
a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java
+++
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java
@@ -157,7 +157,7 @@ public class RestletComponent extends DefaultComponent
implements RestConsumerFa
setEndpointHeaderFilterStrategy(result);
setProperties(result, parameters);
if (restletMethods != null) {
-
result.setRestletMethods(RestletConverter.toMethods(restletMethods));
+ result.setRestletMethods(restletMethods);
} else {
result.setRestletMethod(RestletConverter.toMethod(restletMethod));
}
@@ -272,7 +272,7 @@ public class RestletComponent extends DefaultComponent
implements RestConsumerFa
List<Method> methods = new ArrayList<>();
Collections.addAll(methods, Method.OPTIONS);
if (endpoint.getRestletMethods() != null) {
- Collections.addAll(methods, endpoint.getRestletMethods());
+ Collections.addAll(methods,
RestletConverter.toMethods(endpoint.getRestletMethods()));
} else {
Collections.addAll(methods, endpoint.getRestletMethod());
}
@@ -400,7 +400,7 @@ public class RestletComponent extends DefaultComponent
implements RestConsumerFa
List<Method> methods = new ArrayList<>();
Collections.addAll(methods, Method.OPTIONS);
if (endpoint.getRestletMethods() != null) {
- Collections.addAll(methods, endpoint.getRestletMethods());
+ Collections.addAll(methods,
RestletConverter.toMethods(endpoint.getRestletMethods()));
} else {
Collections.addAll(methods, endpoint.getRestletMethod());
}
diff --git
a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java
index 612732d..d33ef05 100644
---
a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java
+++
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java
@@ -63,8 +63,8 @@ public class RestletEndpoint extends DefaultEndpoint
implements AsyncEndpoint, H
private int connectTimeout = DEFAULT_CONNECT_TIMEOUT;
@UriParam(defaultValue = "GET", enums =
"ALL,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE")
private Method restletMethod = Method.GET;
- @UriParam(label = "consumer", javaType = "java.lang.String")
- private Method[] restletMethods;
+ @UriParam(label = "consumer")
+ private String restletMethods;
@UriParam(label = "security")
private Map<String, String> restletRealm;
@UriParam(label = "advanced")
@@ -254,13 +254,14 @@ public class RestletEndpoint extends DefaultEndpoint
implements AsyncEndpoint, H
/**
* Specify one or more methods separated by commas (e.g.
restletMethods=post,put) to be serviced by a restlet consumer endpoint.
* If both restletMethod and restletMethods options are specified, the
restletMethod setting is ignored.
- * The possible methods are:
ALL,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE
+ * The possible methods are:
ALL,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE.
+ * Multiple methods can be separated by comma.
*/
- public void setRestletMethods(Method[] restletMethods) {
+ public void setRestletMethods(String restletMethods) {
this.restletMethods = restletMethods;
}
- public Method[] getRestletMethods() {
+ public String getRestletMethods() {
return restletMethods;
}
diff --git
a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceConsumer.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceConsumer.java
index 3dac00f..df8bcab 100644
---
a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceConsumer.java
+++
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceConsumer.java
@@ -96,7 +96,7 @@ public class SalesforceConsumer extends DefaultConsumer {
messageKind = MessageKind.fromTopicName(topicName);
- rawPayload = endpoint.getConfiguration().getRawPayload();
+ rawPayload = endpoint.getConfiguration().isRawPayload();
// get sObjectClass to convert to
final String sObjectName =
endpoint.getConfiguration().getSObjectName();
diff --git
a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceEndpoint.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceEndpoint.java
index d207a16..163efce 100644
---
a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceEndpoint.java
+++
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceEndpoint.java
@@ -45,16 +45,16 @@ public class SalesforceEndpoint extends DefaultEndpoint {
@UriPath(label = "consumer", description = "The name of the topic/channel
to use")
private final String topicName;
@UriParam
- private final SalesforceEndpointConfig config;
+ private final SalesforceEndpointConfig configuration;
@UriParam(label = "consumer", description = "The replayId value to use
when subscribing")
private Long replayId;
public SalesforceEndpoint(String uri, SalesforceComponent
salesforceComponent,
- SalesforceEndpointConfig config, OperationName
operationName, String topicName) {
+ SalesforceEndpointConfig configuration,
OperationName operationName, String topicName) {
super(uri, salesforceComponent);
- this.config = config;
+ this.configuration = configuration;
this.operationName = operationName;
this.topicName = topicName;
}
@@ -101,7 +101,7 @@ public class SalesforceEndpoint extends DefaultEndpoint {
}
public SalesforceEndpointConfig getConfiguration() {
- return config;
+ return configuration;
}
public OperationName getOperationName() {
diff --git
a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceEndpointConfig.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceEndpointConfig.java
index 996d701..7331c0d 100644
---
a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceEndpointConfig.java
+++
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceEndpointConfig.java
@@ -221,7 +221,7 @@ public class SalesforceEndpointConfig implements Cloneable {
this.format = format;
}
- public boolean getRawPayload() {
+ public boolean isRawPayload() {
return rawPayload;
}
diff --git
a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/AbstractSalesforceProcessor.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/AbstractSalesforceProcessor.java
index 138120d..d6bd95b 100644
---
a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/AbstractSalesforceProcessor.java
+++
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/AbstractSalesforceProcessor.java
@@ -56,7 +56,7 @@ public abstract class AbstractSalesforceProcessor implements
SalesforceProcessor
final SalesforceComponent component = endpoint.getComponent();
session = component.getSession();
httpClient = endpoint.getConfiguration().getHttpClient();
- rawPayload = endpoint.getConfiguration().getRawPayload();
+ rawPayload = endpoint.getConfiguration().isRawPayload();
}
@Override
diff --git
a/components/camel-servicenow/camel-servicenow-component/src/main/docs/servicenow-component.adoc
b/components/camel-servicenow/camel-servicenow-component/src/main/docs/servicenow-component.adoc
index 8e3a4bf..daa1d49 100644
---
a/components/camel-servicenow/camel-servicenow-component/src/main/docs/servicenow-component.adoc
+++
b/components/camel-servicenow/camel-servicenow-component/src/main/docs/servicenow-component.adoc
@@ -93,12 +93,12 @@ with the following path and query parameters:
| *inputDisplayValue* (producer) | True to set raw value of input fields
(default: false) | | Boolean
| *key* (producer) | Set this parameter to true to return only scorecards for
key indicators. | | Boolean
| *lazyStartProducer* (producer) | Whether the producer should be started lazy
(on the first message). By starting lazy you can use this to allow CamelContext
and routes to startup in situations where a producer may otherwise fail during
starting and cause the route to fail being started. By deferring this startup
to be lazy then the startup failure can be handled during routing messages via
Camel's routing error handlers. Beware that when the first message is processed
then creating and [...]
-| *models* (producer) | Defines both request and response models | | String
+| *models* (producer) | Defines both request and response models | | Map
| *perPage* (producer) | Enter the maximum number of scorecards each query can
return. By default this value is 10, and the maximum is 100. | 10 | Integer
| *release* (producer) | The ServiceNow release to target, default to Helsinki
See \https://docs.servicenow.com | HELSINKI | ServiceNowRelease
-| *requestModels* (producer) | Defines the request model | | String
+| *requestModels* (producer) | Defines the request model | | Map
| *resource* (producer) | The default resource, can be overridden by header
CamelServiceNowResource | | String
-| *responseModels* (producer) | Defines the response model | | String
+| *responseModels* (producer) | Defines the response model | | Map
| *sortBy* (producer) | Specify the value to use when sorting results. By
default, queries sort records by value. | | String
| *sortDir* (producer) | Specify the sort direction, ascending or descending.
By default, queries sort records in descending order. Use sysparm_sortdir=asc
to sort in ascending order. | | String
| *suppressAutoSysField* (producer) | True to suppress auto generation of
system fields (default: false) | | Boolean
diff --git
a/components/camel-servicenow/camel-servicenow-component/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java
b/components/camel-servicenow/camel-servicenow-component/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java
index 2b966d3..9419716 100644
---
a/components/camel-servicenow/camel-servicenow-component/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java
+++
b/components/camel-servicenow/camel-servicenow-component/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java
@@ -104,11 +104,11 @@ public class ServiceNowConfiguration implements Cloneable
{
private String displayValue = "false";
@UriParam
private Boolean inputDisplayValue = false;
- @UriParam(prefix = "model.", multiValue = true, javaType =
"java.lang.String", description = "Defines both request and response models")
+ @UriParam(prefix = "model.", multiValue = true, description = "Defines
both request and response models")
private transient Map<String, Class<?>> models; // field not in use as its
a shortcut for both requestModels/responseModels
- @UriParam(prefix = "request-model.", multiValue = true, javaType =
"java.lang.String")
+ @UriParam(prefix = "request-model.", multiValue = true)
private Map<String, Class<?>> requestModels;
- @UriParam(prefix = "response-model.", multiValue = true, javaType =
"java.lang.String")
+ @UriParam(prefix = "response-model.", multiValue = true)
private Map<String, Class<?>> responseModels;
@UriParam(label = "advanced")
private ObjectMapper mapper;
@@ -666,6 +666,10 @@ public class ServiceNowConfiguration implements Cloneable {
setResponseModels(models);
}
+ public Map<String, Class<?>> getModels() {
+ return models;
+ }
+
public void addModel(String name, Class<?> type) {
addRequestModel(name, type);
addResponseModel(name, type);
@@ -687,6 +691,10 @@ public class ServiceNowConfiguration implements Cloneable {
this.requestModels.putAll(models);
}
+ public Map<String, Class<?>> getResponseModels() {
+ return responseModels;
+ }
+
public void addRequestModel(String name, Class<?> type) {
if (this.requestModels == null) {
this.requestModels = new HashMap<>();
diff --git
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/PubNubEndpointBuilderFactory.java
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/PubNubEndpointBuilderFactory.java
index e3c80d3..2a564f9 100644
---
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/PubNubEndpointBuilderFactory.java
+++
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/PubNubEndpointBuilderFactory.java
@@ -125,7 +125,7 @@ public interface PubNubEndpointBuilderFactory {
return this;
}
/**
- * If cipher is passed, all communicatons to/from PubNub will be
+ * If cipher is passed, all communications to/from PubNub will be
* encrypted.
*
* The option is a: <code>java.lang.String</code> type.
@@ -434,7 +434,7 @@ public interface PubNubEndpointBuilderFactory {
return this;
}
/**
- * If cipher is passed, all communicatons to/from PubNub will be
+ * If cipher is passed, all communications to/from PubNub will be
* encrypted.
*
* The option is a: <code>java.lang.String</code> type.
@@ -624,7 +624,7 @@ public interface PubNubEndpointBuilderFactory {
return this;
}
/**
- * If cipher is passed, all communicatons to/from PubNub will be
+ * If cipher is passed, all communications to/from PubNub will be
* encrypted.
*
* The option is a: <code>java.lang.String</code> type.
diff --git
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/PulsarEndpointBuilderFactory.java
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/PulsarEndpointBuilderFactory.java
index 75fdbf3..d23c3c7 100644
---
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/PulsarEndpointBuilderFactory.java
+++
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/PulsarEndpointBuilderFactory.java
@@ -519,10 +519,7 @@ public interface PulsarEndpointBuilderFactory {
return this;
}
/**
- * Set the compression type for the producer. Supported compression
- * types are: NONE: No compression LZ4: Compress with LZ4 algorithm.
- * Faster but lower compression than ZLib ZLI: Standard ZLib
compression
- * Default is NONE.
+ * Set the compression type for the producer.
*
* The option is a:
* <code>org.apache.pulsar.client.api.CompressionType</code> type.
@@ -535,10 +532,7 @@ public interface PulsarEndpointBuilderFactory {
return this;
}
/**
- * Set the compression type for the producer. Supported compression
- * types are: NONE: No compression LZ4: Compress with LZ4 algorithm.
- * Faster but lower compression than ZLib ZLI: Standard ZLib
compression
- * Default is NONE.
+ * Set the compression type for the producer.
*
* The option will be converted to a
* <code>org.apache.pulsar.client.api.CompressionType</code> type.
diff --git
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/RestletEndpointBuilderFactory.java
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/RestletEndpointBuilderFactory.java
index e62af5e..94e3183 100644
---
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/RestletEndpointBuilderFactory.java
+++
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/RestletEndpointBuilderFactory.java
@@ -114,25 +114,9 @@ public interface RestletEndpointBuilderFactory {
* endpoint. If both restletMethod and restletMethods options are
* specified, the restletMethod setting is ignored. The possible
methods
* are: ALL,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE.
+ * Multiple methods can be separated by comma.
*
- * The option is a: <code>org.restlet.data.Method[]</code> type.
- *
- * Group: consumer
- */
- default RestletEndpointConsumerBuilder restletMethods(
- Object[] restletMethods) {
- setProperty("restletMethods", restletMethods);
- return this;
- }
- /**
- * Specify one or more methods separated by commas (e.g.
- * restletMethods=post,put) to be serviced by a restlet consumer
- * endpoint. If both restletMethod and restletMethods options are
- * specified, the restletMethod setting is ignored. The possible
methods
- * are: ALL,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE.
- *
- * The option will be converted to a
- * <code>org.restlet.data.Method[]</code> type.
+ * The option is a: <code>java.lang.String</code> type.
*
* Group: consumer
*/