git commit: CAMEL-6428: Applied latest patch from Dhiraj Bokde
Updated Branches: refs/heads/master 13c1dd9f4 - db2767306 CAMEL-6428: Applied latest patch from Dhiraj Bokde Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/db276730 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/db276730 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/db276730 Branch: refs/heads/master Commit: db2767306d3619d37cb1cfb34d81581aa3f780ea Parents: 13c1dd9 Author: Claus Ibsen davscl...@apache.org Authored: Thu Jun 20 10:51:53 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Jun 20 10:51:53 2013 +0200 -- .../salesforce/StreamingApiIntegrationTest.java | 2 + .../camel-salesforce-maven-plugin/pom.xml | 90 +++- .../src/it/settings.xml | 55 .../src/it/simple-it/pom.xml| 61 + .../src/it/simple-it/verify.groovy | 4 + .../apache/camel/maven/CamelSalesforceMojo.java | 49 --- 6 files changed, 229 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/db276730/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java -- diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java index f80c2f6..514f17e 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java +++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java @@ -56,6 +56,8 @@ public class StreamingApiIntegrationTest extends AbstractSalesforceTestBase { // validate dynamic message headers assertNotNull(Missing header CamelSalesforceClientId, in.getHeader(CamelSalesforceClientId)); +assertNotNull(Missing header CamelSalesforceEventType, in.getHeader(CamelSalesforceEventType)); +assertNotNull(Missing header CamelSalesforceCreatedDate, in.getHeader(CamelSalesforceCreatedDate)); } finally { // remove the test record http://git-wip-us.apache.org/repos/asf/camel/blob/db276730/components/camel-salesforce/camel-salesforce-maven-plugin/pom.xml -- diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/pom.xml b/components/camel-salesforce/camel-salesforce-maven-plugin/pom.xml index a5bfdf7..6f8d64e 100644 --- a/components/camel-salesforce/camel-salesforce-maven-plugin/pom.xml +++ b/components/camel-salesforce/camel-salesforce-maven-plugin/pom.xml @@ -15,7 +15,8 @@ See the License for the specific language governing permissions and limitations under the License. -- -project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion @@ -38,6 +39,17 @@ version2.0/version /dependency dependency + groupIdorg.apache.maven.plugin-tools/groupId + artifactIdmaven-plugin-annotations/artifactId + version3.2/version + scopeprovided/scope +/dependency +dependency + groupIdorg.codehaus.plexus/groupId + artifactIdplexus-utils/artifactId + version3.0.8/version +/dependency +dependency groupIdorg.apache.camel/groupId artifactIdcamel-salesforce/artifactId version${project.version}/version @@ -62,6 +74,12 @@ !-- testing -- dependency + groupIdorg.apache.maven.plugin-testing/groupId + artifactIdmaven-plugin-testing-harness/artifactId + version2.1/version + scopetest/scope +/dependency +dependency groupIdorg.slf4j/groupId artifactIdslf4j-log4j12/artifactId version${slf4j-api-version}/version @@ -75,4 +93,74 @@ /dependency /dependencies + build +plugins + !-- Generate plugin help -- + plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-plugin-plugin/artifactId +version3.2/version +configuration + goalPrefixcamel-salesforce/goalPrefix +
[CONF] Apache Camel Spring LDAP
Spring LDAP Page moved by Claus Ibsen From: Apache Camel Component List To: Apache Camel Components Children moved Change Notification Preferences View Online | Add Comment
[2/3] git commit: Merge branch 'mustache-component' of https://github.com/gquintana/camel
Merge branch 'mustache-component' of https://github.com/gquintana/camel Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/50eb726e Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/50eb726e Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/50eb726e Branch: refs/heads/master Commit: 50eb726eacdd39cdee3e50f523643834bcc64fb2 Parents: db27673 bddf3d1 Author: Claus Ibsen davscl...@apache.org Authored: Thu Jun 20 10:53:42 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Jun 20 10:53:42 2013 +0200 -- components/camel-mustache/ReadMe.wiki | 96 + components/camel-mustache/pom.xml | 64 ++ .../component/mustache/MustacheComponent.java | 70 +++ .../component/mustache/MustacheConstants.java | 39 .../component/mustache/MustacheEndpoint.java| 180 .../src/main/resources/LICENSE.txt | 203 +++ .../org/apache/camel/component/mustache | 1 + .../src/main/resources/NOTICE.txt | 11 + .../mustache/MustacheComponentTest.java | 147 ++ .../component/mustache/MustacheLetterTest.java | 66 ++ .../src/test/resources/another.mustache | 4 + .../src/test/resources/child.mustache | 4 + .../src/test/resources/included.mustache| 1 + .../src/test/resources/includer.mustache| 3 + .../src/test/resources/letter.mustache | 6 + .../src/test/resources/log4j.properties | 36 .../src/test/resources/parent.mustache | 5 + .../src/test/resources/simple.mustache | 1 + components/pom.xml | 1 + 19 files changed, 938 insertions(+) --
[3/3] git commit: CAMEL-6467: Added new mustache component to kit. Fixed CS.
CAMEL-6467: Added new mustache component to kit. Fixed CS. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5ec63db9 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5ec63db9 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5ec63db9 Branch: refs/heads/master Commit: 5ec63db9426d768145c281e6a83227e88eaaeac5 Parents: 50eb726 Author: Claus Ibsen davscl...@apache.org Authored: Thu Jun 20 11:26:28 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Jun 20 11:26:28 2013 +0200 -- apache-camel/pom.xml| 4 + .../src/main/descriptors/common-bin.xml | 1 + components/camel-mustache/pom.xml | 83 ++-- .../component/mustache/MustacheComponent.java | 13 ++- .../component/mustache/MustacheConstants.java | 6 +- .../component/mustache/MustacheEndpoint.java| 62 +++ .../org/apache/camel/component/mustache | 17 .../mustache/MustacheComponentTest.java | 58 +++--- .../component/mustache/MustacheLetterTest.java | 4 +- .../src/test/resources/log4j.properties | 5 +- parent/pom.xml | 6 ++ 11 files changed, 145 insertions(+), 114 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/5ec63db9/apache-camel/pom.xml -- diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml index eb784ab..919f899 100644 --- a/apache-camel/pom.xml +++ b/apache-camel/pom.xml @@ -372,6 +372,10 @@ /dependency dependency groupIdorg.apache.camel/groupId + artifactIdcamel-mustache/artifactId +/dependency +dependency + groupIdorg.apache.camel/groupId artifactIdcamel-mvel/artifactId /dependency dependency http://git-wip-us.apache.org/repos/asf/camel/blob/5ec63db9/apache-camel/src/main/descriptors/common-bin.xml -- diff --git a/apache-camel/src/main/descriptors/common-bin.xml b/apache-camel/src/main/descriptors/common-bin.xml index b941198..110c694 100644 --- a/apache-camel/src/main/descriptors/common-bin.xml +++ b/apache-camel/src/main/descriptors/common-bin.xml @@ -104,6 +104,7 @@ includeorg.apache.camel:camel-mongodb/include includeorg.apache.camel:camel-mqtt/include includeorg.apache.camel:camel-msv/include +includeorg.apache.camel:camel-mustache/include includeorg.apache.camel:camel-mvel/include includeorg.apache.camel:camel-mybatis/include includeorg.apache.camel:camel-nagios/include http://git-wip-us.apache.org/repos/asf/camel/blob/5ec63db9/components/camel-mustache/pom.xml -- diff --git a/components/camel-mustache/pom.xml b/components/camel-mustache/pom.xml index f6be585..05a1537 100644 --- a/components/camel-mustache/pom.xml +++ b/components/camel-mustache/pom.xml @@ -15,50 +15,49 @@ See the License for the specific language governing permissions and limitations under the License. -- -project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; -modelVersion4.0.0/modelVersion +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; + modelVersion4.0.0/modelVersion -parent -groupIdorg.apache.camel/groupId -artifactIdcomponents/artifactId -version2.12-SNAPSHOT/version -/parent -artifactIdcamel-mustache/artifactId -packagingbundle/packaging -nameCamel :: Mustache/name -descriptionCamel Mustache support/description -properties - camel.osgi.export.pkgorg.apache.camel.component.mustache.*/camel.osgi.export.pkg - camel.osgi.export.serviceorg.apache.camel.spi.ComponentResolver;component=mustache/camel.osgi.export.service -/properties + parent +groupIdorg.apache.camel/groupId +artifactIdcomponents/artifactId +version2.12-SNAPSHOT/version + /parent -dependencies + artifactIdcamel-mustache/artifactId + packagingbundle/packaging + nameCamel :: Mustache/name + descriptionCamel Mustache support/description -dependency -groupIdorg.apache.camel/groupId -artifactIdcamel-core/artifactId -/dependency -dependency -groupIdcom.github.spullara.mustache.java/groupId -artifactIdcompiler/artifactId -version0.8.12/version -/dependency + properties +
[1/3] git commit: Initial Mustache component commit
Updated Branches: refs/heads/master db2767306 - 5ec63db94 Initial Mustache component commit Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bddf3d1f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bddf3d1f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bddf3d1f Branch: refs/heads/master Commit: bddf3d1f3f821e7dda81675ff602cf0b935925fc Parents: 13c1dd9 Author: Gerald Quintana gerald.quint...@gmail.com Authored: Wed Jun 19 22:06:17 2013 +0100 Committer: Gerald Quintana gerald.quint...@gmail.com Committed: Wed Jun 19 23:09:52 2013 +0200 -- components/camel-mustache/ReadMe.wiki | 96 + components/camel-mustache/pom.xml | 64 ++ .../component/mustache/MustacheComponent.java | 70 +++ .../component/mustache/MustacheConstants.java | 39 .../component/mustache/MustacheEndpoint.java| 180 .../src/main/resources/LICENSE.txt | 203 +++ .../org/apache/camel/component/mustache | 1 + .../src/main/resources/NOTICE.txt | 11 + .../mustache/MustacheComponentTest.java | 147 ++ .../component/mustache/MustacheLetterTest.java | 66 ++ .../src/test/resources/another.mustache | 4 + .../src/test/resources/child.mustache | 4 + .../src/test/resources/included.mustache| 1 + .../src/test/resources/includer.mustache| 3 + .../src/test/resources/letter.mustache | 6 + .../src/test/resources/log4j.properties | 36 .../src/test/resources/parent.mustache | 5 + .../src/test/resources/simple.mustache | 1 + components/pom.xml | 1 + 19 files changed, 938 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/bddf3d1f/components/camel-mustache/ReadMe.wiki -- diff --git a/components/camel-mustache/ReadMe.wiki b/components/camel-mustache/ReadMe.wiki new file mode 100644 index 000..0642e9b --- /dev/null +++ b/components/camel-mustache/ReadMe.wiki @@ -0,0 +1,96 @@ +h2. Mustache + +The *mustache:* component allows for processing a message using a [Mustache|http://mustache.github.io/] template. This can be ideal when using [Templating] to generate responses for requests. + +Maven users will need to add the following dependency to their {{pom.xml}} for this component: +{code:xml} +dependency +groupIdorg.apache.camel/groupId +artifactIdcamel-mustache/artifactId +versionx.x.x/version !-- use the same version as your Camel core version -- +/dependency +{code} + +h3. URI format + +{code} +mustache:templateName[?options] +{code} + +Where *templateName* is the classpath-local URI of the template to invoke; or the complete URL of the remote template (eg: file://folder/myfile.mustache). + +You can append query options to the URI in the following format, {{?option=valueoption=value...}} + +h3. Options +{div:class=confluenceTableSmall} +|| Option || Default || Description || +| {{encoding}} | {{null}} | Character encoding of the resource content. | +| {{startDelimiter}} | {{ | Characters used to mark template code beginning. | +| {{endDelimiter}} | }} | Characters used to mark template code end. | +{div} + +h3. Mustache Context +Camel will provide exchange information in the Mustache context (just a {{Map}}). The {{Exchange}} is transferred as: +{div:class=confluenceTableSmall} +|| key || value || +| {{exchange}} | The {{Exchange}} itself. | +| {{exchange.properties}} | The {{Exchange}} properties. | +| {{headers}} | The headers of the In message. | +| {{camelContext}} | The Camel Context. | +| {{request}} | The In message. | +| {{body}} | The In message body. | +| {{response}} | The Out message (only for InOut message exchange pattern). | +{div} + +h3. Dynamic templates + +Camel provides two headers by which you can define a different resource location for a template or the template content itself. If any of these headers is set then Camel uses this over the endpoint configured resource. This allows you to provide a dynamic template at runtime. +{div:class=confluenceTableSmall} +|| Header || Type || Description || Support Version || +| MustacheConstants.MUSTACHE_RESOURCE | org.springframework.core.io.Resource | The template resource | | +| MustacheConstants.MUSTACHE_RESOURCE_URI | String | A URI for the template resource to use instead of the endpoint configured. | | +| MustacheConstants.MUSTACHE_TEMPLATE | String | The template to use instead of the endpoint configured. | | +{div} + +h3. Samples + +For example you could use something like: + +{code} +from(activemq:My.Queue). +to(mustache:com/acme/MyResponse.mustache); +{code} + +To use a Mustache
svn commit: r866579 - in /websites/production/camel/content: book-architecture.html book-in-one-page.html cache/main.pageCache component-list.html components.html transport.html uris.html
Author: buildbot Date: Thu Jun 20 09:43:46 2013 New Revision: 866579 Log: Production update by buildbot for camel Modified: websites/production/camel/content/book-architecture.html websites/production/camel/content/book-in-one-page.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/component-list.html websites/production/camel/content/components.html websites/production/camel/content/transport.html websites/production/camel/content/uris.html Modified: websites/production/camel/content/book-architecture.html == --- websites/production/camel/content/book-architecture.html (original) +++ websites/production/camel/content/book-architecture.html Thu Jun 20 09:43:46 2013 @@ -518,7 +518,12 @@ mqtt:name pre class=code-xml msv:someLocalOrRemoteResource /pre -/div/div /tdtd colspan=1 rowspan=1 class=confluenceTd Validates the payload of a message using the a shape=rect class=external-link href=https://msv.dev.java.net/; rel=nofollowMSV Library/a /td/trtrtd colspan=1 rowspan=1 class=confluenceTd a shape=rect href=mvel-component.html title=MVEL ComponentMVEL/a / camel-mvel +/div/div /tdtd colspan=1 rowspan=1 class=confluenceTd Validates the payload of a message using the a shape=rect class=external-link href=https://msv.dev.java.net/; rel=nofollowMSV Library/a /td/trtrtd colspan=1 rowspan=1 class=confluenceTd a shape=rect href=https://cwiki.apache.org/confluence/display/CAMEL/Mustache; title=MustacheMustache/a / camel-mustache +div class=code panel style=border-width: 1px;div class=codeContent panelContent +pre class=code-xml +mustache:someTemplateResource +/pre +/div/div /tdtd colspan=1 rowspan=1 class=confluenceTd Generates a response using a a shape=rect class=external-link href=http://mustache.github.io/; rel=nofollowMustache/a template /td/trtrtd colspan=1 rowspan=1 class=confluenceTd a shape=rect href=mvel-component.html title=MVEL ComponentMVEL/a / camel-mvel div class=code panel style=border-width: 1px;div class=codeContent panelContent pre class=code-xml mvel:someTemplateResource Modified: websites/production/camel/content/book-in-one-page.html == --- websites/production/camel/content/book-in-one-page.html (original) +++ websites/production/camel/content/book-in-one-page.html Thu Jun 20 09:43:46 2013 @@ -925,7 +925,12 @@ mqtt:name pre class=code-xml msv:someLocalOrRemoteResource /pre -/div/div /tdtd colspan=1 rowspan=1 class=confluenceTd Validates the payload of a message using the a shape=rect class=external-link href=https://msv.dev.java.net/; rel=nofollowMSV Library/a /td/trtrtd colspan=1 rowspan=1 class=confluenceTd a shape=rect href=mvel-component.html title=MVEL ComponentMVEL/a / camel-mvel +/div/div /tdtd colspan=1 rowspan=1 class=confluenceTd Validates the payload of a message using the a shape=rect class=external-link href=https://msv.dev.java.net/; rel=nofollowMSV Library/a /td/trtrtd colspan=1 rowspan=1 class=confluenceTd a shape=rect href=https://cwiki.apache.org/confluence/display/CAMEL/Mustache; title=MustacheMustache/a / camel-mustache +div class=code panel style=border-width: 1px;div class=codeContent panelContent +pre class=code-xml +mustache:someTemplateResource +/pre +/div/div /tdtd colspan=1 rowspan=1 class=confluenceTd Generates a response using a a shape=rect class=external-link href=http://mustache.github.io/; rel=nofollowMustache/a template /td/trtrtd colspan=1 rowspan=1 class=confluenceTd a shape=rect href=mvel-component.html title=MVEL ComponentMVEL/a / camel-mvel div class=code panel style=border-width: 1px;div class=codeContent panelContent pre class=code-xml mvel:someTemplateResource Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/component-list.html == --- websites/production/camel/content/component-list.html (original) +++ websites/production/camel/content/component-list.html Thu Jun 20 09:43:46 2013 @@ -488,7 +488,12 @@ mqtt:name pre class=code-xml msv:someLocalOrRemoteResource /pre -/div/div /tdtd colspan=1 rowspan=1 class=confluenceTd Validates the payload of a message using the a shape=rect class=external-link href=https://msv.dev.java.net/; rel=nofollowMSV Library/a /td/trtrtd colspan=1 rowspan=1 class=confluenceTd a shape=rect href=mvel-component.html title=MVEL ComponentMVEL/a / camel-mvel +/div/div /tdtd colspan=1 rowspan=1 class=confluenceTd Validates the payload of a message using the a shape=rect class=external-link href=https://msv.dev.java.net/; rel=nofollowMSV Library/a /td/trtrtd colspan=1 rowspan=1 class=confluenceTd a shape=rect
svn commit: r866585 - in /websites/production/camel/content: cache/main.pageCache camel-2120-release.html mustache.html
Author: buildbot Date: Thu Jun 20 10:19:29 2013 New Revision: 866585 Log: Production update by buildbot for camel Added: websites/production/camel/content/mustache.html Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2120-release.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2120-release.html == --- websites/production/camel/content/camel-2120-release.html (original) +++ websites/production/camel/content/camel-2120-release.html Thu Jun 20 10:19:29 2013 @@ -96,7 +96,7 @@ h3a shape=rect name=Camel2.12.0Release-NewComponents/aNew a shape=rect href=components.html title=ComponentsComponents/a/h3 -ullia shape=rect href=geocoder.html title=Geocoderttcamel-geocoder/tt/a - For looking up geocodes (latitude, longitude) for a given address, or reverse lookup with a shape=rect class=external-link href=https://code.google.com/p/geocoder-java/; rel=nofollowJava API for Google Geocoder/a/lilia shape=rect href=mvel-component.html title=MVEL Componentttcamel-mvel/tt/a - For templating using a shape=rect class=external-link href=http://mvel.codehaus.org/; rel=nofollowMVEL/a/lilia shape=rect href=netty-http.html title=Netty HTTPttcamel-netty-http/tt/a - HTTP component using a shape=rect href=netty.html title=NettyNetty/a as transport/lilia shape=rect href=sap-netweaver.html title=SAP NetWeaverttcamel-sap-netwever/tt/a - For integration with a shape=rect class=external-link href=http://scn.sap.com/community/developer-center/netweaver-gateway; rel=nofollowSAP NetWeaver Ga teway/a/lilia shape=rect href=weather.html title=Weatherttcamel-weather/tt/a - For polling weather information from a shape=rect class=external-link href=http://openweathermap.org; rel=nofollowOpen Weather Map/a/li/ul +ullia shape=rect href=geocoder.html title=Geocoderttcamel-geocoder/tt/a - For looking up geocodes (latitude, longitude) for a given address, or reverse lookup with a shape=rect class=external-link href=https://code.google.com/p/geocoder-java/; rel=nofollowJava API for Google Geocoder/a/lilia shape=rect href=mustache.html title=Mustachettcamel-mustache/tt/a - For templating using a shape=rect class=external-link href=http://mustache.github.io/; rel=nofollowMustache/a/lilia shape=rect href=mvel-component.html title=MVEL Componentttcamel-mvel/tt/a - For templating using a shape=rect class=external-link href=http://mvel.codehaus.org/; rel=nofollowMVEL/a/lilia shape=rect href=netty-http.html title=Netty HTTPttcamel-netty-http/tt/a - HTTP component using a shape=rect href=netty.html title=NettyNetty/a as transport/lilia shape=rect href=sap-netweaver.html titl e=SAP NetWeaverttcamel-sap-netwever/tt/a - For integration with a shape=rect class=external-link href=http://scn.sap.com/community/developer-center/netweaver-gateway; rel=nofollowSAP NetWeaver Gateway/a/lilia shape=rect href=weather.html title=Weatherttcamel-weather/tt/a - For polling weather information from a shape=rect class=external-link href=http://openweathermap.org; rel=nofollowOpen Weather Map/a/li/ul h3a shape=rect name=Camel2.12.0Release-NewDSL/aNew DSL/h3 Added: websites/production/camel/content/mustache.html == --- websites/production/camel/content/mustache.html (added) +++ websites/production/camel/content/mustache.html Thu Jun 20 10:19:29 2013 @@ -0,0 +1,272 @@ +!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; +!-- + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the License); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an AS IS BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +-- +html +head +link href=http://camel.apache.org/styles/site.css; rel=stylesheet type=text/css +link href=http://camel.apache.org/styles/type-settings.css; rel=stylesheet type=text/css +script src=http://camel.apache.org/styles/prototype.js; type=text/javascript/script +script src=http://camel.apache.org/styles/rico.js;
[1/3] git commit: CAMEL-6467: Added new mustache component to kit. Fixed CS.
Updated Branches: refs/heads/master 5ec63db94 - efbb85961 CAMEL-6467: Added new mustache component to kit. Fixed CS. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/82434981 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/82434981 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/82434981 Branch: refs/heads/master Commit: 82434981491f7198aebc817c4b7b13607eac5990 Parents: 5ec63db Author: Claus Ibsen davscl...@apache.org Authored: Thu Jun 20 11:36:20 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Jun 20 11:36:20 2013 +0200 -- components/camel-mustache/ReadMe.wiki | 96 .../component/mustache/MustacheLetterTest.java | 2 +- 2 files changed, 1 insertion(+), 97 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/82434981/components/camel-mustache/ReadMe.wiki -- diff --git a/components/camel-mustache/ReadMe.wiki b/components/camel-mustache/ReadMe.wiki deleted file mode 100644 index 0642e9b..000 --- a/components/camel-mustache/ReadMe.wiki +++ /dev/null @@ -1,96 +0,0 @@ -h2. Mustache - -The *mustache:* component allows for processing a message using a [Mustache|http://mustache.github.io/] template. This can be ideal when using [Templating] to generate responses for requests. - -Maven users will need to add the following dependency to their {{pom.xml}} for this component: -{code:xml} -dependency -groupIdorg.apache.camel/groupId -artifactIdcamel-mustache/artifactId -versionx.x.x/version !-- use the same version as your Camel core version -- -/dependency -{code} - -h3. URI format - -{code} -mustache:templateName[?options] -{code} - -Where *templateName* is the classpath-local URI of the template to invoke; or the complete URL of the remote template (eg: file://folder/myfile.mustache). - -You can append query options to the URI in the following format, {{?option=valueoption=value...}} - -h3. Options -{div:class=confluenceTableSmall} -|| Option || Default || Description || -| {{encoding}} | {{null}} | Character encoding of the resource content. | -| {{startDelimiter}} | {{ | Characters used to mark template code beginning. | -| {{endDelimiter}} | }} | Characters used to mark template code end. | -{div} - -h3. Mustache Context -Camel will provide exchange information in the Mustache context (just a {{Map}}). The {{Exchange}} is transferred as: -{div:class=confluenceTableSmall} -|| key || value || -| {{exchange}} | The {{Exchange}} itself. | -| {{exchange.properties}} | The {{Exchange}} properties. | -| {{headers}} | The headers of the In message. | -| {{camelContext}} | The Camel Context. | -| {{request}} | The In message. | -| {{body}} | The In message body. | -| {{response}} | The Out message (only for InOut message exchange pattern). | -{div} - -h3. Dynamic templates - -Camel provides two headers by which you can define a different resource location for a template or the template content itself. If any of these headers is set then Camel uses this over the endpoint configured resource. This allows you to provide a dynamic template at runtime. -{div:class=confluenceTableSmall} -|| Header || Type || Description || Support Version || -| MustacheConstants.MUSTACHE_RESOURCE | org.springframework.core.io.Resource | The template resource | | -| MustacheConstants.MUSTACHE_RESOURCE_URI | String | A URI for the template resource to use instead of the endpoint configured. | | -| MustacheConstants.MUSTACHE_TEMPLATE | String | The template to use instead of the endpoint configured. | | -{div} - -h3. Samples - -For example you could use something like: - -{code} -from(activemq:My.Queue). -to(mustache:com/acme/MyResponse.mustache); -{code} - -To use a Mustache template to formulate a response for a message for InOut message exchanges (where there is a {{JMSReplyTo}} header). - -If you want to use InOnly and consume the message and send it to another destination you could use: - -{code} -from(activemq:My.Queue). -to(mustache:com/acme/MyResponse.mustache). -to(activemq:Another.Queue); -{code} - -It's possible to specify what template the component should use dynamically via a header, so for example: -{code} -from(direct:in). -setHeader(MustacheConstants.MUSTACHE_RESOURCE_URI).constant(path/to/my/template.mustache). -to(mustache:dummy); -{code} - -h3. The Email Sample -In this sample we want to use Mustache templating for an order confirmation email. The email template is laid out in Mustache as: -{code} -Dear {{headers.lastName}}}, {{headers.firstName}} - -Thanks for the order of {{headers.item}}. - -Regards Camel Riders Bookstore -{{body}} -{code} - -And the java code: -
[2/3] git commit: CAMEL-6455: Improved exception message when bean parameter binding fails.
CAMEL-6455: Improved exception message when bean parameter binding fails. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b5c5c262 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b5c5c262 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b5c5c262 Branch: refs/heads/master Commit: b5c5c262f5304e6c4ca98fd165a62681f309b052 Parents: 8243498 Author: Claus Ibsen davscl...@apache.org Authored: Thu Jun 20 13:24:23 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Jun 20 13:24:23 2013 +0200 -- .../apache/camel/component/bean/MethodInfo.java | 27 + .../bean/ParameterBindingException.java | 59 ...eterAndNoMethodWithNoParameterIssueTest.java | 4 +- ...nNoTypeConvertionPossibleWhenHeaderTest.java | 7 ++- .../bean/BeanOverloadedMethodFQNTest.java | 4 +- .../bean/BeanParameterInvalidValueTest.java | 4 +- 6 files changed, 88 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/b5c5c262/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java b/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java index 205e285..721a2c5 100644 --- a/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java +++ b/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java @@ -535,17 +535,19 @@ public class MethodInfo { if (parameterValue instanceof String) { parameterValue = StringHelper.removeLeadingAndEndingQuotes((String) parameterValue); } -try { -// its a valid parameter value, so convert it to the expected type of the parameter -answer = exchange.getContext().getTypeConverter().mandatoryConvertTo(parameterType, exchange, parameterValue); -if (LOG.isTraceEnabled()) { -LOG.trace(Parameter #{} evaluated as: {} type: , new Object[]{index, answer, ObjectHelper.type(answer)}); +if (parameterValue != null) { +try { +// its a valid parameter value, so convert it to the expected type of the parameter +answer = exchange.getContext().getTypeConverter().mandatoryConvertTo(parameterType, exchange, parameterValue); +if (LOG.isTraceEnabled()) { +LOG.trace(Parameter #{} evaluated as: {} type: , new Object[]{index, answer, ObjectHelper.type(answer)}); +} +} catch (Exception e) { +if (LOG.isDebugEnabled()) { +LOG.debug(Cannot convert from type: {} to type: {} for parameter #{}, new Object[]{ObjectHelper.type(parameterValue), parameterType, index}); +} +throw new ParameterBindingException(e, method, index, parameterType, parameterValue); } -} catch (NoTypeConversionAvailableException e) { -if (LOG.isDebugEnabled()) { -LOG.debug(Cannot convert from type: {} to type: {} for parameter #{}, new Object[]{ObjectHelper.type(parameterValue), parameterType, index}); -} -throw ObjectHelper.wrapCamelExecutionException(exchange, e); } } } @@ -570,7 +572,10 @@ public class MethodInfo { LOG.trace(Parameter #{} evaluated as: {} type: , new Object[]{index, answer, ObjectHelper.type(answer)}); } } catch (NoTypeConversionAvailableException e) { -throw ObjectHelper.wrapCamelExecutionException(exchange, e); +if (LOG.isDebugEnabled()) { +LOG.debug(Cannot convert from type: {} to type: {} for parameter #{}, new Object[]{ObjectHelper.type(result), parameterType, index}); +} +throw new ParameterBindingException(e, method, index, parameterType, result); } } else { LOG.trace(Parameter #{} evaluated as null, index);
[3/3] git commit: CAMEL-6471: CXF in PAYLOAD mode should not output body/headers in the toString as that may force loading into memory. Also log if payload mode is allowing streaming or not, as thats
CAMEL-6471: CXF in PAYLOAD mode should not output body/headers in the toString as that may force loading into memory. Also log if payload mode is allowing streaming or not, as thats not easy to see how is configured. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/efbb8596 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/efbb8596 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/efbb8596 Branch: refs/heads/master Commit: efbb85961a2ad932d15164a01e2823ce1fe0ef54 Parents: b5c5c26 Author: Claus Ibsen davscl...@apache.org Authored: Thu Jun 20 13:48:16 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Jun 20 13:48:16 2013 +0200 -- .../apache/camel/component/cxf/CxfPayload.java | 29 ++-- .../cxf/feature/PayLoadDataFormatFeature.java | 4 +++ 2 files changed, 6 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/efbb8596/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java -- diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java index f40efcd..2fad481 100644 --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java @@ -130,34 +130,9 @@ public class CxfPayloadT { return headers; } -/** - * Returns the contents as a String - * Important notes: - * 1) This requires the message to be fully loaded breaking the streaming - * 2) For large messages, the result can be a VERY large String and require - * large amounts of memory. - */ public String toString() { -StringBuilder buf = new StringBuilder(); -buf.append(getClass().getName()); -buf.append( headers: + headers); -// go through the list of element and turn it into String -if (body == null) { -buf.append(body: + body); -} else { -buf.append(body: [ ); -for (Element src : getBody()) { -String elementString; -try { -elementString = StaxUtils.toString(src); -} catch (XMLStreamException e) { -elementString = src.toString(); -} -buf.append([ + elementString + ]); -} -buf.append(]); -} -return buf.toString(); +// do not load or print the payload body etc as we do not want to load that into memory etc +return super.toString(); } } http://git-wip-us.apache.org/repos/asf/camel/blob/efbb8596/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java -- diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java index 4642358..dae5b86 100644 --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java @@ -85,6 +85,8 @@ public class PayLoadDataFormatFeature extends AbstractDataFormatFeature { SoapHeaderInterceptor.class); client.getEndpoint().getBinding().getInInterceptors().add(new ConfigureDocLitWrapperInterceptor(true)); resetPartTypes(client.getEndpoint().getBinding()); + +LOG.info(Initialized CXF Client: {} in Payload mode with allow streaming: {}, client, allowStreaming); } @@ -103,6 +105,8 @@ public class PayLoadDataFormatFeature extends AbstractDataFormatFeature { removeInterceptor(server.getEndpoint().getBinding().getInInterceptors(), SoapHeaderInterceptor.class); resetPartTypes(server.getEndpoint().getBinding()); + +LOG.info(Initialized CXF Server: {} in Payload mode with allow streaming: {}, server, allowStreaming); } @Override
svn commit: r1494977 - /camel/website/pom.xml
Author: dkulp Date: Thu Jun 20 13:23:06 2013 New Revision: 1494977 URL: http://svn.apache.org/r1494977 Log: Update cxf version used Modified: camel/website/pom.xml Modified: camel/website/pom.xml URL: http://svn.apache.org/viewvc/camel/website/pom.xml?rev=1494977r1=1494976r2=1494977view=diff == --- camel/website/pom.xml (original) +++ camel/website/pom.xml Thu Jun 20 13:23:06 2013 @@ -28,11 +28,11 @@ parent groupIdorg.apache.cxf/groupId artifactIdcxf-parent/artifactId -version2.5.2/version +version2.6.8/version /parent properties -cxf.version2.5.2/cxf.version +cxf.version2.6.8/cxf.version extra.arg/extra.arg svn.arg1/svn.arg1 svn.arg2/svn.arg2
svn commit: r866626 - /websites/production/camel/content/styles/highlighter/
Author: dkulp Date: Thu Jun 20 13:31:49 2013 New Revision: 866626 Log: Add the code highlighter that will be required by the new confluence Added: websites/production/camel/content/styles/highlighter/ - copied from r866624, websites/production/cxf/content/resources/highlighter/
svn commit: r1495010 - /camel/website/template/template.camel
Author: dkulp Date: Thu Jun 20 14:04:51 2013 New Revision: 1495010 URL: http://svn.apache.org/r1495010 Log: Update the template to account for the new wiki's code format blocks Modified: camel/website/template/template.camel Modified: camel/website/template/template.camel URL: http://svn.apache.org/viewvc/camel/website/template/template.camel?rev=1495010r1=1495009r2=1495010view=diff == --- camel/website/template/template.camel (original) +++ camel/website/template/template.camel Thu Jun 20 14:04:51 2013 @@ -35,6 +35,21 @@ /style ![endif]-- + +#if($page.hasCode) + link href='http://camel.apache.org/styles/highlighter/styles/shCore.css' rel='stylesheet' type='text/css' / + link href='http://camel,.apache.org/styles/highlighter/styles/shThemeEclipse.css' rel='stylesheet' type='text/css' / + script src='http://camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'/script +#foreach ($hscript in $page.CodeScripts) + script src='http://camel.apache.org/styles/highlighter/scripts/$hscript' type='text/javascript'/script +#end + + script type=text/javascript + SyntaxHighlighter.defaults['toolbar'] = false; + SyntaxHighlighter.all(); + /script +#end + title Apache Camel: $page.title /title
git commit: CAMEL-6455: Improved bean component to support specifying empty parameter in the method name. And thrown a MethodNotFoundException if not found.
Updated Branches: refs/heads/master efbb85961 - a52864dfc CAMEL-6455: Improved bean component to support specifying empty parameter in the method name. And thrown a MethodNotFoundException if not found. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a52864df Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a52864df Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a52864df Branch: refs/heads/master Commit: a52864dfc931ee898cd53850c830049c820bf5a3 Parents: efbb859 Author: Claus Ibsen davscl...@apache.org Authored: Thu Jun 20 16:41:54 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Jun 20 17:09:49 2013 +0200 -- .../apache/camel/component/bean/BeanInfo.java | 14 ++ .../apache/camel/component/bean/MethodInfo.java | 4 ++ .../component/bean/MethodNotFoundException.java | 6 +++ ...eterAndNoMethodWithNoParameterIssueTest.java | 49 +--- 4 files changed, 66 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/a52864df/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java b/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java index a511943..dc9eb04 100644 --- a/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java +++ b/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java @@ -206,6 +206,7 @@ public class BeanInfo { if (methodName.contains(()) { name = ObjectHelper.before(methodName, (); } +boolean emptyParameters = methodName.endsWith(()); // special for getClass, as we want the user to be able to invoke this method // for example to log the class type or the likes @@ -221,6 +222,11 @@ public class BeanInfo { if (methods != null methods.size() == 1) { // only one method then choose it methodInfo = methods.get(0); + +// validate that if we want an explict no-arg method, then that's what we get +if (emptyParameters methodInfo.hasParameters()) { +throw new MethodNotFoundException(exchange, pojo, methodName, (with no parameters)); +} } else if (methods != null) { // there are more methods with that name so we cannot decide which to use @@ -228,6 +234,14 @@ public class BeanInfo { // must use the method name which may have qualifiers methodInfo = chooseMethod(pojo, exchange, methodName); +// validate that if we want an explicit no-arg method, then that's what we get +if (emptyParameters) { +if (methodInfo == null || methodInfo.hasParameters()) { +// we could not find a no-arg method with that name +throw new MethodNotFoundException(exchange, pojo, methodName, (with no parameters)); +} +} + if (methodInfo == null || !name.equals(methodInfo.getMethod().getName())) { throw new AmbiguousMethodCallException(exchange, methods); } http://git-wip-us.apache.org/repos/asf/camel/blob/a52864df/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java b/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java index 721a2c5..5080e24 100644 --- a/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java +++ b/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java @@ -378,6 +378,10 @@ public class MethodInfo { return hasHandlerAnnotation; } +public boolean hasParameters() { +return !parameters.isEmpty(); +} + public boolean isReturnTypeVoid() { return method.getReturnType().getName().equals(void); } http://git-wip-us.apache.org/repos/asf/camel/blob/a52864df/camel-core/src/main/java/org/apache/camel/component/bean/MethodNotFoundException.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/MethodNotFoundException.java b/camel-core/src/main/java/org/apache/camel/component/bean/MethodNotFoundException.java index 71e9760..e31c729 100644 ---
git commit: fixed CS error
Updated Branches: refs/heads/camel-2.10.x 36624994c - 5dbfc4a50 fixed CS error Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5dbfc4a5 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5dbfc4a5 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5dbfc4a5 Branch: refs/heads/camel-2.10.x Commit: 5dbfc4a50d1069384122fc6065fef7ac0066b7dd Parents: 3662499 Author: cmueller cmuel...@apache.org Authored: Thu Jun 20 20:59:18 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Thu Jun 20 20:59:18 2013 +0200 -- .../java/org/apache/camel/example/client/CamelClientRemoting.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/5dbfc4a5/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java -- diff --git a/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java b/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java index e7110e5..ac7f4eb 100644 --- a/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java +++ b/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java @@ -45,7 +45,7 @@ public final class CamelClientRemoting { System.out.println(... the result is: + response); // we're done so let's properly close the application context - context.close(); +context.close(); } // END SNIPPET: e1
[3/3] git commit: CAMEL-6317: Camel-validator not able to resolve schema when using useSharedSchema=false Thanks David J. M. Karlsen for reporting it
CAMEL-6317: Camel-validator not able to resolve schema when using useSharedSchema=false Thanks David J. M. Karlsen for reporting it Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c5d5d612 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c5d5d612 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c5d5d612 Branch: refs/heads/master Commit: c5d5d6124e5fac4181a5424510fa69d2f23fa078 Parents: a259399 Author: cmueller cmuel...@apache.org Authored: Thu Jun 20 22:09:30 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Thu Jun 20 22:09:30 2013 +0200 -- .../org/apache/camel/component/validator/ValidatorComponent.java| 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c5d5d612/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java b/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java index f69a5b9..5ec52f4 100644 --- a/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java +++ b/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java @@ -51,7 +51,6 @@ public class ValidatorComponent extends DefaultComponent { ValidatingProcessor validator = new ValidatingProcessor(); validator.setSchemaAsByteArray(bytes); -//validator.setSchemaSource(source); LOG.debug({} using schema resource: {}, this, resourceUri); configureValidator(validator, uri, remaining, parameters);
[1/3] git commit: CAMEL-6317: Camel-validator not able to resolve schema when using useSharedSchema=false Thanks David J. M. Karlsen for reporting it
Updated Branches: refs/heads/master a52864dfc - c5d5d6124 CAMEL-6317: Camel-validator not able to resolve schema when using useSharedSchema=false Thanks David J. M. Karlsen for reporting it Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a2593990 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a2593990 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a2593990 Branch: refs/heads/master Commit: a2593990d45ae9acac14778701cc8e0cce24f6f4 Parents: b21239f Author: cmueller cmuel...@apache.org Authored: Thu Jun 20 22:07:31 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Thu Jun 20 22:08:01 2013 +0200 -- .../component/validator/ValidatorComponent.java | 19 +++ .../validation/ValidatingProcessor.java | 20 +++- .../component/validator/ValidatorRouteTest.java | 15 --- 3 files changed, 42 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/a2593990/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java b/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java index 58de3e7..f69a5b9 100644 --- a/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java +++ b/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java @@ -19,11 +19,8 @@ package org.apache.camel.component.validator; import java.io.InputStream; import java.util.Map; -import javax.xml.transform.stream.StreamSource; - -import org.w3c.dom.ls.LSResourceResolver; - import org.apache.camel.Endpoint; +import org.apache.camel.converter.IOConverter; import org.apache.camel.impl.DefaultComponent; import org.apache.camel.impl.ProcessorEndpoint; import org.apache.camel.processor.validation.ValidatingProcessor; @@ -31,6 +28,7 @@ import org.apache.camel.util.IOHelper; import org.apache.camel.util.ResourceHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.w3c.dom.ls.LSResourceResolver; /** * The a href=http://camel.apache.org/validation.html;Validator Component/a @@ -43,18 +41,23 @@ public class ValidatorComponent extends DefaultComponent { protected Endpoint createEndpoint(String uri, String remaining, MapString, Object parameters) throws Exception { final String resourceUri = remaining; InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(), resourceUri); -StreamSource source = new StreamSource(is); +byte[] bytes = null; +try { +bytes = IOConverter.toBytes(is); +} finally { +// and make sure to close the input stream after the schema has been loaded +IOHelper.close(is); +} ValidatingProcessor validator = new ValidatingProcessor(); -validator.setSchemaSource(source); +validator.setSchemaAsByteArray(bytes); +//validator.setSchemaSource(source); LOG.debug({} using schema resource: {}, this, resourceUri); configureValidator(validator, uri, remaining, parameters); // force loading of schema at create time otherwise concurrent // processing could cause thread safe issues for the javax.xml.validation.SchemaFactory validator.loadSchema(); -// and make sure to close the input stream after the schema has been loaded -IOHelper.close(is); return new ProcessorEndpoint(uri, this, validator); } http://git-wip-us.apache.org/repos/asf/camel/blob/a2593990/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java -- diff --git a/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java index f2922bc..bd9f783 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java +++ b/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java @@ -16,6 +16,7 @@ */ package org.apache.camel.processor.validation; +import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -68,6 +69,7 @@ public class ValidatingProcessor implements AsyncProcessor { private SchemaFactory schemaFactory; private URL schemaUrl; private File schemaFile; +private byte[] schemaAsByteArray; private ValidatorErrorHandler
[2/3] git commit: CAMEL-6464: connectionTimeout property is ignored by JavaMail Thanks to Marco Zapletal for reporting it
CAMEL-6464: connectionTimeout property is ignored by JavaMail Thanks to Marco Zapletal for reporting it Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b21239f7 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b21239f7 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b21239f7 Branch: refs/heads/master Commit: b21239f709384f9d7c594d920f16c71d0007f61e Parents: a52864d Author: cmueller cmuel...@apache.org Authored: Thu Jun 20 21:26:44 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Thu Jun 20 22:08:01 2013 +0200 -- .../java/org/apache/camel/component/mail/MailConfiguration.java | 4 ++-- .../main/java/org/apache/camel/component/mail/MailConstants.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/b21239f7/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java -- diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java index 4614f40..bb0d70e 100644 --- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java +++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java @@ -55,7 +55,7 @@ public class MailConfiguration implements Cloneable { private String replyTo; private int fetchSize = -1; private boolean debugMode; -private long connectionTimeout = MailConstants.MAIL_DEFAULT_CONNECTION_TIMEOUT; +private int connectionTimeout = MailConstants.MAIL_DEFAULT_CONNECTION_TIMEOUT; private boolean dummyTrustManager; private String contentType = text/plain; private String alternativeBodyHeader = MailConstants.MAIL_ALTERNATIVE_BODY; @@ -418,7 +418,7 @@ public class MailConfiguration implements Cloneable { return connectionTimeout; } -public void setConnectionTimeout(long connectionTimeout) { +public void setConnectionTimeout(int connectionTimeout) { this.connectionTimeout = connectionTimeout; } http://git-wip-us.apache.org/repos/asf/camel/blob/b21239f7/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java -- diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java index 65fd523..10d4cee 100644 --- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java +++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java @@ -23,7 +23,7 @@ public final class MailConstants { public static final String MAIL_DEFAULT_FOLDER = INBOX; public static final String MAIL_DEFAULT_FROM = camel@localhost; public static final String MAIL_MESSAGE_ID = CamelMailMessageId; -public static final long MAIL_DEFAULT_CONNECTION_TIMEOUT = 3L; +public static final int MAIL_DEFAULT_CONNECTION_TIMEOUT = 3; private MailConstants() { // utility class
git commit: CAMEL-6464: connectionTimeout property is ignored by JavaMail Thanks to Marco Zapletal for reporting it
Updated Branches: refs/heads/camel-2.11.x 8221f2ce6 - a1c4835ea CAMEL-6464: connectionTimeout property is ignored by JavaMail Thanks to Marco Zapletal for reporting it Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a1c4835e Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a1c4835e Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a1c4835e Branch: refs/heads/camel-2.11.x Commit: a1c4835eaa5ab8173cfb357a373ded0cf363ca06 Parents: 8221f2c Author: cmueller cmuel...@apache.org Authored: Thu Jun 20 21:26:44 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Thu Jun 20 22:14:38 2013 +0200 -- .../java/org/apache/camel/component/mail/MailConfiguration.java | 4 ++-- .../main/java/org/apache/camel/component/mail/MailConstants.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/a1c4835e/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java -- diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java index 4614f40..bb0d70e 100644 --- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java +++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java @@ -55,7 +55,7 @@ public class MailConfiguration implements Cloneable { private String replyTo; private int fetchSize = -1; private boolean debugMode; -private long connectionTimeout = MailConstants.MAIL_DEFAULT_CONNECTION_TIMEOUT; +private int connectionTimeout = MailConstants.MAIL_DEFAULT_CONNECTION_TIMEOUT; private boolean dummyTrustManager; private String contentType = text/plain; private String alternativeBodyHeader = MailConstants.MAIL_ALTERNATIVE_BODY; @@ -418,7 +418,7 @@ public class MailConfiguration implements Cloneable { return connectionTimeout; } -public void setConnectionTimeout(long connectionTimeout) { +public void setConnectionTimeout(int connectionTimeout) { this.connectionTimeout = connectionTimeout; } http://git-wip-us.apache.org/repos/asf/camel/blob/a1c4835e/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java -- diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java index 65fd523..10d4cee 100644 --- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java +++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java @@ -23,7 +23,7 @@ public final class MailConstants { public static final String MAIL_DEFAULT_FOLDER = INBOX; public static final String MAIL_DEFAULT_FROM = camel@localhost; public static final String MAIL_MESSAGE_ID = CamelMailMessageId; -public static final long MAIL_DEFAULT_CONNECTION_TIMEOUT = 3L; +public static final int MAIL_DEFAULT_CONNECTION_TIMEOUT = 3; private MailConstants() { // utility class
[2/2] git commit: CAMEL-6317: Camel-validator not able to resolve schema when using useSharedSchema=false Thanks David J. M. Karlsen for reporting it
CAMEL-6317: Camel-validator not able to resolve schema when using useSharedSchema=false Thanks David J. M. Karlsen for reporting it Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/270962a5 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/270962a5 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/270962a5 Branch: refs/heads/camel-2.11.x Commit: 270962a5423376a1aead945aeb503c2a3869f4a3 Parents: 612f95b Author: cmueller cmuel...@apache.org Authored: Thu Jun 20 22:09:30 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Thu Jun 20 22:15:28 2013 +0200 -- .../org/apache/camel/component/validator/ValidatorComponent.java| 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/270962a5/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java b/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java index f69a5b9..5ec52f4 100644 --- a/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java +++ b/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java @@ -51,7 +51,6 @@ public class ValidatorComponent extends DefaultComponent { ValidatingProcessor validator = new ValidatingProcessor(); validator.setSchemaAsByteArray(bytes); -//validator.setSchemaSource(source); LOG.debug({} using schema resource: {}, this, resourceUri); configureValidator(validator, uri, remaining, parameters);
[1/2] git commit: CAMEL-6317: Camel-validator not able to resolve schema when using useSharedSchema=false Thanks David J. M. Karlsen for reporting it
Updated Branches: refs/heads/camel-2.11.x a1c4835ea - 270962a54 CAMEL-6317: Camel-validator not able to resolve schema when using useSharedSchema=false Thanks David J. M. Karlsen for reporting it Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/612f95bb Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/612f95bb Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/612f95bb Branch: refs/heads/camel-2.11.x Commit: 612f95bba302228a0a900f7334d8a571c7a0a74e Parents: a1c4835 Author: cmueller cmuel...@apache.org Authored: Thu Jun 20 22:07:31 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Thu Jun 20 22:15:15 2013 +0200 -- .../component/validator/ValidatorComponent.java | 19 +++ .../validation/ValidatingProcessor.java | 20 +++- .../component/validator/ValidatorRouteTest.java | 15 --- 3 files changed, 42 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/612f95bb/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java b/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java index 58de3e7..f69a5b9 100644 --- a/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java +++ b/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java @@ -19,11 +19,8 @@ package org.apache.camel.component.validator; import java.io.InputStream; import java.util.Map; -import javax.xml.transform.stream.StreamSource; - -import org.w3c.dom.ls.LSResourceResolver; - import org.apache.camel.Endpoint; +import org.apache.camel.converter.IOConverter; import org.apache.camel.impl.DefaultComponent; import org.apache.camel.impl.ProcessorEndpoint; import org.apache.camel.processor.validation.ValidatingProcessor; @@ -31,6 +28,7 @@ import org.apache.camel.util.IOHelper; import org.apache.camel.util.ResourceHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.w3c.dom.ls.LSResourceResolver; /** * The a href=http://camel.apache.org/validation.html;Validator Component/a @@ -43,18 +41,23 @@ public class ValidatorComponent extends DefaultComponent { protected Endpoint createEndpoint(String uri, String remaining, MapString, Object parameters) throws Exception { final String resourceUri = remaining; InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(), resourceUri); -StreamSource source = new StreamSource(is); +byte[] bytes = null; +try { +bytes = IOConverter.toBytes(is); +} finally { +// and make sure to close the input stream after the schema has been loaded +IOHelper.close(is); +} ValidatingProcessor validator = new ValidatingProcessor(); -validator.setSchemaSource(source); +validator.setSchemaAsByteArray(bytes); +//validator.setSchemaSource(source); LOG.debug({} using schema resource: {}, this, resourceUri); configureValidator(validator, uri, remaining, parameters); // force loading of schema at create time otherwise concurrent // processing could cause thread safe issues for the javax.xml.validation.SchemaFactory validator.loadSchema(); -// and make sure to close the input stream after the schema has been loaded -IOHelper.close(is); return new ProcessorEndpoint(uri, this, validator); } http://git-wip-us.apache.org/repos/asf/camel/blob/612f95bb/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java -- diff --git a/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java index 40995f1..6c325d9 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java +++ b/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java @@ -16,6 +16,7 @@ */ package org.apache.camel.processor.validation; +import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -65,6 +66,7 @@ public class ValidatingProcessor implements Processor { private SchemaFactory schemaFactory; private URL schemaUrl; private File schemaFile; +private byte[] schemaAsByteArray; private ValidatorErrorHandler
[2/2] git commit: CAMEL-6317: Camel-validator not able to resolve schema when using useSharedSchema=false Thanks David J. M. Karlsen for reporting it
CAMEL-6317: Camel-validator not able to resolve schema when using useSharedSchema=false Thanks David J. M. Karlsen for reporting it Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/755c71dd Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/755c71dd Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/755c71dd Branch: refs/heads/camel-2.10.x Commit: 755c71dda8663cd0847a66eabc66a9033ca13013 Parents: b809a84 Author: cmueller cmuel...@apache.org Authored: Thu Jun 20 22:09:30 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Thu Jun 20 22:23:24 2013 +0200 -- .../org/apache/camel/component/validator/ValidatorComponent.java| 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/755c71dd/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java b/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java index f69a5b9..5ec52f4 100644 --- a/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java +++ b/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java @@ -51,7 +51,6 @@ public class ValidatorComponent extends DefaultComponent { ValidatingProcessor validator = new ValidatingProcessor(); validator.setSchemaAsByteArray(bytes); -//validator.setSchemaSource(source); LOG.debug({} using schema resource: {}, this, resourceUri); configureValidator(validator, uri, remaining, parameters);
[1/2] git commit: CAMEL-6317: Camel-validator not able to resolve schema when using useSharedSchema=false Thanks David J. M. Karlsen for reporting it
Updated Branches: refs/heads/camel-2.10.x e85c21375 - 755c71dda CAMEL-6317: Camel-validator not able to resolve schema when using useSharedSchema=false Thanks David J. M. Karlsen for reporting it Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b809a843 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b809a843 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b809a843 Branch: refs/heads/camel-2.10.x Commit: b809a8430170c92daef3d55a699c496f5e377b2c Parents: e85c213 Author: cmueller cmuel...@apache.org Authored: Thu Jun 20 22:07:31 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Thu Jun 20 22:22:59 2013 +0200 -- .../component/validator/ValidatorComponent.java | 19 +++ .../validation/ValidatingProcessor.java | 20 +++- .../component/validator/ValidatorRouteTest.java | 15 --- 3 files changed, 42 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/b809a843/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java b/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java index 58de3e7..f69a5b9 100644 --- a/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java +++ b/camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java @@ -19,11 +19,8 @@ package org.apache.camel.component.validator; import java.io.InputStream; import java.util.Map; -import javax.xml.transform.stream.StreamSource; - -import org.w3c.dom.ls.LSResourceResolver; - import org.apache.camel.Endpoint; +import org.apache.camel.converter.IOConverter; import org.apache.camel.impl.DefaultComponent; import org.apache.camel.impl.ProcessorEndpoint; import org.apache.camel.processor.validation.ValidatingProcessor; @@ -31,6 +28,7 @@ import org.apache.camel.util.IOHelper; import org.apache.camel.util.ResourceHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.w3c.dom.ls.LSResourceResolver; /** * The a href=http://camel.apache.org/validation.html;Validator Component/a @@ -43,18 +41,23 @@ public class ValidatorComponent extends DefaultComponent { protected Endpoint createEndpoint(String uri, String remaining, MapString, Object parameters) throws Exception { final String resourceUri = remaining; InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(), resourceUri); -StreamSource source = new StreamSource(is); +byte[] bytes = null; +try { +bytes = IOConverter.toBytes(is); +} finally { +// and make sure to close the input stream after the schema has been loaded +IOHelper.close(is); +} ValidatingProcessor validator = new ValidatingProcessor(); -validator.setSchemaSource(source); +validator.setSchemaAsByteArray(bytes); +//validator.setSchemaSource(source); LOG.debug({} using schema resource: {}, this, resourceUri); configureValidator(validator, uri, remaining, parameters); // force loading of schema at create time otherwise concurrent // processing could cause thread safe issues for the javax.xml.validation.SchemaFactory validator.loadSchema(); -// and make sure to close the input stream after the schema has been loaded -IOHelper.close(is); return new ProcessorEndpoint(uri, this, validator); } http://git-wip-us.apache.org/repos/asf/camel/blob/b809a843/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java -- diff --git a/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java index 19fa2b1..57d285b 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java +++ b/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java @@ -16,6 +16,7 @@ */ package org.apache.camel.processor.validation; +import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -67,6 +68,7 @@ public class ValidatingProcessor implements Processor { private SchemaFactory schemaFactory; private URL schemaUrl; private File schemaFile; +private byte[] schemaAsByteArray; private ValidatorErrorHandler
git commit: CAMEL-6464: connectionTimeout property is ignored by JavaMail Thanks to Marco Zapletal for reporting it
Updated Branches: refs/heads/camel-2.10.x 5dbfc4a50 - e85c21375 CAMEL-6464: connectionTimeout property is ignored by JavaMail Thanks to Marco Zapletal for reporting it Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e85c2137 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e85c2137 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e85c2137 Branch: refs/heads/camel-2.10.x Commit: e85c2137580aa57188924a3d125b769880d41ffe Parents: 5dbfc4a Author: cmueller cmuel...@apache.org Authored: Thu Jun 20 21:26:44 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Thu Jun 20 22:18:33 2013 +0200 -- .../java/org/apache/camel/component/mail/MailConfiguration.java | 4 ++-- .../main/java/org/apache/camel/component/mail/MailConstants.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/e85c2137/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java -- diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java index 4614f40..bb0d70e 100644 --- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java +++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java @@ -55,7 +55,7 @@ public class MailConfiguration implements Cloneable { private String replyTo; private int fetchSize = -1; private boolean debugMode; -private long connectionTimeout = MailConstants.MAIL_DEFAULT_CONNECTION_TIMEOUT; +private int connectionTimeout = MailConstants.MAIL_DEFAULT_CONNECTION_TIMEOUT; private boolean dummyTrustManager; private String contentType = text/plain; private String alternativeBodyHeader = MailConstants.MAIL_ALTERNATIVE_BODY; @@ -418,7 +418,7 @@ public class MailConfiguration implements Cloneable { return connectionTimeout; } -public void setConnectionTimeout(long connectionTimeout) { +public void setConnectionTimeout(int connectionTimeout) { this.connectionTimeout = connectionTimeout; } http://git-wip-us.apache.org/repos/asf/camel/blob/e85c2137/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java -- diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java index acda232..c6b42ee 100644 --- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java +++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java @@ -22,7 +22,7 @@ public final class MailConstants { public static final String MAIL_ALTERNATIVE_BODY = CamelMailAlternativeBody; public static final String MAIL_DEFAULT_FOLDER = INBOX; public static final String MAIL_DEFAULT_FROM = camel@localhost; -public static final long MAIL_DEFAULT_CONNECTION_TIMEOUT = 3L; +public static final int MAIL_DEFAULT_CONNECTION_TIMEOUT = 3; private MailConstants() { // utility class
svn commit: r866680 [15/15] - in /websites/production/camel/content/maven: camel-2.10.0/camel-ahc/apidocs/ camel-2.10.0/camel-amqp/apidocs/ camel-2.10.0/camel-apns/apidocs/ camel-2.10.0/camel-atom/api
Modified: websites/production/camel/content/maven/camel-2.9.0/camel-xmpp/apidocs/index.html == --- websites/production/camel/content/maven/camel-2.9.0/camel-xmpp/apidocs/index.html (original) +++ websites/production/camel/content/maven/camel-2.9.0/camel-xmpp/apidocs/index.html Thu Jun 20 21:40:23 2013 @@ -13,6 +13,42 @@ Camel :: XMPP 2.9.0 API targetPage = targetPage.substring(1); if (targetPage.indexOf(:) != -1) targetPage = undefined; +if (targetPage != !validURL(targetPage)) +targetPage = undefined; +function validURL(url) { +var pos = url.indexOf(.html); +if (pos == -1 || pos != url.length - 5) +return false; +var allowNumber = false; +var allowSep = false; +var seenDot = false; +for (var i = 0; i url.length - 5; i++) { +var ch = url.charAt(i); +if ('a' = ch ch = 'z' || +'A' = ch ch = 'Z' || +ch == '$' || +ch == '_') { +allowNumber = true; +allowSep = true; +} else if ('0' = ch ch = '9' +|| ch == '-') { +if (!allowNumber) + return false; +} else if (ch == '/' || ch == '.') { +if (!allowSep) +return false; +allowNumber = false; +allowSep = false; +if (ch == '.') + seenDot = true; +if (ch == '/' seenDot) + return false; +} else { +return false; +} +} +return true; +} function loadFrames() { if (targetPage != targetPage != undefined) top.classFrame.location = top.targetPage; Modified: websites/production/camel/content/maven/camel-2.9.0/camel-xstream/apidocs/index.html == --- websites/production/camel/content/maven/camel-2.9.0/camel-xstream/apidocs/index.html (original) +++ websites/production/camel/content/maven/camel-2.9.0/camel-xstream/apidocs/index.html Thu Jun 20 21:40:23 2013 @@ -13,6 +13,42 @@ Camel :: XStream 2.9.0 API targetPage = targetPage.substring(1); if (targetPage.indexOf(:) != -1) targetPage = undefined; +if (targetPage != !validURL(targetPage)) +targetPage = undefined; +function validURL(url) { +var pos = url.indexOf(.html); +if (pos == -1 || pos != url.length - 5) +return false; +var allowNumber = false; +var allowSep = false; +var seenDot = false; +for (var i = 0; i url.length - 5; i++) { +var ch = url.charAt(i); +if ('a' = ch ch = 'z' || +'A' = ch ch = 'Z' || +ch == '$' || +ch == '_') { +allowNumber = true; +allowSep = true; +} else if ('0' = ch ch = '9' +|| ch == '-') { +if (!allowNumber) + return false; +} else if (ch == '/' || ch == '.') { +if (!allowSep) +return false; +allowNumber = false; +allowSep = false; +if (ch == '.') + seenDot = true; +if (ch == '/' seenDot) + return false; +} else { +return false; +} +} +return true; +} function loadFrames() { if (targetPage != targetPage != undefined) top.classFrame.location = top.targetPage; Modified: websites/production/camel/content/maven/camel-2.9.0/camel-zookeeper/apidocs/index.html == --- websites/production/camel/content/maven/camel-2.9.0/camel-zookeeper/apidocs/index.html (original) +++ websites/production/camel/content/maven/camel-2.9.0/camel-zookeeper/apidocs/index.html Thu Jun 20 21:40:23 2013 @@ -13,6 +13,42 @@ Camel :: Zookeeper 2.9.0 API targetPage = targetPage.substring(1); if (targetPage.indexOf(:) != -1) targetPage = undefined; +if (targetPage != !validURL(targetPage)) +targetPage = undefined; +function validURL(url) { +var pos = url.indexOf(.html); +if (pos == -1 || pos != url.length - 5) +return false; +var allowNumber = false; +var allowSep = false; +var seenDot = false; +for (var i = 0; i url.length - 5; i++) { +var ch = url.charAt(i); +if ('a' = ch ch = 'z' || +'A' = ch ch = 'Z' || +ch == '$' || +ch == '_') { +allowNumber = true; +