WordPress
Read, create, update and delete the posts and users of a WordPress site with the WordPress REST API.
What’s inside
-
WordPress component, URI syntax:
wordpress:operation
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-wordpress-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 15 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.wordpress.api-version | The version of the WordPress REST API, used in the request paths (wp/v2/posts for version 2). | 2 | String |
camel.component.wordpress.autowired-enabled | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.wordpress.bridge-error-handler | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. 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 |
camel.component.wordpress.configuration | The configuration whose values are the defaults of every endpoint of this component. The option is a org.apache.camel.component.wordpress.WordpressConfiguration type. | WordpressConfiguration | |
camel.component.wordpress.criteria | The search parameters of the consumer, with the property names of PostSearchCriteria or UserSearchCriteria, for example criteria.perPage=10. Not used when searchCriteria or id is set. This is a multi-value option with prefix: criteria. | Object> | |
camel.component.wordpress.enabled | Whether to enable auto configuration of the wordpress component. This is enabled by default. | Boolean | |
camel.component.wordpress.force | Whether the delete of a post removes it permanently instead of moving it to the trash. A user is always deleted permanently. | false | Boolean |
camel.component.wordpress.health-check-consumer-enabled | Used for enabling or disabling all consumer based health checks from this component | true | Boolean |
camel.component.wordpress.health-check-producer-enabled | Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true. | true | Boolean |
camel.component.wordpress.id | The id of the post or user to work with. With it, the consumer polls only this entity, and the producer updates it, or deletes it with the delete operation detail. Without it, the consumer polls the search criteria and the producer creates a new entity. | Integer | |
camel.component.wordpress.lazy-start-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 starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean |
camel.component.wordpress.password | The password of the authorized user. | String | |
camel.component.wordpress.search-criteria | The search criteria of the consumer: a PostSearchCriteria for post or a UserSearchCriteria for user, of the org.apache.camel.component.wordpress.api.model package. When set, the criteria options are not used. The option is a org.apache.camel.component.wordpress.api.model.SearchCriteria type. | SearchCriteria | |
camel.component.wordpress.url | The URL of the WordPress REST API of your site, for example http://myblog.com/wp-json/ | String | |
camel.component.wordpress.user | The name of an authorized user, needed to perform write operations. | String |