This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new d44de8a75d4 camel-whatsapp - is producer only.
d44de8a75d4 is described below
commit d44de8a75d4b6bca6fe141daeaccd69cde4e8287
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Sep 17 11:13:10 2022 +0200
camel-whatsapp - is producer only.
---
.../apache/camel/catalog/components/whatsapp.json | 28 +-
.../whatsapp/WhatsAppComponentConfigurer.java | 6 -
.../whatsapp/WhatsAppEndpointConfigurer.java | 114 ---
.../whatsapp/WhatsAppEndpointUriFactory.java | 25 +-
.../apache/camel/component/whatsapp/whatsapp.json | 28 +-
.../src/main/docs/whatsapp-component.adoc | 8 +-
.../camel/component/whatsapp/WhatsAppEndpoint.java | 6 +-
.../component/ComponentsBuilderFactory.java | 2 +-
.../dsl/WhatsappComponentBuilderFactory.java | 59 +-
.../src/generated/resources/metadata.json | 4 +-
.../builder/endpoint/StaticEndpointBuilders.java | 4 +-
.../dsl/WhatsAppEndpointBuilderFactory.java | 1028 +-------------------
12 files changed, 55 insertions(+), 1257 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/whatsapp.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/whatsapp.json
index 2b26d2bd063..e52695bf5f3 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/whatsapp.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/whatsapp.json
@@ -3,7 +3,7 @@
"kind": "component",
"name": "whatsapp",
"title": "WhatsApp",
- "description": "Send messages.",
+ "description": "Send messages to WhatsApp.",
"deprecated": false,
"firstVersion": "3.18.0",
"label": "cloud,api,chat",
@@ -18,13 +18,12 @@
"async": false,
"api": false,
"consumerOnly": false,
- "producerOnly": false,
+ "producerOnly": true,
"lenientProperties": false
},
"componentProperties": {
- "phoneNumberId": { "kind": "property", "displayName": "Phone Number Id",
"group": "common", "label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "Phone Number ID taken from WhatsApp Meta for Developers
Dashboard" },
- "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error
Handler", "group": "consumer", "label": "consumer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "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 me [...]
"lazyStartProducer": { "kind": "property", "displayName": "Lazy Start
Producer", "group": "producer", "label": "producer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "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 star [...]
+ "phoneNumberId": { "kind": "property", "displayName": "Phone Number Id",
"group": "producer", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Phone Number ID taken from WhatsApp Meta for
Developers Dashboard" },
"apiVersion": { "kind": "property", "displayName": "Api Version", "group":
"advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "v13.0", "description": "WhatsApp Cloud API
version" },
"autowiredEnabled": { "kind": "property", "displayName": "Autowired
Enabled", "group": "advanced", "label": "advanced", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "description": "Whether autowiring is
enabled. This is used for automatic autowiring options (the option must be
marked as autowired) by looking up in the registry to find if there is a single
instance of matching type, which t [...]
"baseUri": { "kind": "property", "displayName": "Base Uri", "group":
"advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "https:\/\/graph.facebook.com", "description":
"Can be used to set an alternative base URI, e.g. when you want to test the
component against a mock WhatsApp API" },
@@ -37,12 +36,7 @@
"CamelWhatsAppRecipientPhoneNumberId": { "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"Object", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "description": "Recipient phone number associated with Phone
Number ID", "constantName":
"org.apache.camel.component.whatsapp.WhatsAppConstants#WHATSAPP_RECIPIENT_PHONE_NUMBER_ID"
}
},
"properties": {
- "phoneNumberId": { "kind": "path", "displayName": "Phone Number Id",
"group": "common", "label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.whatsapp.WhatsAppConfiguration",
"configurationField": "configuration", "description": "The phone number ID
taken from whatsapp-business dashboard." },
- "sendEmptyMessageWhenIdle": { "kind": "parameter", "displayName": "Send
Empty Message When Idle", "group": "consumer", "label": "consumer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description": "If
the polling consumer did not poll any files, you can enable this option to send
an empty message (no body) instead." },
- "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error
Handler", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "boolean", "javaType": "boolean", "deprecated":
false, "autowired": false, "secret": false, "defaultValue": false,
"description": "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 [...]
- "exceptionHandler": { "kind": "parameter", "displayName": "Exception
Handler", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "object", "javaType":
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.",
"deprecated": false, "autowired": false, "secret": false, "description": "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
con [...]
- "exchangePattern": { "kind": "parameter", "displayName": "Exchange
Pattern", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "object", "javaType":
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut",
"InOptionalOut" ], "deprecated": false, "autowired": false, "secret": false,
"description": "Sets the exchange pattern when the consumer creates an
exchange." },
- "pollStrategy": { "kind": "parameter", "displayName": "Poll Strategy",
"group": "consumer (advanced)", "label": "consumer,advanced", "required":
false, "type": "object", "javaType":
"org.apache.camel.spi.PollingConsumerPollStrategy", "deprecated": false,
"autowired": false, "secret": false, "description": "A pluggable
org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your
custom implementation to control error handling usually occurred during the
poll operation [...]
+ "phoneNumberId": { "kind": "path", "displayName": "Phone Number Id",
"group": "producer", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.whatsapp.WhatsAppConfiguration",
"configurationField": "configuration", "description": "The phone number ID
taken from whatsapp-business dashboard." },
"lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start
Producer", "group": "producer (advanced)", "label": "producer,advanced",
"required": false, "type": "boolean", "javaType": "boolean", "deprecated":
false, "autowired": false, "secret": false, "defaultValue": false,
"description": "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 other [...]
"apiVersion": { "kind": "parameter", "displayName": "Api Version",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.whatsapp.WhatsAppConfiguration",
"configurationField": "configuration", "description": "Facebook graph api
version." },
"baseUri": { "kind": "parameter", "displayName": "Base Uri", "group":
"advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.whatsapp.WhatsAppConfiguration",
"configurationField": "configuration", "description": "Can be used to set an
alternative base URI, e.g. when you want to test the component against a mock
WhatsApp API" },
@@ -50,20 +44,6 @@
"webhookPath": { "kind": "parameter", "displayName": "Webhook Path",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "webhook", "configurationClass":
"org.apache.camel.component.whatsapp.WhatsAppConfiguration",
"configurationField": "configuration", "description": "Webhook path" },
"webhookVerifyToken": { "kind": "parameter", "displayName": "Webhook
Verify Token", "group": "advanced", "label": "advanced", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.whatsapp.WhatsAppConfiguration",
"configurationField": "configuration", "description": "Webhook verify token" },
"whatsappService": { "kind": "parameter", "displayName": "Whatsapp
Service", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "org.apache.camel.component.whatsapp.WhatsAppService",
"deprecated": false, "autowired": false, "secret": false, "description":
"WhatsApp service implementation" },
- "backoffErrorThreshold": { "kind": "parameter", "displayName": "Backoff
Error Threshold", "group": "scheduler", "label": "consumer,scheduler",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"autowired": false, "secret": false, "description": "The number of subsequent
error polls (failed due some error) that should happen before the
backoffMultipler should kick-in." },
- "backoffIdleThreshold": { "kind": "parameter", "displayName": "Backoff
Idle Threshold", "group": "scheduler", "label": "consumer,scheduler",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"autowired": false, "secret": false, "description": "The number of subsequent
idle polls that should happen before the backoffMultipler should kick-in." },
- "backoffMultiplier": { "kind": "parameter", "displayName": "Backoff
Multiplier", "group": "scheduler", "label": "consumer,scheduler", "required":
false, "type": "integer", "javaType": "int", "deprecated": false, "autowired":
false, "secret": false, "description": "To let the scheduled polling consumer
backoff if there has been a number of subsequent idles\/errors in a row. The
multiplier is then the number of polls that will be skipped before the next
actual attempt is happening agai [...]
- "delay": { "kind": "parameter", "displayName": "Delay", "group":
"scheduler", "label": "consumer,scheduler", "required": false, "type":
"integer", "javaType": "long", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 500, "description": "Milliseconds before the
next poll." },
- "greedy": { "kind": "parameter", "displayName": "Greedy", "group":
"scheduler", "label": "consumer,scheduler", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "If greedy is enabled,
then the ScheduledPollConsumer will run immediately again, if the previous run
polled 1 or more messages." },
- "initialDelay": { "kind": "parameter", "displayName": "Initial Delay",
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type":
"integer", "javaType": "long", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 1000, "description": "Milliseconds before the
first poll starts." },
- "repeatCount": { "kind": "parameter", "displayName": "Repeat Count",
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type":
"integer", "javaType": "long", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 0, "description": "Specifies a maximum limit
of number of fires. So if you set it to 1, the scheduler will only fire once.
If you set it to 5, it will only fire five times. A value of zero or negative
means fire forever." },
- "runLoggingLevel": { "kind": "parameter", "displayName": "Run Logging
Level", "group": "scheduler", "label": "consumer,scheduler", "required": false,
"type": "object", "javaType": "org.apache.camel.LoggingLevel", "enum": [
"TRACE", "DEBUG", "INFO", "WARN", "ERROR", "OFF" ], "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "TRACE", "description":
"The consumer logs a start\/complete log line when it polls. This option allows
you to configure the logging level [...]
- "scheduledExecutorService": { "kind": "parameter", "displayName":
"Scheduled Executor Service", "group": "scheduler", "label":
"consumer,scheduler", "required": false, "type": "object", "javaType":
"java.util.concurrent.ScheduledExecutorService", "deprecated": false,
"autowired": false, "secret": false, "description": "Allows for configuring a
custom\/shared thread pool to use for the consumer. By default each consumer
has its own single threaded thread pool." },
- "scheduler": { "kind": "parameter", "displayName": "Scheduler", "group":
"scheduler", "label": "consumer,scheduler", "required": false, "type":
"object", "javaType": "java.lang.Object", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "none", "description": "To use a cron
scheduler from either camel-spring or camel-quartz component. Use value spring
or quartz for built in scheduler" },
- "schedulerProperties": { "kind": "parameter", "displayName": "Scheduler
Properties", "group": "scheduler", "label": "consumer,scheduler", "required":
false, "type": "object", "javaType": "java.util.Map<java.lang.String,
java.lang.Object>", "prefix": "scheduler.", "multiValue": true, "deprecated":
false, "autowired": false, "secret": false, "description": "To configure
additional properties when using a custom scheduler or any of the Quartz,
Spring based scheduler." },
- "startScheduler": { "kind": "parameter", "displayName": "Start Scheduler",
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "description": "Whether the scheduler
should be auto started." },
- "timeUnit": { "kind": "parameter", "displayName": "Time Unit", "group":
"scheduler", "label": "consumer,scheduler", "required": false, "type":
"object", "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS",
"MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ],
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"MILLISECONDS", "description": "Time unit for initialDelay and delay options."
},
- "useFixedDelay": { "kind": "parameter", "displayName": "Use Fixed Delay",
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "description": "Controls if fixed delay
or fixed rate is used. See ScheduledExecutorService in JDK for details." },
"authorizationToken": { "kind": "parameter", "displayName": "Authorization
Token", "group": "security", "label": "security", "required": true, "type":
"string", "javaType": "java.lang.String", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": true,
"configurationClass":
"org.apache.camel.component.whatsapp.WhatsAppConfiguration",
"configurationField": "configuration", "description": "The authorization access
token taken from whatsapp-business dashboard." }
}
}
diff --git
a/components/camel-whatsapp/src/generated/java/org/apache/camel/component/whatsapp/WhatsAppComponentConfigurer.java
b/components/camel-whatsapp/src/generated/java/org/apache/camel/component/whatsapp/WhatsAppComponentConfigurer.java
index 82ec6fff3ed..7a65e777530 100644
---
a/components/camel-whatsapp/src/generated/java/org/apache/camel/component/whatsapp/WhatsAppComponentConfigurer.java
+++
b/components/camel-whatsapp/src/generated/java/org/apache/camel/component/whatsapp/WhatsAppComponentConfigurer.java
@@ -29,8 +29,6 @@ public class WhatsAppComponentConfigurer extends
PropertyConfigurerSupport imple
case "autowiredEnabled":
target.setAutowiredEnabled(property(camelContext, boolean.class, value));
return true;
case "baseuri":
case "baseUri": target.setBaseUri(property(camelContext,
java.lang.String.class, value)); return true;
- case "bridgeerrorhandler":
- case "bridgeErrorHandler":
target.setBridgeErrorHandler(property(camelContext, boolean.class, value));
return true;
case "client": target.setClient(property(camelContext,
java.net.http.HttpClient.class, value)); return true;
case "lazystartproducer":
case "lazyStartProducer":
target.setLazyStartProducer(property(camelContext, boolean.class, value));
return true;
@@ -53,8 +51,6 @@ public class WhatsAppComponentConfigurer extends
PropertyConfigurerSupport imple
case "autowiredEnabled": return boolean.class;
case "baseuri":
case "baseUri": return java.lang.String.class;
- case "bridgeerrorhandler":
- case "bridgeErrorHandler": return boolean.class;
case "client": return java.net.http.HttpClient.class;
case "lazystartproducer":
case "lazyStartProducer": return boolean.class;
@@ -78,8 +74,6 @@ public class WhatsAppComponentConfigurer extends
PropertyConfigurerSupport imple
case "autowiredEnabled": return target.isAutowiredEnabled();
case "baseuri":
case "baseUri": return target.getBaseUri();
- case "bridgeerrorhandler":
- case "bridgeErrorHandler": return target.isBridgeErrorHandler();
case "client": return target.getClient();
case "lazystartproducer":
case "lazyStartProducer": return target.isLazyStartProducer();
diff --git
a/components/camel-whatsapp/src/generated/java/org/apache/camel/component/whatsapp/WhatsAppEndpointConfigurer.java
b/components/camel-whatsapp/src/generated/java/org/apache/camel/component/whatsapp/WhatsAppEndpointConfigurer.java
index 561497345cc..fe7be165c45 100644
---
a/components/camel-whatsapp/src/generated/java/org/apache/camel/component/whatsapp/WhatsAppEndpointConfigurer.java
+++
b/components/camel-whatsapp/src/generated/java/org/apache/camel/component/whatsapp/WhatsAppEndpointConfigurer.java
@@ -25,47 +25,12 @@ public class WhatsAppEndpointConfigurer extends
PropertyConfigurerSupport implem
case "apiVersion":
target.getConfiguration().setApiVersion(property(camelContext,
java.lang.String.class, value)); return true;
case "authorizationtoken":
case "authorizationToken":
target.getConfiguration().setAuthorizationToken(property(camelContext,
java.lang.String.class, value)); return true;
- case "backofferrorthreshold":
- case "backoffErrorThreshold":
target.setBackoffErrorThreshold(property(camelContext, int.class, value));
return true;
- case "backoffidlethreshold":
- case "backoffIdleThreshold":
target.setBackoffIdleThreshold(property(camelContext, int.class, value));
return true;
- case "backoffmultiplier":
- case "backoffMultiplier":
target.setBackoffMultiplier(property(camelContext, int.class, value)); return
true;
case "baseuri":
case "baseUri":
target.getConfiguration().setBaseUri(property(camelContext,
java.lang.String.class, value)); return true;
- case "bridgeerrorhandler":
- case "bridgeErrorHandler":
target.setBridgeErrorHandler(property(camelContext, boolean.class, value));
return true;
- case "delay": target.setDelay(property(camelContext, long.class,
value)); return true;
- case "exceptionhandler":
- case "exceptionHandler":
target.setExceptionHandler(property(camelContext,
org.apache.camel.spi.ExceptionHandler.class, value)); return true;
- case "exchangepattern":
- case "exchangePattern":
target.setExchangePattern(property(camelContext,
org.apache.camel.ExchangePattern.class, value)); return true;
- case "greedy": target.setGreedy(property(camelContext, boolean.class,
value)); return true;
case "httpclient":
case "httpClient": target.setHttpClient(property(camelContext,
java.net.http.HttpClient.class, value)); return true;
- case "initialdelay":
- case "initialDelay": target.setInitialDelay(property(camelContext,
long.class, value)); return true;
case "lazystartproducer":
case "lazyStartProducer":
target.setLazyStartProducer(property(camelContext, boolean.class, value));
return true;
- case "pollstrategy":
- case "pollStrategy": target.setPollStrategy(property(camelContext,
org.apache.camel.spi.PollingConsumerPollStrategy.class, value)); return true;
- case "repeatcount":
- case "repeatCount": target.setRepeatCount(property(camelContext,
long.class, value)); return true;
- case "runlogginglevel":
- case "runLoggingLevel":
target.setRunLoggingLevel(property(camelContext,
org.apache.camel.LoggingLevel.class, value)); return true;
- case "scheduledexecutorservice":
- case "scheduledExecutorService":
target.setScheduledExecutorService(property(camelContext,
java.util.concurrent.ScheduledExecutorService.class, value)); return true;
- case "scheduler": target.setScheduler(property(camelContext,
java.lang.Object.class, value)); return true;
- case "schedulerproperties":
- case "schedulerProperties":
target.setSchedulerProperties(property(camelContext, java.util.Map.class,
value)); return true;
- case "sendemptymessagewhenidle":
- case "sendEmptyMessageWhenIdle":
target.setSendEmptyMessageWhenIdle(property(camelContext, boolean.class,
value)); return true;
- case "startscheduler":
- case "startScheduler": target.setStartScheduler(property(camelContext,
boolean.class, value)); return true;
- case "timeunit":
- case "timeUnit": target.setTimeUnit(property(camelContext,
java.util.concurrent.TimeUnit.class, value)); return true;
- case "usefixeddelay":
- case "useFixedDelay": target.setUseFixedDelay(property(camelContext,
boolean.class, value)); return true;
case "webhookpath":
case "webhookPath":
target.getConfiguration().setWebhookPath(property(camelContext,
java.lang.String.class, value)); return true;
case "webhookverifytoken":
@@ -83,47 +48,12 @@ public class WhatsAppEndpointConfigurer extends
PropertyConfigurerSupport implem
case "apiVersion": return java.lang.String.class;
case "authorizationtoken":
case "authorizationToken": return java.lang.String.class;
- case "backofferrorthreshold":
- case "backoffErrorThreshold": return int.class;
- case "backoffidlethreshold":
- case "backoffIdleThreshold": return int.class;
- case "backoffmultiplier":
- case "backoffMultiplier": return int.class;
case "baseuri":
case "baseUri": return java.lang.String.class;
- case "bridgeerrorhandler":
- case "bridgeErrorHandler": return boolean.class;
- case "delay": return long.class;
- case "exceptionhandler":
- case "exceptionHandler": return
org.apache.camel.spi.ExceptionHandler.class;
- case "exchangepattern":
- case "exchangePattern": return org.apache.camel.ExchangePattern.class;
- case "greedy": return boolean.class;
case "httpclient":
case "httpClient": return java.net.http.HttpClient.class;
- case "initialdelay":
- case "initialDelay": return long.class;
case "lazystartproducer":
case "lazyStartProducer": return boolean.class;
- case "pollstrategy":
- case "pollStrategy": return
org.apache.camel.spi.PollingConsumerPollStrategy.class;
- case "repeatcount":
- case "repeatCount": return long.class;
- case "runlogginglevel":
- case "runLoggingLevel": return org.apache.camel.LoggingLevel.class;
- case "scheduledexecutorservice":
- case "scheduledExecutorService": return
java.util.concurrent.ScheduledExecutorService.class;
- case "scheduler": return java.lang.Object.class;
- case "schedulerproperties":
- case "schedulerProperties": return java.util.Map.class;
- case "sendemptymessagewhenidle":
- case "sendEmptyMessageWhenIdle": return boolean.class;
- case "startscheduler":
- case "startScheduler": return boolean.class;
- case "timeunit":
- case "timeUnit": return java.util.concurrent.TimeUnit.class;
- case "usefixeddelay":
- case "useFixedDelay": return boolean.class;
case "webhookpath":
case "webhookPath": return java.lang.String.class;
case "webhookverifytoken":
@@ -142,47 +72,12 @@ public class WhatsAppEndpointConfigurer extends
PropertyConfigurerSupport implem
case "apiVersion": return target.getConfiguration().getApiVersion();
case "authorizationtoken":
case "authorizationToken": return
target.getConfiguration().getAuthorizationToken();
- case "backofferrorthreshold":
- case "backoffErrorThreshold": return target.getBackoffErrorThreshold();
- case "backoffidlethreshold":
- case "backoffIdleThreshold": return target.getBackoffIdleThreshold();
- case "backoffmultiplier":
- case "backoffMultiplier": return target.getBackoffMultiplier();
case "baseuri":
case "baseUri": return target.getConfiguration().getBaseUri();
- case "bridgeerrorhandler":
- case "bridgeErrorHandler": return target.isBridgeErrorHandler();
- case "delay": return target.getDelay();
- case "exceptionhandler":
- case "exceptionHandler": return target.getExceptionHandler();
- case "exchangepattern":
- case "exchangePattern": return target.getExchangePattern();
- case "greedy": return target.isGreedy();
case "httpclient":
case "httpClient": return target.getHttpClient();
- case "initialdelay":
- case "initialDelay": return target.getInitialDelay();
case "lazystartproducer":
case "lazyStartProducer": return target.isLazyStartProducer();
- case "pollstrategy":
- case "pollStrategy": return target.getPollStrategy();
- case "repeatcount":
- case "repeatCount": return target.getRepeatCount();
- case "runlogginglevel":
- case "runLoggingLevel": return target.getRunLoggingLevel();
- case "scheduledexecutorservice":
- case "scheduledExecutorService": return
target.getScheduledExecutorService();
- case "scheduler": return target.getScheduler();
- case "schedulerproperties":
- case "schedulerProperties": return target.getSchedulerProperties();
- case "sendemptymessagewhenidle":
- case "sendEmptyMessageWhenIdle": return
target.isSendEmptyMessageWhenIdle();
- case "startscheduler":
- case "startScheduler": return target.isStartScheduler();
- case "timeunit":
- case "timeUnit": return target.getTimeUnit();
- case "usefixeddelay":
- case "useFixedDelay": return target.isUseFixedDelay();
case "webhookpath":
case "webhookPath": return target.getConfiguration().getWebhookPath();
case "webhookverifytoken":
@@ -192,14 +87,5 @@ public class WhatsAppEndpointConfigurer extends
PropertyConfigurerSupport implem
default: return null;
}
}
-
- @Override
- public Object getCollectionValueType(Object target, String name, boolean
ignoreCase) {
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "schedulerproperties":
- case "schedulerProperties": return java.lang.Object.class;
- default: return null;
- }
- }
}
diff --git
a/components/camel-whatsapp/src/generated/java/org/apache/camel/component/whatsapp/WhatsAppEndpointUriFactory.java
b/components/camel-whatsapp/src/generated/java/org/apache/camel/component/whatsapp/WhatsAppEndpointUriFactory.java
index 02e3dbd06ac..e8a12cf27a2 100644
---
a/components/camel-whatsapp/src/generated/java/org/apache/camel/component/whatsapp/WhatsAppEndpointUriFactory.java
+++
b/components/camel-whatsapp/src/generated/java/org/apache/camel/component/whatsapp/WhatsAppEndpointUriFactory.java
@@ -21,32 +21,13 @@ public class WhatsAppEndpointUriFactory extends
org.apache.camel.support.compone
private static final Set<String> SECRET_PROPERTY_NAMES;
private static final Set<String> MULTI_VALUE_PREFIXES;
static {
- Set<String> props = new HashSet<>(28);
+ Set<String> props = new HashSet<>(9);
props.add("apiVersion");
props.add("authorizationToken");
- props.add("backoffErrorThreshold");
- props.add("backoffIdleThreshold");
- props.add("backoffMultiplier");
props.add("baseUri");
- props.add("bridgeErrorHandler");
- props.add("delay");
- props.add("exceptionHandler");
- props.add("exchangePattern");
- props.add("greedy");
props.add("httpClient");
- props.add("initialDelay");
props.add("lazyStartProducer");
props.add("phoneNumberId");
- props.add("pollStrategy");
- props.add("repeatCount");
- props.add("runLoggingLevel");
- props.add("scheduledExecutorService");
- props.add("scheduler");
- props.add("schedulerProperties");
- props.add("sendEmptyMessageWhenIdle");
- props.add("startScheduler");
- props.add("timeUnit");
- props.add("useFixedDelay");
props.add("webhookPath");
props.add("webhookVerifyToken");
props.add("whatsappService");
@@ -54,9 +35,7 @@ public class WhatsAppEndpointUriFactory extends
org.apache.camel.support.compone
Set<String> secretProps = new HashSet<>(1);
secretProps.add("authorizationToken");
SECRET_PROPERTY_NAMES = Collections.unmodifiableSet(secretProps);
- Set<String> prefixes = new HashSet<>(1);
- prefixes.add("scheduler.");
- MULTI_VALUE_PREFIXES = Collections.unmodifiableSet(prefixes);
+ MULTI_VALUE_PREFIXES = Collections.emptySet();
}
@Override
diff --git
a/components/camel-whatsapp/src/generated/resources/org/apache/camel/component/whatsapp/whatsapp.json
b/components/camel-whatsapp/src/generated/resources/org/apache/camel/component/whatsapp/whatsapp.json
index 2b26d2bd063..e52695bf5f3 100644
---
a/components/camel-whatsapp/src/generated/resources/org/apache/camel/component/whatsapp/whatsapp.json
+++
b/components/camel-whatsapp/src/generated/resources/org/apache/camel/component/whatsapp/whatsapp.json
@@ -3,7 +3,7 @@
"kind": "component",
"name": "whatsapp",
"title": "WhatsApp",
- "description": "Send messages.",
+ "description": "Send messages to WhatsApp.",
"deprecated": false,
"firstVersion": "3.18.0",
"label": "cloud,api,chat",
@@ -18,13 +18,12 @@
"async": false,
"api": false,
"consumerOnly": false,
- "producerOnly": false,
+ "producerOnly": true,
"lenientProperties": false
},
"componentProperties": {
- "phoneNumberId": { "kind": "property", "displayName": "Phone Number Id",
"group": "common", "label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "Phone Number ID taken from WhatsApp Meta for Developers
Dashboard" },
- "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error
Handler", "group": "consumer", "label": "consumer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "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 me [...]
"lazyStartProducer": { "kind": "property", "displayName": "Lazy Start
Producer", "group": "producer", "label": "producer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "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 star [...]
+ "phoneNumberId": { "kind": "property", "displayName": "Phone Number Id",
"group": "producer", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Phone Number ID taken from WhatsApp Meta for
Developers Dashboard" },
"apiVersion": { "kind": "property", "displayName": "Api Version", "group":
"advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "v13.0", "description": "WhatsApp Cloud API
version" },
"autowiredEnabled": { "kind": "property", "displayName": "Autowired
Enabled", "group": "advanced", "label": "advanced", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "description": "Whether autowiring is
enabled. This is used for automatic autowiring options (the option must be
marked as autowired) by looking up in the registry to find if there is a single
instance of matching type, which t [...]
"baseUri": { "kind": "property", "displayName": "Base Uri", "group":
"advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "https:\/\/graph.facebook.com", "description":
"Can be used to set an alternative base URI, e.g. when you want to test the
component against a mock WhatsApp API" },
@@ -37,12 +36,7 @@
"CamelWhatsAppRecipientPhoneNumberId": { "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"Object", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "description": "Recipient phone number associated with Phone
Number ID", "constantName":
"org.apache.camel.component.whatsapp.WhatsAppConstants#WHATSAPP_RECIPIENT_PHONE_NUMBER_ID"
}
},
"properties": {
- "phoneNumberId": { "kind": "path", "displayName": "Phone Number Id",
"group": "common", "label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.whatsapp.WhatsAppConfiguration",
"configurationField": "configuration", "description": "The phone number ID
taken from whatsapp-business dashboard." },
- "sendEmptyMessageWhenIdle": { "kind": "parameter", "displayName": "Send
Empty Message When Idle", "group": "consumer", "label": "consumer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description": "If
the polling consumer did not poll any files, you can enable this option to send
an empty message (no body) instead." },
- "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error
Handler", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "boolean", "javaType": "boolean", "deprecated":
false, "autowired": false, "secret": false, "defaultValue": false,
"description": "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 [...]
- "exceptionHandler": { "kind": "parameter", "displayName": "Exception
Handler", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "object", "javaType":
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.",
"deprecated": false, "autowired": false, "secret": false, "description": "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
con [...]
- "exchangePattern": { "kind": "parameter", "displayName": "Exchange
Pattern", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "object", "javaType":
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut",
"InOptionalOut" ], "deprecated": false, "autowired": false, "secret": false,
"description": "Sets the exchange pattern when the consumer creates an
exchange." },
- "pollStrategy": { "kind": "parameter", "displayName": "Poll Strategy",
"group": "consumer (advanced)", "label": "consumer,advanced", "required":
false, "type": "object", "javaType":
"org.apache.camel.spi.PollingConsumerPollStrategy", "deprecated": false,
"autowired": false, "secret": false, "description": "A pluggable
org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your
custom implementation to control error handling usually occurred during the
poll operation [...]
+ "phoneNumberId": { "kind": "path", "displayName": "Phone Number Id",
"group": "producer", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.whatsapp.WhatsAppConfiguration",
"configurationField": "configuration", "description": "The phone number ID
taken from whatsapp-business dashboard." },
"lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start
Producer", "group": "producer (advanced)", "label": "producer,advanced",
"required": false, "type": "boolean", "javaType": "boolean", "deprecated":
false, "autowired": false, "secret": false, "defaultValue": false,
"description": "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 other [...]
"apiVersion": { "kind": "parameter", "displayName": "Api Version",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.whatsapp.WhatsAppConfiguration",
"configurationField": "configuration", "description": "Facebook graph api
version." },
"baseUri": { "kind": "parameter", "displayName": "Base Uri", "group":
"advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.whatsapp.WhatsAppConfiguration",
"configurationField": "configuration", "description": "Can be used to set an
alternative base URI, e.g. when you want to test the component against a mock
WhatsApp API" },
@@ -50,20 +44,6 @@
"webhookPath": { "kind": "parameter", "displayName": "Webhook Path",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "webhook", "configurationClass":
"org.apache.camel.component.whatsapp.WhatsAppConfiguration",
"configurationField": "configuration", "description": "Webhook path" },
"webhookVerifyToken": { "kind": "parameter", "displayName": "Webhook
Verify Token", "group": "advanced", "label": "advanced", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.whatsapp.WhatsAppConfiguration",
"configurationField": "configuration", "description": "Webhook verify token" },
"whatsappService": { "kind": "parameter", "displayName": "Whatsapp
Service", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "org.apache.camel.component.whatsapp.WhatsAppService",
"deprecated": false, "autowired": false, "secret": false, "description":
"WhatsApp service implementation" },
- "backoffErrorThreshold": { "kind": "parameter", "displayName": "Backoff
Error Threshold", "group": "scheduler", "label": "consumer,scheduler",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"autowired": false, "secret": false, "description": "The number of subsequent
error polls (failed due some error) that should happen before the
backoffMultipler should kick-in." },
- "backoffIdleThreshold": { "kind": "parameter", "displayName": "Backoff
Idle Threshold", "group": "scheduler", "label": "consumer,scheduler",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"autowired": false, "secret": false, "description": "The number of subsequent
idle polls that should happen before the backoffMultipler should kick-in." },
- "backoffMultiplier": { "kind": "parameter", "displayName": "Backoff
Multiplier", "group": "scheduler", "label": "consumer,scheduler", "required":
false, "type": "integer", "javaType": "int", "deprecated": false, "autowired":
false, "secret": false, "description": "To let the scheduled polling consumer
backoff if there has been a number of subsequent idles\/errors in a row. The
multiplier is then the number of polls that will be skipped before the next
actual attempt is happening agai [...]
- "delay": { "kind": "parameter", "displayName": "Delay", "group":
"scheduler", "label": "consumer,scheduler", "required": false, "type":
"integer", "javaType": "long", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 500, "description": "Milliseconds before the
next poll." },
- "greedy": { "kind": "parameter", "displayName": "Greedy", "group":
"scheduler", "label": "consumer,scheduler", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "If greedy is enabled,
then the ScheduledPollConsumer will run immediately again, if the previous run
polled 1 or more messages." },
- "initialDelay": { "kind": "parameter", "displayName": "Initial Delay",
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type":
"integer", "javaType": "long", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 1000, "description": "Milliseconds before the
first poll starts." },
- "repeatCount": { "kind": "parameter", "displayName": "Repeat Count",
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type":
"integer", "javaType": "long", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 0, "description": "Specifies a maximum limit
of number of fires. So if you set it to 1, the scheduler will only fire once.
If you set it to 5, it will only fire five times. A value of zero or negative
means fire forever." },
- "runLoggingLevel": { "kind": "parameter", "displayName": "Run Logging
Level", "group": "scheduler", "label": "consumer,scheduler", "required": false,
"type": "object", "javaType": "org.apache.camel.LoggingLevel", "enum": [
"TRACE", "DEBUG", "INFO", "WARN", "ERROR", "OFF" ], "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "TRACE", "description":
"The consumer logs a start\/complete log line when it polls. This option allows
you to configure the logging level [...]
- "scheduledExecutorService": { "kind": "parameter", "displayName":
"Scheduled Executor Service", "group": "scheduler", "label":
"consumer,scheduler", "required": false, "type": "object", "javaType":
"java.util.concurrent.ScheduledExecutorService", "deprecated": false,
"autowired": false, "secret": false, "description": "Allows for configuring a
custom\/shared thread pool to use for the consumer. By default each consumer
has its own single threaded thread pool." },
- "scheduler": { "kind": "parameter", "displayName": "Scheduler", "group":
"scheduler", "label": "consumer,scheduler", "required": false, "type":
"object", "javaType": "java.lang.Object", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "none", "description": "To use a cron
scheduler from either camel-spring or camel-quartz component. Use value spring
or quartz for built in scheduler" },
- "schedulerProperties": { "kind": "parameter", "displayName": "Scheduler
Properties", "group": "scheduler", "label": "consumer,scheduler", "required":
false, "type": "object", "javaType": "java.util.Map<java.lang.String,
java.lang.Object>", "prefix": "scheduler.", "multiValue": true, "deprecated":
false, "autowired": false, "secret": false, "description": "To configure
additional properties when using a custom scheduler or any of the Quartz,
Spring based scheduler." },
- "startScheduler": { "kind": "parameter", "displayName": "Start Scheduler",
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "description": "Whether the scheduler
should be auto started." },
- "timeUnit": { "kind": "parameter", "displayName": "Time Unit", "group":
"scheduler", "label": "consumer,scheduler", "required": false, "type":
"object", "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS",
"MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ],
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"MILLISECONDS", "description": "Time unit for initialDelay and delay options."
},
- "useFixedDelay": { "kind": "parameter", "displayName": "Use Fixed Delay",
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "description": "Controls if fixed delay
or fixed rate is used. See ScheduledExecutorService in JDK for details." },
"authorizationToken": { "kind": "parameter", "displayName": "Authorization
Token", "group": "security", "label": "security", "required": true, "type":
"string", "javaType": "java.lang.String", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": true,
"configurationClass":
"org.apache.camel.component.whatsapp.WhatsAppConfiguration",
"configurationField": "configuration", "description": "The authorization access
token taken from whatsapp-business dashboard." }
}
}
diff --git a/components/camel-whatsapp/src/main/docs/whatsapp-component.adoc
b/components/camel-whatsapp/src/main/docs/whatsapp-component.adoc
index b2c149338ef..61ca2fe8424 100644
--- a/components/camel-whatsapp/src/main/docs/whatsapp-component.adoc
+++ b/components/camel-whatsapp/src/main/docs/whatsapp-component.adoc
@@ -2,17 +2,17 @@
:doctitle: WhatsApp
:shortname: whatsapp
:artifactid: camel-whatsapp
-:description: Send messages.
+:description: Send messages to WhatsApp.
:since: 3.18
:supportlevel: Preview
-:component-header: Both producer and consumer are supported
+:component-header: Only producer is supported
*Since Camel {since}*
*{component-header}*
The WhatsApp component provides access to the
https://developers.facebook.com/docs/whatsapp/cloud-api[WhatsApp Cloud API].
-It allows a Camel-based application to send messages using a cloud-hosted
version of the WhatsApp Business Platform..
+It allows a Camel-based application to send messages using a cloud-hosted
version of the WhatsApp Business Platform.
Before using this component you have to set up Developer Assets and Platform
Access, following the instructions at the
https://developers.facebook.com/docs/whatsapp/cloud-api/get-started#set-up-developer-assets[Register
WhatsApp Business Cloud API account].
@@ -107,4 +107,4 @@
fromF("webhook:whatsapp:%s?authorizationToken=%s&webhookVerifyToken=%s", "<phone
In order to enable and configure the webhook, the following guide can be used
https://developers.facebook.com/docs/whatsapp/cloud-api/guides/set-up-webhooks
the webhook component will expose an endpoint that can be used into the
whatsapp administration console.
-Refer to the *camel-webhook* component documentation for instructions on how
to set it.
\ No newline at end of file
+Refer to the *camel-webhook* component documentation for instructions on how
to set it.
diff --git
a/components/camel-whatsapp/src/main/java/org/apache/camel/component/whatsapp/WhatsAppEndpoint.java
b/components/camel-whatsapp/src/main/java/org/apache/camel/component/whatsapp/WhatsAppEndpoint.java
index ce9cd21c3cd..58e258ce72d 100644
---
a/components/camel-whatsapp/src/main/java/org/apache/camel/component/whatsapp/WhatsAppEndpoint.java
+++
b/components/camel-whatsapp/src/main/java/org/apache/camel/component/whatsapp/WhatsAppEndpoint.java
@@ -35,9 +35,10 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Send messages.
+ * Send messages to WhatsApp.
*/
@UriEndpoint(firstVersion = "3.18.0", scheme = "whatsapp", title = "WhatsApp",
syntax = "whatsapp:phoneNumberId",
+ producerOnly = true,
category = {
Category.CLOUD, Category.API,
Category.CHAT },
@@ -91,7 +92,7 @@ public class WhatsAppEndpoint extends ScheduledPollEndpoint
implements WebhookCa
@Override
public Consumer createConsumer(Processor processor) throws Exception {
- return null;
+ throw new UnsupportedOperationException("consumer not supported");
}
@Override
@@ -111,7 +112,6 @@ public class WhatsAppEndpoint extends ScheduledPollEndpoint
implements WebhookCa
@Override
public void setWebhookConfiguration(WebhookConfiguration
webhookConfiguration) {
webhookConfiguration.setWebhookPath(configuration.getWebhookPath());
-
this.webhookConfiguration = webhookConfiguration;
}
diff --git
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
index d57d57fbb29..ebb1263096f 100644
---
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
+++
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
@@ -4505,7 +4505,7 @@ public interface ComponentsBuilderFactory {
}
/**
* WhatsApp (camel-whatsapp)
- * Send messages.
+ * Send messages to WhatsApp.
*
* Category: cloud,api,chat
* Since: 3.18
diff --git
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/WhatsappComponentBuilderFactory.java
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/WhatsappComponentBuilderFactory.java
index 52bd9db3700..b6842c6d1b1 100644
---
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/WhatsappComponentBuilderFactory.java
+++
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/WhatsappComponentBuilderFactory.java
@@ -23,7 +23,7 @@ import org.apache.camel.builder.component.ComponentBuilder;
import org.apache.camel.component.whatsapp.WhatsAppComponent;
/**
- * Send messages.
+ * Send messages to WhatsApp.
*
* Generated by camel-package-maven-plugin - do not edit this file!
*/
@@ -32,7 +32,7 @@ public interface WhatsappComponentBuilderFactory {
/**
* WhatsApp (camel-whatsapp)
- * Send messages.
+ * Send messages to WhatsApp.
*
* Category: cloud,api,chat
* Since: 3.18
@@ -50,43 +50,6 @@ public interface WhatsappComponentBuilderFactory {
interface WhatsappComponentBuilder
extends
ComponentBuilder<WhatsAppComponent> {
- /**
- * Phone Number ID taken from WhatsApp Meta for Developers Dashboard.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: common
- *
- * @param phoneNumberId the value to set
- * @return the dsl builder
- */
- default WhatsappComponentBuilder phoneNumberId(
- java.lang.String phoneNumberId) {
- doSetProperty("phoneNumberId", phoneNumberId);
- return this;
- }
- /**
- * 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.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: false
- * Group: consumer
- *
- * @param bridgeErrorHandler the value to set
- * @return the dsl builder
- */
- default WhatsappComponentBuilder bridgeErrorHandler(
- boolean bridgeErrorHandler) {
- doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
- return this;
- }
/**
* Whether the producer should be started lazy (on the first message).
* By starting lazy you can use this to allow CamelContext and routes
to
@@ -111,6 +74,21 @@ public interface WhatsappComponentBuilderFactory {
doSetProperty("lazyStartProducer", lazyStartProducer);
return this;
}
+ /**
+ * Phone Number ID taken from WhatsApp Meta for Developers Dashboard.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param phoneNumberId the value to set
+ * @return the dsl builder
+ */
+ default WhatsappComponentBuilder phoneNumberId(
+ java.lang.String phoneNumberId) {
+ doSetProperty("phoneNumberId", phoneNumberId);
+ return this;
+ }
/**
* WhatsApp Cloud API version.
*
@@ -226,9 +204,8 @@ public interface WhatsappComponentBuilderFactory {
String name,
Object value) {
switch (name) {
- case "phoneNumberId": ((WhatsAppComponent)
component).setPhoneNumberId((java.lang.String) value); return true;
- case "bridgeErrorHandler": ((WhatsAppComponent)
component).setBridgeErrorHandler((boolean) value); return true;
case "lazyStartProducer": ((WhatsAppComponent)
component).setLazyStartProducer((boolean) value); return true;
+ case "phoneNumberId": ((WhatsAppComponent)
component).setPhoneNumberId((java.lang.String) value); return true;
case "apiVersion": ((WhatsAppComponent)
component).setApiVersion((java.lang.String) value); return true;
case "autowiredEnabled": ((WhatsAppComponent)
component).setAutowiredEnabled((boolean) value); return true;
case "baseUri": ((WhatsAppComponent)
component).setBaseUri((java.lang.String) value); return true;
diff --git a/dsl/camel-componentdsl/src/generated/resources/metadata.json
b/dsl/camel-componentdsl/src/generated/resources/metadata.json
index e335ccf7ed6..de245a48b8f 100644
--- a/dsl/camel-componentdsl/src/generated/resources/metadata.json
+++ b/dsl/camel-componentdsl/src/generated/resources/metadata.json
@@ -7433,7 +7433,7 @@
"kind": "component",
"name": "whatsapp",
"title": "WhatsApp",
- "description": "Send messages.",
+ "description": "Send messages to WhatsApp.",
"deprecated": false,
"firstVersion": "3.18.0",
"label": "cloud,api,chat",
@@ -7448,7 +7448,7 @@
"async": false,
"api": false,
"consumerOnly": false,
- "producerOnly": false,
+ "producerOnly": true,
"lenientProperties": false
},
"WordpressComponentBuilderFactory": {
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index 372d0a51f3c..c219f0b0c87 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -15582,7 +15582,7 @@ public class StaticEndpointBuilders {
}
/**
* WhatsApp (camel-whatsapp)
- * Send messages.
+ * Send messages to WhatsApp.
*
* Category: cloud,api,chat
* Since: 3.18
@@ -15602,7 +15602,7 @@ public class StaticEndpointBuilders {
}
/**
* WhatsApp (camel-whatsapp)
- * Send messages.
+ * Send messages to WhatsApp.
*
* Category: cloud,api,chat
* Since: 3.18
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/WhatsAppEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/WhatsAppEndpointBuilderFactory.java
index 460c4d32436..5c6c94413cf 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/WhatsAppEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/WhatsAppEndpointBuilderFactory.java
@@ -17,7 +17,6 @@
package org.apache.camel.builder.endpoint.dsl;
import java.util.*;
-import java.util.Map;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.stream.*;
@@ -27,7 +26,7 @@ import org.apache.camel.builder.EndpointProducerBuilder;
import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
/**
- * Send messages.
+ * Send messages to WhatsApp.
*
* Generated by camel build tools - do NOT edit this file!
*/
@@ -36,842 +35,11 @@ public interface WhatsAppEndpointBuilderFactory {
/**
- * Builder for endpoint consumers for the WhatsApp component.
- */
- public interface WhatsAppEndpointConsumerBuilder
- extends
- EndpointConsumerBuilder {
- default AdvancedWhatsAppEndpointConsumerBuilder advanced() {
- return (AdvancedWhatsAppEndpointConsumerBuilder) this;
- }
- /**
- * If the polling consumer did not poll any files, you can enable this
- * option to send an empty message (no body) instead.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: false
- * Group: consumer
- *
- * @param sendEmptyMessageWhenIdle the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder sendEmptyMessageWhenIdle(
- boolean sendEmptyMessageWhenIdle) {
- doSetProperty("sendEmptyMessageWhenIdle",
sendEmptyMessageWhenIdle);
- return this;
- }
- /**
- * If the polling consumer did not poll any files, you can enable this
- * option to send an empty message (no body) instead.
- *
- * The option will be converted to a <code>boolean</code>
- * type.
- *
- * Default: false
- * Group: consumer
- *
- * @param sendEmptyMessageWhenIdle the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder sendEmptyMessageWhenIdle(
- String sendEmptyMessageWhenIdle) {
- doSetProperty("sendEmptyMessageWhenIdle",
sendEmptyMessageWhenIdle);
- return this;
- }
- /**
- * The number of subsequent error polls (failed due some error) that
- * should happen before the backoffMultipler should kick-in.
- *
- * The option is a: <code>int</code> type.
- *
- * Group: scheduler
- *
- * @param backoffErrorThreshold the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder backoffErrorThreshold(
- int backoffErrorThreshold) {
- doSetProperty("backoffErrorThreshold", backoffErrorThreshold);
- return this;
- }
- /**
- * The number of subsequent error polls (failed due some error) that
- * should happen before the backoffMultipler should kick-in.
- *
- * The option will be converted to a <code>int</code> type.
- *
- * Group: scheduler
- *
- * @param backoffErrorThreshold the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder backoffErrorThreshold(
- String backoffErrorThreshold) {
- doSetProperty("backoffErrorThreshold", backoffErrorThreshold);
- return this;
- }
- /**
- * The number of subsequent idle polls that should happen before the
- * backoffMultipler should kick-in.
- *
- * The option is a: <code>int</code> type.
- *
- * Group: scheduler
- *
- * @param backoffIdleThreshold the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder backoffIdleThreshold(
- int backoffIdleThreshold) {
- doSetProperty("backoffIdleThreshold", backoffIdleThreshold);
- return this;
- }
- /**
- * The number of subsequent idle polls that should happen before the
- * backoffMultipler should kick-in.
- *
- * The option will be converted to a <code>int</code> type.
- *
- * Group: scheduler
- *
- * @param backoffIdleThreshold the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder backoffIdleThreshold(
- String backoffIdleThreshold) {
- doSetProperty("backoffIdleThreshold", backoffIdleThreshold);
- return this;
- }
- /**
- * To let the scheduled polling consumer backoff if there has been a
- * number of subsequent idles/errors in a row. The multiplier is then
- * the number of polls that will be skipped before the next actual
- * attempt is happening again. When this option is in use then
- * backoffIdleThreshold and/or backoffErrorThreshold must also be
- * configured.
- *
- * The option is a: <code>int</code> type.
- *
- * Group: scheduler
- *
- * @param backoffMultiplier the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder backoffMultiplier(
- int backoffMultiplier) {
- doSetProperty("backoffMultiplier", backoffMultiplier);
- return this;
- }
- /**
- * To let the scheduled polling consumer backoff if there has been a
- * number of subsequent idles/errors in a row. The multiplier is then
- * the number of polls that will be skipped before the next actual
- * attempt is happening again. When this option is in use then
- * backoffIdleThreshold and/or backoffErrorThreshold must also be
- * configured.
- *
- * The option will be converted to a <code>int</code> type.
- *
- * Group: scheduler
- *
- * @param backoffMultiplier the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder backoffMultiplier(
- String backoffMultiplier) {
- doSetProperty("backoffMultiplier", backoffMultiplier);
- return this;
- }
- /**
- * Milliseconds before the next poll.
- *
- * The option is a: <code>long</code> type.
- *
- * Default: 500
- * Group: scheduler
- *
- * @param delay the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder delay(long delay) {
- doSetProperty("delay", delay);
- return this;
- }
- /**
- * Milliseconds before the next poll.
- *
- * The option will be converted to a <code>long</code>
type.
- *
- * Default: 500
- * Group: scheduler
- *
- * @param delay the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder delay(String delay) {
- doSetProperty("delay", delay);
- return this;
- }
- /**
- * If greedy is enabled, then the ScheduledPollConsumer will run
- * immediately again, if the previous run polled 1 or more messages.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: false
- * Group: scheduler
- *
- * @param greedy the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder greedy(boolean greedy) {
- doSetProperty("greedy", greedy);
- return this;
- }
- /**
- * If greedy is enabled, then the ScheduledPollConsumer will run
- * immediately again, if the previous run polled 1 or more messages.
- *
- * The option will be converted to a <code>boolean</code>
- * type.
- *
- * Default: false
- * Group: scheduler
- *
- * @param greedy the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder greedy(String greedy) {
- doSetProperty("greedy", greedy);
- return this;
- }
- /**
- * Milliseconds before the first poll starts.
- *
- * The option is a: <code>long</code> type.
- *
- * Default: 1000
- * Group: scheduler
- *
- * @param initialDelay the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder initialDelay(long
initialDelay) {
- doSetProperty("initialDelay", initialDelay);
- return this;
- }
- /**
- * Milliseconds before the first poll starts.
- *
- * The option will be converted to a <code>long</code>
type.
- *
- * Default: 1000
- * Group: scheduler
- *
- * @param initialDelay the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder initialDelay(String
initialDelay) {
- doSetProperty("initialDelay", initialDelay);
- return this;
- }
- /**
- * Specifies a maximum limit of number of fires. So if you set it to 1,
- * the scheduler will only fire once. If you set it to 5, it will only
- * fire five times. A value of zero or negative means fire forever.
- *
- * The option is a: <code>long</code> type.
- *
- * Default: 0
- * Group: scheduler
- *
- * @param repeatCount the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder repeatCount(long repeatCount) {
- doSetProperty("repeatCount", repeatCount);
- return this;
- }
- /**
- * Specifies a maximum limit of number of fires. So if you set it to 1,
- * the scheduler will only fire once. If you set it to 5, it will only
- * fire five times. A value of zero or negative means fire forever.
- *
- * The option will be converted to a <code>long</code>
type.
- *
- * Default: 0
- * Group: scheduler
- *
- * @param repeatCount the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder repeatCount(String
repeatCount) {
- doSetProperty("repeatCount", repeatCount);
- return this;
- }
- /**
- * The consumer logs a start/complete log line when it polls. This
- * option allows you to configure the logging level for that.
- *
- * The option is a:
- * <code>org.apache.camel.LoggingLevel</code> type.
- *
- * Default: TRACE
- * Group: scheduler
- *
- * @param runLoggingLevel the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder runLoggingLevel(
- org.apache.camel.LoggingLevel runLoggingLevel) {
- doSetProperty("runLoggingLevel", runLoggingLevel);
- return this;
- }
- /**
- * The consumer logs a start/complete log line when it polls. This
- * option allows you to configure the logging level for that.
- *
- * The option will be converted to a
- * <code>org.apache.camel.LoggingLevel</code> type.
- *
- * Default: TRACE
- * Group: scheduler
- *
- * @param runLoggingLevel the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder runLoggingLevel(
- String runLoggingLevel) {
- doSetProperty("runLoggingLevel", runLoggingLevel);
- return this;
- }
- /**
- * Allows for configuring a custom/shared thread pool to use for the
- * consumer. By default each consumer has its own single threaded
thread
- * pool.
- *
- * The option is a:
- *
<code>java.util.concurrent.ScheduledExecutorService</code> type.
- *
- * Group: scheduler
- *
- * @param scheduledExecutorService the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder scheduledExecutorService(
- ScheduledExecutorService scheduledExecutorService) {
- doSetProperty("scheduledExecutorService",
scheduledExecutorService);
- return this;
- }
- /**
- * Allows for configuring a custom/shared thread pool to use for the
- * consumer. By default each consumer has its own single threaded
thread
- * pool.
- *
- * The option will be converted to a
- *
<code>java.util.concurrent.ScheduledExecutorService</code> type.
- *
- * Group: scheduler
- *
- * @param scheduledExecutorService the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder scheduledExecutorService(
- String scheduledExecutorService) {
- doSetProperty("scheduledExecutorService",
scheduledExecutorService);
- return this;
- }
- /**
- * To use a cron scheduler from either camel-spring or camel-quartz
- * component. Use value spring or quartz for built in scheduler.
- *
- * The option is a: <code>java.lang.Object</code> type.
- *
- * Default: none
- * Group: scheduler
- *
- * @param scheduler the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder scheduler(Object scheduler) {
- doSetProperty("scheduler", scheduler);
- return this;
- }
- /**
- * To use a cron scheduler from either camel-spring or camel-quartz
- * component. Use value spring or quartz for built in scheduler.
- *
- * The option will be converted to a
- * <code>java.lang.Object</code> type.
- *
- * Default: none
- * Group: scheduler
- *
- * @param scheduler the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder scheduler(String scheduler) {
- doSetProperty("scheduler", scheduler);
- return this;
- }
- /**
- * To configure additional properties when using a custom scheduler or
- * any of the Quartz, Spring based scheduler.
- *
- * The option is a: <code>java.util.Map&lt;java.lang.String,
- * java.lang.Object&gt;</code> type.
- * The option is multivalued, and you can use the
- * schedulerProperties(String, Object) method to add a value (call the
- * method multiple times to set more values).
- *
- * Group: scheduler
- *
- * @param key the option key
- * @param value the option value
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder schedulerProperties(
- String key,
- Object value) {
- doSetMultiValueProperty("schedulerProperties", "scheduler." + key,
value);
- return this;
- }
- /**
- * To configure additional properties when using a custom scheduler or
- * any of the Quartz, Spring based scheduler.
- *
- * The option is a: <code>java.util.Map&lt;java.lang.String,
- * java.lang.Object&gt;</code> type.
- * The option is multivalued, and you can use the
- * schedulerProperties(String, Object) method to add a value (call the
- * method multiple times to set more values).
- *
- * Group: scheduler
- *
- * @param values the values
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder schedulerProperties(Map
values) {
- doSetMultiValueProperties("schedulerProperties", "scheduler.",
values);
- return this;
- }
- /**
- * Whether the scheduler should be auto started.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: true
- * Group: scheduler
- *
- * @param startScheduler the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder startScheduler(
- boolean startScheduler) {
- doSetProperty("startScheduler", startScheduler);
- return this;
- }
- /**
- * Whether the scheduler should be auto started.
- *
- * The option will be converted to a <code>boolean</code>
- * type.
- *
- * Default: true
- * Group: scheduler
- *
- * @param startScheduler the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder startScheduler(
- String startScheduler) {
- doSetProperty("startScheduler", startScheduler);
- return this;
- }
- /**
- * Time unit for initialDelay and delay options.
- *
- * The option is a:
- * <code>java.util.concurrent.TimeUnit</code> type.
- *
- * Default: MILLISECONDS
- * Group: scheduler
- *
- * @param timeUnit the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder timeUnit(TimeUnit timeUnit) {
- doSetProperty("timeUnit", timeUnit);
- return this;
- }
- /**
- * Time unit for initialDelay and delay options.
- *
- * The option will be converted to a
- * <code>java.util.concurrent.TimeUnit</code> type.
- *
- * Default: MILLISECONDS
- * Group: scheduler
- *
- * @param timeUnit the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder timeUnit(String timeUnit) {
- doSetProperty("timeUnit", timeUnit);
- return this;
- }
- /**
- * Controls if fixed delay or fixed rate is used. See
- * ScheduledExecutorService in JDK for details.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: true
- * Group: scheduler
- *
- * @param useFixedDelay the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder useFixedDelay(
- boolean useFixedDelay) {
- doSetProperty("useFixedDelay", useFixedDelay);
- return this;
- }
- /**
- * Controls if fixed delay or fixed rate is used. See
- * ScheduledExecutorService in JDK for details.
- *
- * The option will be converted to a <code>boolean</code>
- * type.
- *
- * Default: true
- * Group: scheduler
- *
- * @param useFixedDelay the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder useFixedDelay(
- String useFixedDelay) {
- doSetProperty("useFixedDelay", useFixedDelay);
- return this;
- }
- /**
- * The authorization access token taken from whatsapp-business
- * dashboard.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Required: true
- * Group: security
- *
- * @param authorizationToken the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointConsumerBuilder authorizationToken(
- String authorizationToken) {
- doSetProperty("authorizationToken", authorizationToken);
- return this;
- }
- }
-
- /**
- * Advanced builder for endpoint consumers for the WhatsApp component.
- */
- public interface AdvancedWhatsAppEndpointConsumerBuilder
- extends
- EndpointConsumerBuilder {
- default WhatsAppEndpointConsumerBuilder basic() {
- return (WhatsAppEndpointConsumerBuilder) this;
- }
- /**
- * 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.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: false
- * Group: consumer (advanced)
- *
- * @param bridgeErrorHandler the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder bridgeErrorHandler(
- boolean bridgeErrorHandler) {
- doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
- return this;
- }
- /**
- * 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.
- *
- * The option will be converted to a <code>boolean</code>
- * type.
- *
- * Default: false
- * Group: consumer (advanced)
- *
- * @param bridgeErrorHandler the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder bridgeErrorHandler(
- String bridgeErrorHandler) {
- doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
- return this;
- }
- /**
- * 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.
- *
- * The option is a:
- * <code>org.apache.camel.spi.ExceptionHandler</code> type.
- *
- * Group: consumer (advanced)
- *
- * @param exceptionHandler the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder exceptionHandler(
- org.apache.camel.spi.ExceptionHandler exceptionHandler) {
- doSetProperty("exceptionHandler", exceptionHandler);
- return this;
- }
- /**
- * 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.
- *
- * The option will be converted to a
- * <code>org.apache.camel.spi.ExceptionHandler</code> type.
- *
- * Group: consumer (advanced)
- *
- * @param exceptionHandler the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder exceptionHandler(
- String exceptionHandler) {
- doSetProperty("exceptionHandler", exceptionHandler);
- return this;
- }
- /**
- * Sets the exchange pattern when the consumer creates an exchange.
- *
- * The option is a:
- * <code>org.apache.camel.ExchangePattern</code> type.
- *
- * Group: consumer (advanced)
- *
- * @param exchangePattern the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder exchangePattern(
- org.apache.camel.ExchangePattern exchangePattern) {
- doSetProperty("exchangePattern", exchangePattern);
- return this;
- }
- /**
- * Sets the exchange pattern when the consumer creates an exchange.
- *
- * The option will be converted to a
- * <code>org.apache.camel.ExchangePattern</code> type.
- *
- * Group: consumer (advanced)
- *
- * @param exchangePattern the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder exchangePattern(
- String exchangePattern) {
- doSetProperty("exchangePattern", exchangePattern);
- return this;
- }
- /**
- * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing
- * you to provide your custom implementation to control error handling
- * usually occurred during the poll operation before an Exchange have
- * been created and being routed in Camel.
- *
- * The option is a:
- *
<code>org.apache.camel.spi.PollingConsumerPollStrategy</code> type.
- *
- * Group: consumer (advanced)
- *
- * @param pollStrategy the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder pollStrategy(
- org.apache.camel.spi.PollingConsumerPollStrategy pollStrategy)
{
- doSetProperty("pollStrategy", pollStrategy);
- return this;
- }
- /**
- * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing
- * you to provide your custom implementation to control error handling
- * usually occurred during the poll operation before an Exchange have
- * been created and being routed in Camel.
- *
- * The option will be converted to a
- *
<code>org.apache.camel.spi.PollingConsumerPollStrategy</code> type.
- *
- * Group: consumer (advanced)
- *
- * @param pollStrategy the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder pollStrategy(
- String pollStrategy) {
- doSetProperty("pollStrategy", pollStrategy);
- return this;
- }
- /**
- * Facebook graph api version.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: advanced
- *
- * @param apiVersion the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder apiVersion(
- String apiVersion) {
- doSetProperty("apiVersion", apiVersion);
- return this;
- }
- /**
- * Can be used to set an alternative base URI, e.g. when you want to
- * test the component against a mock WhatsApp API.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: advanced
- *
- * @param baseUri the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder baseUri(String
baseUri) {
- doSetProperty("baseUri", baseUri);
- return this;
- }
- /**
- * HttpClient implementation.
- *
- * The option is a: <code>java.net.http.HttpClient</code>
- * type.
- *
- * Group: advanced
- *
- * @param httpClient the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder httpClient(
- java.net.http.HttpClient httpClient) {
- doSetProperty("httpClient", httpClient);
- return this;
- }
- /**
- * HttpClient implementation.
- *
- * The option will be converted to a
- * <code>java.net.http.HttpClient</code> type.
- *
- * Group: advanced
- *
- * @param httpClient the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder httpClient(
- String httpClient) {
- doSetProperty("httpClient", httpClient);
- return this;
- }
- /**
- * Webhook path.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Default: webhook
- * Group: advanced
- *
- * @param webhookPath the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder webhookPath(
- String webhookPath) {
- doSetProperty("webhookPath", webhookPath);
- return this;
- }
- /**
- * Webhook verify token.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: advanced
- *
- * @param webhookVerifyToken the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder webhookVerifyToken(
- String webhookVerifyToken) {
- doSetProperty("webhookVerifyToken", webhookVerifyToken);
- return this;
- }
- /**
- * WhatsApp service implementation.
- *
- * The option is a:
- *
<code>org.apache.camel.component.whatsapp.WhatsAppService</code>
type.
- *
- * Group: advanced
- *
- * @param whatsappService the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder whatsappService(
- org.apache.camel.component.whatsapp.WhatsAppService
whatsappService) {
- doSetProperty("whatsappService", whatsappService);
- return this;
- }
- /**
- * WhatsApp service implementation.
- *
- * The option will be converted to a
- *
<code>org.apache.camel.component.whatsapp.WhatsAppService</code>
type.
- *
- * Group: advanced
- *
- * @param whatsappService the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointConsumerBuilder whatsappService(
- String whatsappService) {
- doSetProperty("whatsappService", whatsappService);
- return this;
- }
- }
-
- /**
- * Builder for endpoint producers for the WhatsApp component.
+ * Builder for endpoint for the WhatsApp component.
*/
- public interface WhatsAppEndpointProducerBuilder
- extends
- EndpointProducerBuilder {
- default AdvancedWhatsAppEndpointProducerBuilder advanced() {
- return (AdvancedWhatsAppEndpointProducerBuilder) this;
+ public interface WhatsAppEndpointBuilder extends EndpointProducerBuilder {
+ default AdvancedWhatsAppEndpointBuilder advanced() {
+ return (AdvancedWhatsAppEndpointBuilder) this;
}
/**
* The authorization access token taken from whatsapp-business
@@ -885,7 +53,7 @@ public interface WhatsAppEndpointBuilderFactory {
* @param authorizationToken the value to set
* @return the dsl builder
*/
- default WhatsAppEndpointProducerBuilder authorizationToken(
+ default WhatsAppEndpointBuilder authorizationToken(
String authorizationToken) {
doSetProperty("authorizationToken", authorizationToken);
return this;
@@ -893,13 +61,13 @@ public interface WhatsAppEndpointBuilderFactory {
}
/**
- * Advanced builder for endpoint producers for the WhatsApp component.
+ * Advanced builder for endpoint for the WhatsApp component.
*/
- public interface AdvancedWhatsAppEndpointProducerBuilder
+ public interface AdvancedWhatsAppEndpointBuilder
extends
EndpointProducerBuilder {
- default WhatsAppEndpointProducerBuilder basic() {
- return (WhatsAppEndpointProducerBuilder) this;
+ default WhatsAppEndpointBuilder basic() {
+ return (WhatsAppEndpointBuilder) this;
}
/**
* Whether the producer should be started lazy (on the first message).
@@ -920,7 +88,7 @@ public interface WhatsAppEndpointBuilderFactory {
* @param lazyStartProducer the value to set
* @return the dsl builder
*/
- default AdvancedWhatsAppEndpointProducerBuilder lazyStartProducer(
+ default AdvancedWhatsAppEndpointBuilder lazyStartProducer(
boolean lazyStartProducer) {
doSetProperty("lazyStartProducer", lazyStartProducer);
return this;
@@ -945,177 +113,11 @@ public interface WhatsAppEndpointBuilderFactory {
* @param lazyStartProducer the value to set
* @return the dsl builder
*/
- default AdvancedWhatsAppEndpointProducerBuilder lazyStartProducer(
+ default AdvancedWhatsAppEndpointBuilder lazyStartProducer(
String lazyStartProducer) {
doSetProperty("lazyStartProducer", lazyStartProducer);
return this;
}
- /**
- * Facebook graph api version.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: advanced
- *
- * @param apiVersion the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointProducerBuilder apiVersion(
- String apiVersion) {
- doSetProperty("apiVersion", apiVersion);
- return this;
- }
- /**
- * Can be used to set an alternative base URI, e.g. when you want to
- * test the component against a mock WhatsApp API.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: advanced
- *
- * @param baseUri the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointProducerBuilder baseUri(String
baseUri) {
- doSetProperty("baseUri", baseUri);
- return this;
- }
- /**
- * HttpClient implementation.
- *
- * The option is a: <code>java.net.http.HttpClient</code>
- * type.
- *
- * Group: advanced
- *
- * @param httpClient the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointProducerBuilder httpClient(
- java.net.http.HttpClient httpClient) {
- doSetProperty("httpClient", httpClient);
- return this;
- }
- /**
- * HttpClient implementation.
- *
- * The option will be converted to a
- * <code>java.net.http.HttpClient</code> type.
- *
- * Group: advanced
- *
- * @param httpClient the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointProducerBuilder httpClient(
- String httpClient) {
- doSetProperty("httpClient", httpClient);
- return this;
- }
- /**
- * Webhook path.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Default: webhook
- * Group: advanced
- *
- * @param webhookPath the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointProducerBuilder webhookPath(
- String webhookPath) {
- doSetProperty("webhookPath", webhookPath);
- return this;
- }
- /**
- * Webhook verify token.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: advanced
- *
- * @param webhookVerifyToken the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointProducerBuilder webhookVerifyToken(
- String webhookVerifyToken) {
- doSetProperty("webhookVerifyToken", webhookVerifyToken);
- return this;
- }
- /**
- * WhatsApp service implementation.
- *
- * The option is a:
- *
<code>org.apache.camel.component.whatsapp.WhatsAppService</code>
type.
- *
- * Group: advanced
- *
- * @param whatsappService the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointProducerBuilder whatsappService(
- org.apache.camel.component.whatsapp.WhatsAppService
whatsappService) {
- doSetProperty("whatsappService", whatsappService);
- return this;
- }
- /**
- * WhatsApp service implementation.
- *
- * The option will be converted to a
- *
<code>org.apache.camel.component.whatsapp.WhatsAppService</code>
type.
- *
- * Group: advanced
- *
- * @param whatsappService the value to set
- * @return the dsl builder
- */
- default AdvancedWhatsAppEndpointProducerBuilder whatsappService(
- String whatsappService) {
- doSetProperty("whatsappService", whatsappService);
- return this;
- }
- }
-
- /**
- * Builder for endpoint for the WhatsApp component.
- */
- public interface WhatsAppEndpointBuilder
- extends
- WhatsAppEndpointConsumerBuilder,
- WhatsAppEndpointProducerBuilder {
- default AdvancedWhatsAppEndpointBuilder advanced() {
- return (AdvancedWhatsAppEndpointBuilder) this;
- }
- /**
- * The authorization access token taken from whatsapp-business
- * dashboard.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Required: true
- * Group: security
- *
- * @param authorizationToken the value to set
- * @return the dsl builder
- */
- default WhatsAppEndpointBuilder authorizationToken(
- String authorizationToken) {
- doSetProperty("authorizationToken", authorizationToken);
- return this;
- }
- }
-
- /**
- * Advanced builder for endpoint for the WhatsApp component.
- */
- public interface AdvancedWhatsAppEndpointBuilder
- extends
- AdvancedWhatsAppEndpointConsumerBuilder,
- AdvancedWhatsAppEndpointProducerBuilder {
- default WhatsAppEndpointBuilder basic() {
- return (WhatsAppEndpointBuilder) this;
- }
/**
* Facebook graph api version.
*
@@ -1243,7 +245,7 @@ public interface WhatsAppEndpointBuilderFactory {
public interface WhatsAppBuilders {
/**
* WhatsApp (camel-whatsapp)
- * Send messages.
+ * Send messages to WhatsApp.
*
* Category: cloud,api,chat
* Since: 3.18
@@ -1256,7 +258,7 @@ public interface WhatsAppEndpointBuilderFactory {
}
/**
* WhatsApp (camel-whatsapp)
- * Send messages.
+ * Send messages to WhatsApp.
*
* Category: cloud,api,chat
* Since: 3.18
@@ -1275,7 +277,7 @@ public interface WhatsAppEndpointBuilderFactory {
}
/**
* WhatsApp (camel-whatsapp)
- * Send messages.
+ * Send messages to WhatsApp.
*
* Category: cloud,api,chat
* Since: 3.18