CAMEL-10937: Camel components - Configured using setters should support property placeholders
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c7907e9f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c7907e9f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c7907e9f Branch: refs/heads/master Commit: c7907e9f789f8e61f299091d62b8d48fe0f60abd Parents: cc06080 Author: Claus Ibsen <davscl...@apache.org> Authored: Sat Mar 4 12:49:51 2017 +0100 Committer: Claus Ibsen <davscl...@apache.org> Committed: Sat Mar 4 12:49:51 2017 +0100 ---------------------------------------------------------------------- camel-core/src/main/docs/bean-component.adoc | 14 +++- camel-core/src/main/docs/binding-component.adoc | 14 +++- camel-core/src/main/docs/browse-component.adoc | 14 +++- camel-core/src/main/docs/class-component.adoc | 14 +++- .../src/main/docs/controlbus-component.adoc | 14 +++- .../src/main/docs/dataformat-component.adoc | 14 +++- camel-core/src/main/docs/dataset-component.adoc | 12 +++- camel-core/src/main/docs/direct-component.adoc | 5 +- .../src/main/docs/direct-vm-component.adoc | 5 +- camel-core/src/main/docs/file-component.adoc | 12 +++- .../src/main/docs/language-component.adoc | 14 +++- camel-core/src/main/docs/log-component.adoc | 5 +- camel-core/src/main/docs/mock-component.adoc | 12 +++- .../src/main/docs/properties-component.adoc | 5 +- camel-core/src/main/docs/ref-component.adoc | 14 +++- .../src/main/docs/rest-api-component.adoc | 14 +++- camel-core/src/main/docs/rest-component.adoc | 5 +- .../src/main/docs/scheduler-component.adoc | 5 +- camel-core/src/main/docs/seda-component.adoc | 5 +- camel-core/src/main/docs/stub-component.adoc | 5 +- camel-core/src/main/docs/test-component.adoc | 12 +++- camel-core/src/main/docs/timer-component.adoc | 14 +++- .../src/main/docs/validator-component.adoc | 5 +- camel-core/src/main/docs/vm-component.adoc | 5 +- camel-core/src/main/docs/xslt-component.adoc | 5 +- .../org/apache/camel/builder/RouteBuilder.java | 33 +++++++++ .../properties/DefaultPropertiesParser.java | 5 ++ .../properties/PropertiesComponent.java | 6 ++ .../org/apache/camel/impl/DefaultComponent.java | 64 +++++++++++++----- .../apache/camel/util/CamelContextHelper.java | 48 ++++++++++++++ ...omponentResolvePropertyPlaceholdersTest.java | 70 ++++++++++++++++++++ .../properties/myproperties.properties | 2 + .../src/main/docs/ahc-ws-component.adoc | 5 +- .../camel-ahc/src/main/docs/ahc-component.adoc | 5 +- .../src/main/docs/amqp-component.adoc | 3 +- .../src/main/docs/apns-component.adoc | 5 +- .../src/main/docs/asterisk-component.adoc | 14 +++- .../src/main/docs/atmos-component.adoc | 14 +++- .../docs/atmosphere-websocket-component.adoc | 3 +- .../src/main/docs/atom-component.adoc | 14 +++- .../src/main/docs/avro-component.adoc | 5 +- .../src/main/docs/aws-cw-component.adoc | 14 +++- .../src/main/docs/aws-ddb-component.adoc | 14 +++- .../src/main/docs/aws-ddbstream-component.adoc | 14 +++- .../src/main/docs/aws-ec2-component.adoc | 14 +++- .../src/main/docs/aws-kinesis-component.adoc | 14 +++- .../src/main/docs/aws-s3-component.adoc | 14 +++- .../src/main/docs/aws-sdb-component.adoc | 14 +++- .../src/main/docs/aws-ses-component.adoc | 14 +++- .../src/main/docs/aws-sns-component.adoc | 14 +++- .../src/main/docs/aws-sqs-component.adoc | 14 +++- .../src/main/docs/aws-swf-component.adoc | 14 +++- .../src/main/docs/azure-blob-component.adoc | 12 +++- .../src/main/docs/azure-queue-component.adoc | 12 +++- .../src/main/docs/bean-validator-component.adoc | 14 +++- .../src/main/docs/beanstalk-component.adoc | 5 +- .../src/main/docs/bonita-component.adoc | 14 +++- .../camel-box/src/main/docs/box-component.adoc | 5 +- .../src/main/docs/braintree-component.adoc | 5 +- .../src/main/docs/cache-component.adoc | 5 +- .../src/main/docs/cql-component.adoc | 14 +++- .../main/docs/chronicle-engine-component.adoc | 14 +++- .../src/main/docs/chunk-component.adoc | 12 +++- .../src/main/docs/cm-sms-component.adoc | 14 +++- .../src/main/docs/cmis-component.adoc | 5 +- .../src/main/docs/coap-component.adoc | 14 +++- .../src/main/docs/cometd-component.adoc | 5 +- .../src/main/docs/consul-component.adoc | 14 +++- .../src/main/docs/context-component.adoc | 14 +++- .../src/main/docs/couchbase-component.adoc | 12 +++- .../src/main/docs/couchdb-component.adoc | 14 +++- .../src/main/docs/crypto-component.adoc | 5 +- .../camel-cxf/src/main/docs/cxf-component.adoc | 5 +- .../src/main/docs/cxfrs-component.adoc | 5 +- .../src/main/docs/disruptor-component.adoc | 5 +- .../camel-dns/src/main/docs/dns-component.adoc | 14 +++- .../src/main/docs/docker-component.adoc | 5 +- .../src/main/docs/dozer-component.adoc | 14 +++- .../src/main/docs/drill-component.adoc | 14 +++- .../src/main/docs/dropbox-component.adoc | 14 +++- .../src/main/docs/ehcache-component.adoc | 14 +++- .../camel-ejb/src/main/docs/ejb-component.adoc | 5 +- .../src/main/docs/elasticsearch-component.adoc | 5 +- .../src/main/docs/elasticsearch5-component.adoc | 14 +++- .../src/main/docs/elsql-component.adoc | 3 +- .../src/main/docs/etcd-component.adoc | 12 +++- .../src/main/docs/eventadmin-component.adoc | 5 +- .../src/main/docs/exec-component.adoc | 14 +++- .../src/main/docs/facebook-component.adoc | 5 +- .../src/main/docs/flatpack-component.adoc | 14 +++- .../src/main/docs/flink-component.adoc | 5 +- .../camel-fop/src/main/docs/fop-component.adoc | 14 +++- .../src/main/docs/freemarker-component.adoc | 3 +- .../camel-ftp/src/main/docs/ftp-component.adoc | 12 +++- .../camel-ftp/src/main/docs/ftps-component.adoc | 12 +++- .../camel-ftp/src/main/docs/sftp-component.adoc | 12 +++- .../src/main/docs/ganglia-component.adoc | 5 +- .../src/main/docs/geocoder-component.adoc | 14 +++- .../camel-git/src/main/docs/git-component.adoc | 14 +++- .../src/main/docs/github-component.adoc | 14 +++- .../main/docs/google-calendar-component.adoc | 5 +- .../src/main/docs/google-drive-component.adoc | 5 +- .../src/main/docs/google-mail-component.adoc | 5 +- .../src/main/docs/google-pubsub-component.adoc | 5 +- .../src/main/docs/gora-component.adoc | 14 +++- .../src/main/docs/guava-eventbus-component.adoc | 5 +- .../src/main/docs/hazelcast-component.adoc | 3 +- .../src/main/docs/hbase-component.adoc | 5 +- .../src/main/docs/hdfs-component.adoc | 5 +- .../src/main/docs/hdfs2-component.adoc | 5 +- .../src/main/docs/hipchat-component.adoc | 14 +++- .../src/main/docs/http-component.adoc | 3 +- .../src/main/docs/http4-component.adoc | 3 +- .../src/main/docs/ibatis-component.adoc | 5 +- .../src/main/docs/infinispan-component.adoc | 14 +++- .../src/main/docs/influxdb-component.adoc | 14 +++- .../camel-irc/src/main/docs/irc-component.adoc | 12 +++- .../src/main/docs/ironmq-component.adoc | 14 +++- .../src/main/docs/javaspace-component.adoc | 14 +++- .../src/main/docs/jbpm-component.adoc | 14 +++- .../src/main/docs/jcache-component.adoc | 3 +- .../src/main/docs/jclouds-component.adoc | 5 +- .../camel-jcr/src/main/docs/jcr-component.adoc | 14 +++- .../src/main/docs/jdbc-component.adoc | 5 +- .../src/main/docs/jetty-component.adoc | 3 +- .../src/main/docs/jgroups-component.adoc | 5 +- .../src/main/docs/jing-component.adoc | 14 +++- .../src/main/docs/jira-component.adoc | 14 +++- .../camel-jms/src/main/docs/jms-component.adoc | 3 +- .../camel-jmx/src/main/docs/jmx-component.adoc | 14 +++- .../src/main/docs/jolt-component.adoc | 3 +- .../camel-jpa/src/main/docs/jpa-component.adoc | 3 +- .../camel-jsch/src/main/docs/scp-component.adoc | 5 +- .../src/main/docs/jt400-component.adoc | 5 +- .../src/main/docs/kafka-component.adoc | 3 +- .../src/main/docs/kestrel-component.adoc | 5 +- .../src/main/docs/krati-component.adoc | 14 +++- .../src/main/docs/kubernetes-component.adoc | 14 +++- .../src/main/docs/ldap-component.adoc | 14 +++- .../src/main/docs/linkedin-component.adoc | 5 +- .../src/main/docs/lucene-component.adoc | 5 +- .../src/main/docs/lumberjack-component.adoc | 5 +- .../src/main/docs/mail-component.adoc | 3 +- .../src/main/docs/metrics-component.adoc | 5 +- .../src/main/docs/mina-component.adoc | 3 +- .../src/main/docs/mina2-component.adoc | 3 +- .../src/main/docs/mllp-component.adoc | 12 +++- .../src/main/docs/mongodb-gridfs-component.adoc | 14 +++- .../src/main/docs/mongodb-component.adoc | 12 +++- .../src/main/docs/mongodb3-component.adoc | 14 +++- .../src/main/docs/mqtt-component.adoc | 3 +- .../camel-msv/src/main/docs/msv-component.adoc | 5 +- .../src/main/docs/mustache-component.adoc | 3 +- .../src/main/docs/mvel-component.adoc | 12 +++- .../src/main/docs/mybatis-component.adoc | 5 +- .../src/main/docs/nagios-component.adoc | 5 +- .../src/main/docs/nats-component.adoc | 14 +++- .../src/main/docs/netty-http-component.adoc | 3 +- .../src/main/docs/netty-component.adoc | 3 +- .../src/main/docs/netty4-http-component.adoc | 3 +- .../src/main/docs/netty4-component.adoc | 3 +- .../src/main/docs/olingo2-component.adoc | 5 +- .../src/main/docs/openshift-component.adoc | 5 +- .../main/docs/openstack-cinder-component.adoc | 14 +++- .../main/docs/openstack-glance-component.adoc | 14 +++- .../main/docs/openstack-keystone-component.adoc | 14 +++- .../main/docs/openstack-neutron-component.adoc | 14 +++- .../src/main/docs/openstack-nova-component.adoc | 14 +++- .../main/docs/openstack-swift-component.adoc | 14 +++- .../src/main/docs/optaplanner-component.adoc | 14 +++- .../src/main/docs/paho-component.adoc | 5 +- .../src/main/docs/paxlogging-component.adoc | 5 +- .../camel-pdf/src/main/docs/pdf-component.adoc | 14 +++- .../src/main/docs/pgevent-component.adoc | 14 +++- .../src/main/docs/lpr-component.adoc | 14 +++- .../src/main/docs/quartz-component.adoc | 5 +- .../src/main/docs/quartz2-component.adoc | 3 +- .../src/main/docs/quickfix-component.adoc | 5 +- .../src/main/docs/rabbitmq-component.adoc | 12 +++- .../main/docs/reactive-streams-component.adoc | 5 +- .../src/main/docs/restlet-component.adoc | 5 +- .../camel-rmi/src/main/docs/rmi-component.adoc | 14 +++- .../src/main/docs/routebox-component.adoc | 14 +++- .../camel-rss/src/main/docs/rss-component.adoc | 14 +++- .../src/main/docs/salesforce-component.adoc | 3 +- .../src/main/docs/sap-netweaver-component.adoc | 14 +++- .../src/main/docs/xquery-component.adoc | 5 +- .../src/main/docs/schematron-component.adoc | 14 +++- .../src/main/docs/servicenow-component.adoc | 5 +- .../src/main/docs/servlet-component.adoc | 3 +- .../camel-sip/src/main/docs/sip-component.adoc | 14 +++- .../src/main/docs/sjms-batch-component.adoc | 5 +- .../src/main/docs/sjms-component.adoc | 3 +- .../src/main/docs/slack-component.adoc | 5 +- .../src/main/docs/smpp-component.adoc | 5 +- .../src/main/docs/snmp-component.adoc | 14 +++- .../src/main/docs/spark-rest-component.adoc | 5 +- .../src/main/docs/spark-component.adoc | 5 +- .../src/main/docs/splunk-component.adoc | 5 +- .../src/main/docs/spring-batch-component.adoc | 5 +- .../main/docs/spring-integration-component.adoc | 14 +++- .../src/main/docs/spring-ldap-component.adoc | 14 +++- .../src/main/docs/spring-redis-component.adoc | 14 +++- .../src/main/docs/spring-ws-component.adoc | 14 +++- .../src/main/docs/spring-event-component.adoc | 5 +- .../camel-sql/src/main/docs/sql-component.adoc | 3 +- .../src/main/docs/sql-stored-component.adoc | 5 +- .../camel-ssh/src/main/docs/ssh-component.adoc | 5 +- .../src/main/docs/stax-component.adoc | 14 +++- .../src/main/docs/stomp-component.adoc | 5 +- .../src/main/docs/stream-component.adoc | 14 +++- .../main/docs/string-template-component.adoc | 12 +++- .../src/main/docs/telegram-component.adoc | 5 +- .../src/main/docs/tika-component.adoc | 14 +++- .../src/main/docs/twitter-component.adoc | 3 +- .../src/main/docs/undertow-component.adoc | 5 +- .../src/main/docs/velocity-component.adoc | 3 +- .../src/main/docs/vertx-component.adoc | 5 +- .../src/main/docs/weather-component.adoc | 14 +++- .../src/main/docs/websocket-component.adoc | 3 +- .../src/main/docs/xmlrpc-component.adoc | 14 +++- .../src/main/docs/xmlsecurity-component.adoc | 5 +- .../src/main/docs/xmpp-component.adoc | 14 +++- .../src/main/docs/yammer-component.adoc | 3 +- .../src/main/docs/zookeeper-component.adoc | 5 +- .../example/kafka/MessagePublisherClient.java | 12 +++- .../springboot/AhcComponentConfiguration.java | 15 +++++ .../ws/springboot/WsComponentConfiguration.java | 15 +++++ .../springboot/AMQPComponentConfiguration.java | 15 +++++ .../springboot/ApnsComponentConfiguration.java | 15 +++++ .../AsteriskComponentAutoConfiguration.java | 33 ++++++++- .../AsteriskComponentConfiguration.java | 45 +++++++++++++ .../AtmosComponentAutoConfiguration.java | 34 +++++++++- .../springboot/AtmosComponentConfiguration.java | 44 ++++++++++++ .../WebsocketComponentConfiguration.java | 15 +++++ .../AtomComponentAutoConfiguration.java | 34 +++++++++- .../springboot/AtomComponentConfiguration.java | 44 ++++++++++++ .../springboot/AvroComponentConfiguration.java | 15 +++++ .../CwComponentAutoConfiguration.java | 34 +++++++++- .../cw/springboot/CwComponentConfiguration.java | 44 ++++++++++++ .../DdbComponentAutoConfiguration.java | 34 +++++++++- .../springboot/DdbComponentConfiguration.java | 45 +++++++++++++ .../DdbStreamComponentAutoConfiguration.java | 33 ++++++++- .../DdbStreamComponentConfiguration.java | 44 ++++++++++++ .../EC2ComponentAutoConfiguration.java | 34 +++++++++- .../springboot/EC2ComponentConfiguration.java | 44 ++++++++++++ .../KinesisComponentAutoConfiguration.java | 35 +++++++++- .../KinesisComponentConfiguration.java | 45 +++++++++++++ .../S3ComponentAutoConfiguration.java | 34 +++++++++- .../s3/springboot/S3ComponentConfiguration.java | 45 +++++++++++++ .../SdbComponentAutoConfiguration.java | 34 +++++++++- .../springboot/SdbComponentConfiguration.java | 45 +++++++++++++ .../SesComponentAutoConfiguration.java | 34 +++++++++- .../springboot/SesComponentConfiguration.java | 44 ++++++++++++ .../SnsComponentAutoConfiguration.java | 34 +++++++++- .../springboot/SnsComponentConfiguration.java | 45 +++++++++++++ .../SqsComponentAutoConfiguration.java | 34 +++++++++- .../springboot/SqsComponentConfiguration.java | 45 +++++++++++++ .../SWFComponentAutoConfiguration.java | 34 +++++++++- .../springboot/SWFComponentConfiguration.java | 45 +++++++++++++ .../BlobServiceComponentAutoConfiguration.java | 33 ++++++++- .../BlobServiceComponentConfiguration.java | 45 +++++++++++++ .../QueueServiceComponentAutoConfiguration.java | 33 ++++++++- .../QueueServiceComponentConfiguration.java | 45 +++++++++++++ ...BeanValidatorComponentAutoConfiguration.java | 33 ++++++++- .../BeanValidatorComponentConfiguration.java | 45 +++++++++++++ .../BeanstalkComponentConfiguration.java | 15 +++++ .../BonitaComponentAutoConfiguration.java | 34 +++++++++- .../BonitaComponentConfiguration.java | 44 ++++++++++++ .../springboot/BoxComponentConfiguration.java | 15 +++++ .../BraintreeComponentConfiguration.java | 15 +++++ .../springboot/CacheComponentConfiguration.java | 15 +++++ .../CassandraComponentAutoConfiguration.java | 33 ++++++++- .../CassandraComponentConfiguration.java | 45 +++++++++++++ ...ronicleEngineComponentAutoConfiguration.java | 34 +++++++++- .../ChronicleEngineComponentConfiguration.java | 45 +++++++++++++ .../ChunkComponentAutoConfiguration.java | 34 +++++++++- .../springboot/ChunkComponentConfiguration.java | 44 ++++++++++++ .../CMComponentAutoConfiguration.java | 34 +++++++++- .../cm/springboot/CMComponentConfiguration.java | 44 ++++++++++++ .../springboot/CMISComponentConfiguration.java | 15 +++++ .../CoAPComponentAutoConfiguration.java | 34 +++++++++- .../springboot/CoAPComponentConfiguration.java | 45 +++++++++++++ .../CometdComponentConfiguration.java | 15 +++++ .../ConsulComponentAutoConfiguration.java | 34 +++++++++- .../ConsulComponentConfiguration.java | 45 +++++++++++++ ...lifiedContextComponentAutoConfiguration.java | 34 +++++++++- .../QualifiedContextComponentConfiguration.java | 45 +++++++++++++ .../BeanComponentAutoConfiguration.java | 34 +++++++++- .../springboot/BeanComponentConfiguration.java | 44 ++++++++++++ .../ClassComponentAutoConfiguration.java | 34 +++++++++- .../springboot/ClassComponentConfiguration.java | 44 ++++++++++++ .../BindingNameComponentAutoConfiguration.java | 33 ++++++++- .../BindingNameComponentConfiguration.java | 45 +++++++++++++ .../BrowseComponentAutoConfiguration.java | 34 +++++++++- .../BrowseComponentConfiguration.java | 45 +++++++++++++ .../ControlBusComponentAutoConfiguration.java | 33 ++++++++- .../ControlBusComponentConfiguration.java | 45 +++++++++++++ .../DataFormatComponentAutoConfiguration.java | 33 ++++++++- .../DataFormatComponentConfiguration.java | 45 +++++++++++++ .../DataSetComponentAutoConfiguration.java | 35 +++++++++- .../DataSetComponentConfiguration.java | 45 +++++++++++++ .../DirectComponentConfiguration.java | 15 +++++ .../DirectVmComponentConfiguration.java | 15 +++++ .../FileComponentAutoConfiguration.java | 34 +++++++++- .../springboot/FileComponentConfiguration.java | 44 ++++++++++++ .../LanguageComponentAutoConfiguration.java | 33 ++++++++- .../LanguageComponentConfiguration.java | 45 +++++++++++++ .../springboot/LogComponentConfiguration.java | 15 +++++ .../MockComponentAutoConfiguration.java | 34 +++++++++- .../springboot/MockComponentConfiguration.java | 45 +++++++++++++ .../PropertiesComponentConfiguration.java | 15 +++++ .../RefComponentAutoConfiguration.java | 34 +++++++++- .../springboot/RefComponentConfiguration.java | 45 +++++++++++++ .../RestApiComponentAutoConfiguration.java | 35 +++++++++- .../RestApiComponentConfiguration.java | 45 +++++++++++++ .../springboot/RestComponentConfiguration.java | 15 +++++ .../SchedulerComponentConfiguration.java | 15 +++++ .../springboot/SedaComponentConfiguration.java | 15 +++++ .../springboot/StubComponentConfiguration.java | 15 +++++ .../TestComponentAutoConfiguration.java | 34 +++++++++- .../springboot/TestComponentConfiguration.java | 45 +++++++++++++ .../TimerComponentAutoConfiguration.java | 34 +++++++++- .../springboot/TimerComponentConfiguration.java | 45 +++++++++++++ .../ValidatorComponentConfiguration.java | 15 +++++ .../vm/springboot/VmComponentConfiguration.java | 15 +++++ .../springboot/XsltComponentConfiguration.java | 15 +++++ .../CouchbaseComponentAutoConfiguration.java | 33 ++++++++- .../CouchbaseComponentConfiguration.java | 45 +++++++++++++ .../CouchDbComponentAutoConfiguration.java | 35 +++++++++- .../CouchDbComponentConfiguration.java | 44 ++++++++++++ .../DigitalSignatureComponentConfiguration.java | 15 +++++ .../springboot/CxfRsComponentConfiguration.java | 15 +++++ .../springboot/CxfComponentConfiguration.java | 15 +++++ .../DisruptorComponentConfiguration.java | 15 +++++ .../DisruptorVmComponentConfiguration.java | 15 +++++ .../DnsComponentAutoConfiguration.java | 34 +++++++++- .../springboot/DnsComponentConfiguration.java | 44 ++++++++++++ .../DockerComponentConfiguration.java | 15 +++++ .../DozerComponentAutoConfiguration.java | 34 +++++++++- .../springboot/DozerComponentConfiguration.java | 45 +++++++++++++ .../DrillComponentAutoConfiguration.java | 34 +++++++++- .../springboot/DrillComponentConfiguration.java | 45 +++++++++++++ .../DropboxComponentAutoConfiguration.java | 35 +++++++++- .../DropboxComponentConfiguration.java | 45 +++++++++++++ .../EhcacheComponentAutoConfiguration.java | 35 +++++++++- .../EhcacheComponentConfiguration.java | 45 +++++++++++++ .../ElasticsearchComponentConfiguration.java | 15 +++++ ...ElasticsearchComponentAutoConfiguration.java | 33 ++++++++- .../ElasticsearchComponentConfiguration.java | 45 +++++++++++++ .../springboot/ElsqlComponentConfiguration.java | 15 +++++ .../EtcdComponentAutoConfiguration.java | 34 +++++++++- .../springboot/EtcdComponentConfiguration.java | 45 +++++++++++++ .../ExecComponentAutoConfiguration.java | 34 +++++++++- .../springboot/ExecComponentConfiguration.java | 44 ++++++++++++ .../FacebookComponentConfiguration.java | 15 +++++ .../FlatpackComponentAutoConfiguration.java | 33 ++++++++- .../FlatpackComponentConfiguration.java | 45 +++++++++++++ .../springboot/FlinkComponentConfiguration.java | 15 +++++ .../FopComponentAutoConfiguration.java | 34 +++++++++- .../springboot/FopComponentConfiguration.java | 45 +++++++++++++ .../FreemarkerComponentConfiguration.java | 15 +++++ .../FtpComponentAutoConfiguration.java | 34 +++++++++- .../springboot/FtpComponentConfiguration.java | 45 +++++++++++++ .../FtpsComponentAutoConfiguration.java | 34 +++++++++- .../springboot/FtpsComponentConfiguration.java | 45 +++++++++++++ .../SftpComponentAutoConfiguration.java | 34 +++++++++- .../springboot/SftpComponentConfiguration.java | 45 +++++++++++++ .../GangliaComponentConfiguration.java | 15 +++++ .../GeoCoderComponentAutoConfiguration.java | 33 ++++++++- .../GeoCoderComponentConfiguration.java | 45 +++++++++++++ .../GitComponentAutoConfiguration.java | 34 +++++++++- .../springboot/GitComponentConfiguration.java | 44 ++++++++++++ .../GitHubComponentAutoConfiguration.java | 34 +++++++++- .../GitHubComponentConfiguration.java | 44 ++++++++++++ .../GoogleCalendarComponentConfiguration.java | 15 +++++ .../GoogleDriveComponentConfiguration.java | 15 +++++ .../GoogleMailComponentConfiguration.java | 15 +++++ .../GooglePubsubComponentConfiguration.java | 15 +++++ .../GoraComponentAutoConfiguration.java | 34 +++++++++- .../springboot/GoraComponentConfiguration.java | 45 +++++++++++++ .../GuavaEventBusComponentConfiguration.java | 15 +++++ .../HazelcastComponentConfiguration.java | 15 +++++ .../springboot/HBaseComponentConfiguration.java | 15 +++++ .../springboot/HdfsComponentConfiguration.java | 15 +++++ .../springboot/HdfsComponentConfiguration.java | 15 +++++ .../HipchatComponentAutoConfiguration.java | 35 +++++++++- .../HipchatComponentConfiguration.java | 45 +++++++++++++ .../springboot/HttpComponentConfiguration.java | 15 +++++ .../springboot/HttpComponentConfiguration.java | 15 +++++ .../InfinispanComponentAutoConfiguration.java | 33 ++++++++- .../InfinispanComponentConfiguration.java | 45 +++++++++++++ .../InfluxDbComponentAutoConfiguration.java | 33 ++++++++- .../InfluxDbComponentConfiguration.java | 45 +++++++++++++ .../IrcComponentAutoConfiguration.java | 34 +++++++++- .../springboot/IrcComponentConfiguration.java | 44 ++++++++++++ .../IronMQComponentAutoConfiguration.java | 34 +++++++++- .../IronMQComponentConfiguration.java | 45 +++++++++++++ .../JavaSpaceComponentAutoConfiguration.java | 33 ++++++++- .../JavaSpaceComponentConfiguration.java | 44 ++++++++++++ .../JBPMComponentAutoConfiguration.java | 34 +++++++++- .../springboot/JBPMComponentConfiguration.java | 45 +++++++++++++ .../JCacheComponentConfiguration.java | 15 +++++ .../JcrComponentAutoConfiguration.java | 34 +++++++++- .../springboot/JcrComponentConfiguration.java | 45 +++++++++++++ .../springboot/JdbcComponentConfiguration.java | 15 +++++ .../JettyHttpComponentConfiguration9.java | 15 +++++ .../JGroupsComponentConfiguration.java | 15 +++++ .../JingComponentAutoConfiguration.java | 34 +++++++++- .../springboot/JingComponentConfiguration.java | 44 ++++++++++++ .../JIRAComponentAutoConfiguration.java | 34 +++++++++- .../springboot/JIRAComponentConfiguration.java | 44 ++++++++++++ .../springboot/JmsComponentConfiguration.java | 15 +++++ .../JMXComponentAutoConfiguration.java | 34 +++++++++- .../springboot/JMXComponentConfiguration.java | 44 ++++++++++++ .../springboot/JoltComponentConfiguration.java | 15 +++++ .../springboot/JpaComponentConfiguration.java | 15 +++++ .../springboot/ScpComponentConfiguration.java | 15 +++++ .../springboot/Jt400ComponentConfiguration.java | 15 +++++ .../springboot/KafkaComponentConfiguration.java | 15 +++++ .../KestrelComponentConfiguration.java | 15 +++++ .../KratiComponentAutoConfiguration.java | 34 +++++++++- .../springboot/KratiComponentConfiguration.java | 44 ++++++++++++ .../KubernetesComponentAutoConfiguration.java | 33 ++++++++- .../KubernetesComponentConfiguration.java | 44 ++++++++++++ .../LdapComponentAutoConfiguration.java | 34 +++++++++- .../springboot/LdapComponentConfiguration.java | 45 +++++++++++++ .../LinkedInComponentConfiguration.java | 15 +++++ .../LuceneComponentConfiguration.java | 15 +++++ .../LumberjackComponentConfiguration.java | 15 +++++ .../springboot/MailComponentConfiguration.java | 15 +++++ .../MetricsComponentConfiguration.java | 15 +++++ .../springboot/Mina2ComponentConfiguration.java | 15 +++++ .../MllpComponentAutoConfiguration.java | 34 +++++++++- .../springboot/MllpComponentConfiguration.java | 45 +++++++++++++ .../GridFsComponentAutoConfiguration.java | 34 +++++++++- .../GridFsComponentConfiguration.java | 44 ++++++++++++ .../MongoDbComponentAutoConfiguration.java | 35 +++++++++- .../MongoDbComponentConfiguration.java | 44 ++++++++++++ .../MongoDbComponentAutoConfiguration.java | 35 +++++++++- .../MongoDbComponentConfiguration.java | 44 ++++++++++++ .../springboot/MQTTComponentConfiguration.java | 15 +++++ .../springboot/MsvComponentConfiguration.java | 15 +++++ .../MustacheComponentConfiguration.java | 15 +++++ .../MvelComponentAutoConfiguration.java | 34 +++++++++- .../springboot/MvelComponentConfiguration.java | 44 ++++++++++++ .../MyBatisComponentConfiguration.java | 15 +++++ .../NagiosComponentConfiguration.java | 15 +++++ .../NatsComponentAutoConfiguration.java | 34 +++++++++- .../springboot/NatsComponentConfiguration.java | 44 ++++++++++++ .../NettyHttpComponentConfiguration.java | 15 +++++ .../springboot/NettyComponentConfiguration.java | 15 +++++ .../NettyHttpComponentConfiguration.java | 15 +++++ .../springboot/NettyComponentConfiguration.java | 15 +++++ .../Olingo2ComponentConfiguration.java | 15 +++++ .../OpenShiftComponentConfiguration.java | 15 +++++ .../CinderComponentAutoConfiguration.java | 34 +++++++++- .../CinderComponentConfiguration.java | 45 +++++++++++++ .../GlanceComponentAutoConfiguration.java | 34 +++++++++- .../GlanceComponentConfiguration.java | 45 +++++++++++++ .../KeystoneComponentAutoConfiguration.java | 33 ++++++++- .../KeystoneComponentConfiguration.java | 45 +++++++++++++ .../NeutronComponentAutoConfiguration.java | 35 +++++++++- .../NeutronComponentConfiguration.java | 45 +++++++++++++ .../NovaComponentAutoConfiguration.java | 34 +++++++++- .../springboot/NovaComponentConfiguration.java | 45 +++++++++++++ .../SwiftComponentAutoConfiguration.java | 34 +++++++++- .../springboot/SwiftComponentConfiguration.java | 45 +++++++++++++ .../OptaPlannerComponentAutoConfiguration.java | 33 ++++++++- .../OptaPlannerComponentConfiguration.java | 44 ++++++++++++ .../springboot/PahoComponentConfiguration.java | 15 +++++ .../PdfComponentAutoConfiguration.java | 34 +++++++++- .../springboot/PdfComponentConfiguration.java | 45 +++++++++++++ .../PgEventComponentAutoConfiguration.java | 35 +++++++++- .../PgEventComponentConfiguration.java | 45 +++++++++++++ .../PrinterComponentAutoConfiguration.java | 35 +++++++++- .../PrinterComponentConfiguration.java | 44 ++++++++++++ .../QuartzComponentConfiguration.java | 15 +++++ .../QuickfixjComponentConfiguration.java | 15 +++++ .../RabbitMQComponentAutoConfiguration.java | 33 ++++++++- .../RabbitMQComponentConfiguration.java | 45 +++++++++++++ .../ReactiveStreamsComponentConfiguration.java | 15 +++++ .../RestletComponentConfiguration.java | 15 +++++ .../RmiComponentAutoConfiguration.java | 34 +++++++++- .../springboot/RmiComponentConfiguration.java | 44 ++++++++++++ .../RouteboxComponentAutoConfiguration.java | 33 ++++++++- .../RouteboxComponentConfiguration.java | 45 +++++++++++++ .../RssComponentAutoConfiguration.java | 34 +++++++++- .../springboot/RssComponentConfiguration.java | 44 ++++++++++++ .../SalesforceComponentConfiguration.java | 15 +++++ .../NetWeaverComponentAutoConfiguration.java | 33 ++++++++- .../NetWeaverComponentConfiguration.java | 45 +++++++++++++ .../XQueryComponentConfiguration.java | 15 +++++ .../SchematronComponentAutoConfiguration.java | 33 ++++++++- .../SchematronComponentConfiguration.java | 44 ++++++++++++ .../ServiceNowComponentConfiguration.java | 15 +++++ .../ServletComponentConfiguration.java | 15 +++++ .../SipComponentAutoConfiguration.java | 34 +++++++++- .../springboot/SipComponentConfiguration.java | 45 +++++++++++++ .../SjmsBatchComponentConfiguration.java | 15 +++++ .../springboot/SjmsComponentConfiguration.java | 15 +++++ .../springboot/SlackComponentConfiguration.java | 15 +++++ .../springboot/SmppComponentConfiguration.java | 15 +++++ .../SnmpComponentAutoConfiguration.java | 34 +++++++++- .../springboot/SnmpComponentConfiguration.java | 45 +++++++++++++ .../springboot/SparkComponentConfiguration.java | 15 +++++ .../SplunkComponentConfiguration.java | 15 +++++ .../SpringBatchComponentConfiguration.java | 15 +++++ ...ngIntegrationComponentAutoConfiguration.java | 34 +++++++++- ...SpringIntegrationComponentConfiguration.java | 44 ++++++++++++ .../SpringLdapComponentAutoConfiguration.java | 33 ++++++++- .../SpringLdapComponentConfiguration.java | 45 +++++++++++++ .../RedisComponentAutoConfiguration.java | 34 +++++++++- .../springboot/RedisComponentConfiguration.java | 44 ++++++++++++ .../springboot/EventComponentConfiguration.java | 15 +++++ ...ingWebserviceComponentAutoConfiguration.java | 34 +++++++++- .../SpringWebserviceComponentConfiguration.java | 45 +++++++++++++ .../springboot/SqlComponentConfiguration.java | 15 +++++ .../SqlStoredComponentConfiguration.java | 15 +++++ .../springboot/SshComponentConfiguration.java | 15 +++++ .../StAXComponentAutoConfiguration.java | 34 +++++++++- .../springboot/StAXComponentConfiguration.java | 45 +++++++++++++ .../springboot/StompComponentConfiguration.java | 15 +++++ .../StreamComponentAutoConfiguration.java | 34 +++++++++- .../StreamComponentConfiguration.java | 45 +++++++++++++ ...tringTemplateComponentAutoConfiguration.java | 34 +++++++++- .../StringTemplateComponentConfiguration.java | 44 ++++++++++++ .../TelegramComponentConfiguration.java | 15 +++++ .../TikaComponentAutoConfiguration.java | 34 +++++++++- .../springboot/TikaComponentConfiguration.java | 45 +++++++++++++ .../TwitterComponentConfiguration.java | 15 +++++ .../UndertowComponentConfiguration.java | 15 +++++ .../VelocityComponentConfiguration.java | 15 +++++ .../springboot/VertxComponentConfiguration.java | 15 +++++ .../WeatherComponentAutoConfiguration.java | 35 +++++++++- .../WeatherComponentConfiguration.java | 44 ++++++++++++ .../WebsocketComponentConfiguration.java | 15 +++++ .../XmlRpcComponentAutoConfiguration.java | 34 +++++++++- .../XmlRpcComponentConfiguration.java | 44 ++++++++++++ .../XmlSignatureComponentConfiguration.java | 15 +++++ .../XmppComponentAutoConfiguration.java | 34 +++++++++- .../springboot/XmppComponentConfiguration.java | 44 ++++++++++++ .../YammerComponentConfiguration.java | 15 +++++ .../ZooKeeperComponentConfiguration.java | 15 +++++ 544 files changed, 11566 insertions(+), 590 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/bean-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/bean-component.adoc b/camel-core/src/main/docs/bean-component.adoc index 42ee7af..72d587c 100644 --- a/camel-core/src/main/docs/bean-component.adoc +++ b/camel-core/src/main/docs/bean-component.adoc @@ -18,7 +18,17 @@ the link:registry.html[Registry] // component options: START -The Bean component has no options. +The Bean component supports 1 options which are listed below. + + + +{% raw %} +[width="100%",cols="2,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. +|======================================================================= +{% endraw %} // component options: END @@ -141,4 +151,4 @@ mechanisms in Camel. * link:class.html[Class] component * link:bean-binding.html[Bean Binding] -* link:bean-integration.html[Bean Integration] \ No newline at end of file +* link:bean-integration.html[Bean Integration] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/binding-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/binding-component.adoc b/camel-core/src/main/docs/binding-component.adoc index 4dc49a4..f3290af 100644 --- a/camel-core/src/main/docs/binding-component.adoc +++ b/camel-core/src/main/docs/binding-component.adoc @@ -20,7 +20,17 @@ route. // component options: START -The Binding component has no options. +The Binding component supports 1 options which are listed below. + + + +{% raw %} +[width="100%",cols="2,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. +|======================================================================= +{% endraw %} // component options: END @@ -111,4 +121,4 @@ BindingComponent to wrap the endpoints in the binding of your choice. So bindings are a composition tool really; only use them when they make sense - the extra complexity may not be worth it unless you have lots of -routes or endpoints. \ No newline at end of file +routes or endpoints. http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/browse-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/browse-component.adoc b/camel-core/src/main/docs/browse-component.adoc index 1bef51d..ab1184d 100644 --- a/camel-core/src/main/docs/browse-component.adoc +++ b/camel-core/src/main/docs/browse-component.adoc @@ -21,7 +21,17 @@ Where *someName* can be any string to uniquely identify the endpoint. // component options: START -The Browse component has no options. +The Browse component supports 1 options which are listed below. + + + +{% raw %} +[width="100%",cols="2,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. +|======================================================================= +{% endraw %} // component options: END @@ -76,4 +86,4 @@ We can now inspect the received exchanges from within the Java code: * link:configuring-camel.html[Configuring Camel] * link:component.html[Component] * link:endpoint.html[Endpoint] -* link:getting-started.html[Getting Started] \ No newline at end of file +* link:getting-started.html[Getting Started] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/class-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/class-component.adoc b/camel-core/src/main/docs/class-component.adoc index bcbb2f7..651a67e 100644 --- a/camel-core/src/main/docs/class-component.adoc +++ b/camel-core/src/main/docs/class-component.adoc @@ -21,7 +21,17 @@ bean. // component options: START -The Class component has no options. +The Class component supports 1 options which are listed below. + + + +{% raw %} +[width="100%",cols="2,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. +|======================================================================= +{% endraw %} // component options: END @@ -113,4 +123,4 @@ component works in much the same way. * link:bean.html[Bean] * link:bean-binding.html[Bean Binding] -* link:bean-integration.html[Bean Integration] \ No newline at end of file +* link:bean-integration.html[Bean Integration] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/controlbus-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/controlbus-component.adoc b/camel-core/src/main/docs/controlbus-component.adoc index 202ec00..3458ef9 100644 --- a/camel-core/src/main/docs/controlbus-component.adoc +++ b/camel-core/src/main/docs/controlbus-component.adoc @@ -62,7 +62,17 @@ then the result is put in the message body. // component options: START -The Control Bus component has no options. +The Control Bus component supports 1 options which are listed below. + + + +{% raw %} +[width="100%",cols="2,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. +|======================================================================= +{% endraw %} // component options: END @@ -192,4 +202,4 @@ link:getting-started.html[Getting Started], you may also find the link:architecture.html[Architecture] useful particularly the description of link:endpoint.html[Endpoint] and link:uris.html[URIs]. Then you could try out some of the link:examples.html[Examples] first before trying -this pattern out. \ No newline at end of file +this pattern out. http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/dataformat-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/dataformat-component.adoc b/camel-core/src/main/docs/dataformat-component.adoc index 5e1377c..45d6f49 100644 --- a/camel-core/src/main/docs/dataformat-component.adoc +++ b/camel-core/src/main/docs/dataformat-component.adoc @@ -22,7 +22,17 @@ for which options it support. // component options: START -The Data Format component has no options. +The Data Format component supports 1 options which are listed below. + + + +{% raw %} +[width="100%",cols="2,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. +|======================================================================= +{% endraw %} // component options: END @@ -73,4 +83,4 @@ And in XML DSL you do: * link:component.html[Component] * link:endpoint.html[Endpoint] * link:getting-started.html[Getting Started] -* link:data-format.html[Data Format] \ No newline at end of file +* link:data-format.html[Data Format] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/dataset-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/dataset-component.adoc b/camel-core/src/main/docs/dataset-component.adoc index b4f8245..2c11439 100644 --- a/camel-core/src/main/docs/dataset-component.adoc +++ b/camel-core/src/main/docs/dataset-component.adoc @@ -44,7 +44,17 @@ extend `DataSetSupport`. // component options: START -The Dataset component has no options. +The Dataset component supports 1 options which are listed below. + + + +{% raw %} +[width="100%",cols="2,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. +|======================================================================= +{% endraw %} // component options: END http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/direct-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/direct-component.adoc b/camel-core/src/main/docs/direct-component.adoc index 928b119..8bf62c6 100644 --- a/camel-core/src/main/docs/direct-component.adoc +++ b/camel-core/src/main/docs/direct-component.adoc @@ -29,7 +29,7 @@ Where *someName* can be any string to uniquely identify the endpoint // component options: START -The Direct component supports 2 options which are listed below. +The Direct component supports 3 options which are listed below. @@ -39,6 +39,7 @@ The Direct component supports 2 options which are listed below. | Name | Group | Default | Java Type | Description | block | producer | false | boolean | If sending a message to a direct endpoint which has no active consumer then we can tell the producer to block and wait for the consumer to become active. | timeout | producer | 30000 | long | The timeout value to use if block is enabled. +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. |======================================================================= {% endraw %} // component options: END @@ -109,4 +110,4 @@ be used together. * link:endpoint.html[Endpoint] * link:getting-started.html[Getting Started] * link:seda.html[SEDA] -* link:vm.html[VM] \ No newline at end of file +* link:vm.html[VM] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/direct-vm-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/direct-vm-component.adoc b/camel-core/src/main/docs/direct-vm-component.adoc index 8823a1a..3e8b226 100644 --- a/camel-core/src/main/docs/direct-vm-component.adoc +++ b/camel-core/src/main/docs/direct-vm-component.adoc @@ -40,7 +40,7 @@ Where *someName* can be any string to uniquely identify the endpoint // component options: START -The Direct VM component supports 4 options which are listed below. +The Direct VM component supports 5 options which are listed below. @@ -52,6 +52,7 @@ The Direct VM component supports 4 options which are listed below. | timeout | producer | 30000 | long | The timeout value to use if block is enabled. | headerFilterStrategy | common | | HeaderFilterStrategy | Sets a HeaderFilterStrategy that will only be applied on producer endpoints (on both directions: request and response). Default value: none. | propagateProperties | advanced | true | boolean | Whether to propagate or not properties from the producer side to the consumer side and vice versa. Default value: true. +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. |======================================================================= {% endraw %} // component options: END @@ -128,4 +129,4 @@ And the sample using spring DSL: * link:direct.html[Direct] * link:seda.html[SEDA] -* link:vm.html[VM] \ No newline at end of file +* link:vm.html[VM] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/file-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/file-component.adoc b/camel-core/src/main/docs/file-component.adoc index 651a102..e535e7e 100644 --- a/camel-core/src/main/docs/file-component.adoc +++ b/camel-core/src/main/docs/file-component.adoc @@ -53,7 +53,17 @@ _Consuming files from folders where others drop files directly_. // component options: START -The File component has no options. +The File component supports 1 options which are listed below. + + + +{% raw %} +[width="100%",cols="2,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. +|======================================================================= +{% endraw %} // component options: END http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/language-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/language-component.adoc b/camel-core/src/main/docs/language-component.adoc index 07e5e7b..105c148 100644 --- a/camel-core/src/main/docs/language-component.adoc +++ b/camel-core/src/main/docs/language-component.adoc @@ -36,7 +36,17 @@ language://languageName:resource:scheme:location][?options] // component options: START -The Language component has no options. +The Language component supports 1 options which are listed below. + + + +{% raw %} +[width="100%",cols="2,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. +|======================================================================= +{% endraw %} // component options: END @@ -125,4 +135,4 @@ other link:language.html[Language]s in Camel by prefixing with * link:languages.html[Languages] * link:routing-slip.html[Routing Slip] * link:dynamic-router.html[Dynamic Router] -* link:script.html[Script] \ No newline at end of file +* link:script.html[Script] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/log-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/log-component.adoc b/camel-core/src/main/docs/log-component.adoc index 96dbc8d..d7ec4c6 100644 --- a/camel-core/src/main/docs/log-component.adoc +++ b/camel-core/src/main/docs/log-component.adoc @@ -56,7 +56,7 @@ link:logeip.html[LogEIP]. // component options: START -The Log component supports 1 options which are listed below. +The Log component supports 2 options which are listed below. @@ -65,6 +65,7 @@ The Log component supports 1 options which are listed below. |======================================================================= | Name | Group | Default | Java Type | Description | exchangeFormatter | advanced | | ExchangeFormatter | Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified we default to DefaultExchangeFormatter. +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. |======================================================================= {% endraw %} // component options: END @@ -281,4 +282,4 @@ reference it using `logger` URI parameter. * link:how-do-i-use-log4j.html[How do I use log4j] * link:how-do-i-use-java-14-logging.html[How do I use Java 1.4 logging] * link:logeip.html[LogEIP] for using `log` directly in the DSL for human -logs. \ No newline at end of file +logs. http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/mock-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/mock-component.adoc b/camel-core/src/main/docs/mock-component.adoc index 47b8e39..babf102 100644 --- a/camel-core/src/main/docs/mock-component.adoc +++ b/camel-core/src/main/docs/mock-component.adoc @@ -84,7 +84,17 @@ You can append query options to the URI in the following format, // component options: START -The Mock component has no options. +The Mock component supports 1 options which are listed below. + + + +{% raw %} +[width="100%",cols="2,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. +|======================================================================= +{% endraw %} // component options: END http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/properties-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/properties-component.adoc b/camel-core/src/main/docs/properties-component.adoc index 852d7b9..3798534 100644 --- a/camel-core/src/main/docs/properties-component.adoc +++ b/camel-core/src/main/docs/properties-component.adoc @@ -14,7 +14,7 @@ Where *key* is the key for the property to lookup ### Options // component options: START -The Properties component supports 16 options which are listed below. +The Properties component supports 17 options which are listed below. @@ -38,6 +38,7 @@ The Properties component supports 16 options which are listed below. | initialProperties | common | | Properties | Sets initial properties which will be used before any locations are resolved. | overrideProperties | common | | Properties | Sets a special list of override properties that take precedence and will use first if a property exist. | systemPropertiesMode | common | 2 | int | Sets the system property mode. +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. |======================================================================= {% endraw %} // component options: END @@ -1010,4 +1011,4 @@ To register a custom function from Java code is as shown below: * link:getting-started.html[Getting Started] * link:jasypt.html[Jasypt] for using encrypted values (eg passwords) in -the properties \ No newline at end of file +the properties http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/ref-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/ref-component.adoc b/camel-core/src/main/docs/ref-component.adoc index e5ce62e..b5fa10b 100644 --- a/camel-core/src/main/docs/ref-component.adoc +++ b/camel-core/src/main/docs/ref-component.adoc @@ -20,7 +20,17 @@ bean ID of an endpoint in the Spring registry. ### Ref Options // component options: START -The Ref component has no options. +The Ref component supports 1 options which are listed below. + + + +{% raw %} +[width="100%",cols="2,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. +|======================================================================= +{% endraw %} // component options: END @@ -92,4 +102,4 @@ Which is the more common way to write it. * link:configuring-camel.html[Configuring Camel] * link:component.html[Component] * link:endpoint.html[Endpoint] -* link:getting-started.html[Getting Started] \ No newline at end of file +* link:getting-started.html[Getting Started] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/rest-api-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/rest-api-component.adoc b/camel-core/src/main/docs/rest-api-component.adoc index 26c50c6..480ed26 100644 --- a/camel-core/src/main/docs/rest-api-component.adoc +++ b/camel-core/src/main/docs/rest-api-component.adoc @@ -465,7 +465,17 @@ bindings. // component options: START -The REST API component has no options. +The REST API component supports 1 options which are listed below. + + + +{% raw %} +[width="100%",cols="2,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. +|======================================================================= +{% endraw %} // component options: END @@ -748,4 +758,4 @@ the Apache Camel distribution. * link:swagger-java.html[Swagger Java] * link:spark-rest.html[Spark-rest] * link:how-do-i-import-rests-from-other-xml-files.html[How do I import -rests from other XML files] \ No newline at end of file +rests from other XML files] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/rest-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/rest-component.adoc b/camel-core/src/main/docs/rest-component.adoc index 810d2a5..5cf0a63 100644 --- a/camel-core/src/main/docs/rest-component.adoc +++ b/camel-core/src/main/docs/rest-component.adoc @@ -18,7 +18,7 @@ From Camel 2.18 onwards the rest component can also be used as a client (produce ### URI Options // component options: START -The REST component supports 3 options which are listed below. +The REST component supports 4 options which are listed below. @@ -29,6 +29,7 @@ The REST component supports 3 options which are listed below. | componentName | common | | String | The Camel Rest component to use for the REST transport such as restlet spark-rest. If no component has been explicit configured then Camel will lookup if there is a Camel component that integrates with the Rest DSL or if a org.apache.camel.spi.RestConsumerFactory (consumer) or org.apache.camel.spi.RestProducerFactory (producer) is registered in the registry. If either one is found then that is being used. | apiDoc | producer | | String | The swagger api doc resource to use. The resource is loaded from classpath by default and must be in JSon format. | host | producer | | String | Host and port of HTTP service to use (override host in swagger schema) +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. |======================================================================= {% endraw %} // component options: END @@ -236,4 +237,4 @@ containers. * link:getting-started.html[Getting Started] * link:rest-dsl.html[Rest DSL] -* link:servlet.html[SERVLET] \ No newline at end of file +* link:servlet.html[SERVLET] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/scheduler-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/scheduler-component.adoc b/camel-core/src/main/docs/scheduler-component.adoc index b811837..f34a65b 100644 --- a/camel-core/src/main/docs/scheduler-component.adoc +++ b/camel-core/src/main/docs/scheduler-component.adoc @@ -31,7 +31,7 @@ You can append query options to the URI in the following format, ### Options // component options: START -The Scheduler component supports 1 options which are listed below. +The Scheduler component supports 2 options which are listed below. @@ -40,6 +40,7 @@ The Scheduler component supports 1 options which are listed below. |======================================================================= | Name | Group | Default | Java Type | Description | concurrentTasks | scheduler | 1 | int | Number of threads used by the scheduling thread pool. Is by default using a single thread +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. |======================================================================= {% endraw %} // component options: END @@ -157,4 +158,4 @@ exchange. * link:getting-started.html[Getting Started] * link:timer.html[Timer] -* link:quartz.html[Quartz] \ No newline at end of file +* link:quartz.html[Quartz] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/seda-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/seda-component.adoc b/camel-core/src/main/docs/seda-component.adoc index b748b08..12c47a2 100644 --- a/camel-core/src/main/docs/seda-component.adoc +++ b/camel-core/src/main/docs/seda-component.adoc @@ -38,7 +38,7 @@ You can append query options to the URI in the following format: ### Options // component options: START -The SEDA component supports 3 options which are listed below. +The SEDA component supports 4 options which are listed below. @@ -49,6 +49,7 @@ The SEDA component supports 3 options which are listed below. | queueSize | advanced | | int | Sets the default maximum capacity of the SEDA queue (i.e. the number of messages it can hold). | concurrentConsumers | consumer | 1 | int | Sets the default number of concurrent threads processing exchanges. | defaultQueueFactory | advanced | | Exchange> | Sets the default queue factory. +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. |======================================================================= {% endraw %} // component options: END @@ -234,4 +235,4 @@ int size = seda.getExchanges().size(); * link:vm.html[VM] * link:disruptor.html[Disruptor] * link:direct.html[Direct] -* link:async.html[Async] \ No newline at end of file +* link:async.html[Async] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/stub-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/stub-component.adoc b/camel-core/src/main/docs/stub-component.adoc index cafda54..fa7b190 100644 --- a/camel-core/src/main/docs/stub-component.adoc +++ b/camel-core/src/main/docs/stub-component.adoc @@ -28,7 +28,7 @@ Where *`someUri`* can be any URI with any query parameters. ### Options // component options: START -The Stub component supports 3 options which are listed below. +The Stub component supports 4 options which are listed below. @@ -39,6 +39,7 @@ The Stub component supports 3 options which are listed below. | queueSize | advanced | | int | Sets the default maximum capacity of the SEDA queue (i.e. the number of messages it can hold). | concurrentConsumers | consumer | 1 | int | Sets the default number of concurrent threads processing exchanges. | defaultQueueFactory | advanced | | Exchange> | Sets the default queue factory. +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. |======================================================================= {% endraw %} // component options: END @@ -86,4 +87,4 @@ stub:http://somehost.bar.com/something[http://somehost.bar.com/something] * link:configuring-camel.html[Configuring Camel] * link:component.html[Component] * link:endpoint.html[Endpoint] -* link:getting-started.html[Getting Started] \ No newline at end of file +* link:getting-started.html[Getting Started] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/test-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/test-component.adoc b/camel-core/src/main/docs/test-component.adoc index de3a5f1..5dc73ed 100644 --- a/camel-core/src/main/docs/test-component.adoc +++ b/camel-core/src/main/docs/test-component.adoc @@ -53,7 +53,17 @@ pulled from before starting the test. ### URI Options // component options: START -The Test component has no options. +The Test component supports 1 options which are listed below. + + + +{% raw %} +[width="100%",cols="2,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. +|======================================================================= +{% endraw %} // component options: END http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/timer-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/timer-component.adoc b/camel-core/src/main/docs/timer-component.adoc index 63ef05e..a014d60 100644 --- a/camel-core/src/main/docs/timer-component.adoc +++ b/camel-core/src/main/docs/timer-component.adoc @@ -35,7 +35,17 @@ friendly syntax]. ### Options // component options: START -The Timer component has no options. +The Timer component supports 1 options which are listed below. + + + +{% raw %} +[width="100%",cols="2,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. +|======================================================================= +{% endraw %} // component options: END @@ -155,4 +165,4 @@ starting the route. To do that you use the repeatCount option as shown: * link:endpoint.html[Endpoint] * link:getting-started.html[Getting Started] -* link:quartz.html[Quartz] \ No newline at end of file +* link:quartz.html[Quartz] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/validator-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/validator-component.adoc b/camel-core/src/main/docs/validator-component.adoc index b397635..eb8750b 100644 --- a/camel-core/src/main/docs/validator-component.adoc +++ b/camel-core/src/main/docs/validator-component.adoc @@ -52,7 +52,7 @@ provided directly in the camel-core. ### Options // component options: START -The Validator component supports 1 options which are listed below. +The Validator component supports 2 options which are listed below. @@ -61,6 +61,7 @@ The Validator component supports 1 options which are listed below. |======================================================================= | Name | Group | Default | Java Type | Description | resourceResolverFactory | advanced | | ValidatorResourceResolverFactory | To use a custom LSResourceResolver which depends on a dynamic endpoint resource URI +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. |======================================================================= {% endraw %} // component options: END @@ -112,4 +113,4 @@ programmatically clear the cache. This method is available on the * link:configuring-camel.html[Configuring Camel] * link:component.html[Component] * link:endpoint.html[Endpoint] -* link:getting-started.html[Getting Started] \ No newline at end of file +* link:getting-started.html[Getting Started] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/vm-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/vm-component.adoc b/camel-core/src/main/docs/vm-component.adoc index 284ce0a..bd12801 100644 --- a/camel-core/src/main/docs/vm-component.adoc +++ b/camel-core/src/main/docs/vm-component.adoc @@ -61,7 +61,7 @@ from("vm:bar?concurrentConsumers=5").to("file://output"); ### Options // component options: START -The VM component supports 3 options which are listed below. +The VM component supports 4 options which are listed below. @@ -72,6 +72,7 @@ The VM component supports 3 options which are listed below. | queueSize | advanced | | int | Sets the default maximum capacity of the SEDA queue (i.e. the number of messages it can hold). | concurrentConsumers | consumer | 1 | int | Sets the default number of concurrent threads processing exchanges. | defaultQueueFactory | advanced | | Exchange> | Sets the default queue factory. +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. |======================================================================= {% endraw %} // component options: END @@ -133,4 +134,4 @@ from("vm:order.email").bean(MyOrderEmailSender.class); * link:component.html[Component] * link:endpoint.html[Endpoint] * link:getting-started.html[Getting Started] -* link:seda.html[Seda] \ No newline at end of file +* link:seda.html[Seda] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/docs/xslt-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/xslt-component.adoc b/camel-core/src/main/docs/xslt-component.adoc index 1e6f4b9..8836cf4 100644 --- a/camel-core/src/main/docs/xslt-component.adoc +++ b/camel-core/src/main/docs/xslt-component.adoc @@ -67,7 +67,7 @@ directly in the camel-core. ### Options // component options: START -The XSLT component supports 8 options which are listed below. +The XSLT component supports 9 options which are listed below. @@ -83,6 +83,7 @@ The XSLT component supports 8 options which are listed below. | saxonExtensionFunctions | producer | | List | Allows you to use a custom net.sf.saxon.lib.ExtensionFunctionDefinition. You would need to add camel-saxon to the classpath. The function is looked up in the registry where you can comma to separate multiple values to lookup. | saxonConfiguration | producer | true | Object | To use a custom Saxon configuration | saxonConfigurationProperties | advanced | | Map | To set custom Saxon configuration properties +| resolvePropertyPlaceholders | common | true | boolean | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. |======================================================================= {% endraw %} // component options: END @@ -428,4 +429,4 @@ ________________________________________________________________________________ * link:configuring-camel.html[Configuring Camel] * link:component.html[Component] * link:endpoint.html[Endpoint] -* link:getting-started.html[Getting Started] \ No newline at end of file +* link:getting-started.html[Getting Started] http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java b/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java index 26c2097..62fbccb 100644 --- a/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java +++ b/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java @@ -23,8 +23,10 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.camel.CamelContext; +import org.apache.camel.Component; import org.apache.camel.Endpoint; import org.apache.camel.RoutesBuilder; +import org.apache.camel.component.properties.PropertiesComponent; import org.apache.camel.impl.DefaultCamelContext; import org.apache.camel.model.FromDefinition; import org.apache.camel.model.InterceptDefinition; @@ -39,6 +41,7 @@ import org.apache.camel.model.rest.RestConfigurationDefinition; import org.apache.camel.model.rest.RestDefinition; import org.apache.camel.model.rest.RestsDefinition; import org.apache.camel.spi.RestConfiguration; +import org.apache.camel.util.ObjectHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -235,6 +238,36 @@ public abstract class RouteBuilder extends BuilderSupport implements RoutesBuild } /** + * Injects a property placeholder value with the given key converted to the given type. + * + * @param key the property key + * @param type the type to convert the value as + * @return the value, or <tt>null</tt> if value is empty + * @throws Exception is thrown if property with key not found or error converting to the given type. + */ + public <T> T propertyInject(String key, Class<T> type) throws Exception { + ObjectHelper.notEmpty(key, "key"); + ObjectHelper.notNull(type, "Class type"); + + // the properties component is mandatory + Component component = getContext().hasComponent("properties"); + if (component == null) { + throw new IllegalArgumentException("PropertiesComponent with name properties must be defined" + + " in CamelContext to support property placeholders in expressions"); + } + PropertiesComponent pc = getContext().getTypeConverter() + .mandatoryConvertTo(PropertiesComponent.class, component); + // enclose key with {{ }} to force parsing + Object value = pc.parseUri(pc.getPrefixToken() + key + pc.getSuffixToken()); + + if (value != null) { + return getContext().getTypeConverter().mandatoryConvertTo(type, value); + } else { + return null; + } + } + + /** * Adds a route for an interceptor that intercepts every processing step. * * @return the builder http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java b/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java index f5f42d8..08535c8 100644 --- a/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java +++ b/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java @@ -21,6 +21,7 @@ import java.util.Properties; import java.util.Set; import org.apache.camel.util.ObjectHelper; +import org.apache.camel.util.StringHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -299,6 +300,10 @@ public class DefaultPropertiesParser implements AugmentedPropertyNameAwareProper * @return Value of the property or {@code null} if not found */ private String doGetPropertyValue(String key) { + if (ObjectHelper.isEmpty(key)) { + return parseProperty(key, null, properties); + } + String value = null; // override is the default mode http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java b/camel-core/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java index 6589354..d3ba396 100644 --- a/camel-core/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java +++ b/camel-core/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java @@ -507,6 +507,12 @@ public class PropertiesComponent extends UriEndpointComponent { } @Override + public boolean isResolvePropertyPlaceholders() { + // its chicken and egg, we cannot resolve placeholders on ourselves + return false; + } + + @Override protected void doStart() throws Exception { super.doStart(); http://git-wip-us.apache.org/repos/asf/camel/blob/c7907e9f/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java index 7b5b31e..e7f49a3 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java +++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java @@ -29,6 +29,7 @@ import org.apache.camel.ComponentConfiguration; import org.apache.camel.Endpoint; import org.apache.camel.EndpointConfiguration; import org.apache.camel.ResolveEndpointFailedException; +import org.apache.camel.spi.Metadata; import org.apache.camel.support.ServiceSupport; import org.apache.camel.util.CamelContextHelper; import org.apache.camel.util.EndpointHelper; @@ -48,6 +49,10 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone private CamelContext camelContext; + @Metadata(label = "common", defaultValue = "true", + description = "Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders.") + private boolean resolvePropertyPlaceholders = true; + public DefaultComponent() { } @@ -145,6 +150,22 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone } /** + * Whether the component should resolve property placeholders on itself when starting. + * Only properties which are of String type can use property placeholders. + */ + public void setResolvePropertyPlaceholders(boolean resolvePropertyPlaceholders) { + this.resolvePropertyPlaceholders = resolvePropertyPlaceholders; + } + + /** + * Whether the component should resolve property placeholders on itself when starting. + * Only properties which are of String type can use property placeholders. + */ + public boolean isResolvePropertyPlaceholders() { + return resolvePropertyPlaceholders; + } + + /** * Strategy to do post configuration logic. * <p/> * Can be used to construct an URI based on the remaining parameters. For example the parameters that configures @@ -222,6 +243,17 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone protected void doStart() throws Exception { ObjectHelper.notNull(getCamelContext(), "camelContext"); + + if (isResolvePropertyPlaceholders()) { + // only resolve property placeholders if its in use + Component existing = CamelContextHelper.lookupPropertiesComponent(camelContext, false); + if (existing != null) { + LOG.debug("Resolving property placeholders on component: {}", this); + CamelContextHelper.resolvePropertyPlaceholders(camelContext, this); + } else { + LOG.debug("Cannot resolve property placeholders on component: {} as PropertiesComponent is not in use", this); + } + } } protected void doStop() throws Exception { @@ -249,7 +281,7 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone * @param bean the bean * @param parameters properties to set */ - protected void setProperties(Object bean, Map<String, Object> parameters) throws Exception { + protected void setProperties(Object bean, Map<String, Object> parameters) throws Exception { setProperties(getCamelContext(), bean, parameters); } @@ -276,11 +308,11 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone /** * Gets the parameter and remove it from the parameter map. This method doesn't resolve * reference parameters in the registry. - * + * * @param parameters the parameters * @param key the key * @param type the requested type to convert the value from the parameter - * @return the converted value parameter, <tt>null</tt> if parameter does not exists. + * @return the converted value parameter, <tt>null</tt> if parameter does not exists. * @see #resolveAndRemoveReferenceParameter(Map, String, Class) */ public <T> T getAndRemoveParameter(Map<String, Object> parameters, String key, Class<T> type) { @@ -295,7 +327,7 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone * @param key the key * @param type the requested type to convert the value from the parameter * @param defaultValue use this default value if the parameter does not contain the key - * @return the converted value parameter + * @return the converted value parameter * @see #resolveAndRemoveReferenceParameter(Map, String, Class, Object) */ public <T> T getAndRemoveParameter(Map<String, Object> parameters, String key, Class<T> type, T defaultValue) { @@ -317,7 +349,7 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone * @param parameters the parameters * @param key the key * @param type the requested type to convert the value from the parameter - * @return the converted value parameter + * @return the converted value parameter */ public <T> T getAndRemoveOrResolveReferenceParameter(Map<String, Object> parameters, String key, Class<T> type) { return getAndRemoveOrResolveReferenceParameter(parameters, key, type, null); @@ -331,7 +363,7 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone * @param key the key * @param type the requested type to convert the value from the parameter * @param defaultValue use this default value if the parameter does not contain the key - * @return the converted value parameter + * @return the converted value parameter */ public <T> T getAndRemoveOrResolveReferenceParameter(Map<String, Object> parameters, String key, Class<T> type, T defaultValue) { String value = getAndRemoveParameter(parameters, key, String.class); @@ -346,7 +378,7 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone /** * Resolves a reference parameter in the registry and removes it from the map. - * + * * @param <T> type of object to lookup in the registry. * @param parameters parameter map. * @param key parameter map key. @@ -357,12 +389,12 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone * registry. */ public <T> T resolveAndRemoveReferenceParameter(Map<String, Object> parameters, String key, Class<T> type) { - return resolveAndRemoveReferenceParameter(parameters, key, type, null); + return resolveAndRemoveReferenceParameter(parameters, key, type, null); } /** * Resolves a reference parameter in the registry and removes it from the map. - * + * * @param <T> type of object to lookup in the registry. * @param parameters parameter map. * @param key parameter map key. @@ -381,11 +413,11 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone return EndpointHelper.resolveReferenceParameter(getCamelContext(), value, type); } } - + /** * Resolves a reference list parameter in the registry and removes it from * the map. - * + * * @param parameters parameter map. * @param key parameter map key. * @param elementType result list element type. @@ -402,7 +434,7 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone /** * Resolves a reference list parameter in the registry and removes it from * the map. - * + * * @param parameters parameter map. * @param key parameter map key. * @param elementType result list element type. @@ -413,21 +445,21 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone * not found in registry. * @see EndpointHelper#resolveReferenceListParameter(CamelContext, String, Class) */ - public <T> List<T> resolveAndRemoveReferenceListParameter(Map<String, Object> parameters, String key, Class<T> elementType, List<T> defaultValue) { + public <T> List<T> resolveAndRemoveReferenceListParameter(Map<String, Object> parameters, String key, Class<T> elementType, List<T> defaultValue) { String value = getAndRemoveParameter(parameters, key, String.class); - + if (value == null) { return defaultValue; } else { return EndpointHelper.resolveReferenceListParameter(getCamelContext(), value, elementType); } } - + /** * Returns the reminder of the text if it starts with the prefix. * <p/> * Is useable for string parameters that contains commands. - * + * * @param prefix the prefix * @param text the text * @return the reminder, or null if no reminder