[2/3] camel git commit: CAMEL-7999: More components include documentation
CAMEL-7999: More components include documentation Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c4dc594a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c4dc594a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c4dc594a Branch: refs/heads/master Commit: c4dc594a591224a49b6bb2e5be4e0d84cb47e3e6 Parents: 5cb374b Author: Claus Ibsen davscl...@apache.org Authored: Tue Dec 2 09:29:24 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 09:29:24 2014 +0100 -- .../component/bean/validator/BeanValidator.java | 88 .../bean/validator/BeanValidatorComponent.java | 47 ++- .../bean/validator/BeanValidatorEndpoint.java | 135 +++ .../bean/validator/BeanValidatorProducer.java | 70 ++ .../BeanValidatorConfigurationTest.java | 30 ++--- 5 files changed, 223 insertions(+), 147 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c4dc594a/components/camel-bean-validator/src/main/java/org/apache/camel/component/bean/validator/BeanValidator.java -- diff --git a/components/camel-bean-validator/src/main/java/org/apache/camel/component/bean/validator/BeanValidator.java b/components/camel-bean-validator/src/main/java/org/apache/camel/component/bean/validator/BeanValidator.java deleted file mode 100644 index 1deb976..000 --- a/components/camel-bean-validator/src/main/java/org/apache/camel/component/bean/validator/BeanValidator.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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. - */ -package org.apache.camel.component.bean.validator; - -import java.util.Set; - -import javax.validation.ConstraintValidatorFactory; -import javax.validation.ConstraintViolation; -import javax.validation.MessageInterpolator; -import javax.validation.TraversableResolver; -import javax.validation.Validator; -import javax.validation.ValidatorFactory; - -import org.apache.camel.Exchange; -import org.apache.camel.Processor; - -/** - * Bean validator that uses the JSR 303 reference implementation (Hibernate Validator). - * Throws {@link BeanValidationException} if constrain violations are detected. - */ -public class BeanValidator implements Processor { - -private ValidatorFactory validatorFactory; -private Validator validator; -private Class? group; - -public void process(Exchange exchange) throws Exception { -Object bean = exchange.getIn().getBody(); -SetConstraintViolationObject constraintViolations = null; - -if (this.group != null) { -constraintViolations = validator.validate(bean, group); -} else { -constraintViolations = validator.validate(bean); -} - -if (!constraintViolations.isEmpty()) { -throw new BeanValidationException(exchange, constraintViolations, exchange.getIn().getBody()); -} -} - -public ValidatorFactory getValidatorFactory() { -return validatorFactory; -} - -public void setValidatorFactory(ValidatorFactory validatorFactory) { -this.validatorFactory = validatorFactory; -this.validator = this.validatorFactory.getValidator(); -} - -public Validator getValidator() { -return validator; -} - -public Class? getGroup() { -return group; -} - -public void setGroup(Class? group) { -this.group = group; -} - -public MessageInterpolator getMessageInterpolator() { -return this.validatorFactory.getMessageInterpolator(); -} - -public TraversableResolver getTraversableResolver() { -return this.validatorFactory.getTraversableResolver(); -} - -public ConstraintValidatorFactory getConstraintValidatorFactory() { -return this.validatorFactory.getConstraintValidatorFactory(); -} -} \ No newline at end of file
[3/3] camel git commit: CAMEL-7999: More components include documentation
CAMEL-7999: More components include documentation Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a9ef2ad0 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a9ef2ad0 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a9ef2ad0 Branch: refs/heads/master Commit: a9ef2ad0538dcc79b09dd78589d55c78079ad051 Parents: c4dc594 Author: Claus Ibsen davscl...@apache.org Authored: Tue Dec 2 09:33:11 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 09:33:11 2014 +0100 -- .../org/apache/camel/language/mvel/MvelComponent.java | 14 +++--- .../org/apache/camel/language/mvel/MvelEndpoint.java | 8 ++-- 2 files changed, 13 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/a9ef2ad0/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/MvelComponent.java -- diff --git a/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/MvelComponent.java b/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/MvelComponent.java index 51acccd..1fe03f3a 100644 --- a/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/MvelComponent.java +++ b/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/MvelComponent.java @@ -19,25 +19,25 @@ package org.apache.camel.language.mvel; import java.util.Map; import org.apache.camel.Endpoint; -import org.apache.camel.impl.DefaultComponent; -import org.apache.camel.util.ObjectHelper; +import org.apache.camel.impl.UriEndpointComponent; import org.apache.camel.util.ResourceHelper; /** * An a href=http://camel.apache.org/mvel.html;Mvel Component/a * for performing transforming messages */ -public class MvelComponent extends DefaultComponent { +public class MvelComponent extends UriEndpointComponent { + +public MvelComponent() { +super(MvelEndpoint.class); +} protected Endpoint createEndpoint(String uri, String remaining, MapString, Object parameters) throws Exception { -String encoding = getAndRemoveParameter(parameters, encoding, String.class); boolean cache = getAndRemoveParameter(parameters, contentCache, Boolean.class, Boolean.TRUE); MvelEndpoint answer = new MvelEndpoint(uri, this, remaining); +setProperties(answer, parameters); answer.setContentCache(cache); -if (ObjectHelper.isNotEmpty(encoding)) { -answer.setEncoding(encoding); -} // if its a http resource then append any remaining parameters and update the resource uri if (ResourceHelper.isHttpUri(remaining)) { http://git-wip-us.apache.org/repos/asf/camel/blob/a9ef2ad0/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/MvelEndpoint.java -- diff --git a/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/MvelEndpoint.java b/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/MvelEndpoint.java index d8cfe1a..61b5f2d 100644 --- a/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/MvelEndpoint.java +++ b/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/MvelEndpoint.java @@ -25,6 +25,8 @@ import org.apache.camel.ExchangePattern; import org.apache.camel.Message; import org.apache.camel.component.ResourceEndpoint; import org.apache.camel.converter.IOConverter; +import org.apache.camel.spi.UriEndpoint; +import org.apache.camel.spi.UriParam; import org.apache.camel.util.ExchangeHelper; import org.apache.camel.util.ObjectHelper; import org.mvel2.ParserContext; @@ -32,11 +34,13 @@ import org.mvel2.templates.CompiledTemplate; import org.mvel2.templates.TemplateCompiler; import org.mvel2.templates.TemplateRuntime; +@UriEndpoint(scheme = mvel, label = transformation,script) public class MvelEndpoint extends ResourceEndpoint { +@UriParam private String encoding; -private String template; -private CompiledTemplate compiled; +private volatile String template; +private volatile CompiledTemplate compiled; public MvelEndpoint(String uri, MvelComponent component, String resourceUri) { super(uri, component, resourceUri);
[1/3] camel git commit: CAMEL-7999: More components include documentation
Repository: camel Updated Branches: refs/heads/master b2d768828 - a9ef2ad05 CAMEL-7999: More components include documentation Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5cb374b3 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5cb374b3 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5cb374b3 Branch: refs/heads/master Commit: 5cb374b360f4bc29d113a3cface303cf435831a5 Parents: b2d7688 Author: Claus Ibsen davscl...@apache.org Authored: Tue Dec 2 09:02:16 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 09:02:16 2014 +0100 -- .../freemarker/FreemarkerComponent.java | 8 ++-- .../freemarker/FreemarkerEndpoint.java | 7 +-- .../component/mustache/MustacheComponent.java | 21 ++-- .../component/mustache/MustacheEndpoint.java| 6 ++ .../stringtemplate/StringTemplateComponent.java | 7 ++- .../stringtemplate/StringTemplateEndpoint.java | 6 ++ .../component/velocity/VelocityComponent.java | 15 +++--- .../component/velocity/VelocityEndpoint.java| 7 +++ 8 files changed, 49 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/5cb374b3/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerComponent.java -- diff --git a/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerComponent.java b/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerComponent.java index 9aa19f0..fe46555 100644 --- a/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerComponent.java +++ b/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerComponent.java @@ -23,18 +23,22 @@ import freemarker.cache.NullCacheStorage; import freemarker.cache.URLTemplateLoader; import freemarker.template.Configuration; import org.apache.camel.Endpoint; -import org.apache.camel.impl.DefaultComponent; +import org.apache.camel.impl.UriEndpointComponent; import org.apache.camel.util.ObjectHelper; import org.apache.camel.util.ResourceHelper; /** * Freemarker component. */ -public class FreemarkerComponent extends DefaultComponent { +public class FreemarkerComponent extends UriEndpointComponent { private Configuration configuration; private Configuration noCacheConfiguration; +public FreemarkerComponent() { +super(FreemarkerEndpoint.class); +} + protected Endpoint createEndpoint(String uri, String remaining, MapString, Object parameters) throws Exception { // should we use regular configuration or no cache (content cache is default true) Configuration config; http://git-wip-us.apache.org/repos/asf/camel/blob/5cb374b3/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerEndpoint.java -- diff --git a/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerEndpoint.java b/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerEndpoint.java index 7a33922..3367714 100644 --- a/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerEndpoint.java +++ b/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerEndpoint.java @@ -16,8 +16,6 @@ */ package org.apache.camel.component.freemarker; - - import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; @@ -30,15 +28,20 @@ import org.apache.camel.Exchange; import org.apache.camel.ExchangePattern; import org.apache.camel.Message; import org.apache.camel.component.ResourceEndpoint; +import org.apache.camel.spi.UriEndpoint; +import org.apache.camel.spi.UriParam; import org.apache.camel.util.ExchangeHelper; import org.apache.camel.util.ObjectHelper; /** * Freemarker endpoint */ +@UriEndpoint(scheme = freemarker, label = transformation) public class FreemarkerEndpoint extends ResourceEndpoint { +@UriParam private String encoding; +@UriParam private Configuration configuration; public FreemarkerEndpoint() { http://git-wip-us.apache.org/repos/asf/camel/blob/5cb374b3/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/MustacheComponent.java -- diff --git a/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/MustacheComponent.java
[1/2] camel git commit: CAMEL-7999: More components include documentation
Repository: camel Updated Branches: refs/heads/master a9ef2ad05 - 28586940f CAMEL-7999: More components include documentation Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/eab6ebb8 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/eab6ebb8 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/eab6ebb8 Branch: refs/heads/master Commit: eab6ebb8f4646c6c445ce49929f8c6b80dfe381c Parents: a9ef2ad Author: Claus Ibsen davscl...@apache.org Authored: Tue Dec 2 09:48:51 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 09:48:51 2014 +0100 -- .../camel/component/apns/ApnsComponent.java | 18 + .../camel/component/apns/ApnsEndpoint.java | 21 +++- .../bean/validator/BeanValidatorEndpoint.java | 2 +- 3 files changed, 22 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/eab6ebb8/components/camel-apns/src/main/java/org/apache/camel/component/apns/ApnsComponent.java -- diff --git a/components/camel-apns/src/main/java/org/apache/camel/component/apns/ApnsComponent.java b/components/camel-apns/src/main/java/org/apache/camel/component/apns/ApnsComponent.java index bc44fb1..5e70eac 100644 --- a/components/camel-apns/src/main/java/org/apache/camel/component/apns/ApnsComponent.java +++ b/components/camel-apns/src/main/java/org/apache/camel/component/apns/ApnsComponent.java @@ -19,33 +19,25 @@ package org.apache.camel.component.apns; import java.util.Map; import com.notnoop.apns.ApnsService; -import org.apache.camel.CamelContext; import org.apache.camel.Endpoint; -import org.apache.camel.impl.DefaultComponent; -import org.apache.camel.util.ObjectHelper; +import org.apache.camel.impl.UriEndpointComponent; -/** - * Represents the component that manages {@link ApnsEndpoint}. It holds the list - * of named apns endpoints. - */ -public class ApnsComponent extends DefaultComponent { +public class ApnsComponent extends UriEndpointComponent { private ApnsService apnsService; public ApnsComponent() { +super(ApnsEndpoint.class); } public ApnsComponent(ApnsService apnsService) { -ObjectHelper.notNull(apnsService, apnsService); +this(); this.apnsService = apnsService; } -public ApnsComponent(CamelContext context) { -super(context); -} - protected Endpoint createEndpoint(String uri, String remaining, MapString, Object parameters) throws Exception { ApnsEndpoint endpoint = new ApnsEndpoint(uri, this); +endpoint.setName(remaining); setProperties(endpoint, parameters); return endpoint; } http://git-wip-us.apache.org/repos/asf/camel/blob/eab6ebb8/components/camel-apns/src/main/java/org/apache/camel/component/apns/ApnsEndpoint.java -- diff --git a/components/camel-apns/src/main/java/org/apache/camel/component/apns/ApnsEndpoint.java b/components/camel-apns/src/main/java/org/apache/camel/component/apns/ApnsEndpoint.java index 6c2c6dc..607b1dc 100644 --- a/components/camel-apns/src/main/java/org/apache/camel/component/apns/ApnsEndpoint.java +++ b/components/camel-apns/src/main/java/org/apache/camel/component/apns/ApnsEndpoint.java @@ -20,26 +20,37 @@ import java.util.Set; import java.util.concurrent.CopyOnWriteArraySet; import com.notnoop.apns.ApnsService; - import org.apache.camel.Consumer; import org.apache.camel.Processor; import org.apache.camel.Producer; import org.apache.camel.impl.DefaultConsumer; import org.apache.camel.impl.ScheduledPollEndpoint; +import org.apache.camel.spi.UriEndpoint; +import org.apache.camel.spi.UriParam; +import org.apache.camel.spi.UriPath; -/** - * Represents a direct endpoint that synchronously invokes the consumers of the - * endpoint when a producer sends a message to it. - */ +@UriEndpoint(scheme = apns, consumerClass = ApnsConsumer.class, label = eventbus,mobile) public class ApnsEndpoint extends ScheduledPollEndpoint { private final CopyOnWriteArraySetDefaultConsumer consumers = new CopyOnWriteArraySetDefaultConsumer(); + +@UriPath(description = Name of the endpoint.) +private String name; +@UriParam private String tokens; public ApnsEndpoint(String uri, ApnsComponent component) { super(uri, component); } +public String getName() { +return name; +} + +public void setName(String name) { +this.name = name; +} + public String getTokens() { return tokens; }
[2/2] camel git commit: CAMEL-7999: More components include documentation
CAMEL-7999: More components include documentation Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/28586940 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/28586940 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/28586940 Branch: refs/heads/master Commit: 28586940f06ae677cb38e698bc1e7ed2ff769103 Parents: eab6ebb Author: Claus Ibsen davscl...@apache.org Authored: Tue Dec 2 09:57:39 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 09:57:39 2014 +0100 -- .../java/org/apache/camel/component/atom/AtomComponent.java | 4 .../java/org/apache/camel/component/atom/AtomEndpoint.java | 4 +++- .../java/org/apache/camel/component/feed/FeedComponent.java | 9 +++-- .../java/org/apache/camel/component/feed/FeedEndpoint.java | 9 + .../java/org/apache/camel/component/rss/RssComponent.java | 4 .../java/org/apache/camel/component/rss/RssEndpoint.java| 4 +++- 6 files changed, 30 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/28586940/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomComponent.java -- diff --git a/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomComponent.java b/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomComponent.java index 5296da0..53e4050 100644 --- a/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomComponent.java +++ b/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomComponent.java @@ -33,6 +33,10 @@ import org.apache.camel.util.URISupport; */ public class AtomComponent extends FeedComponent { +public AtomComponent() { +super(AtomEndpoint.class); +} + @Override protected FeedEndpoint createEndpoint(String uri, String remaining, MapString, Object parameters) throws Exception { return new AtomEndpoint(uri, this, null); http://git-wip-us.apache.org/repos/asf/camel/blob/28586940/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomEndpoint.java -- diff --git a/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomEndpoint.java b/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomEndpoint.java index e8ec3e4..5d071b2 100644 --- a/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomEndpoint.java +++ b/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomEndpoint.java @@ -24,12 +24,14 @@ import org.apache.camel.Processor; import org.apache.camel.component.feed.FeedComponent; import org.apache.camel.component.feed.FeedEndpoint; import org.apache.camel.component.feed.FeedPollingConsumer; +import org.apache.camel.spi.UriEndpoint; /** - * An a href=http://camel.apache.org/atom.html;Atom Endpoint/a. + * Atom is used for polling atom feeds * * @version */ +@UriEndpoint(scheme = atom, consumerClass = FeedPollingConsumer.class, label = feeds) public class AtomEndpoint extends FeedEndpoint { public AtomEndpoint() { http://git-wip-us.apache.org/repos/asf/camel/blob/28586940/components/camel-atom/src/main/java/org/apache/camel/component/feed/FeedComponent.java -- diff --git a/components/camel-atom/src/main/java/org/apache/camel/component/feed/FeedComponent.java b/components/camel-atom/src/main/java/org/apache/camel/component/feed/FeedComponent.java index 5491778..e83bb3c 100644 --- a/components/camel-atom/src/main/java/org/apache/camel/component/feed/FeedComponent.java +++ b/components/camel-atom/src/main/java/org/apache/camel/component/feed/FeedComponent.java @@ -18,12 +18,17 @@ package org.apache.camel.component.feed; import java.util.Map; -import org.apache.camel.impl.DefaultComponent; +import org.apache.camel.Endpoint; +import org.apache.camel.impl.UriEndpointComponent; /** * A base class for feed (atom, RSS) components. */ -public abstract class FeedComponent extends DefaultComponent { +public abstract class FeedComponent extends UriEndpointComponent { + +public FeedComponent(Class? extends Endpoint endpointClass) { +super(endpointClass); +} protected abstract FeedEndpoint createEndpoint(String uri, String remaining, MapString, Object parameters) throws Exception; http://git-wip-us.apache.org/repos/asf/camel/blob/28586940/components/camel-atom/src/main/java/org/apache/camel/component/feed/FeedEndpoint.java -- diff --git
camel git commit: Fix and enable test.
Repository: camel Updated Branches: refs/heads/master 28586940f - aa89a5b20 Fix and enable test. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/aa89a5b2 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/aa89a5b2 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/aa89a5b2 Branch: refs/heads/master Commit: aa89a5b200fe5e1350129f4630699baa408052ca Parents: 2858694 Author: Babak Vahdat bvah...@apache.org Authored: Tue Dec 2 10:56:43 2014 +0100 Committer: Babak Vahdat bvah...@apache.org Committed: Tue Dec 2 10:56:43 2014 +0100 -- tests/camel-itest-osgi/pom.xml | 1 - .../apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java | 2 +- .../org/apache/camel/itest/osgi/blueprint/blueprint-29.xml | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/aa89a5b2/tests/camel-itest-osgi/pom.xml -- diff --git a/tests/camel-itest-osgi/pom.xml b/tests/camel-itest-osgi/pom.xml index c51f199..8a00c0c 100644 --- a/tests/camel-itest-osgi/pom.xml +++ b/tests/camel-itest-osgi/pom.xml @@ -504,7 +504,6 @@ exclude**/FtpConsumeTest.*/exclude exclude**/BlobStoreRouteTest.*/exclude !-- CAMEL-6134 -- exclude**/BlobStoreBlueprintRouteTest.*/exclude !-- CAMEL-6134 -- - exclude**/BlueprintTracerTest.*/exclude !-- We get a Gave up waiting for service ((objectClass=org.apache.camel.CamelContext) -- /excludes systemPropertyVariables karafVersion${karaf-version}/karafVersion http://git-wip-us.apache.org/repos/asf/camel/blob/aa89a5b2/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java -- diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java index 3640b3b..25b7282 100644 --- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java +++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java @@ -57,7 +57,7 @@ public class BlueprintTracerTest extends OSGiBlueprintTestSupport { result.assertIsSatisfied(); DefaultTraceEventMessage em = tracer.getReceivedExchanges().get(0).getIn().getBody(DefaultTraceEventMessage.class); -assertEquals(Hello Camel, em.getBody()); +assertEquals(Hello World, em.getBody()); assertEquals(String, em.getBodyType()); assertEquals(null, em.getCausedByException()); http://git-wip-us.apache.org/repos/asf/camel/blob/aa89a5b2/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-29.xml -- diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-29.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-29.xml index 8dea9c8..7c3b93c 100644 --- a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-29.xml +++ b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-29.xml @@ -19,7 +19,6 @@ xmlns:camel=http://camel.apache.org/schema/blueprint; camelContext trace=true xmlns=http://camel.apache.org/schema/blueprint; -endpoint id=traced uri=mock:traced/ route from uri=direct:start/ to uri=mock:result/ @@ -27,12 +26,11 @@ /camelContext bean id=camelTracer class=org.apache.camel.processor.interceptor.Tracer -property name=traceExceptions value=false/ property name=traceInterceptors value=true/ property name=traceExceptions value=true/ property name=logLevel value=INFO/ property name=logName value=org.apache.camel.blueprint.log/ -property name=destination ref=traced/ +property name=destinationUri value=mock:traced/ /bean /blueprint
camel git commit: CAMEL-8103: Make CxfEndpoint CamelContextAware
Repository: camel Updated Branches: refs/heads/master aa89a5b20 - d787ad2dc CAMEL-8103: Make CxfEndpoint CamelContextAware Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d787ad2d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d787ad2d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d787ad2d Branch: refs/heads/master Commit: d787ad2dc7ee03d5209a1cbfd63bdbef9ddc430d Parents: aa89a5b Author: Jochen Cordes jcor...@redhat.com Authored: Tue Dec 2 08:47:14 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 11:00:15 2014 +0100 -- .../apache/camel/impl/DefaultCamelContext.java | 5 ++ .../apache/camel/component/cxf/CxfEndpoint.java | 3 +- .../cxf/CxfJavaOnlyCamelContextAwareTest.java | 88 3 files changed, 95 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d787ad2d/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java -- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java index a12f088..4ee7115 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java +++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java @@ -2362,6 +2362,11 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon addStartupListener(listener); } +if (service instanceof CamelContextAware) { +CamelContextAware aware = (CamelContextAware) service; +aware.setCamelContext(this); +} + service.start(); } http://git-wip-us.apache.org/repos/asf/camel/blob/d787ad2d/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java -- diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java index dffc1d7..e6abc2a 100644 --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java @@ -43,6 +43,7 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; import org.apache.camel.CamelContext; +import org.apache.camel.CamelContextAware; import org.apache.camel.CamelException; import org.apache.camel.Consumer; import org.apache.camel.Processor; @@ -112,7 +113,7 @@ import org.slf4j.LoggerFactory; * mode is {@link DataFormat#POJO}. */ @UriEndpoint(scheme = cxf, consumerClass = CxfConsumer.class, label = http,soap,webservice) -public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategyAware, Service, Cloneable { +public class CxfEndpoint extends DefaultEndpoint implements CamelContextAware, HeaderFilterStrategyAware, Service, Cloneable { private static final Logger LOG = LoggerFactory.getLogger(CxfEndpoint.class); http://git-wip-us.apache.org/repos/asf/camel/blob/d787ad2d/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfJavaOnlyCamelContextAwareTest.java -- diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfJavaOnlyCamelContextAwareTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfJavaOnlyCamelContextAwareTest.java new file mode 100644 index 000..317ee9b --- /dev/null +++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfJavaOnlyCamelContextAwareTest.java @@ -0,0 +1,88 @@ +/** + * 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. + */ + +package org.apache.camel.component.cxf; +import javax.xml.namespace.QName; +import org.w3c.dom.Document; +import org.apache.camel.Exchange; +import org.apache.camel.Processor; +import
camel git commit: CAMEL-8103: Polish
Repository: camel Updated Branches: refs/heads/master d787ad2dc - c261bad16 CAMEL-8103: Polish Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c261bad1 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c261bad1 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c261bad1 Branch: refs/heads/master Commit: c261bad164524df97b0f8779ac73e547e8b82063 Parents: d787ad2 Author: Babak Vahdat bvah...@apache.org Authored: Tue Dec 2 11:11:50 2014 +0100 Committer: Babak Vahdat bvah...@apache.org Committed: Tue Dec 2 11:11:50 2014 +0100 -- .../camel/component/cxf/CxfJavaOnlyCamelContextAwareTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c261bad1/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfJavaOnlyCamelContextAwareTest.java -- diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfJavaOnlyCamelContextAwareTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfJavaOnlyCamelContextAwareTest.java index 317ee9b..71acc66 100644 --- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfJavaOnlyCamelContextAwareTest.java +++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfJavaOnlyCamelContextAwareTest.java @@ -39,7 +39,7 @@ public class CxfJavaOnlyCamelContextAwareTest extends CamelTestSupport { String s = GetPerson xmlns=\http://camel.apache.org/wsdl-first/types\;personId123/personId/GetPerson; Document xml = context.getTypeConverter().convertTo(Document.class, s); -System.out.println(Endpoints: + context.getEndpoints()); +log.info(Endpoints: {}, context.getEndpoints()); Object output = template.requestBody(personService, xml); assertNotNull(output);
[2/2] camel git commit: CAMEL-8090: camel-chunk added to kit
CAMEL-8090: camel-chunk added to kit Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/01056c16 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/01056c16 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/01056c16 Branch: refs/heads/master Commit: 01056c16e82918e30d8fa185e6be78ff9ff10b62 Parents: 7cf0422 Author: Claus Ibsen davscl...@apache.org Authored: Tue Dec 2 11:22:40 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 11:22:40 2014 +0100 -- apache-camel/pom.xml| 4 +++ .../src/main/descriptors/common-bin.xml | 1 + .../camel/component/chunk/ChunkComponent.java | 34 .../camel/component/chunk/ChunkEndpoint.java| 9 ++ .../src/test/resources/log4j.properties | 29 +++-- parent/pom.xml | 5 +++ 6 files changed, 45 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/01056c16/apache-camel/pom.xml -- diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml index 966f375..ad7500b 100644 --- a/apache-camel/pom.xml +++ b/apache-camel/pom.xml @@ -133,6 +133,10 @@ /dependency dependency groupIdorg.apache.camel/groupId + artifactIdcamel-chunk/artifactId +/dependency +dependency + groupIdorg.apache.camel/groupId artifactIdcamel-cmis/artifactId /dependency dependency http://git-wip-us.apache.org/repos/asf/camel/blob/01056c16/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 6e25e10..f5422c7 100644 --- a/apache-camel/src/main/descriptors/common-bin.xml +++ b/apache-camel/src/main/descriptors/common-bin.xml @@ -44,6 +44,7 @@ includeorg.apache.camel:camel-cache/include includeorg.apache.camel:camel-castor/include includeorg.apache.camel:camel-cdi/include +includeorg.apache.camel:camel-chunk/include includeorg.apache.camel:camel-cmis/include includeorg.apache.camel:camel-core/include includeorg.apache.camel:camel-core-osgi/include http://git-wip-us.apache.org/repos/asf/camel/blob/01056c16/components/camel-chunk/src/main/java/org/apache/camel/component/chunk/ChunkComponent.java -- diff --git a/components/camel-chunk/src/main/java/org/apache/camel/component/chunk/ChunkComponent.java b/components/camel-chunk/src/main/java/org/apache/camel/component/chunk/ChunkComponent.java index 24648a8..40b6fee 100644 --- a/components/camel-chunk/src/main/java/org/apache/camel/component/chunk/ChunkComponent.java +++ b/components/camel-chunk/src/main/java/org/apache/camel/component/chunk/ChunkComponent.java @@ -19,39 +19,17 @@ package org.apache.camel.component.chunk; import java.util.Map; import org.apache.camel.Endpoint; -import org.apache.camel.impl.DefaultComponent; -import org.apache.camel.util.ObjectHelper; +import org.apache.camel.impl.UriEndpointComponent; -/** - * Represents the component that manages {@link ChunksEndpoint}. - * - * @version - */ -public class ChunkComponent extends DefaultComponent { +public class ChunkComponent extends UriEndpointComponent { + +public ChunkComponent() { +super(ChunkEndpoint.class); +} @Override protected Endpoint createEndpoint(String uri, String remaining, MapString, Object parameters) throws Exception { ChunkEndpoint endpoint = new ChunkEndpoint(uri, this, remaining); -String encoding = getAndRemoveParameter(parameters, encoding, String.class); -if (ObjectHelper.isNotEmpty(encoding)) { -endpoint.setEncoding(encoding); -} -String themesFolder = getAndRemoveParameter(parameters, themesFolder, String.class); -if (ObjectHelper.isNotEmpty(themesFolder)) { -endpoint.setThemeFolder(themesFolder); -} -String themeSubfolder = getAndRemoveParameter(parameters, themeSubfolder, String.class); -if (ObjectHelper.isNotEmpty(themeSubfolder)) { -endpoint.setThemeSubfolder(themeSubfolder); -} -String themeLayer = getAndRemoveParameter(parameters, themeLayer, String.class); -if (ObjectHelper.isNotEmpty(themeLayer)) { -endpoint.setThemeLayer(themeLayer); -} -String extension = getAndRemoveParameter(parameters, extension, String.class); -if (ObjectHelper.isNotEmpty(extension)) { -endpoint.setExtension(extension); -} setProperties(endpoint,
[1/2] camel git commit: Added new component Camel-chunk
Repository: camel Updated Branches: refs/heads/master c261bad16 - 01056c16e Added new component Camel-chunk Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7cf04221 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7cf04221 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7cf04221 Branch: refs/heads/master Commit: 7cf0422174d58d469d7fd03566958ae6c209bfae Parents: c261bad Author: ancosen anco...@gmail.com Authored: Sun Nov 30 10:14:35 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 11:13:57 2014 +0100 -- components/camel-chunk/README.md| 101 components/camel-chunk/pom.xml | 68 + .../camel/component/chunk/ChunkComponent.java | 58 + .../camel/component/chunk/ChunkConstants.java | 48 .../camel/component/chunk/ChunkEndpoint.java| 248 +++ .../src/main/resources/META-INF/LICENSE.txt | 203 +++ .../src/main/resources/META-INF/NOTICE.txt | 11 + .../services/org/apache/camel/component/chunk | 18 ++ .../chunk/ChunkComponentLayersTest.java | 67 + .../chunk/ChunkComponentNestedLayersTest.java | 68 + .../chunk/ChunkComponentNestedTest.java | 67 + .../chunk/ChunkComponentTemplateTest.java | 67 + .../component/chunk/ChunkComponentTest.java | 100 ...unkDifferentThemeFolderAndSubfolderTest.java | 67 + ...entThemeFolderSubfolderAndExtensionTest.java | 67 + ...fferentThemeFolderSubfolderAndLayerTest.java | 67 + .../chunk/ChunkDifferentThemeFolderTest.java| 67 + .../camel/component/chunk/ChunkLetterTest.java | 64 + .../resources/folderexample/file_example.chtml | 1 + .../subfolderexample/diff_template.chtml| 10 + .../subfolderexample/subfile_example.chtml | 1 + .../subfolderexample/subfile_example.file | 1 + .../src/test/resources/log4j.properties | 14 ++ .../src/test/resources/themes/example.chtml | 10 + .../src/test/resources/themes/file.chtml| 1 + .../src/test/resources/themes/file_nested.chtml | 2 + .../src/test/resources/themes/hello.chtml | 1 + .../src/test/resources/themes/letter.chtml | 6 + .../src/test/resources/themes/nested.chtml | 1 + .../resources/themes/subfolder/theme1.chtml | 1 + .../resources/themes/subfolder/theme2.chtml | 1 + components/pom.xml | 1 + parent/pom.xml | 3 +- 33 files changed, 1509 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/7cf04221/components/camel-chunk/README.md -- diff --git a/components/camel-chunk/README.md b/components/camel-chunk/README.md new file mode 100644 index 000..340a8a8 --- /dev/null +++ b/components/camel-chunk/README.md @@ -0,0 +1,101 @@ +# Chunk Component + +# Introduction + +This component use the Java Chunk library: http://www.x5software.com/chunk/examples/ChunkExample?loc=en_US + +Chunk is a Template Engine for Java similar to Apache Velocity, Mustache Java and Freemarker + +The **chunk:** component allows for processing a message using a Chunk template. This can be useful when using Templating to build responses for requests. + +Maven users will need to add the following dependency to their pom.xml for this component: + +```xml + +dependency +groupIdorg.apache.camel/groupId +artifactIdcamel-chunk/artifactId +versionx.x.x/version +!-- use the same version as your Camel core version -- +/dependency + +``` + +# URI format + +``` + +chunk:templateName[?options] + +``` + +# Options + +By default the chunk library will scan a default folder themes for a specific template, however is possible to define a differente folder to scan using the specific option. +Default extension of template file are .chtml and .cxml, however is possible to define different extension using the specific option. + +| Option | Default | Description | +|-|-|| +| encoding| null| Character encoding of the resource content. | +| themesFolder| null| Alternative folder to scan for a template name.| +| themeSubfolder | null| Alternative subfolder to scan for a template name if themeFolder parameter is
camel git commit: CAMEL-8090: Add karaf feature for camel-splunk
Repository: camel Updated Branches: refs/heads/master 01056c16e - 4b3343dcc CAMEL-8090: Add karaf feature for camel-splunk Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4b3343dc Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4b3343dc Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4b3343dc Branch: refs/heads/master Commit: 4b3343dcc3219651c2a2a0563264a8548bb7dab9 Parents: 01056c1 Author: Claus Ibsen davscl...@apache.org Authored: Tue Dec 2 11:27:42 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 11:27:42 2014 +0100 -- .../features/src/main/resources/features.xml| 6 +++ .../camel/itest/karaf/CamelChunkTest.java | 40 2 files changed, 46 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/4b3343dc/platforms/karaf/features/src/main/resources/features.xml -- diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml index f1f1255..e665774 100644 --- a/platforms/karaf/features/src/main/resources/features.xml +++ b/platforms/karaf/features/src/main/resources/features.xml @@ -228,6 +228,12 @@ bundlemvn:org.apache.camel/camel-cdi/${project.version}/bundle /feature -- + feature name='camel-chunk' version='${project.version}' resolver='(obr)' start-level='50' +feature version='${project.version}'camel-core/feature +bundle dependency='true'mvn:commons-io/commons-io/${commons-io-version}/bundle +bundle dependency='true'wrap:mvn:com.x5dev/chunk-templates/${chunk-templates-version}/bundle +bundlemvn:org.apache.camel/camel-chunk/${project.version}/bundle + /feature feature name='camel-cmis' version='${project.version}' resolver='(obr)' start-level='50' feature version='${project.version}'camel-core/feature feature version='${cxf-version-range}'cxf-specs/feature http://git-wip-us.apache.org/repos/asf/camel/blob/4b3343dc/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelChunkTest.java -- diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelChunkTest.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelChunkTest.java new file mode 100644 index 000..827181e --- /dev/null +++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelChunkTest.java @@ -0,0 +1,40 @@ +/** + * 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. + */ +package org.apache.camel.itest.karaf; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.junit.PaxExam; + +@RunWith(PaxExam.class) +public class CamelChunkTest extends AbstractFeatureTest { + +public static final String COMPONENT = extractName(CamelChunkTest.class); + +@Test +public void test() throws Exception { +testComponent(COMPONENT); +} + +@Configuration +public static Option[] configure() { +return configure(COMPONENT); +} + +} \ No newline at end of file
camel git commit: Polish
Repository: camel Updated Branches: refs/heads/master 4b3343dcc - c8ae4cac9 Polish Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c8ae4cac Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c8ae4cac Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c8ae4cac Branch: refs/heads/master Commit: c8ae4cac990afd79704d318de8fbecea8f684a0d Parents: 4b3343d Author: Babak Vahdat bvah...@apache.org Authored: Tue Dec 2 11:45:36 2014 +0100 Committer: Babak Vahdat bvah...@apache.org Committed: Tue Dec 2 11:45:36 2014 +0100 -- .../camel/component/sjms/SjmsProducer.java | 32 +--- .../sjms/consumer/InOutMessageHandler.java | 2 +- .../component/sjms/producer/InOutProducer.java | 2 -- 3 files changed, 15 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c8ae4cac/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsProducer.java -- diff --git a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsProducer.java b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsProducer.java index f26cb2a..88e0ca2 100644 --- a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsProducer.java +++ b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsProducer.java @@ -203,12 +203,8 @@ public abstract class SjmsProducer extends DefaultAsyncProducer { return isSynchronous(); } -protected SjmsEndpoint getSjmsEndpoint() { -return (SjmsEndpoint) this.getEndpoint(); -} - protected ConnectionResource getConnectionResource() { -return getSjmsEndpoint().getConnectionResource(); +return getEndpoint().getConnectionResource(); } /** @@ -217,7 +213,7 @@ public abstract class SjmsProducer extends DefaultAsyncProducer { * @return int */ public int getAcknowledgeMode() { -return getSjmsEndpoint().getAcknowledgementMode().intValue(); +return getEndpoint().getAcknowledgementMode().intValue(); } /** @@ -226,7 +222,7 @@ public abstract class SjmsProducer extends DefaultAsyncProducer { * @return true if synchronous, otherwise false */ public boolean isSynchronous() { -return getSjmsEndpoint().isSynchronous(); +return getEndpoint().isSynchronous(); } /** @@ -235,7 +231,7 @@ public abstract class SjmsProducer extends DefaultAsyncProducer { * @return String */ public String getReplyTo() { -return getSjmsEndpoint().getNamedReplyTo(); +return getEndpoint().getNamedReplyTo(); } /** @@ -244,7 +240,7 @@ public abstract class SjmsProducer extends DefaultAsyncProducer { * @return String */ public String getDestinationName() { -return getSjmsEndpoint().getDestinationName(); +return getEndpoint().getDestinationName(); } /** @@ -272,7 +268,7 @@ public abstract class SjmsProducer extends DefaultAsyncProducer { * @return true if it is a Topic, otherwise it is a Queue */ public boolean isTopic() { -return getSjmsEndpoint().isTopic(); +return getEndpoint().isTopic(); } /** @@ -281,7 +277,7 @@ public abstract class SjmsProducer extends DefaultAsyncProducer { * @return true if transacted, otherwise false */ public boolean isEndpointTransacted() { -return getSjmsEndpoint().isTransacted(); +return getEndpoint().isTransacted(); } /** @@ -290,7 +286,7 @@ public abstract class SjmsProducer extends DefaultAsyncProducer { * @return true if it is a Topic, otherwise it is a Queue */ public String getNamedReplyTo() { -return getSjmsEndpoint().getNamedReplyTo(); +return getEndpoint().getNamedReplyTo(); } /** @@ -299,7 +295,7 @@ public abstract class SjmsProducer extends DefaultAsyncProducer { * @return int */ public int getProducerCount() { -return getSjmsEndpoint().getProducerCount(); +return getEndpoint().getProducerCount(); } /** @@ -308,7 +304,7 @@ public abstract class SjmsProducer extends DefaultAsyncProducer { * @return int */ public int getConsumerCount() { -return getSjmsEndpoint().getConsumerCount(); +return getEndpoint().getConsumerCount(); } /** @@ -326,7 +322,7 @@ public abstract class SjmsProducer extends DefaultAsyncProducer { * @return long */ public long getTtl() { -return getSjmsEndpoint().getTtl(); +return getEndpoint().getTtl(); } /** @@ -335,7 +331,7 @@ public abstract class SjmsProducer extends
camel git commit: Polish
Repository: camel Updated Branches: refs/heads/master c8ae4cac9 - c7f775ffc Polish Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c7f775ff Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c7f775ff Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c7f775ff Branch: refs/heads/master Commit: c7f775ffc179e7c87efc1d41d05116e1c1813659 Parents: c8ae4ca Author: Babak Vahdat bvah...@apache.org Authored: Tue Dec 2 11:49:01 2014 +0100 Committer: Babak Vahdat bvah...@apache.org Committed: Tue Dec 2 11:49:01 2014 +0100 -- .../camel/component/docker/RemoveImageCmdUriTest.java | 3 ++- .../docker/headers/AttachContainerCmdHeaderTest.java | 13 +++-- .../docker/headers/BuildImageCmdHeaderTest.java| 9 + .../docker/headers/CopyFileContainerCmdHeaderTest.java | 5 +++-- .../docker/headers/CreateContainerCmdHeaderTest.java | 5 +++-- .../docker/headers/CreateImageCmdHeaderTest.java | 5 +++-- .../docker/headers/DiffContainerCmdHeaderTest.java | 3 ++- .../docker/headers/InspectContainerCmdHeaderTest.java | 3 ++- .../docker/headers/InspectImageCmdHeaderTest.java | 5 +++-- .../docker/headers/KillContainerCmdHeaderTest.java | 5 +++-- .../docker/headers/ListContainersCmdHeaderTest.java| 7 --- .../docker/headers/ListImagesCmdHeaderTest.java| 5 +++-- .../docker/headers/LogContainerCmdHeaderTest.java | 13 +++-- .../docker/headers/PauseContainerCmdHeaderTest.java| 3 ++- .../docker/headers/PullImageCmdHeaderTest.java | 7 --- .../docker/headers/PushImageCmdHeaderTest.java | 3 ++- .../docker/headers/RemoveContainerCmdHeaderTest.java | 7 --- .../docker/headers/RemoveImageCmdHeaderTest.java | 3 ++- .../docker/headers/RestartContainerCmdHeaderTest.java | 5 +++-- .../docker/headers/SearchImagesCmdHeaderTest.java | 5 +++-- .../docker/headers/StopContainerCmdHeaderTest.java | 5 +++-- .../docker/headers/TagImageCmdHeaderTest.java | 3 ++- .../docker/headers/TopContainerCmdHeaderTest.java | 5 +++-- .../docker/headers/UnpauseContainerCmdHeaderTest.java | 3 ++- .../docker/headers/WaitContainerCmdHeaderTest.java | 3 ++- 25 files changed, 79 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c7f775ff/components/camel-docker/src/test/java/org/apache/camel/component/docker/RemoveImageCmdUriTest.java -- diff --git a/components/camel-docker/src/test/java/org/apache/camel/component/docker/RemoveImageCmdUriTest.java b/components/camel-docker/src/test/java/org/apache/camel/component/docker/RemoveImageCmdUriTest.java index 9c51abc..74a1fb2 100644 --- a/components/camel-docker/src/test/java/org/apache/camel/component/docker/RemoveImageCmdUriTest.java +++ b/components/camel-docker/src/test/java/org/apache/camel/component/docker/RemoveImageCmdUriTest.java @@ -23,6 +23,7 @@ import com.github.dockerjava.api.command.RemoveImageCmd; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.docker.headers.BaseDockerHeaderTest; import org.junit.Test; +import org.mockito.Matchers; import org.mockito.Mock; import org.mockito.Mockito; @@ -65,7 +66,7 @@ public class RemoveImageCmdUriTest extends BaseDockerHeaderTestRemoveImageCmd @Override protected void setupMocks() { - Mockito.when(dockerClient.removeImageCmd(Mockito.anyString())).thenReturn(mockObject); + Mockito.when(dockerClient.removeImageCmd(Matchers.anyString())).thenReturn(mockObject); } @Override http://git-wip-us.apache.org/repos/asf/camel/blob/c7f775ff/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/AttachContainerCmdHeaderTest.java -- diff --git a/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/AttachContainerCmdHeaderTest.java b/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/AttachContainerCmdHeaderTest.java index a0c17a8..472c409 100644 --- a/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/AttachContainerCmdHeaderTest.java +++ b/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/AttachContainerCmdHeaderTest.java @@ -23,6 +23,7 @@ import com.github.dockerjava.api.command.AttachContainerCmd; import org.apache.camel.component.docker.DockerConstants; import org.apache.camel.component.docker.DockerOperation; import org.junit.Test; +import org.mockito.Matchers; import org.mockito.Mock; import org.mockito.Mockito; @@ -57,17 +58,17 @@ public class AttachContainerCmdHeaderTest extends
camel git commit: Polish
Repository: camel Updated Branches: refs/heads/master c7f775ffc - 0e195428e Polish Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0e195428 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0e195428 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0e195428 Branch: refs/heads/master Commit: 0e195428ee04531be27a0b659005e3aa8d159d23 Parents: c7f775f Author: Babak Vahdat bvah...@apache.org Authored: Tue Dec 2 11:51:09 2014 +0100 Committer: Babak Vahdat bvah...@apache.org Committed: Tue Dec 2 11:51:09 2014 +0100 -- .../src/main/java/org/apache/camel/builder/RouteBuilder.java | 1 - .../camel/component/bean/ConstantStaticTypeBeanHolder.java | 2 -- .../java/org/apache/camel/component/bean/RegistryBean.java | 1 - .../org/apache/camel/component/language/LanguageProducer.java | 1 - .../java/org/apache/camel/component/timer/TimerConsumer.java | 1 - .../main/java/org/apache/camel/model/ProcessorDefinition.java | 2 -- .../apache/camel/model/language/XMLTokenizerExpression.java| 1 - .../camel/processor/FileIdempotentConsumerCreateRepoTest.java | 1 - .../apache/camel/processor/SplitterParallelAggregateTest.java | 6 +++--- .../java/org/apache/camel/core/osgi/OsgiTypeConverter.java | 1 - 10 files changed, 3 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/0e195428/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 3186b41..c490de3 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 @@ -16,7 +16,6 @@ */ package org.apache.camel.builder; -import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; http://git-wip-us.apache.org/repos/asf/camel/blob/0e195428/camel-core/src/main/java/org/apache/camel/component/bean/ConstantStaticTypeBeanHolder.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/ConstantStaticTypeBeanHolder.java b/camel-core/src/main/java/org/apache/camel/component/bean/ConstantStaticTypeBeanHolder.java index c6e20da..50a2b50 100644 --- a/camel-core/src/main/java/org/apache/camel/component/bean/ConstantStaticTypeBeanHolder.java +++ b/camel-core/src/main/java/org/apache/camel/component/bean/ConstantStaticTypeBeanHolder.java @@ -17,8 +17,6 @@ package org.apache.camel.component.bean; import org.apache.camel.CamelContext; -import org.apache.camel.Processor; -import org.apache.camel.util.ObjectHelper; /** * A constant {@link org.apache.camel.component.bean.BeanHolder} for a class or static class http://git-wip-us.apache.org/repos/asf/camel/blob/0e195428/camel-core/src/main/java/org/apache/camel/component/bean/RegistryBean.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/RegistryBean.java b/camel-core/src/main/java/org/apache/camel/component/bean/RegistryBean.java index 84fd994..76a2f81 100644 --- a/camel-core/src/main/java/org/apache/camel/component/bean/RegistryBean.java +++ b/camel-core/src/main/java/org/apache/camel/component/bean/RegistryBean.java @@ -20,7 +20,6 @@ import org.apache.camel.CamelContext; import org.apache.camel.NoSuchBeanException; import org.apache.camel.Processor; import org.apache.camel.spi.Registry; -import org.apache.camel.util.CamelContextHelper; /** * An implementation of a {@link BeanHolder} which will look up a bean from the registry and act as a cache of its metadata http://git-wip-us.apache.org/repos/asf/camel/blob/0e195428/camel-core/src/main/java/org/apache/camel/component/language/LanguageProducer.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/language/LanguageProducer.java b/camel-core/src/main/java/org/apache/camel/component/language/LanguageProducer.java index 6a59314..7b5c73c 100644 --- a/camel-core/src/main/java/org/apache/camel/component/language/LanguageProducer.java +++ b/camel-core/src/main/java/org/apache/camel/component/language/LanguageProducer.java @@ -23,7 +23,6 @@ import org.apache.camel.Exchange; import org.apache.camel.Expression; import org.apache.camel.impl.DefaultProducer; import org.apache.camel.util.IOHelper; -import org.apache.camel.util.ObjectHelper; import org.apache.camel.util.ResourceHelper; import org.apache.camel.util.ServiceHelper;
camel git commit: Polish
Repository: camel Updated Branches: refs/heads/master 0e195428e - cc5c00f54 Polish Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/cc5c00f5 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/cc5c00f5 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/cc5c00f5 Branch: refs/heads/master Commit: cc5c00f54365fda65cfb823ba984ce2b1af5bce5 Parents: 0e19542 Author: Babak Vahdat bvah...@apache.org Authored: Tue Dec 2 11:55:25 2014 +0100 Committer: Babak Vahdat bvah...@apache.org Committed: Tue Dec 2 11:55:25 2014 +0100 -- .../camel/component/google/drive/GoogleDriveConsumer.java | 1 - .../camel/component/google/drive/GoogleDriveEndpoint.java | 2 +- .../camel/component/google/drive/GoogleDriveProducer.java | 1 - .../component/google/drive/DriveFilesIntegrationTest.java | 1 - .../java/org/apache/camel/component/hl7/HL7DataFormatTest.java | 1 - .../test/java/org/apache/camel/component/hl7/HL7RouteTest.java | 3 --- .../org/apache/camel/component/hl7/MessageValidatorTest.java | 3 ++- .../jettyproducer/JettyHttpsProducerSslContextInUriTest.java | 1 - .../org/apache/camel/component/jira/CommentConsumerTest.java | 4 ++-- .../org/apache/camel/component/jira/IssueConsumerTest.java | 4 ++-- .../camel/processor/jpa/JpaRouteSkipLockedEntityTest.java | 2 +- .../org/apache/camel/component/jsch/ScpServerTestSupport.java | 2 -- .../camel/component/kafka/embedded/EmbeddedZookeeper.java | 2 +- .../apache/camel/component/metrics/HistogramProducerTest.java | 2 -- .../org/apache/camel/component/mongodb/MongoDbProducer.java| 1 - .../java/org/apache/camel/component/netty4/MyCustomCodec.java | 2 +- .../apache/camel/component/restlet/DefaultRestletBinding.java | 1 - .../schematron/exception/SchematronConfigException.java| 2 ++ .../schematron/exception/SchematronValidationException.java| 2 +- .../java/org/apache/camel/scr/AbstractCamelRunnerTest.java | 6 +++--- 20 files changed, 16 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/cc5c00f5/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConsumer.java -- diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConsumer.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConsumer.java index 266aa27..76a0492 100644 --- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConsumer.java +++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConsumer.java @@ -16,7 +16,6 @@ */ package org.apache.camel.component.google.drive; -import java.io.IOException; import java.util.Map; import com.google.api.client.googleapis.services.AbstractGoogleClientRequest; http://git-wip-us.apache.org/repos/asf/camel/blob/cc5c00f5/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java -- diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java index b7133cf..b3fd22c 100644 --- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java +++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java @@ -74,7 +74,7 @@ public class GoogleDriveEndpoint extends AbstractApiEndpointGoogleDriveApiName, @Override protected void afterConfigureProperties() { -switch ((GoogleDriveApiName)apiName) { +switch (apiName) { case DRIVE_FILES: apiProxy = getClient().files(); break; http://git-wip-us.apache.org/repos/asf/camel/blob/cc5c00f5/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveProducer.java -- diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveProducer.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveProducer.java index 55b815a..188ef71 100644 --- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveProducer.java +++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveProducer.java @@ -16,7 +16,6
camel git commit: Polish
Repository: camel Updated Branches: refs/heads/master cc5c00f54 - c778bbcd6 Polish Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c778bbcd Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c778bbcd Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c778bbcd Branch: refs/heads/master Commit: c778bbcd680ce0b405e2cefb8e0d3b0c20a1efd3 Parents: cc5c00f Author: Babak Vahdat bvah...@apache.org Authored: Tue Dec 2 12:01:52 2014 +0100 Committer: Babak Vahdat bvah...@apache.org Committed: Tue Dec 2 12:01:52 2014 +0100 -- .../camel/component/servlet/rest/RestServletGetTest.java | 1 - .../org/apache/camel/component/sparkrest/SparkComponent.java | 8 .../spring/boot/CamelAutoConfigurationPropertiesTest.java| 1 - .../spring/javaconfig/test/JavaConfigContextLoader.java | 3 --- .../org/apache/camel/component/event/EventComponent.java | 1 - .../component/stringtemplate/StringTemplateComponent.java| 1 - .../org/apache/camel/component/twitter/TwitterComponent.java | 1 - .../apache/camel/component/velocity/VelocityComponent.java | 1 - .../xmlsecurity/processor/XmlVerifierProcessor.java | 4 ++-- .../apache/camel/component/xmlsecurity/XmlSignatureTest.java | 4 ++-- .../org/apache/camel/itest/karaf/AbstractFeatureTest.java| 2 -- .../camel/itest/osgi/blueprint/AbstractIntegrationTest.java | 3 +-- .../java/org/apache/camel/itest/osgi/core/seda/SedaTest.java | 1 - .../org/apache/camel/maven/packaging/PrepareCatalogMojo.java | 1 - 14 files changed, 9 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c778bbcd/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/rest/RestServletGetTest.java -- diff --git a/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/rest/RestServletGetTest.java b/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/rest/RestServletGetTest.java index 48805d1..12dc536 100644 --- a/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/rest/RestServletGetTest.java +++ b/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/rest/RestServletGetTest.java @@ -23,7 +23,6 @@ import com.meterware.servletunit.ServletUnitClient; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.component.http.HttpBinding; import org.apache.camel.component.servlet.ServletCamelRouterTestSupport; import org.apache.camel.component.servlet.ServletRestHttpBinding; import org.apache.camel.impl.JndiRegistry; http://git-wip-us.apache.org/repos/asf/camel/blob/c778bbcd/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/SparkComponent.java -- diff --git a/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/SparkComponent.java b/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/SparkComponent.java index 61b68c1..b5b91a5 100644 --- a/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/SparkComponent.java +++ b/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/SparkComponent.java @@ -104,19 +104,19 @@ public class SparkComponent extends UriEndpointComponent implements RestConsumer super.doStart(); if (getPort() != SparkBase.SPARK_DEFAULT_PORT) { -Spark.setPort(getPort()); +SparkBase.setPort(getPort()); } else { // if no explicit port configured, then use port from rest configuration RestConfiguration config = getCamelContext().getRestConfiguration(); if (config.getComponent() == null || config.getComponent().equals(spark-rest)) { int port = config.getPort(); if (port 0) { -Spark.setPort(port); +SparkBase.setPort(port); } } } if (getIpAddress() != null) { -Spark.setIpAddress(getIpAddress()); +SparkBase.setIpAddress(getIpAddress()); } // configure component options @@ -132,7 +132,7 @@ public class SparkComponent extends UriEndpointComponent implements RestConsumer @Override protected void doShutdown() throws Exception { super.doShutdown(); -Spark.stop(); +SparkBase.stop(); } @Override http://git-wip-us.apache.org/repos/asf/camel/blob/c778bbcd/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CamelAutoConfigurationPropertiesTest.java
camel git commit: Put back the import statement (accidentally removed by the previous commit)
Repository: camel Updated Branches: refs/heads/master c778bbcd6 - 7b9ad319e Put back the import statement (accidentally removed by the previous commit) Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7b9ad319 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7b9ad319 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7b9ad319 Branch: refs/heads/master Commit: 7b9ad319e431cf81a267f04c839c4d5ba1ff5993 Parents: c778bbc Author: Babak Vahdat bvah...@apache.org Authored: Tue Dec 2 12:06:20 2014 +0100 Committer: Babak Vahdat bvah...@apache.org Committed: Tue Dec 2 12:06:20 2014 +0100 -- .../java/org/apache/camel/itest/karaf/AbstractFeatureTest.java | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/7b9ad319/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/AbstractFeatureTest.java -- diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/AbstractFeatureTest.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/AbstractFeatureTest.java index 8903684..2e7272d 100644 --- a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/AbstractFeatureTest.java +++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/AbstractFeatureTest.java @@ -22,6 +22,8 @@ import java.lang.reflect.Field; import java.nio.charset.Charset; import java.util.Properties; +import javax.inject.Inject; + import org.apache.camel.CamelContext; import org.apache.camel.impl.DefaultRouteContext; import org.apache.camel.model.DataFormatDefinition;
svn commit: r931323 - in /websites/production/camel/content: cache/main.pageCache camel-2150-release.html
Author: buildbot Date: Tue Dec 2 11:19:08 2014 New Revision: 931323 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2150-release.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2150-release.html == --- websites/production/camel/content/camel-2150-release.html (original) +++ websites/production/camel/content/camel-2150-release.html Tue Dec 2 11:19:08 2014 @@ -84,7 +84,7 @@ tbody tr td valign=top width=100% -div class=wiki-content maincontenth1 id=Camel2.15.0Release-Camel2.15.0release(currentlyinprogress)Camel#160;2.15.0 release (currently in progress)/h1div style=padding-right:20px;float:left;margin-left:-20px;pimg class=confluence-embedded-image confluence-external-resource src=http://camel.apache.org/download.data/camel-box-v1.0-150x200.png; data-image-src=http://camel.apache.org/download.data/camel-box-v1.0-150x200.png;/p/divdiv style=min-height:200px#160;/divh2 id=Camel2.15.0Release-NewandNoteworthyNew and Noteworthy/h2pWelcome to the 2.15.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...)/pullispanComponent documentation now included in the built component JARs. And Java API and JMX API to access that documentation. And APIs to explain an endpoint uri and what all those configured options mean.#160;/span/lilispanComponent can now have#160;associated#160;label(s) which are use d for grouping components into: core, database, messaging, http, rest, etc./span/lilispanProvide Configurer for user to configure the CXF conduit and CXF destination from Java code/span/lilispanspanAdded a codeDelegateEndpoint/code#160;interface into Camel API/span/span/liliSupport to setup the SslContextParameters in the a shape=rect href=restlet.htmlcamel-restlet/a component/liliJava DSL - Should support nested choice in doTry .. doCatch/lilia shape=rect href=mongodb.htmlMongoDb/a component now a shape=rect class=external-link href=https://issues.apache.org/jira/browse/CAMEL-7996;stores OIDs/a#160;of the inserted records in the message header/lilia shape=rect href=recipient-list.htmlRecipient List/a now supports specifying custom#160;a shape=rect href=exchange-pattern.htmlExchange Pattern/a in the endpoint ur's/lilia shape=rect href=type-converter.htmlType Converter/a to enum's is now case insensitive, so you can convert safely level=info to an enum with name Level.INFO etc./lilia shape=rect href=xslt.htmlXSLT/a and#160;a shape=rect href=https://cwiki.apache.org/confluence/display/SM/Validation;Validation/a components now provides all their endpoint configurations in the endpoint, and not only in the component, making these components like any other components./liliMade the a shape=rect href=karaf.htmlCamel Karaf Commands/a reusable by moving common code into a#160;codecamel-commands-core/code module that SPI can extend and plugin Camel commands for other environments./liliFurther hardening of the#160;a shape=rect href=sjms.htmlSJMS/a#160;component./lilia shape=rect href=rest-dsl.htmlRest DSL/a with embedded routes now supports a shape=rect href=exception-clause.htmlonException/a, a shape=rect href=intercept.htmlintercept/a etc in use for those embedded routes, just like any regular r outes.#160;br clear=nonebr clear=none/li/ulh3 id=Camel2.15.0Release-FixedissuesFixed issues/h3ulliFixed processors was not enlisted in JMX when routes was transacted./liliFixed the NullPointerException when using CXF endpoint with enrich/liliFixed the#160;endpointProperty of#160;restConfiguration doesn't work issue/liliFixed the issue that#160;CircuitBreakerLoadBalancer fails on async processors/liliFixed#160;MyBatis consumer a shape=rect class=external-link href=https://issues.apache.org/jira/browse/CAMEL-8011;ignoring maxMessagesPerPoll/a option/liliFixed potential issue with#160;pollEnrich not triggering error handler if an exception was thrown in the polling.br clear=nonebr clear=none/li/ulh3 id=Camel2.15.0Release-NewNew a shape=rect href=enterprise-integration-patterns.htmlEnterprise Integration Patterns/a/h3h3 id=Camel2.15.0Release-New.1New a shape=rect href=components.htmlComponents/ a/h3ullia shape=rect href=beanstalk.htmlcamel-beanstalk/a - for working with Amazon Beanstalk jobs./lilia shape=rect href=docker.htmlcamel-docker/a - to communicate with Docker./lilicamel-github - for integrating with github/lilicamel-jira - for integrating with JIRA issue tracker/lilicamel-scr - for using Camel with a shape=rect class=external-link
camel git commit: Polish
Repository: camel Updated Branches: refs/heads/master 7b9ad319e - da1813bbf Polish Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/da1813bb Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/da1813bb Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/da1813bb Branch: refs/heads/master Commit: da1813bbf36080c5ed976fc5f6a1665ed067ff75 Parents: 7b9ad31 Author: Babak Vahdat bvah...@apache.org Authored: Tue Dec 2 12:57:36 2014 +0100 Committer: Babak Vahdat bvah...@apache.org Committed: Tue Dec 2 12:57:36 2014 +0100 -- .../camel/processor/SplitterParallelAggregateTest.java | 3 +-- .../camel/itest/osgi/blueprint/AbstractIntegrationTest.java | 8 2 files changed, 5 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/da1813bb/camel-core/src/test/java/org/apache/camel/processor/SplitterParallelAggregateTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/processor/SplitterParallelAggregateTest.java b/camel-core/src/test/java/org/apache/camel/processor/SplitterParallelAggregateTest.java index 257a36f..6eac19d 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/SplitterParallelAggregateTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/SplitterParallelAggregateTest.java @@ -84,8 +84,7 @@ public class SplitterParallelAggregateTest extends ContextTestSupport { for (String endpoint : endpoints) { stopWatch.restart(); for (int requestIndex = 0; requestIndex numberOfRequests; requestIndex++) { -futures.add(template.asyncRequestBody( -endpoint, null, File.class)); +futures.add(template.asyncRequestBody(endpoint, null, File.class)); } for (int i = 0; i futures.size(); i++) { http://git-wip-us.apache.org/repos/asf/camel/blob/da1813bb/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java -- diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java index 5040892..ce2e5f4 100644 --- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java +++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java @@ -53,7 +53,7 @@ public abstract class AbstractIntegrationTest extends OSGiIntegrationTestSupport } protected T T getOsgiService(ClassT type, String filter, long timeout) { -ServiceTracker?, ? tracker = null; +ServiceTrackerT, T tracker; try { String flt; if (filter != null) { @@ -66,11 +66,11 @@ public abstract class AbstractIntegrationTest extends OSGiIntegrationTestSupport flt = ( + Constants.OBJECTCLASS + = + type.getName() + ); } Filter osgiFilter = FrameworkUtil.createFilter(flt); -tracker = new ServiceTrackerObject, Object(bundleContext, osgiFilter, null); +tracker = new ServiceTrackerT, T(bundleContext, osgiFilter, null); tracker.open(true); // Note that the tracker is not closed to keep the reference // This is buggy, as the service reference may change i think -Object svc = type.cast(tracker.waitForService(timeout)); +T svc = tracker.waitForService(timeout); if (svc == null) { @SuppressWarnings(rawtypes) Dictionary dic = bundleContext.getBundle().getHeaders(); @@ -86,7 +86,7 @@ public abstract class AbstractIntegrationTest extends OSGiIntegrationTestSupport throw new RuntimeException(Gave up waiting for service + flt); } -return type.cast(svc); +return svc; } catch (InvalidSyntaxException e) { throw new IllegalArgumentException(Invalid filter, e); } catch (InterruptedException e) {
camel git commit: Add the ability to send a KeyValue in the EncryptedKey in camel-xmlsecurity
Repository: camel Updated Branches: refs/heads/master da1813bbf - 3817962c8 Add the ability to send a KeyValue in the EncryptedKey in camel-xmlsecurity Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3817962c Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3817962c Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3817962c Branch: refs/heads/master Commit: 3817962c82d11461f02ba1ea170e5abebffd8259 Parents: da1813b Author: Colm O hEigeartaigh cohei...@apache.org Authored: Tue Dec 2 12:00:59 2014 + Committer: Colm O hEigeartaigh cohei...@apache.org Committed: Tue Dec 2 12:01:56 2014 + -- .../model/dataformat/XMLSecurityDataFormat.java | 12 + .../xmlsecurity/XMLSecurityDataFormat.java | 35 +++--- .../dataformat/xmlsecurity/TestHelper.java | 3 +- .../xmlsecurity/XMLSecurityDataFormatTest.java | 51 4 files changed, 92 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/3817962c/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java -- diff --git a/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java b/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java index 1cefdba..b5e02f6 100644 --- a/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java +++ b/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java @@ -60,6 +60,8 @@ public class XMLSecurityDataFormat extends DataFormatDefinition implements Names private String digestAlgorithm; @XmlAttribute private String mgfAlgorithm; +@XmlAttribute +private boolean addKeyValueForEncryptedKey = true; @XmlTransient private KeyStoreParameters keyOrTrustStoreParameters; @@ -274,6 +276,8 @@ public class XMLSecurityDataFormat extends DataFormatDefinition implements Names if (mgfAlgorithm != null) { setProperty(camelContext, dataFormat, mgfAlgorithm, this.getMgfAlgorithm()); } + +setProperty(camelContext, dataFormat, addKeyValueForEncryptedKey, isAddKeyValueForEncryptedKey()); } public String getXmlCipherAlgorithm() { @@ -363,6 +367,14 @@ public class XMLSecurityDataFormat extends DataFormatDefinition implements Names public void setMgfAlgorithm(String mgfAlgorithm) { this.mgfAlgorithm = mgfAlgorithm; } + +public boolean isAddKeyValueForEncryptedKey() { +return addKeyValueForEncryptedKey; +} + +public void setAddKeyValueForEncryptedKey(boolean addKeyValueForEncryptedKey) { +this.addKeyValueForEncryptedKey = addKeyValueForEncryptedKey; +} @Override public void setNamespaces(MapString, String nspaces) { http://git-wip-us.apache.org/repos/asf/camel/blob/3817962c/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java -- diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java index 3e816c5..ada0ce8 100755 --- a/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java +++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java @@ -29,6 +29,7 @@ import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; import java.security.PrivilegedAction; import java.security.PrivilegedExceptionAction; +import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.util.Arrays; import java.util.Map; @@ -43,7 +44,6 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; - import org.apache.camel.CamelContext; import org.apache.camel.CamelContextAware; import org.apache.camel.Exchange; @@ -139,6 +139,7 @@ public class XMLSecurityDataFormat implements DataFormat, CamelContextAware { private CamelContext camelContext; private DefaultNamespaceContext nsContext = new DefaultNamespaceContext(); +private boolean addKeyValueForEncryptedKey = true; public XMLSecurityDataFormat() { this.xmlCipherAlgorithm = XMLCipher.TRIPLEDES; @@ -475,8 +476,9 @@ public class XMLSecurityDataFormat implements DataFormat, CamelContextAware { } else { keyCipher = XMLCipher.getInstance(XMLCipher.RSA_OAEP, null,
camel git commit: Add the ability to send a KeyValue in the EncryptedKey in camel-xmlsecurity
Repository: camel Updated Branches: refs/heads/camel-2.14.x e04a4fe60 - 500a6635a Add the ability to send a KeyValue in the EncryptedKey in camel-xmlsecurity Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/500a6635 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/500a6635 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/500a6635 Branch: refs/heads/camel-2.14.x Commit: 500a6635aff979481195796d01d334bfc571b519 Parents: e04a4fe Author: Colm O hEigeartaigh cohei...@apache.org Authored: Tue Dec 2 12:00:59 2014 + Committer: Colm O hEigeartaigh cohei...@apache.org Committed: Tue Dec 2 12:04:21 2014 + -- .../model/dataformat/XMLSecurityDataFormat.java | 12 + .../xmlsecurity/XMLSecurityDataFormat.java | 35 +++--- .../dataformat/xmlsecurity/TestHelper.java | 3 +- .../xmlsecurity/XMLSecurityDataFormatTest.java | 51 4 files changed, 92 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/500a6635/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java -- diff --git a/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java b/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java index 1cefdba..b5e02f6 100644 --- a/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java +++ b/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java @@ -60,6 +60,8 @@ public class XMLSecurityDataFormat extends DataFormatDefinition implements Names private String digestAlgorithm; @XmlAttribute private String mgfAlgorithm; +@XmlAttribute +private boolean addKeyValueForEncryptedKey = true; @XmlTransient private KeyStoreParameters keyOrTrustStoreParameters; @@ -274,6 +276,8 @@ public class XMLSecurityDataFormat extends DataFormatDefinition implements Names if (mgfAlgorithm != null) { setProperty(camelContext, dataFormat, mgfAlgorithm, this.getMgfAlgorithm()); } + +setProperty(camelContext, dataFormat, addKeyValueForEncryptedKey, isAddKeyValueForEncryptedKey()); } public String getXmlCipherAlgorithm() { @@ -363,6 +367,14 @@ public class XMLSecurityDataFormat extends DataFormatDefinition implements Names public void setMgfAlgorithm(String mgfAlgorithm) { this.mgfAlgorithm = mgfAlgorithm; } + +public boolean isAddKeyValueForEncryptedKey() { +return addKeyValueForEncryptedKey; +} + +public void setAddKeyValueForEncryptedKey(boolean addKeyValueForEncryptedKey) { +this.addKeyValueForEncryptedKey = addKeyValueForEncryptedKey; +} @Override public void setNamespaces(MapString, String nspaces) { http://git-wip-us.apache.org/repos/asf/camel/blob/500a6635/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java -- diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java index 91ebf6f..b31deae 100755 --- a/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java +++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java @@ -29,6 +29,7 @@ import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; import java.security.PrivilegedAction; import java.security.PrivilegedExceptionAction; +import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.util.Arrays; import java.util.Map; @@ -43,7 +44,6 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; - import org.apache.camel.CamelContext; import org.apache.camel.CamelContextAware; import org.apache.camel.Exchange; @@ -139,6 +139,7 @@ public class XMLSecurityDataFormat implements DataFormat, CamelContextAware { private CamelContext camelContext; private DefaultNamespaceContext nsContext = new DefaultNamespaceContext(); +private boolean addKeyValueForEncryptedKey = true; public XMLSecurityDataFormat() { this.xmlCipherAlgorithm = XMLCipher.TRIPLEDES; @@ -475,8 +476,9 @@ public class XMLSecurityDataFormat implements DataFormat, CamelContextAware { } else { keyCipher = XMLCipher.getInstance(XMLCipher.RSA_OAEP, null,
[2/2] camel git commit: CAMEl-8104: rest-dsl should allow custom error messages as-is without attempting output binding.
CAMEl-8104: rest-dsl should allow custom error messages as-is without attempting output binding. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/be560320 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/be560320 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/be560320 Branch: refs/heads/camel-2.14.x Commit: be560320d5a44a70cae787273674fbfd4e75c037 Parents: 500a663 Author: Claus Ibsen davscl...@apache.org Authored: Tue Dec 2 13:02:21 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 13:15:05 2014 +0100 -- .../camel/model/rest/RestBindingDefinition.java | 17 - .../model/rest/RestConfigurationDefinition.java | 22 ++ .../apache/camel/model/rest/RestDefinition.java | 15 .../apache/camel/model/rest/VerbDefinition.java | 11 +++ .../processor/binding/RestBindingProcessor.java | 12 +++- .../org/apache/camel/spi/RestConfiguration.java | 19 + .../rest/FromRestGetHttpErrorCodeTest.java | 66 + ...RestletPojoInOutCustomErrorResponseTest.java | 76 .../component/restlet/UserErrorService.java | 28 9 files changed, 263 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/be560320/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java -- diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java b/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java index 396243f..3a120c4 100644 --- a/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java @@ -51,6 +51,9 @@ public class RestBindingDefinition extends NoOutputDefinitionRestBindingDefinit @XmlAttribute private String outType; +@XmlAttribute +private Boolean skipBindingOnErrorCode; + @Override public String toString() { return RestBinding; @@ -72,9 +75,12 @@ public class RestBindingDefinition extends NoOutputDefinitionRestBindingDefinit mode = bindingMode.name(); } +// skip by default +boolean skip = skipBindingOnErrorCode == null || skipBindingOnErrorCode; + if (mode == null || off.equals(mode)) { // binding mode is off, so create a off mode binding processor -return new RestBindingProcessor(null, null, null, null, consumes, produces, mode); +return new RestBindingProcessor(null, null, null, null, consumes, produces, mode, skip); } // setup json data format @@ -161,7 +167,7 @@ public class RestBindingDefinition extends NoOutputDefinitionRestBindingDefinit context.addService(outJaxb); } -return new RestBindingProcessor(json, jaxb, outJson, outJaxb, consumes, produces, mode); +return new RestBindingProcessor(json, jaxb, outJson, outJaxb, consumes, produces, mode, skip); } private void setAdditionalConfiguration(CamelContext context, DataFormat dataFormat) throws Exception { @@ -214,4 +220,11 @@ public class RestBindingDefinition extends NoOutputDefinitionRestBindingDefinit this.outType = outType; } +public Boolean getSkipBindingOnErrorCode() { +return skipBindingOnErrorCode; +} + +public void setSkipBindingOnErrorCode(Boolean skipBindingOnErrorCode) { +this.skipBindingOnErrorCode = skipBindingOnErrorCode; +} } http://git-wip-us.apache.org/repos/asf/camel/blob/be560320/camel-core/src/main/java/org/apache/camel/model/rest/RestConfigurationDefinition.java -- diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestConfigurationDefinition.java b/camel-core/src/main/java/org/apache/camel/model/rest/RestConfigurationDefinition.java index 531fbc8..7cd175b 100644 --- a/camel-core/src/main/java/org/apache/camel/model/rest/RestConfigurationDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestConfigurationDefinition.java @@ -59,6 +59,9 @@ public class RestConfigurationDefinition { private RestBindingMode bindingMode; @XmlAttribute +private Boolean skipBindingOnErrorCode; + +@XmlAttribute private String jsonDataFormat; @XmlAttribute @@ -132,6 +135,14 @@ public class RestConfigurationDefinition { this.bindingMode = bindingMode; } +public Boolean getSkipBindingOnErrorCode() { +return skipBindingOnErrorCode; +} + +public void setSkipBindingOnErrorCode(Boolean skipBindingOnErrorCode) { +this.skipBindingOnErrorCode =
[1/2] camel git commit: CAMEl-8104: rest-dsl should allow custom error messages as-is without attempting output binding.
Repository: camel Updated Branches: refs/heads/camel-2.14.x 500a6635a - be560320d refs/heads/master 3817962c8 - d33319fab CAMEl-8104: rest-dsl should allow custom error messages as-is without attempting output binding. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d33319fa Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d33319fa Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d33319fa Branch: refs/heads/master Commit: d33319fab93bc29f20d329b25264c6bf62fc90a9 Parents: 3817962 Author: Claus Ibsen davscl...@apache.org Authored: Tue Dec 2 13:02:21 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 13:14:41 2014 +0100 -- .../camel/model/rest/RestBindingDefinition.java | 17 - .../model/rest/RestConfigurationDefinition.java | 22 ++ .../apache/camel/model/rest/RestDefinition.java | 15 .../apache/camel/model/rest/VerbDefinition.java | 11 +++ .../processor/binding/RestBindingProcessor.java | 12 +++- .../org/apache/camel/spi/RestConfiguration.java | 19 + .../rest/FromRestGetHttpErrorCodeTest.java | 66 + ...RestletPojoInOutCustomErrorResponseTest.java | 76 .../component/restlet/UserErrorService.java | 28 9 files changed, 263 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d33319fa/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java -- diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java b/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java index 396243f..3a120c4 100644 --- a/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java @@ -51,6 +51,9 @@ public class RestBindingDefinition extends NoOutputDefinitionRestBindingDefinit @XmlAttribute private String outType; +@XmlAttribute +private Boolean skipBindingOnErrorCode; + @Override public String toString() { return RestBinding; @@ -72,9 +75,12 @@ public class RestBindingDefinition extends NoOutputDefinitionRestBindingDefinit mode = bindingMode.name(); } +// skip by default +boolean skip = skipBindingOnErrorCode == null || skipBindingOnErrorCode; + if (mode == null || off.equals(mode)) { // binding mode is off, so create a off mode binding processor -return new RestBindingProcessor(null, null, null, null, consumes, produces, mode); +return new RestBindingProcessor(null, null, null, null, consumes, produces, mode, skip); } // setup json data format @@ -161,7 +167,7 @@ public class RestBindingDefinition extends NoOutputDefinitionRestBindingDefinit context.addService(outJaxb); } -return new RestBindingProcessor(json, jaxb, outJson, outJaxb, consumes, produces, mode); +return new RestBindingProcessor(json, jaxb, outJson, outJaxb, consumes, produces, mode, skip); } private void setAdditionalConfiguration(CamelContext context, DataFormat dataFormat) throws Exception { @@ -214,4 +220,11 @@ public class RestBindingDefinition extends NoOutputDefinitionRestBindingDefinit this.outType = outType; } +public Boolean getSkipBindingOnErrorCode() { +return skipBindingOnErrorCode; +} + +public void setSkipBindingOnErrorCode(Boolean skipBindingOnErrorCode) { +this.skipBindingOnErrorCode = skipBindingOnErrorCode; +} } http://git-wip-us.apache.org/repos/asf/camel/blob/d33319fa/camel-core/src/main/java/org/apache/camel/model/rest/RestConfigurationDefinition.java -- diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestConfigurationDefinition.java b/camel-core/src/main/java/org/apache/camel/model/rest/RestConfigurationDefinition.java index 531fbc8..7cd175b 100644 --- a/camel-core/src/main/java/org/apache/camel/model/rest/RestConfigurationDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestConfigurationDefinition.java @@ -59,6 +59,9 @@ public class RestConfigurationDefinition { private RestBindingMode bindingMode; @XmlAttribute +private Boolean skipBindingOnErrorCode; + +@XmlAttribute private String jsonDataFormat; @XmlAttribute @@ -132,6 +135,14 @@ public class RestConfigurationDefinition { this.bindingMode = bindingMode; } +public Boolean getSkipBindingOnErrorCode() { +return skipBindingOnErrorCode; +} + +public
svn commit: r931327 [1/2] - in /websites/production/camel/content: book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache camel-2150-release.html rest-dsl.html xmlsecurity-dataformat
Author: buildbot Date: Tue Dec 2 12:20:00 2014 New Revision: 931327 Log: Production update by buildbot for camel Modified: websites/production/camel/content/book-dataformat-appendix.html websites/production/camel/content/book-in-one-page.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2150-release.html websites/production/camel/content/rest-dsl.html websites/production/camel/content/xmlsecurity-dataformat.html Modified: websites/production/camel/content/book-dataformat-appendix.html == --- websites/production/camel/content/book-dataformat-appendix.html (original) +++ websites/production/camel/content/book-dataformat-appendix.html Tue Dec 2 12:20:00 2014 @@ -2068,7 +2068,7 @@ public class BindyComplexCsvUnmarshallTe lt;/dependencygt; ]]/script /div/div -h2 id=BookDataFormatAppendix-XMLSecurityDataFormatXMLSecurity Data Format/h2pThe XMLSecurity Data Format facilitates encryption and decryption of XML payloads at the Document, Element, and Element Content levels (including simultaneous multi-node encryption/decryption using XPath). To sign messages using the XML Signature specification, please see the Camel XML Security a shape=rect href=xml-security-component.htmlcomponent/a./ppThe encryption capability is based on formats supported using the Apache XML Security (Santuario) project. Symmetric encryption/decryption is currently supported using Triple-DES and AES (128, 192, and 256) encryption formats. Additional formats can be easily added later as needed. This capability allows Camel users to encrypt/decrypt payloads while being dispatched or received along a route./ppstrongAvailable as of Camel 2.9/strongbr clear=none The XMLSecurity Data Format supports asymmetric key encryption. In this encryption model a symmetric key is generated and used to perform XML content encryption or decryption. This content encryption key is then itself encrypted using an asymmetric encryption algorithm that leverages the recipient's public key as the key encryption key. Use of an asymmetric key encryption algorithm ensures that only the holder of the recipient's private key can access the generated symmetric encryption key. Thus, only the private key holder can decode the message. The XMLSecurity Data Format handles all of the logic required to encrypt and decrypt the message content and encryption key(s) using asymmetric key encryption./ppThe XMLSecurity Data Format also has improved support for namespaces when processing the XPath queries that select content for encryption. A namespace definition mapping can be included as part of the data format configuration. This enables true namespace matching, even if the prefix values in the XPath query and the target xml document are not equivale nt strings./ph3 id=BookDataFormatAppendix-BasicOptionsBasic Options/h3div class=table-wraptable class=confluenceTabletbodytrth colspan=1 rowspan=1 class=confluenceThpOption/p/thth colspan=1 rowspan=1 class=confluenceThpDefault/p/thth colspan=1 rowspan=1 class=confluenceThpDescription/p/th/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodesecureTag/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodenull/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpThe XPath reference to the XML Element selected for encryption/decryption. If no tag is specified, the entire payload is encrypted/decrypted./p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodesecureTagContents/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodefalse/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpA boolean value to specify whether the XML Element is to be encrypted or the contents of the XML Element/pullicodefalse/code = Element Level/lilicodetrue/code = Element Content Level/li/ul/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodepassPhrase/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodenull/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpA String used as passPhrase to encrypt/decrypt content. The passPhrase has to be provided. If no passPhrase is specified, a default passPhrase is used. The passPhrase needs to be put together in conjunction with the appropriate encryption algorithm. For example using codeTRIPLEDES/code the passPhase can be a codeOnly another 24 Byte key/code/p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodexmlCipherAlgorithm/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodeTRIPLEDES/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpThe cipher algorithm to be used for encryption/decryption of the XML message content. The available choices are:/pullicodeXMLCipher.TRIPLEDES/code/lilicodeXMLCipher.AES_128/code/lilicodeXMLCipher.AES_128_GCM/code strongCamel 2.12/strong/lilicodeXMLCipher.AES_192/code/lilicodeXMLCipher.AES_192_GCM/code strongCamel
svn commit: r931327 [2/2] - in /websites/production/camel/content: book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache camel-2150-release.html rest-dsl.html xmlsecurity-dataformat
Modified: websites/production/camel/content/xmlsecurity-dataformat.html == --- websites/production/camel/content/xmlsecurity-dataformat.html (original) +++ websites/production/camel/content/xmlsecurity-dataformat.html Tue Dec 2 12:20:00 2014 @@ -85,7 +85,7 @@ tbody tr td valign=top width=100% -div class=wiki-content maincontenth2 id=XMLSecurityDataFormat-XMLSecurityDataFormatXMLSecurity Data Format/h2pThe XMLSecurity Data Format facilitates encryption and decryption of XML payloads at the Document, Element, and Element Content levels (including simultaneous multi-node encryption/decryption using XPath). To sign messages using the XML Signature specification, please see the Camel XML Security a shape=rect href=xml-security-component.htmlcomponent/a./ppThe encryption capability is based on formats supported using the Apache XML Security (Santuario) project. Symmetric encryption/decryption is currently supported using Triple-DES and AES (128, 192, and 256) encryption formats. Additional formats can be easily added later as needed. This capability allows Camel users to encrypt/decrypt payloads while being dispatched or received along a route./ppstrongAvailable as of Camel 2.9/strongbr clear=none The XMLSecurity Data Format supports asymmetr ic key encryption. In this encryption model a symmetric key is generated and used to perform XML content encryption or decryption. This content encryption key is then itself encrypted using an asymmetric encryption algorithm that leverages the recipient's public key as the key encryption key. Use of an asymmetric key encryption algorithm ensures that only the holder of the recipient's private key can access the generated symmetric encryption key. Thus, only the private key holder can decode the message. The XMLSecurity Data Format handles all of the logic required to encrypt and decrypt the message content and encryption key(s) using asymmetric key encryption./ppThe XMLSecurity Data Format also has improved support for namespaces when processing the XPath queries that select content for encryption. A namespace definition mapping can be included as part of the data format configuration. This enables true namespace matching, even if the prefix values in the XPath query and the target xml document are not equivalent strings./ph3 id=XMLSecurityDataFormat-BasicOptionsBasic Options/h3div class=table-wraptable class=confluenceTabletbodytrth colspan=1 rowspan=1 class=confluenceThpOption/p/thth colspan=1 rowspan=1 class=confluenceThpDefault/p/thth colspan=1 rowspan=1 class=confluenceThpDescription/p/th/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodesecureTag/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodenull/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpThe XPath reference to the XML Element selected for encryption/decryption. If no tag is specified, the entire payload is encrypted/decrypted./p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodesecureTagContents/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodefalse/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpA boole an value to specify whether the XML Element is to be encrypted or the contents of the XML Element/pullicodefalse/code = Element Level/lilicodetrue/code = Element Content Level/li/ul/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodepassPhrase/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodenull/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpA String used as passPhrase to encrypt/decrypt content. The passPhrase has to be provided. If no passPhrase is specified, a default passPhrase is used. The passPhrase needs to be put together in conjunction with the appropriate encryption algorithm. For example using codeTRIPLEDES/code the passPhase can be a codeOnly another 24 Byte key/code/p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodexmlCipherAlgorithm/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodeTRIPLEDES/code/p/tdtd colspan=1 rows pan=1 class=confluenceTdpThe cipher algorithm to be used for encryption/decryption of the XML message content. The available choices are:/pullicodeXMLCipher.TRIPLEDES/code/lilicodeXMLCipher.AES_128/code/lilicodeXMLCipher.AES_128_GCM/code strongCamel 2.12/strong/lilicodeXMLCipher.AES_192/code/lilicodeXMLCipher.AES_192_GCM/code strongCamel 2.12/strong/lilicodeXMLCipher.AES_256/code/lilicodeXMLCipher.AES_256_GCM/code strongCamel 2.12/strong/liliXMLCipher.SEED_128 strongCamel 2.12/strong/liliXMLCipher.CAMELLIA_128, XMLCipher.CAMELLIA_192, XMLCipher.CAMELLIA_256 strongCamel 2.12/strong/li/ul/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodenamespaces/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodenull/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpA map of namespace values indexed by prefix. The index values must match the pr efixes used in the
[3/3] camel git commit: Fixed the CS error of camel-velocity
Fixed the CS error of camel-velocity Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/897805a2 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/897805a2 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/897805a2 Branch: refs/heads/master Commit: 897805a2bd2ccc20880da6c9b9fc85457fea9844 Parents: d33319f Author: Willem Jiang willem.ji...@gmail.com Authored: Tue Dec 2 20:34:52 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Tue Dec 2 20:44:15 2014 +0800 -- .../apache/camel/component/velocity/VelocityComponent.java | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/897805a2/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityComponent.java -- diff --git a/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityComponent.java b/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityComponent.java index e9421da..97f3244 100644 --- a/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityComponent.java +++ b/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityComponent.java @@ -28,6 +28,10 @@ import org.apache.velocity.app.VelocityEngine; */ public class VelocityComponent extends UriEndpointComponent { private VelocityEngine velocityEngine; + +public VelocityComponent() { +super(VelocityEndpoint.class); +} public VelocityEngine getVelocityEngine() { return velocityEngine; @@ -37,10 +41,6 @@ public class VelocityComponent extends UriEndpointComponent { this.velocityEngine = velocityEngine; } -public VelocityComponent() { -super(VelocityEndpoint.class); -} - protected Endpoint createEndpoint(String uri, String remaining, MapString, Object parameters) throws Exception { boolean cache = getAndRemoveParameter(parameters, contentCache, Boolean.class, Boolean.TRUE);
[2/3] camel git commit: CAMEL-8103 polish the code, removed the CamelContextAware interface as the DefaultEndpoint already implements it
CAMEL-8103 polish the code, removed the CamelContextAware interface as the DefaultEndpoint already implements it Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0a9fa98e Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0a9fa98e Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0a9fa98e Branch: refs/heads/master Commit: 0a9fa98e79107dbb77b44d97d75a35e79728441e Parents: 897805a Author: Willem Jiang willem.ji...@gmail.com Authored: Tue Dec 2 20:42:21 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Tue Dec 2 20:44:15 2014 +0800 -- .../java/org/apache/camel/component/cxf/CxfEndpoint.java| 3 +-- .../component/cxf/CxfJavaOnlyCamelContextAwareTest.java | 9 ++--- 2 files changed, 7 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/0a9fa98e/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java -- diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java index e6abc2a..dffc1d7 100644 --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java @@ -43,7 +43,6 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; import org.apache.camel.CamelContext; -import org.apache.camel.CamelContextAware; import org.apache.camel.CamelException; import org.apache.camel.Consumer; import org.apache.camel.Processor; @@ -113,7 +112,7 @@ import org.slf4j.LoggerFactory; * mode is {@link DataFormat#POJO}. */ @UriEndpoint(scheme = cxf, consumerClass = CxfConsumer.class, label = http,soap,webservice) -public class CxfEndpoint extends DefaultEndpoint implements CamelContextAware, HeaderFilterStrategyAware, Service, Cloneable { +public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategyAware, Service, Cloneable { private static final Logger LOG = LoggerFactory.getLogger(CxfEndpoint.class); http://git-wip-us.apache.org/repos/asf/camel/blob/0a9fa98e/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfJavaOnlyCamelContextAwareTest.java -- diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfJavaOnlyCamelContextAwareTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfJavaOnlyCamelContextAwareTest.java index 71acc66..4c91dbf 100644 --- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfJavaOnlyCamelContextAwareTest.java +++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfJavaOnlyCamelContextAwareTest.java @@ -16,11 +16,14 @@ */ package org.apache.camel.component.cxf; + import javax.xml.namespace.QName; + import org.w3c.dom.Document; + +import org.apache.camel.CamelContextAware; import org.apache.camel.Exchange; import org.apache.camel.Processor; -import org.apache.camel.CamelContextAware; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; @@ -65,8 +68,8 @@ public class CxfJavaOnlyCamelContextAwareTest extends CamelTestSupport { public void configure() throws Exception { CxfEndpoint endpoint = new CxfEndpoint(); endpoint.setAddress(http://localhost:; + port1 + /PersonService); -endpoint.setServiceName(new QName(http://camel.apache.org/wsdl-first,PersonService;)); -endpoint.setPortName(new QName(http://camel.apache.org/wsdl-first,soap;)); +endpoint.setServiceName(new QName(http://camel.apache.org/wsdl-first;, PersonService)); +endpoint.setPortName(new QName(http://camel.apache.org/wsdl-first;, soap)); endpoint.setWsdlURL(classpath:person.wsdl); endpoint.setDataFormat(DataFormat.PAYLOAD); context.addEndpoint(personService, endpoint);
[1/3] camel git commit: CAMEL-8103 Added the unit test of CxfRSEndpoint CamelContextAware
Repository: camel Updated Branches: refs/heads/master d33319fab - 9f67a66f5 CAMEL-8103 Added the unit test of CxfRSEndpoint CamelContextAware Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9f67a66f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9f67a66f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9f67a66f Branch: refs/heads/master Commit: 9f67a66f575a8f2cf904a86727b812b4a1320820 Parents: 0a9fa98 Author: Willem Jiang willem.ji...@gmail.com Authored: Tue Dec 2 20:43:39 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Tue Dec 2 20:44:15 2014 +0800 -- .../camel/component/cxf/jaxrs/CxfRsEndpoint.java | 2 ++ .../camel/component/cxf/jaxrs/CxfRsEndpointTest.java | 14 ++ 2 files changed, 16 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/9f67a66f/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java -- diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java index 73dbc72..d86c477 100644 --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java @@ -120,6 +120,8 @@ public class CxfRsEndpoint extends DefaultEndpoint implements HeaderFilterStrate private InterceptorHolder interceptorHolder = new InterceptorHolder(); private MapString, Object properties; +public CxfRsEndpoint() { +} @Deprecated public CxfRsEndpoint(String endpointUri, CamelContext camelContext) { http://git-wip-us.apache.org/repos/asf/camel/blob/9f67a66f/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpointTest.java -- diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpointTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpointTest.java index d8ae6c4..0ae208e 100644 --- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpointTest.java +++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpointTest.java @@ -16,8 +16,10 @@ */ package org.apache.camel.component.cxf.jaxrs; +import org.apache.camel.CamelContext; import org.apache.camel.component.cxf.CXFTestSupport; import org.apache.camel.component.cxf.jaxrs.testbean.CustomerService; +import org.apache.camel.impl.DefaultCamelContext; import org.apache.camel.test.junit4.CamelTestSupport; import org.apache.cxf.jaxrs.JAXRSServerFactoryBean; import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean; @@ -93,5 +95,17 @@ public class CxfRsEndpointTest extends CamelTestSupport { JAXRSClientFactoryBean cfb = endpoint.createJAXRSClientFactoryBean(); assertEquals(Get a wrong proider size, 1, cfb.getProviders().size()); } + +@Test +public void testCxfRsEndpointCamelContextAware() throws Exception { +String endpointUri = cxfrs://simple; +CxfRsEndpoint endpoint = new CxfRsEndpoint(); +endpoint.setAddress(http://localhost:9000/test;); +endpoint.setResourceClasses(CustomerService.class); +CamelContext context = new DefaultCamelContext(); +context.addEndpoint(endpointUri, endpoint); + +assertEquals(Get a wrong camel context., context, endpoint.getCamelContext()); +} }
[3/3] camel git commit: CAMEL-8102 Add support to ObjectHelper to create Iterable's with thanks to Aaron
CAMEL-8102 Add support to ObjectHelper to create Iterable's with thanks to Aaron Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/96bf5725 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/96bf5725 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/96bf5725 Branch: refs/heads/master Commit: 96bf5725f22895d81f8abc4faf3ca1989170609c Parents: 5d96933 Author: Willem Jiang willem.ji...@gmail.com Authored: Tue Dec 2 22:25:27 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Tue Dec 2 22:27:04 2014 +0800 -- .../apache/camel/converter/ObjectConverter.java | 11 +- .../apache/camel/processor/CatchProcessor.java | 7 +- .../org/apache/camel/util/ObjectHelper.java | 268 --- .../camel/converter/ObjectConverterTest.java| 13 + 4 files changed, 192 insertions(+), 107 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/96bf5725/camel-core/src/main/java/org/apache/camel/converter/ObjectConverter.java -- diff --git a/camel-core/src/main/java/org/apache/camel/converter/ObjectConverter.java b/camel-core/src/main/java/org/apache/camel/converter/ObjectConverter.java index 2fe8580..4d375c5 100644 --- a/camel-core/src/main/java/org/apache/camel/converter/ObjectConverter.java +++ b/camel-core/src/main/java/org/apache/camel/converter/ObjectConverter.java @@ -70,8 +70,15 @@ public final class ObjectConverter { public static Iterator? iterator(Object value) { return ObjectHelper.createIterator(value); } - - + +/** + * Creates an iterable over the value + */ +@Converter +public static Iterable? iterable(Object value) { +return ObjectHelper.createIterable(value); +} + /** * Returns the converted value, or null if the value is null */ http://git-wip-us.apache.org/repos/asf/camel/blob/96bf5725/camel-core/src/main/java/org/apache/camel/processor/CatchProcessor.java -- diff --git a/camel-core/src/main/java/org/apache/camel/processor/CatchProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/CatchProcessor.java index 4998755..5cc5b9c 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/CatchProcessor.java +++ b/camel-core/src/main/java/org/apache/camel/processor/CatchProcessor.java @@ -16,7 +16,6 @@ */ package org.apache.camel.processor; -import java.util.Iterator; import java.util.List; import org.apache.camel.AsyncCallback; @@ -124,11 +123,9 @@ public class CatchProcessor extends DelegateAsyncProcessor implements Traceable */ protected Throwable catches(Exchange exchange, Throwable exception) { // use the exception iterator to walk the caused by hierarchy -IteratorThrowable it = ObjectHelper.createExceptionIterator(exception); -while (it.hasNext()) { -Throwable e = it.next(); +for (final Throwable e : ObjectHelper.createExceptionIterable(exception)) { // see if we catch this type -for (Class? type : exceptions) { +for (final Class? type : exceptions) { if (type.isInstance(e) matchesWhen(exchange)) { return e; } http://git-wip-us.apache.org/repos/asf/camel/blob/96bf5725/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java -- diff --git a/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java b/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java index 3162d38..55bcf8c 100644 --- a/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java +++ b/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java @@ -479,6 +479,38 @@ public final class ObjectHelper { } /** + * Creates an iterable over the value if the value is a collection, an + * Object[], a String with values separated by comma, + * or a primitive type array; otherwise to simplify the caller's code, + * we just create a singleton collection iterator over a single value + * p/ + * Will default use comma for String separating String values. + * This method does bnot/b allow empty values + * + * @param value the value + * @return the iterable + */ +public static IterableObject createIterable(Object value) { +return createIterable(value, DEFAULT_DELIMITER); +} + +/** + * Creates an iterable over the value if the value is a collection, an + * Object[], a String with values separated by the given delimiter, + * or a primitive type array; otherwise to simplify the caller's + * code, we just create a
[2/3] camel git commit: CAMEl-8104 Fixed the unit test error of camel-core
CAMEl-8104 Fixed the unit test error of camel-core Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5d96933e Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5d96933e Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5d96933e Branch: refs/heads/master Commit: 5d96933e6890185f985e4c3d68a920f0240204b8 Parents: 5b3826e Author: Willem Jiang willem.ji...@gmail.com Authored: Tue Dec 2 22:22:32 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Tue Dec 2 22:27:03 2014 +0800 -- .../java/org/apache/camel/model/rest/RestDefinition.java| 9 + 1 file changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/5d96933e/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java -- diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java b/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java index adc0df9..2ddbcca 100644 --- a/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java @@ -103,10 +103,19 @@ public class RestDefinition extends OptionalIdentifiedDefinitionRestDefinition public void setVerbs(ListVerbDefinition verbs) { this.verbs = verbs; } + +public Boolean getSkipBindingOnErrorCode() { +return skipBindingOnErrorCode; +} +public void setSkipBindingOnErrorCode(Boolean skipBindingOnErrorCode) { +this.skipBindingOnErrorCode = skipBindingOnErrorCode; +} + // Fluent API //- + /** * To set the base path of this REST service */
[1/3] camel git commit: CAMEL-8101 CAMEL-8100 Add cmd operation to MongoDB Component
Repository: camel Updated Branches: refs/heads/master 9f67a66f5 - 96bf5725f CAMEL-8101 CAMEL-8100 Add cmd operation to MongoDB Component Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5b3826ea Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5b3826ea Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5b3826ea Branch: refs/heads/master Commit: 5b3826ea53111bba65c7a6238e1378927cfb1897 Parents: 9f67a66 Author: Pierre-Alban DEWITTE padewi...@gmail.com Authored: Mon Dec 1 21:33:46 2014 +0100 Committer: Willem Jiang willem.ji...@gmail.com Committed: Tue Dec 2 22:26:33 2014 +0800 -- .../component/mongodb/MongoDbEndpoint.java | 26 +- .../component/mongodb/MongoDbOperation.java | 3 +- .../component/mongodb/MongoDbProducer.java | 50 .../mongodb/MongoDbOperationsTest.java | 16 +-- .../mongodb/mongoBasicOperationsTest.xml| 8 +++- 5 files changed, 75 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/5b3826ea/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java -- diff --git a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java index 78978b8..b5572da 100644 --- a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java +++ b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java @@ -163,27 +163,29 @@ public class MongoDbEndpoint extends DefaultEndpoint { */ public void initializeConnection() throws CamelMongoDbException { LOG.info(Initialising MongoDb endpoint: {}, this.toString()); -if (database == null || collection == null) { +if (database == null || (collection == null !(MongoDbOperation.getDbStats.equals(operation) || MongoDbOperation.command.equals(operation { throw new CamelMongoDbException(Missing required endpoint configuration: database and/or collection); } db = mongoConnection.getDB(database); if (db == null) { throw new CamelMongoDbException(Could not initialise MongoDbComponent. Database + database + does not exist.); } -if (!createCollection !db.collectionExists(collection)) { -throw new CamelMongoDbException(Could not initialise MongoDbComponent. Collection + collection + and createCollection is false.); -} -dbCollection = db.getCollection(collection); +if(collection != null) { +if (!createCollection !db.collectionExists(collection)) { +throw new CamelMongoDbException(Could not initialise MongoDbComponent. Collection + collection + and createCollection is false.); +} +dbCollection = db.getCollection(collection); -LOG.debug(MongoDb component initialised and endpoint bound to MongoDB collection with the following parameters. Address list: {}, Db: {}, Collection: {}, -new Object[]{mongoConnection.getAllAddress().toString(), db.getName(), dbCollection.getName()}); +LOG.debug(MongoDb component initialised and endpoint bound to MongoDB collection with the following parameters. Address list: {}, Db: {}, Collection: {}, +new Object[]{mongoConnection.getAllAddress().toString(), db.getName(), dbCollection.getName()}); -try { -if (ObjectHelper.isNotEmpty(collectionIndex)) { -ensureIndex(dbCollection, createIndex()); +try { +if (ObjectHelper.isNotEmpty(collectionIndex)) { +ensureIndex(dbCollection, createIndex()); +} +} catch (Exception e) { +throw new CamelMongoDbException(Error creating index, e); } -} catch (Exception e) { -throw new CamelMongoDbException(Error creating index, e); } } http://git-wip-us.apache.org/repos/asf/camel/blob/5b3826ea/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbOperation.java -- diff --git a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbOperation.java b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbOperation.java index fe7570f..f7b5de5 100644 --- a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbOperation.java +++
camel git commit: CAMEl-8104 Fixed the unit test error of camel-core
Repository: camel Updated Branches: refs/heads/camel-2.14.x be560320d - e3b0bb3a6 CAMEl-8104 Fixed the unit test error of camel-core Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e3b0bb3a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e3b0bb3a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e3b0bb3a Branch: refs/heads/camel-2.14.x Commit: e3b0bb3a654c9ce04182ea072639e998a2b98b48 Parents: be56032 Author: Willem Jiang willem.ji...@gmail.com Authored: Tue Dec 2 22:22:32 2014 +0800 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 16:31:27 2014 +0100 -- .../java/org/apache/camel/model/rest/RestDefinition.java| 9 + 1 file changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/e3b0bb3a/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java -- diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java b/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java index adc0df9..2ddbcca 100644 --- a/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java @@ -103,10 +103,19 @@ public class RestDefinition extends OptionalIdentifiedDefinitionRestDefinition public void setVerbs(ListVerbDefinition verbs) { this.verbs = verbs; } + +public Boolean getSkipBindingOnErrorCode() { +return skipBindingOnErrorCode; +} +public void setSkipBindingOnErrorCode(Boolean skipBindingOnErrorCode) { +this.skipBindingOnErrorCode = skipBindingOnErrorCode; +} + // Fluent API //- + /** * To set the base path of this REST service */
camel git commit: CAMEL-8106 XML parsing error is ignored by xtoknize XML tokenizer
Repository: camel Updated Branches: refs/heads/master 96bf5725f - 39ccf5d6d CAMEL-8106 XML parsing error is ignored by xtoknize XML tokenizer Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/39ccf5d6 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/39ccf5d6 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/39ccf5d6 Branch: refs/heads/master Commit: 39ccf5d6d627940c860d207d2e546e7ef8b855d1 Parents: 96bf572 Author: Akitoshi Yoshida a...@apache.org Authored: Tue Dec 2 16:55:47 2014 +0100 Committer: Akitoshi Yoshida a...@apache.org Committed: Tue Dec 2 16:55:47 2014 +0100 -- .../support/XMLTokenExpressionIterator.java | 3 +- ...MLTokenExpressionIteratorInvalidXMLTest.java | 79 2 files changed, 81 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/39ccf5d6/camel-core/src/main/java/org/apache/camel/support/XMLTokenExpressionIterator.java -- diff --git a/camel-core/src/main/java/org/apache/camel/support/XMLTokenExpressionIterator.java b/camel-core/src/main/java/org/apache/camel/support/XMLTokenExpressionIterator.java index f233281..19cc2a6 100644 --- a/camel-core/src/main/java/org/apache/camel/support/XMLTokenExpressionIterator.java +++ b/camel-core/src/main/java/org/apache/camel/support/XMLTokenExpressionIterator.java @@ -575,7 +575,8 @@ public class XMLTokenExpressionIterator extends ExpressionAdapter implements Nam try { nextToken = getNextToken(); } catch (XMLStreamException e) { -// +nextToken = null; +throw new RuntimeException(e); } return o; } http://git-wip-us.apache.org/repos/asf/camel/blob/39ccf5d6/camel-core/src/test/java/org/apache/camel/support/XMLTokenExpressionIteratorInvalidXMLTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/support/XMLTokenExpressionIteratorInvalidXMLTest.java b/camel-core/src/test/java/org/apache/camel/support/XMLTokenExpressionIteratorInvalidXMLTest.java new file mode 100644 index 000..5b35660 --- /dev/null +++ b/camel-core/src/test/java/org/apache/camel/support/XMLTokenExpressionIteratorInvalidXMLTest.java @@ -0,0 +1,79 @@ +/** + * 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. + */ +package org.apache.camel.support; + +import java.io.ByteArrayInputStream; +import java.io.Closeable; +import java.io.IOException; +import java.io.StringReader; +import java.io.UnsupportedEncodingException; +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.xml.stream.XMLStreamException; + +import junit.framework.TestCase; + +/** + * + */ +public class XMLTokenExpressionIteratorInvalidXMLTest extends TestCase { +private static final String DATA_TEMPLATE = +?xml version=\1.0\ encoding=\utf-u\? ++ Statements xmlns=\http://www.apache.org/xml/test\; ++ statementHello World/statement ++ statement{0}/statement ++ /Statements; + + +private static final MapString, String NSMAP = Collections.singletonMap(, http://www.apache.org/xml/test;); + +public void testExtractToken() throws Exception { +String data = MessageFormat.format(DATA_TEMPLATE, Have a nice day); +XMLTokenExpressionIterator xtei = new XMLTokenExpressionIterator(//statement, 'i'); +xtei.setNamespaces(NSMAP); +invokeAndVerify(xtei.createIterator(new StringReader(data)), false); + +data = MessageFormat.format(DATA_TEMPLATE, Have a nice day); +xtei = new XMLTokenExpressionIterator(//statement, 'i'); +xtei.setNamespaces(NSMAP); +invokeAndVerify(xtei.createIterator(new StringReader(data)), true); +} + +private void invokeAndVerify(Iterator? tokenizer, boolean error)
camel git commit: CAMEL-8106 XML parsing error is ignored by xtoknize XML tokenizer
Repository: camel Updated Branches: refs/heads/camel-2.14.x e3b0bb3a6 - 0c55f5600 CAMEL-8106 XML parsing error is ignored by xtoknize XML tokenizer Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0c55f560 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0c55f560 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0c55f560 Branch: refs/heads/camel-2.14.x Commit: 0c55f5600012e39afc3e46c8b72f2958cb62e94d Parents: e3b0bb3 Author: Akitoshi Yoshida a...@apache.org Authored: Tue Dec 2 16:55:47 2014 +0100 Committer: Akitoshi Yoshida a...@apache.org Committed: Tue Dec 2 16:56:43 2014 +0100 -- .../support/XMLTokenExpressionIterator.java | 3 +- ...MLTokenExpressionIteratorInvalidXMLTest.java | 79 2 files changed, 81 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/0c55f560/camel-core/src/main/java/org/apache/camel/support/XMLTokenExpressionIterator.java -- diff --git a/camel-core/src/main/java/org/apache/camel/support/XMLTokenExpressionIterator.java b/camel-core/src/main/java/org/apache/camel/support/XMLTokenExpressionIterator.java index f233281..19cc2a6 100644 --- a/camel-core/src/main/java/org/apache/camel/support/XMLTokenExpressionIterator.java +++ b/camel-core/src/main/java/org/apache/camel/support/XMLTokenExpressionIterator.java @@ -575,7 +575,8 @@ public class XMLTokenExpressionIterator extends ExpressionAdapter implements Nam try { nextToken = getNextToken(); } catch (XMLStreamException e) { -// +nextToken = null; +throw new RuntimeException(e); } return o; } http://git-wip-us.apache.org/repos/asf/camel/blob/0c55f560/camel-core/src/test/java/org/apache/camel/support/XMLTokenExpressionIteratorInvalidXMLTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/support/XMLTokenExpressionIteratorInvalidXMLTest.java b/camel-core/src/test/java/org/apache/camel/support/XMLTokenExpressionIteratorInvalidXMLTest.java new file mode 100644 index 000..5b35660 --- /dev/null +++ b/camel-core/src/test/java/org/apache/camel/support/XMLTokenExpressionIteratorInvalidXMLTest.java @@ -0,0 +1,79 @@ +/** + * 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. + */ +package org.apache.camel.support; + +import java.io.ByteArrayInputStream; +import java.io.Closeable; +import java.io.IOException; +import java.io.StringReader; +import java.io.UnsupportedEncodingException; +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.xml.stream.XMLStreamException; + +import junit.framework.TestCase; + +/** + * + */ +public class XMLTokenExpressionIteratorInvalidXMLTest extends TestCase { +private static final String DATA_TEMPLATE = +?xml version=\1.0\ encoding=\utf-u\? ++ Statements xmlns=\http://www.apache.org/xml/test\; ++ statementHello World/statement ++ statement{0}/statement ++ /Statements; + + +private static final MapString, String NSMAP = Collections.singletonMap(, http://www.apache.org/xml/test;); + +public void testExtractToken() throws Exception { +String data = MessageFormat.format(DATA_TEMPLATE, Have a nice day); +XMLTokenExpressionIterator xtei = new XMLTokenExpressionIterator(//statement, 'i'); +xtei.setNamespaces(NSMAP); +invokeAndVerify(xtei.createIterator(new StringReader(data)), false); + +data = MessageFormat.format(DATA_TEMPLATE, Have a nice day); +xtei = new XMLTokenExpressionIterator(//statement, 'i'); +xtei.setNamespaces(NSMAP); +invokeAndVerify(xtei.createIterator(new StringReader(data)), true); +} + +private void invokeAndVerify(Iterator? tokenizer, boolean
svn commit: r931374 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache properties.html using-propertyplaceholder.html
Author: buildbot Date: Tue Dec 2 16:20:21 2014 New Revision: 931374 Log: Production update by buildbot for camel Modified: websites/production/camel/content/book-component-appendix.html websites/production/camel/content/book-in-one-page.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/properties.html websites/production/camel/content/using-propertyplaceholder.html Modified: websites/production/camel/content/book-component-appendix.html == --- websites/production/camel/content/book-component-appendix.html (original) +++ websites/production/camel/content/book-component-appendix.html Tue Dec 2 16:20:21 2014 @@ -1529,11 +1529,11 @@ template.send(quot;direct:alias-verify /div /div pThe strongcxf:/strong component provides integration with a shape=rect href=http://cxf.apache.org;Apache CXF/a for connecting to JAX-WS services hosted in CXF./ppstyle type=text/css/*![CDATA[*/ -div.rbtoc1417357035426 {padding: 0px;} -div.rbtoc1417357035426 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1417357035426 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1417537054744 {padding: 0px;} +div.rbtoc1417537054744 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1417537054744 li {margin-left: 0px;padding-left: 0px;} -/*]]*//style/pdiv class=toc-macro rbtoc1417357035426 +/*]]*//style/pdiv class=toc-macro rbtoc1417537054744 ul class=toc-indentationlia shape=rect href=#CXF-CXFComponentCXF Component/a ul class=toc-indentationlia shape=rect href=#CXF-URIformatURI format/a/lilia shape=rect href=#CXF-OptionsOptions/a ul class=toc-indentationlia shape=rect href=#CXF-ThedescriptionsofthedataformatsThe descriptions of the dataformats/a @@ -9817,7 +9817,13 @@ properties:key[?options] pFrom Camel 2.10 onwards, you can bridge the Spring property placeholder with Camel, see further below for more details./p /div /div -pThe property placeholder is generally in use when doing:/pul class=alternatelilookup or creating endpoints/lililookup of beans in the a shape=rect href=registry.htmlRegistry/a/liliadditional supported in Spring XML (see below in examples)/liliusing Blueprint PropertyPlaceholder with Camel a shape=rect href=properties.htmlProperties/a component/liliusing code@PropertyInject/code to inject a property in a POJO/li/ulh3 id=BookComponentAppendix-SyntaxSyntax/h3pThe syntax to use Camel's property placeholder is to use {{codekey/code}} for example {{codefile.uri/code}} where codefile.uri/code is the property key.br clear=none You can use property placeholders in parts of the endpoint URI's which for example you can use placeholders for parameters in the URIs./ph3 id=BookComponentAppendix-PropertyResolverPropertyResolver/h3pCamel provides a pluggable mechanism which allows 3rd part to provide their own reso lver to lookup properties. Camel provides a default implementation codeorg.apache.camel.component.properties.DefaultPropertiesResolver/code which is capable of loading properties from the file system, classpath or a shape=rect href=registry.htmlRegistry/a. You can prefix the locations with either:/pul class=alternatelicoderef:/code strongCamel 2.4:/strong to lookup in the a shape=rect href=registry.htmlRegistry/a/lilicodefile:/code to load the from file system/lilicodeclasspath:/code to load from classpath (this is also the default if no prefix is provided)/lilicodeblueprint:/code strongCamel 2.7:/strong to use a specific OSGi blueprint placeholder service/li/ulh3 id=BookComponentAppendix-DefininglocationDefining location/h3pThe codePropertiesResolver/code need to know a location(s) where to resolve the properties. You can define 1 to many locations. If you define the location in a single String property you can separate multiple locations with comma such as:/pdiv class=code panel pdl style=border-width: 1px;div class=codeContent panelContent pdl +pThe property placeholder is generally in use when doing:/pul class=alternatelilookup or creating endpoints/lililookup of beans in the a shape=rect href=registry.htmlRegistry/a/liliadditional supported in Spring XML (see below in examples)/liliusing Blueprint PropertyPlaceholder with Camel a shape=rect href=properties.htmlProperties/a component/liliusing code@PropertyInject/code to inject a property in a POJO/lilistrongCamel 2.14.1/strong Using default value if a property does not exists/li/ulh3 id=BookComponentAppendix-SyntaxSyntax/h3pThe syntax to use Camel's property placeholder is to use {{codekey/code}} for example {{codefile.uri/code}} where codefile.uri/code is the property key.br clear=none You can use property placeholders in parts of the endpoint URI's which for example you can use placeholders for parameters in the URIs./ppFrom#160;strongCamel 2.14.1/strong onwards you can specify a default
svn commit: r931393 [4/5] - in /websites/production/camel/content: book-in-one-page.html book-languages-appendix.html cache/main.pageCache camel-2150-release.html simple.html
Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2150-release.html == --- websites/production/camel/content/camel-2150-release.html (original) +++ websites/production/camel/content/camel-2150-release.html Tue Dec 2 17:19:37 2014 @@ -84,7 +84,7 @@ tbody tr td valign=top width=100% -div class=wiki-content maincontenth1 id=Camel2.15.0Release-Camel2.15.0release(currentlyinprogress)Camel#160;2.15.0 release (currently in progress)/h1div style=padding-right:20px;float:left;margin-left:-20px;pimg class=confluence-embedded-image confluence-external-resource src=http://camel.apache.org/download.data/camel-box-v1.0-150x200.png; data-image-src=http://camel.apache.org/download.data/camel-box-v1.0-150x200.png;/p/divdiv style=min-height:200px#160;/divh2 id=Camel2.15.0Release-NewandNoteworthyNew and Noteworthy/h2pWelcome to the 2.15.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...)/pullispanComponent documentation now included in the built component JARs. And Java API and JMX API to access that documentation. And APIs to explain an endpoint uri and what all those configured options mean.#160;/span/lilispanComponent can now have#160;associated#160;label(s) which are use d for grouping components into: core, database, messaging, http, rest, etc./span/lilispanProvide Configurer for user to configure the CXF conduit and CXF destination from Java code/span/lilispanspanAdded a codeDelegateEndpoint/code#160;interface into Camel API/span/span/liliSupport to setup the SslContextParameters in the a shape=rect href=restlet.htmlcamel-restlet/a component/liliJava DSL - Should support nested choice in doTry .. doCatch/lilia shape=rect href=mongodb.htmlMongoDb/a component now a shape=rect class=external-link href=https://issues.apache.org/jira/browse/CAMEL-7996;stores OIDs/a#160;of the inserted records in the message header/lilia shape=rect href=recipient-list.htmlRecipient List/a now supports specifying custom#160;a shape=rect href=exchange-pattern.htmlExchange Pattern/a in the endpoint ur's/lilia shape=rect href=type-converter.htmlType Converter/a to enum's is now case insensitive, so you can convert safely level=info to an enum with name Level.INFO etc./lilia shape=rect href=xslt.htmlXSLT/a and#160;a shape=rect href=https://cwiki.apache.org/confluence/display/SM/Validation;Validation/a components now provides all their endpoint configurations in the endpoint, and not only in the component, making these components like any other components./liliMade the a shape=rect href=karaf.htmlCamel Karaf Commands/a reusable by moving common code into a#160;codecamel-commands-core/code module that SPI can extend and plugin Camel commands for other environments./liliFurther hardening of the#160;a shape=rect href=sjms.htmlSJMS/a#160;component./lilia shape=rect href=rest-dsl.htmlRest DSL/a with embedded routes now supports a shape=rect href=exception-clause.htmlonException/a, a shape=rect href=intercept.htmlintercept/a etc in use for those embedded routes, just like any regular r outes.#160;/lilia shape=rect href=rest-dsl.htmlRest DSL/a now by default uses custom error message as-is without attempting to binding output (requires a HTTP error code of 300+ is set as a header)/li/ulh3 id=Camel2.15.0Release-FixedissuesFixed issues/h3ulliFixed processors was not enlisted in JMX when routes was transacted./liliFixed the NullPointerException when using CXF endpoint with enrich/liliFixed the#160;endpointProperty of#160;restConfiguration doesn't work issue/liliFixed the issue that#160;CircuitBreakerLoadBalancer fails on async processors/liliFixed#160;MyBatis consumer a shape=rect class=external-link href=https://issues.apache.org/jira/browse/CAMEL-8011;ignoring maxMessagesPerPoll/a option/liliFixed potential issue with#160;pollEnrich not triggering error handler if an exception was thrown in the polling.br clear=nonebr clear=none/li/ulh3 id=Camel2.15.0Release-NewNew a shape=rect href=ent erprise-integration-patterns.htmlEnterprise Integration Patterns/a/h3h3 id=Camel2.15.0Release-New.1New a shape=rect href=components.htmlComponents/a/h3ullia shape=rect href=beanstalk.htmlcamel-beanstalk/a - for working with Amazon Beanstalk jobs./lilicodecamel-chunk/code - for templating with Chunk engine./lilia shape=rect href=docker.htmlcamel-docker/a - to communicate with Docker./lilicamel-github - for integrating with github/lilicamel-jira - for integrating with JIRA issue tracker/lilicamel-scr - for using Camel with a shape=rect class=external-link href=http://felix.apache.org/documentation/subprojects/apache-felix-maven-scr-plugin/scr-annotations.html;SCR/a#160;(OSGi
svn commit: r931393 [5/5] - in /websites/production/camel/content: book-in-one-page.html book-languages-appendix.html cache/main.pageCache camel-2150-release.html simple.html
Modified: websites/production/camel/content/simple.html == --- websites/production/camel/content/simple.html (original) +++ websites/production/camel/content/simple.html Tue Dec 2 17:19:37 2014 @@ -86,269 +86,124 @@ tbody tr td valign=top width=100% -div class=wiki-content maincontenth2 id=Simple-SimpleExpressionLanguageSimple Expression Language/h2 - -pThe Simple Expression Language was a really simple language you can use, but has since grown more powerful. Its primarily intended for being a really small and simple language for evaluating a shape=rect href=expression.htmlExpression/a and a shape=rect href=predicate.htmlPredicate/a without requiring any new dependencies or knowledge of a shape=rect href=xpath.htmlXPath/a; so its ideal for testing in camel-core. Its ideal to cover 95% of the common use cases when you need a little bit of expression based script in your Camel routes./p - -pHowever for much more complex use cases you are generally recommended to choose a more expressive and powerful language such as: /p -ullia shape=rect href=spel.htmlSpEL/a/lilia shape=rect href=mvel.htmlMvel/a/lilia shape=rect href=groovy.htmlGroovy/a/lilia shape=rect href=javascript.htmlJavaScript/a/lilia shape=rect href=el.htmlEL/a/lilia shape=rect href=ognl.htmlOGNL/a/lilione of the supported a shape=rect href=scripting-languages.htmlScripting Languages/a/li/ul - - -pThe simple language uses code${body/code} placeholders for complex expressions where the expression contains constant literals. The ${ } placeholders can be omitted if the expression is only the token itself./p - -div class=aui-message success shadowed information-macro +div class=wiki-content maincontenth2 id=Simple-SimpleExpressionLanguageSimple Expression Language/h2pThe Simple Expression Language was a really simple language you can use, but has since grown more powerful. Its primarily intended for being a really small and simple language for evaluating a shape=rect href=expression.htmlExpression/a and a shape=rect href=predicate.htmlPredicate/a without requiring any new dependencies or knowledge of a shape=rect href=xpath.htmlXPath/a; so its ideal for testing in camel-core. Its ideal to cover 95% of the common use cases when you need a little bit of expression based script in your Camel routes./ppHowever for much more complex use cases you are generally recommended to choose a more expressive and powerful language such as:/pullia shape=rect href=spel.htmlSpEL/a/lilia shape=rect href=mvel.htmlMvel/a/lilia shape=rect href=groovy.htmlGroovy/a/lilia shape=rect href =javascript.htmlJavaScript/a/lilia shape=rect href=el.htmlEL/a/lilia shape=rect href=ognl.htmlOGNL/a/lilione of the supported a shape=rect href=scripting-languages.htmlScripting Languages/a/li/ulpThe simple language uses code${body/code} placeholders for complex expressions where the expression contains constant literals. The ${ } placeholders can be omitted if the expression is only the token itself./pdiv class=aui-message success shadowed information-macro p class=titleAlternative syntax/p span class=aui-icon icon-successIcon/span div class=message-content - -pFrom Camel 2.5 onwards you can also use the alternative syntax which uses $simple{ } as placeholders.br clear=none -This can be used in situations to avoid clashes when using for example Spring property placeholder together with Camel./p +pFrom Camel 2.5 onwards you can also use the alternative syntax which uses $simple{ } as placeholders.br clear=none This can be used in situations to avoid clashes when using for example Spring property placeholder together with Camel./p /div /div - - div class=aui-message success shadowed information-macro p class=titleConfiguring result type/p span class=aui-icon icon-successIcon/span div class=message-content - -pFrom Camel 2.8 onwards you can configure the result type of the a shape=rect href=simple.htmlSimple/a expression. For example to set the type as a codejava.lang.Boolean/code or a codejava.lang.Integer/code etc./p +pFrom Camel 2.8 onwards you can configure the result type of the a shape=rect href=simple.htmlSimple/a expression. For example to set the type as a codejava.lang.Boolean/code or a codejava.lang.Integer/code etc./p /div /div - - div class=aui-message hint shadowed information-macro p class=titleFile language is now merged with Simple language/p span class=aui-icon icon-hintIcon/span div class=message-content - -pFrom Camel 2.2
svn commit: r931393 [1/5] - in /websites/production/camel/content: book-in-one-page.html book-languages-appendix.html cache/main.pageCache camel-2150-release.html simple.html
Author: buildbot Date: Tue Dec 2 17:19:37 2014 New Revision: 931393 Log: Production update by buildbot for camel Modified: websites/production/camel/content/book-in-one-page.html websites/production/camel/content/book-languages-appendix.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2150-release.html websites/production/camel/content/simple.html
svn commit: r931393 [2/5] - in /websites/production/camel/content: book-in-one-page.html book-languages-appendix.html cache/main.pageCache camel-2150-release.html simple.html
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 Tue Dec 2 17:19:37 2014 @@ -4120,11 +4120,11 @@ While not actual tutorials you might fin /div /div h2 id=BookInOnePage-PrefacePreface/h2pThis tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a a shape=rect class=external-link href=http://www.springramework.org; rel=nofollowSpring/a service. The route works in a synchronous fashion returning a response to the client./ppstyle type=text/css/*![CDATA[*/ -div.rbtoc1417537093373 {padding: 0px;} -div.rbtoc1417537093373 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1417537093373 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1417540666765 {padding: 0px;} +div.rbtoc1417540666765 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1417540666765 li {margin-left: 0px;padding-left: 0px;} -/*]]*//style/pdiv class=toc-macro rbtoc1417537093373 +/*]]*//style/pdiv class=toc-macro rbtoc1417540666765 ul class=toc-indentationlia shape=rect href=#Tutorial-JmsRemoting-TutorialonSpringRemotingwithJMSTutorial on Spring Remoting with JMS/a/lilia shape=rect href=#Tutorial-JmsRemoting-PrefacePreface/a/lilia shape=rect href=#Tutorial-JmsRemoting-PrerequisitesPrerequisites/a/lilia shape=rect href=#Tutorial-JmsRemoting-DistributionDistribution/a/lilia shape=rect href=#Tutorial-JmsRemoting-AboutAbout/a/lilia shape=rect href=#Tutorial-JmsRemoting-CreatetheCamelProjectCreate the Camel Project/a ul class=toc-indentationlia shape=rect href=#Tutorial-JmsRemoting-UpdatethePOMwithDependenciesUpdate the POM with Dependencies/a/li/ul /lilia shape=rect href=#Tutorial-JmsRemoting-WritingtheServerWriting the Server/a @@ -6310,11 +6310,11 @@ So we completed the last piece in the pi style type=text/css/*![CDATA[*/ -div.rbtoc1417537096427 {padding: 0px;} -div.rbtoc1417537096427 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1417537096427 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1417540669329 {padding: 0px;} +div.rbtoc1417540669329 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1417540669329 li {margin-left: 0px;padding-left: 0px;} -/*]]*//stylediv class=toc-macro rbtoc1417537096427 +/*]]*//stylediv class=toc-macro rbtoc1417540669329 ul class=toc-indentationlia shape=rect href=#Tutorial-AXIS-Camel-TutorialusingAxis1.4withApacheCamelTutorial using Axis 1.4 with Apache Camel/a ul class=toc-indentationlia shape=rect href=#Tutorial-AXIS-Camel-PrerequisitesPrerequisites/a/lilia shape=rect href=#Tutorial-AXIS-Camel-DistributionDistribution/a/lilia shape=rect href=#Tutorial-AXIS-Camel-IntroductionIntroduction/a/lilia shape=rect href=#Tutorial-AXIS-Camel-SettinguptheprojecttorunAxisSetting up the project to run Axis/a ul class=toc-indentationlia shape=rect href=#Tutorial-AXIS-Camel-Maven2Maven 2/a/lilia shape=rect href=#Tutorial-AXIS-Camel-wsdlwsdl/a/lilia shape=rect href=#Tutorial-AXIS-Camel-ConfiguringAxisConfiguring Axis/a/lilia shape=rect href=#Tutorial-AXIS-Camel-RunningtheExampleRunning the Example/a/li/ul @@ -8834,269 +8834,124 @@ result = body * 2 + 1 lt;/dependencygt; ]]/script /div/div -h2 id=BookInOnePage-SimpleExpressionLanguageSimple Expression Language/h2 - -pThe Simple Expression Language was a really simple language you can use, but has since grown more powerful. Its primarily intended for being a really small and simple language for evaluating a shape=rect href=expression.htmlExpression/a and a shape=rect href=predicate.htmlPredicate/a without requiring any new dependencies or knowledge of a shape=rect href=xpath.htmlXPath/a; so its ideal for testing in camel-core. Its ideal to cover 95% of the common use cases when you need a little bit of expression based script in your Camel routes./p - -pHowever for much more complex use cases you are generally recommended to choose a more expressive and powerful language such as: /p -ullia shape=rect href=spel.htmlSpEL/a/lilia shape=rect href=mvel.htmlMvel/a/lilia shape=rect href=groovy.htmlGroovy/a/lilia shape=rect href=javascript.htmlJavaScript/a/lilia shape=rect href=el.htmlEL/a/lilia shape=rect href=ognl.htmlOGNL/a/lilione of the supported a shape=rect href=scripting-languages.htmlScripting Languages/a/li/ul - - -pThe simple language uses code${body/code} placeholders for complex expressions where the expression contains constant literals. The ${ } placeholders can be omitted if the expression is only the token itself./p - -div class=aui-message success shadowed information-macro +h2 id=BookInOnePage-SimpleExpressionLanguageSimple Expression Language/h2pThe Simple Expression Language was a really simple language you can use, but has since grown more powerful.
svn commit: r931393 [3/5] - in /websites/production/camel/content: book-in-one-page.html book-languages-appendix.html cache/main.pageCache camel-2150-release.html simple.html
Modified: websites/production/camel/content/book-languages-appendix.html == --- websites/production/camel/content/book-languages-appendix.html (original) +++ websites/production/camel/content/book-languages-appendix.html Tue Dec 2 17:19:37 2014 @@ -1041,269 +1041,124 @@ result = body * 2 + 1 lt;/dependencygt; ]]/script /div/div -h2 id=BookLanguagesAppendix-SimpleExpressionLanguageSimple Expression Language/h2 - -pThe Simple Expression Language was a really simple language you can use, but has since grown more powerful. Its primarily intended for being a really small and simple language for evaluating a shape=rect href=expression.htmlExpression/a and a shape=rect href=predicate.htmlPredicate/a without requiring any new dependencies or knowledge of a shape=rect href=xpath.htmlXPath/a; so its ideal for testing in camel-core. Its ideal to cover 95% of the common use cases when you need a little bit of expression based script in your Camel routes./p - -pHowever for much more complex use cases you are generally recommended to choose a more expressive and powerful language such as: /p -ullia shape=rect href=spel.htmlSpEL/a/lilia shape=rect href=mvel.htmlMvel/a/lilia shape=rect href=groovy.htmlGroovy/a/lilia shape=rect href=javascript.htmlJavaScript/a/lilia shape=rect href=el.htmlEL/a/lilia shape=rect href=ognl.htmlOGNL/a/lilione of the supported a shape=rect href=scripting-languages.htmlScripting Languages/a/li/ul - - -pThe simple language uses code${body/code} placeholders for complex expressions where the expression contains constant literals. The ${ } placeholders can be omitted if the expression is only the token itself./p - -div class=aui-message success shadowed information-macro +h2 id=BookLanguagesAppendix-SimpleExpressionLanguageSimple Expression Language/h2pThe Simple Expression Language was a really simple language you can use, but has since grown more powerful. Its primarily intended for being a really small and simple language for evaluating a shape=rect href=expression.htmlExpression/a and a shape=rect href=predicate.htmlPredicate/a without requiring any new dependencies or knowledge of a shape=rect href=xpath.htmlXPath/a; so its ideal for testing in camel-core. Its ideal to cover 95% of the common use cases when you need a little bit of expression based script in your Camel routes./ppHowever for much more complex use cases you are generally recommended to choose a more expressive and powerful language such as:/pullia shape=rect href=spel.htmlSpEL/a/lilia shape=rect href=mvel.htmlMvel/a/lilia shape=rect href=groovy.htmlGroovy/a/lilia shape=rect href=javascript.htmlJava Script/a/lilia shape=rect href=el.htmlEL/a/lilia shape=rect href=ognl.htmlOGNL/a/lilione of the supported a shape=rect href=scripting-languages.htmlScripting Languages/a/li/ulpThe simple language uses code${body/code} placeholders for complex expressions where the expression contains constant literals. The ${ } placeholders can be omitted if the expression is only the token itself./pdiv class=aui-message success shadowed information-macro p class=titleAlternative syntax/p span class=aui-icon icon-successIcon/span div class=message-content - -pFrom Camel 2.5 onwards you can also use the alternative syntax which uses $simple{ } as placeholders.br clear=none -This can be used in situations to avoid clashes when using for example Spring property placeholder together with Camel./p +pFrom Camel 2.5 onwards you can also use the alternative syntax which uses $simple{ } as placeholders.br clear=none This can be used in situations to avoid clashes when using for example Spring property placeholder together with Camel./p /div /div - - div class=aui-message success shadowed information-macro p class=titleConfiguring result type/p span class=aui-icon icon-successIcon/span div class=message-content - -pFrom Camel 2.8 onwards you can configure the result type of the a shape=rect href=simple.htmlSimple/a expression. For example to set the type as a codejava.lang.Boolean/code or a codejava.lang.Integer/code etc./p +pFrom Camel 2.8 onwards you can configure the result type of the a shape=rect href=simple.htmlSimple/a expression. For example to set the type as a codejava.lang.Boolean/code or a codejava.lang.Integer/code etc./p /div /div - - div class=aui-message hint shadowed information-macro p class=titleFile language is now merged with Simple language/p span class=aui-icon icon-hintIcon/span div class=message-content -
[2/4] camel git commit: CAMEL-8099: Add support for using default values in Camel property placeholder.
CAMEL-8099: Add support for using default values in Camel property placeholder. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e8abd636 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e8abd636 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e8abd636 Branch: refs/heads/camel-2.14.x Commit: e8abd636f12c423e9f6f1ad319084aca0e254570 Parents: 0c55f56 Author: Claus Ibsen davscl...@apache.org Authored: Tue Dec 2 17:03:19 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 19:44:16 2014 +0100 -- .../properties/DefaultPropertiesParser.java | 15 .../PropertiesComponentGetOrElseTest.java | 72 2 files changed, 87 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/e8abd636/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 16ef52d..6a5b80f 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 @@ -22,6 +22,7 @@ import java.util.Set; import static java.lang.String.format; +import org.apache.camel.util.ObjectHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -32,6 +33,8 @@ import org.slf4j.LoggerFactory; public class DefaultPropertiesParser implements AugmentedPropertyNameAwarePropertiesParser { protected final Logger log = LoggerFactory.getLogger(getClass()); +private static final String GET_OR_ELSE_TOKEN = :; + @Override public String parseUri(String text, Properties properties, String prefixToken, String suffixToken) throws IllegalArgumentException { return parseUri(text, properties, prefixToken, suffixToken, null, null, false); @@ -189,6 +192,13 @@ public class DefaultPropertiesParser implements AugmentedPropertyNameAwareProper * @return Value of the property with the given key */ private String getPropertyValue(String key, String input) { +// they key may have a get or else expression +String defaultValue = null; +if (key.contains(GET_OR_ELSE_TOKEN)) { +defaultValue = ObjectHelper.after(key, GET_OR_ELSE_TOKEN); +key = ObjectHelper.before(key, GET_OR_ELSE_TOKEN); +} + String augmentedKey = getAugmentedKey(key); boolean shouldFallback = fallbackToUnaugmentedProperty !key.equals(augmentedKey); @@ -198,6 +208,11 @@ public class DefaultPropertiesParser implements AugmentedPropertyNameAwareProper value = doGetPropertyValue(key); } +if (value == null defaultValue != null) { +log.debug(Property with key [{}] not found, using default value: {}, augmentedKey, defaultValue); +value = defaultValue; +} + if (value == null) { StringBuilder esb = new StringBuilder(); esb.append(Property with key [).append(augmentedKey).append(] ); http://git-wip-us.apache.org/repos/asf/camel/blob/e8abd636/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java b/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java new file mode 100644 index 000..e5e5d12 --- /dev/null +++ b/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java @@ -0,0 +1,72 @@ +/** + * 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
[3/4] camel git commit: CAMEL-8099: Add support for using default values in Camel property placeholder.
CAMEL-8099: Add support for using default values in Camel property placeholder. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/703edadd Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/703edadd Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/703edadd Branch: refs/heads/master Commit: 703edaddf00dcc38a15fd3547cbd13f79056c8fa Parents: 39ccf5d Author: Claus Ibsen davscl...@apache.org Authored: Tue Dec 2 17:03:19 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 19:44:25 2014 +0100 -- .../properties/DefaultPropertiesParser.java | 15 .../PropertiesComponentGetOrElseTest.java | 72 2 files changed, 87 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/703edadd/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 16ef52d..6a5b80f 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 @@ -22,6 +22,7 @@ import java.util.Set; import static java.lang.String.format; +import org.apache.camel.util.ObjectHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -32,6 +33,8 @@ import org.slf4j.LoggerFactory; public class DefaultPropertiesParser implements AugmentedPropertyNameAwarePropertiesParser { protected final Logger log = LoggerFactory.getLogger(getClass()); +private static final String GET_OR_ELSE_TOKEN = :; + @Override public String parseUri(String text, Properties properties, String prefixToken, String suffixToken) throws IllegalArgumentException { return parseUri(text, properties, prefixToken, suffixToken, null, null, false); @@ -189,6 +192,13 @@ public class DefaultPropertiesParser implements AugmentedPropertyNameAwareProper * @return Value of the property with the given key */ private String getPropertyValue(String key, String input) { +// they key may have a get or else expression +String defaultValue = null; +if (key.contains(GET_OR_ELSE_TOKEN)) { +defaultValue = ObjectHelper.after(key, GET_OR_ELSE_TOKEN); +key = ObjectHelper.before(key, GET_OR_ELSE_TOKEN); +} + String augmentedKey = getAugmentedKey(key); boolean shouldFallback = fallbackToUnaugmentedProperty !key.equals(augmentedKey); @@ -198,6 +208,11 @@ public class DefaultPropertiesParser implements AugmentedPropertyNameAwareProper value = doGetPropertyValue(key); } +if (value == null defaultValue != null) { +log.debug(Property with key [{}] not found, using default value: {}, augmentedKey, defaultValue); +value = defaultValue; +} + if (value == null) { StringBuilder esb = new StringBuilder(); esb.append(Property with key [).append(augmentedKey).append(] ); http://git-wip-us.apache.org/repos/asf/camel/blob/703edadd/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java b/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java new file mode 100644 index 000..e5e5d12 --- /dev/null +++ b/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java @@ -0,0 +1,72 @@ +/** + * 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
[4/4] camel git commit: CAMEL-8099: Add support for using default values in Camel property placeholder.:
CAMEL-8099: Add support for using default values in Camel property placeholder.: Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c4d6eb33 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c4d6eb33 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c4d6eb33 Branch: refs/heads/master Commit: c4d6eb33364ed951aee446bd25d9551060f43540 Parents: 703edad Author: Claus Ibsen davscl...@apache.org Authored: Tue Dec 2 17:30:53 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 19:44:25 2014 +0100 -- .../simple/ast/SimpleFunctionExpression.java| 12 +++- .../PropertiesComponentGetOrElseTest.java | 29 .../PropertiesComponentSimpleLanguageTest.java | 6 ++-- 3 files changed, 43 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c4d6eb33/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java -- diff --git a/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java b/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java index 4eedcba..d5b648a 100644 --- a/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java +++ b/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java @@ -157,7 +157,17 @@ public class SimpleFunctionExpression extends LiteralExpression { if (remainder != null) { String[] parts = remainder.split(:); if (parts.length 2) { -throw new SimpleParserException(Valid syntax: ${properties:[locations]:key} was: + function, token.getIndex()); +throw new SimpleParserException(Valid syntax: ${properties:key[:default]} was: + function, token.getIndex()); +} +return ExpressionBuilder.propertiesComponentExpression(remainder, null); +} + +// properties-location: prefix +remainder = ifStartsWithReturnRemainder(properties-location:, function); +if (remainder != null) { +String[] parts = remainder.split(:); +if (parts.length 2) { +throw new SimpleParserException(Valid syntax: ${properties-location:location:key[:default]} was: + function, token.getIndex()); } String locations = null; http://git-wip-us.apache.org/repos/asf/camel/blob/c4d6eb33/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java b/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java index e5e5d12..46db7df 100644 --- a/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java +++ b/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java @@ -62,6 +62,35 @@ public class PropertiesComponentGetOrElseTest extends ContextTestSupport { assertMockEndpointsSatisfied(); } +public void testPropertiesComponentSimpleLanguage() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.transform().simple(Hi ${body} do you think ${properties:cool.name} rocks?); +} +}); +context.start(); + +String reply = template.requestBody(direct:start, Claus, String.class); +assertEquals(Hi Claus do you think Camel rocks?, reply); +} + +public void testPropertiesComponentSimpleLanguageUsingDefaultValue() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.transform().simple(Hi ${body} do you think ${properties:unknown:Beer} rocks?); +} +}); +context.start(); + +String reply = template.requestBody(direct:start, Claus, String.class); +assertEquals(Hi Claus do you think Beer rocks?, reply); +} + + @Override protected CamelContext createCamelContext() throws Exception { CamelContext context = super.createCamelContext(); http://git-wip-us.apache.org/repos/asf/camel/blob/c4d6eb33/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentSimpleLanguageTest.java
[1/4] camel git commit: CAMEL-8099: Add support for using default values in Camel property placeholder.:
Repository: camel Updated Branches: refs/heads/camel-2.14.x 0c55f5600 - f7b4bedf2 refs/heads/master 39ccf5d6d - c4d6eb333 CAMEL-8099: Add support for using default values in Camel property placeholder.: Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f7b4bedf Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f7b4bedf Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f7b4bedf Branch: refs/heads/camel-2.14.x Commit: f7b4bedf282905264399786027df09b9d329bd90 Parents: e8abd63 Author: Claus Ibsen davscl...@apache.org Authored: Tue Dec 2 17:30:53 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 19:44:16 2014 +0100 -- .../simple/ast/SimpleFunctionExpression.java| 12 +++- .../PropertiesComponentGetOrElseTest.java | 29 .../PropertiesComponentSimpleLanguageTest.java | 6 ++-- 3 files changed, 43 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/f7b4bedf/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java -- diff --git a/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java b/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java index 4eedcba..d5b648a 100644 --- a/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java +++ b/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java @@ -157,7 +157,17 @@ public class SimpleFunctionExpression extends LiteralExpression { if (remainder != null) { String[] parts = remainder.split(:); if (parts.length 2) { -throw new SimpleParserException(Valid syntax: ${properties:[locations]:key} was: + function, token.getIndex()); +throw new SimpleParserException(Valid syntax: ${properties:key[:default]} was: + function, token.getIndex()); +} +return ExpressionBuilder.propertiesComponentExpression(remainder, null); +} + +// properties-location: prefix +remainder = ifStartsWithReturnRemainder(properties-location:, function); +if (remainder != null) { +String[] parts = remainder.split(:); +if (parts.length 2) { +throw new SimpleParserException(Valid syntax: ${properties-location:location:key[:default]} was: + function, token.getIndex()); } String locations = null; http://git-wip-us.apache.org/repos/asf/camel/blob/f7b4bedf/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java b/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java index e5e5d12..46db7df 100644 --- a/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java +++ b/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentGetOrElseTest.java @@ -62,6 +62,35 @@ public class PropertiesComponentGetOrElseTest extends ContextTestSupport { assertMockEndpointsSatisfied(); } +public void testPropertiesComponentSimpleLanguage() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.transform().simple(Hi ${body} do you think ${properties:cool.name} rocks?); +} +}); +context.start(); + +String reply = template.requestBody(direct:start, Claus, String.class); +assertEquals(Hi Claus do you think Camel rocks?, reply); +} + +public void testPropertiesComponentSimpleLanguageUsingDefaultValue() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.transform().simple(Hi ${body} do you think ${properties:unknown:Beer} rocks?); +} +}); +context.start(); + +String reply = template.requestBody(direct:start, Claus, String.class); +assertEquals(Hi Claus do you think Beer rocks?, reply); +} + + @Override protected CamelContext createCamelContext() throws Exception { CamelContext context = super.createCamelContext();
[2/2] camel git commit: CAMEL-8099: Add support for using default values in Camel property placeholder.:
CAMEL-8099: Add support for using default values in Camel property placeholder.: Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9334a870 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9334a870 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9334a870 Branch: refs/heads/camel-2.14.x Commit: 9334a870c546e7c6e15a99bddb26874bf914d5cb Parents: f7b4bed Author: Claus Ibsen davscl...@apache.org Authored: Tue Dec 2 19:47:26 2014 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Tue Dec 2 19:48:09 2014 +0100 -- .../camel/language/simple/ast/SimpleFunctionExpression.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/9334a870/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java -- diff --git a/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java b/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java index d5b648a..d63e854 100644 --- a/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java +++ b/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java @@ -166,13 +166,13 @@ public class SimpleFunctionExpression extends LiteralExpression { remainder = ifStartsWithReturnRemainder(properties-location:, function); if (remainder != null) { String[] parts = remainder.split(:); -if (parts.length 2) { +if (parts.length 3) { throw new SimpleParserException(Valid syntax: ${properties-location:location:key[:default]} was: + function, token.getIndex()); } String locations = null; String key = remainder; -if (parts.length == 2) { +if (parts.length = 2) { locations = ObjectHelper.before(remainder, :); key = ObjectHelper.after(remainder, :); }
svn commit: r931417 - in /websites/production/camel/content: cache/main.pageCache camel-2150-release.html
Author: buildbot Date: Tue Dec 2 20:18:28 2014 New Revision: 931417 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2150-release.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2150-release.html == --- websites/production/camel/content/camel-2150-release.html (original) +++ websites/production/camel/content/camel-2150-release.html Tue Dec 2 20:18:28 2014 @@ -84,7 +84,7 @@ tbody tr td valign=top width=100% -div class=wiki-content maincontenth1 id=Camel2.15.0Release-Camel2.15.0release(currentlyinprogress)Camel#160;2.15.0 release (currently in progress)/h1div style=padding-right:20px;float:left;margin-left:-20px;pimg class=confluence-embedded-image confluence-external-resource src=http://camel.apache.org/download.data/camel-box-v1.0-150x200.png; data-image-src=http://camel.apache.org/download.data/camel-box-v1.0-150x200.png;/p/divdiv style=min-height:200px#160;/divh2 id=Camel2.15.0Release-NewandNoteworthyNew and Noteworthy/h2pWelcome to the 2.15.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...)/pullispanComponent documentation now included in the built component JARs. And Java API and JMX API to access that documentation. And APIs to explain an endpoint uri and what all those configured options mean.#160;/span/lilispanComponent can now have#160;associated#160;label(s) which are use d for grouping components into: core, database, messaging, http, rest, etc./span/lilispanProvide Configurer for user to configure the CXF conduit and CXF destination from Java code/span/lilispanspanAdded a codeDelegateEndpoint/code#160;interface into Camel API/span/span/liliSupport to setup the SslContextParameters in the a shape=rect href=restlet.htmlcamel-restlet/a component/liliJava DSL - Should support nested choice in doTry .. doCatch/lilia shape=rect href=mongodb.htmlMongoDb/a component now a shape=rect class=external-link href=https://issues.apache.org/jira/browse/CAMEL-7996;stores OIDs/a#160;of the inserted records in the message header/lilia shape=rect href=recipient-list.htmlRecipient List/a now supports specifying custom#160;a shape=rect href=exchange-pattern.htmlExchange Pattern/a in the endpoint ur's/lilia shape=rect href=type-converter.htmlType Converter/a to enum's is now case insensitive, so you can convert safely level=info to an enum with name Level.INFO etc./lilia shape=rect href=xslt.htmlXSLT/a and#160;a shape=rect href=https://cwiki.apache.org/confluence/display/SM/Validation;Validation/a components now provides all their endpoint configurations in the endpoint, and not only in the component, making these components like any other components./liliMade the a shape=rect href=karaf.htmlCamel Karaf Commands/a reusable by moving common code into a#160;codecamel-commands-core/code module that SPI can extend and plugin Camel commands for other environments./liliFurther hardening of the#160;a shape=rect href=sjms.htmlSJMS/a#160;component./lilia shape=rect href=rest-dsl.htmlRest DSL/a with embedded routes now supports a shape=rect href=exception-clause.htmlonException/a, a shape=rect href=intercept.htmlintercept/a etc in use for those embedded routes, just like any regular r outes.#160;/lilia shape=rect href=rest-dsl.htmlRest DSL/a now by default uses custom error message as-is without attempting to binding output (requires a HTTP error code of 300+ is set as a header)/liliCamel#160;a shape=rect href=using-propertyplaceholder.htmlUsing PropertyPlaceholder/a now supports specifying a default value together with the key to lookup./li/ulh3 id=Camel2.15.0Release-FixedissuesFixed issues/h3ulliFixed processors was not enlisted in JMX when routes was transacted./liliFixed the NullPointerException when using CXF endpoint with enrich/liliFixed the#160;endpointProperty of#160;restConfiguration doesn't work issue/liliFixed the issue that#160;CircuitBreakerLoadBalancer fails on async processors/liliFixed#160;MyBatis consumer a shape=rect class=external-link href=https://issues.apache.org/jira/browse/CAMEL-8011;ignoring maxMessagesPerPoll/a option/liliFixed potential issue with#160;pollEnrich not triggering error handler if an exception was thrown in the polling.br clear=nonebr clear=none/li/ulh3 id=Camel2.15.0Release-NewNew a shape=rect href=enterprise-integration-patterns.htmlEnterprise Integration Patterns/a/h3h3 id=Camel2.15.0Release-New.1New a shape=rect href=components.htmlComponents/a/h3ullia shape=rect href=beanstalk.htmlcamel-beanstalk/a - for working with Amazon Beanstalk jobs./lilicodecamel-chunk/code - for
[4/5] camel git commit: Add karaf feature for google mail component
Add karaf feature for google mail component Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2696a973 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2696a973 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2696a973 Branch: refs/heads/master Commit: 2696a973da528164e8b2c6e3e5757bea20bb053e Parents: 16b0714 Author: Jonathan Anstey jans...@gmail.com Authored: Tue Dec 2 17:24:11 2014 -0330 Committer: Jonathan Anstey jans...@gmail.com Committed: Tue Dec 2 17:24:11 2014 -0330 -- apache-camel/pom.xml| 4 .../src/main/descriptors/common-bin.xml | 1 + components/camel-google-mail/pom.xml| 24 ++-- parent/pom.xml | 5 .../features/src/main/resources/features.xml| 15 5 files changed, 37 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/2696a973/apache-camel/pom.xml -- diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml index ad7500b..c0ca486 100644 --- a/apache-camel/pom.xml +++ b/apache-camel/pom.xml @@ -249,6 +249,10 @@ /dependency dependency groupIdorg.apache.camel/groupId + artifactIdcamel-google-mail/artifactId +/dependency +dependency + groupIdorg.apache.camel/groupId artifactIdcamel-groovy/artifactId /dependency dependency http://git-wip-us.apache.org/repos/asf/camel/blob/2696a973/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 f5422c7..d5d2e1b 100644 --- a/apache-camel/src/main/descriptors/common-bin.xml +++ b/apache-camel/src/main/descriptors/common-bin.xml @@ -75,6 +75,7 @@ includeorg.apache.camel:camel-github/include includeorg.apache.camel:camel-google-calendar/include includeorg.apache.camel:camel-google-drive/include +includeorg.apache.camel:camel-google-mail/include includeorg.apache.camel:camel-gora/include includeorg.apache.camel:camel-groovy/include includeorg.apache.camel:camel-guava-eventbus/include http://git-wip-us.apache.org/repos/asf/camel/blob/2696a973/components/camel-google-mail/pom.xml -- diff --git a/components/camel-google-mail/pom.xml b/components/camel-google-mail/pom.xml index f7c0272..3735310 100644 --- a/components/camel-google-mail/pom.xml +++ b/components/camel-google-mail/pom.xml @@ -68,18 +68,18 @@ version${google-api-services-mail-version}/version /dependency -dependency -groupIdjavax.mail/groupId -artifactIdmail/artifactId -version${javax-mail-version}/version -exclusions - !-- javax activation is part of the JDK now -- - exclusion -groupIdjavax.activation/groupId -artifactIdactivation/artifactId - /exclusion -/exclusions -/dependency +dependency +groupIdjavax.mail/groupId +artifactIdmail/artifactId +version${javax-mail-version}/version +exclusions + !-- javax activation is part of the JDK now -- + exclusion +groupIdjavax.activation/groupId +artifactIdactivation/artifactId + /exclusion +/exclusions +/dependency !-- Camel annotations in provided scope to avoid compile errors in IDEs -- dependency http://git-wip-us.apache.org/repos/asf/camel/blob/2696a973/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 7e61552..8d68457 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -808,6 +808,11 @@ /dependency dependency groupIdorg.apache.camel/groupId +artifactIdcamel-google-mail/artifactId +version${project.version}/version + /dependency + dependency +groupIdorg.apache.camel/groupId artifactIdcamel-gora/artifactId version${project.version}/version /dependency http://git-wip-us.apache.org/repos/asf/camel/blob/2696a973/platforms/karaf/features/src/main/resources/features.xml -- diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml index e665774..d335618 100644 --- a/platforms/karaf/features/src/main/resources/features.xml +++
[2/5] camel git commit: CAMEL-8110 - google mail component
CAMEL-8110 - google mail component Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3c6769db Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3c6769db Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3c6769db Branch: refs/heads/master Commit: 3c6769dbd287d4ec919104649947b84eafc3050c Parents: 7ffb70e Author: Jonathan Anstey jans...@gmail.com Authored: Tue Dec 2 17:13:30 2014 -0330 Committer: Jonathan Anstey jans...@gmail.com Committed: Tue Dec 2 17:16:54 2014 -0330 -- components/camel-google-mail/pom.xml| 311 +++ .../mail/BatchGoogleMailClientFactory.java | 68 .../google/mail/GoogleMailClientFactory.java| 27 ++ .../google/mail/GoogleMailComponent.java| 75 + .../google/mail/GoogleMailConfiguration.java| 100 ++ .../google/mail/GoogleMailConsumer.java | 58 .../google/mail/GoogleMailEndpoint.java | 111 +++ .../google/mail/GoogleMailProducer.java | 58 .../mail/internal/GoogleMailConstants.java | 29 ++ .../internal/GoogleMailPropertiesHelper.java| 39 +++ .../org/apache/camel/component/google-mail | 1 + .../mail/AbstractGoogleMailTestSupport.java | 88 ++ .../google/mail/GmailUsersIntegrationTest.java | 60 .../mail/GmailUsersLabelsIntegrationTest.java | 119 +++ .../mail/GmailUsersMessagesIntegrationTest.java | 222 + .../mail/GmailUsersThreadsIntegrationTest.java | 136 .../src/test/resources/log4j.properties | 30 ++ .../src/test/resources/test-options.properties | 26 ++ 18 files changed, 1558 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/3c6769db/components/camel-google-mail/pom.xml -- diff --git a/components/camel-google-mail/pom.xml b/components/camel-google-mail/pom.xml new file mode 100644 index 000..f7c0272 --- /dev/null +++ b/components/camel-google-mail/pom.xml @@ -0,0 +1,311 @@ +?xml version=1.0 encoding=UTF-8? +!-- + 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. +-- +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.15-SNAPSHOT/version + /parent + + artifactIdcamel-google-mail/artifactId + packagingbundle/packaging + nameCamel GoogleMail Component/name + descriptionCamel Component for GoogleMail/description + + properties +schemeNamegoogle-mail/schemeName +componentNameGoogleMail/componentName +componentPackageorg.apache.camel.component.google.mail/componentPackage +outPackageorg.apache.camel.component.google.mail.internal/outPackage + camel.osgi.private.pkgorg.apache.camel.component.google.mail.internal/camel.osgi.private.pkg + camel.osgi.export.pkgorg.apache.camel.component.google.mail/camel.osgi.export.pkg +camel.osgi.export.service + org.apache.camel.spi.ComponentResolver;component=google-mail +/camel.osgi.export.service + /properties + + dependencies +dependency + groupIdorg.apache.camel/groupId + artifactIdcamel-core/artifactId +/dependency +dependency +groupIdcom.google.api-client/groupId +artifactIdgoogle-api-client/artifactId +version${google-api-client-version}/version +/dependency +dependency +groupIdcom.google.oauth-client/groupId +artifactIdgoogle-oauth-client-jetty/artifactId +version${google-api-client-version}/version +/dependency +dependency +groupIdcom.google.http-client/groupId +artifactIdgoogle-http-client-jackson2/artifactId +version${google-api-client-version}/version +/dependency +dependency +groupIdcom.google.apis/groupId +artifactIdgoogle-api-services-gmail/artifactId +
[3/5] camel git commit: Add camel-google-mail to build
Add camel-google-mail to build Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/16b07149 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/16b07149 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/16b07149 Branch: refs/heads/master Commit: 16b071491e52db906c3617a981f0e814c9a42b29 Parents: 38c0a97 Author: Jonathan Anstey jans...@gmail.com Authored: Tue Dec 2 17:17:31 2014 -0330 Committer: Jonathan Anstey jans...@gmail.com Committed: Tue Dec 2 17:17:31 2014 -0330 -- components/pom.xml | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/16b07149/components/pom.xml -- diff --git a/components/pom.xml b/components/pom.xml index 6fba7c9..7cabf32 100644 --- a/components/pom.xml +++ b/components/pom.xml @@ -100,6 +100,7 @@ modulecamel-github/module modulecamel-google-calendar/module modulecamel-google-drive/module +modulecamel-google-mail/module modulecamel-gora/module modulecamel-gson/module modulecamel-guava-eventbus/module
[5/5] camel git commit: Add karaf itest for camel-google-mail
Add karaf itest for camel-google-mail Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4b45630f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4b45630f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4b45630f Branch: refs/heads/master Commit: 4b45630f6ca11dfb5bca1cf346378c7e1fea5f69 Parents: 2696a97 Author: Jonathan Anstey jans...@gmail.com Authored: Tue Dec 2 17:36:04 2014 -0330 Committer: Jonathan Anstey jans...@gmail.com Committed: Tue Dec 2 17:36:04 2014 -0330 -- .../camel/itest/karaf/CamelGoogleMailTest.java | 40 1 file changed, 40 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/4b45630f/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelGoogleMailTest.java -- diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelGoogleMailTest.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelGoogleMailTest.java new file mode 100644 index 000..c518625 --- /dev/null +++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelGoogleMailTest.java @@ -0,0 +1,40 @@ +/** + * 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. + */ +package org.apache.camel.itest.karaf; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.junit.PaxExam; + +@RunWith(PaxExam.class) +public class CamelGoogleMailTest extends AbstractFeatureTest { + +public static final String COMPONENT = extractName(CamelGoogleMailTest.class); + +@Test +public void test() throws Exception { +testComponent(COMPONENT); +} + +@Configuration +public static Option[] configure() { +return configure(COMPONENT); +} + +}
[1/5] camel git commit: Fix CS
Repository: camel Updated Branches: refs/heads/master 7ffb70e2b - 4b45630f6 Fix CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/38c0a977 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/38c0a977 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/38c0a977 Branch: refs/heads/master Commit: 38c0a9f256708cce50b68937c24d33c5e5db Parents: 3c6769d Author: Jonathan Anstey jans...@gmail.com Authored: Tue Dec 2 17:16:36 2014 -0330 Committer: Jonathan Anstey jans...@gmail.com Committed: Tue Dec 2 17:16:54 2014 -0330 -- .../mail/BatchGoogleMailClientFactory.java | 12 +-- .../google/mail/GoogleMailComponent.java| 18 ++--- .../google/mail/GoogleMailConfiguration.java| 10 +-- .../google/mail/GoogleMailConsumer.java | 8 +- .../google/mail/GoogleMailEndpoint.java | 62 +++ .../google/mail/GoogleMailProducer.java | 5 +- .../mail/AbstractGoogleMailTestSupport.java | 17 ++--- .../google/mail/GmailUsersIntegrationTest.java | 11 +-- .../mail/GmailUsersLabelsIntegrationTest.java | 27 +++ .../mail/GmailUsersMessagesIntegrationTest.java | 80 .../mail/GmailUsersThreadsIntegrationTest.java | 56 ++ parent/pom.xml | 1 + 12 files changed, 128 insertions(+), 179 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/38c0a977/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/BatchGoogleMailClientFactory.java -- diff --git a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/BatchGoogleMailClientFactory.java b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/BatchGoogleMailClientFactory.java index 626d232..ea6b085 100644 --- a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/BatchGoogleMailClientFactory.java +++ b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/BatchGoogleMailClientFactory.java @@ -45,24 +45,20 @@ public class BatchGoogleMailClientFactory implements GoogleMailClientFactory { if (refreshToken != null !.equals(refreshToken)) { credential.setRefreshToken(refreshToken); -} +} if (accessToken != null !.equals(accessToken)) { credential.setAccessToken(accessToken); } return new Gmail.Builder(transport, jsonFactory, credential).setApplicationName(applicationName).build(); } catch (Exception e) { -LOG.error(Could not create Google Drive client., e); +LOG.error(Could not create Google Drive client., e); } return null; } - + // Authorizes the installed application to access user's protected data. private Credential authorize(String clientId, String clientSecret, CollectionString scopes) throws Exception { // authorize -return new GoogleCredential.Builder() -.setJsonFactory(jsonFactory) -.setTransport(transport) -.setClientSecrets(clientId, clientSecret) -.build(); +return new GoogleCredential.Builder().setJsonFactory(jsonFactory).setTransport(transport).setClientSecrets(clientId, clientSecret).build(); } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/38c0a977/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java -- diff --git a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java index 4d88110..b19d485 100644 --- a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java +++ b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java @@ -16,15 +16,12 @@ */ package org.apache.camel.component.google.mail; - import com.google.api.services.gmail.Gmail; import org.apache.camel.CamelContext; import org.apache.camel.Endpoint; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.util.component.AbstractApiComponent; -import org.apache.camel.component.google.mail.internal.GoogleMailApiCollection; -import org.apache.camel.component.google.mail.internal.GoogleMailApiName; /** * Represents the component that manages {@link GoogleMailEndpoint}. @@ -34,7 +31,7 @@ public class GoogleMailComponent extends
svn commit: r931423 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache properties.html using-propertyplaceholder.html
Author: buildbot Date: Tue Dec 2 21:20:53 2014 New Revision: 931423 Log: Production update by buildbot for camel Modified: websites/production/camel/content/book-component-appendix.html websites/production/camel/content/book-in-one-page.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/properties.html websites/production/camel/content/using-propertyplaceholder.html Modified: websites/production/camel/content/book-component-appendix.html == --- websites/production/camel/content/book-component-appendix.html (original) +++ websites/production/camel/content/book-component-appendix.html Tue Dec 2 21:20:53 2014 @@ -1529,11 +1529,11 @@ template.send(quot;direct:alias-verify /div /div pThe strongcxf:/strong component provides integration with a shape=rect href=http://cxf.apache.org;Apache CXF/a for connecting to JAX-WS services hosted in CXF./ppstyle type=text/css/*![CDATA[*/ -div.rbtoc1417537054744 {padding: 0px;} -div.rbtoc1417537054744 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1417537054744 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1417555091218 {padding: 0px;} +div.rbtoc1417555091218 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1417555091218 li {margin-left: 0px;padding-left: 0px;} -/*]]*//style/pdiv class=toc-macro rbtoc1417537054744 +/*]]*//style/pdiv class=toc-macro rbtoc1417555091218 ul class=toc-indentationlia shape=rect href=#CXF-CXFComponentCXF Component/a ul class=toc-indentationlia shape=rect href=#CXF-URIformatURI format/a/lilia shape=rect href=#CXF-OptionsOptions/a ul class=toc-indentationlia shape=rect href=#CXF-ThedescriptionsofthedataformatsThe descriptions of the dataformats/a @@ -9817,7 +9817,7 @@ properties:key[?options] pFrom Camel 2.10 onwards, you can bridge the Spring property placeholder with Camel, see further below for more details./p /div /div -pThe property placeholder is generally in use when doing:/pul class=alternatelilookup or creating endpoints/lililookup of beans in the a shape=rect href=registry.htmlRegistry/a/liliadditional supported in Spring XML (see below in examples)/liliusing Blueprint PropertyPlaceholder with Camel a shape=rect href=properties.htmlProperties/a component/liliusing code@PropertyInject/code to inject a property in a POJO/lilistrongCamel 2.14.1/strong Using default value if a property does not exists/li/ulh3 id=BookComponentAppendix-SyntaxSyntax/h3pThe syntax to use Camel's property placeholder is to use {{codekey/code}} for example {{codefile.uri/code}} where codefile.uri/code is the property key.br clear=none You can use property placeholders in parts of the endpoint URI's which for example you can use placeholders for parameters in the URIs./ppFrom#160;strongCamel 2.14.1/strong onwards you can specify a default value to use if a property with the key does not exists, eg#160;codefile.url:/some/path/code where the default value is the text after the colon (eg /some/path)./pdiv class=aui-message hint shadowed information-macro +pThe property placeholder is generally in use when doing:/pul class=alternatelilookup or creating endpoints/lililookup of beans in the a shape=rect href=registry.htmlRegistry/a/liliadditional supported in Spring XML (see below in examples)/liliusing Blueprint PropertyPlaceholder with Camel a shape=rect href=properties.htmlProperties/a component/liliusing code@PropertyInject/code to inject a property in a POJO/lilistrongCamel 2.14.1/strong Using default value if a property does not exists/lilistrongCamel 2.14.1/strong Using custom functions, which can be plugged into the property component./li/ulh3 id=BookComponentAppendix-SyntaxSyntax/h3pThe syntax to use Camel's property placeholder is to use {{codekey/code}} for example {{codefile.uri/code}} where codefile.uri/code is the property key.br clear=none You can use property placeholders in parts of the endpoint URI's which for example you can use placeholders for parameters in the URIs./ppFrom#160;strongCamel 2.14.1/strong onwards you can specify a default value to use if a property with the key does not exists, eg#160;codefile.url:/some/path/code where the default value is the text after the colon (eg /some/path)./pdiv class=aui-message hint shadowed information-macro span class=aui-icon icon-hintIcon/span div class=message-content pDo not use colon in the property key. The colon is used as a separator token when you are providing a default value, which is supported from strongCamel 2.14.1/strong onwards./p @@ -10343,7 +10343,41 @@ protected Properties useOverrideProperti script class=theme: Default; brush: java; gutter: false type=syntaxhighlighter![CDATA[@PropertyInject(value = quot;myTimeoutquot;,
buildbot failure in ASF Buildbot on camel-site-production
The Buildbot has detected a new failure on builder camel-site-production while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/camel-site-production/builds/5309 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-cms-slave Build Reason: The Nightly scheduler named 'camel-site-production' triggered this build Build Source Stamp: [branch camel/website] HEAD Blamelist: BUILD FAILED: failed compile Sincerely, -The Buildbot
buildbot success in ASF Buildbot on camel-site-production
The Buildbot has detected a restored build on builder camel-site-production while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/camel-site-production/builds/5310 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-cms-slave Build Reason: The Nightly scheduler named 'camel-site-production' triggered this build Build Source Stamp: [branch camel/website] HEAD Blamelist: Build succeeded! Sincerely, -The Buildbot
camel git commit: CAMEL-8111: Upgrade to Pax Exam 4.3
Repository: camel Updated Branches: refs/heads/master 4b45630f6 - aad1837a7 CAMEL-8111: Upgrade to Pax Exam 4.3 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/aad1837a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/aad1837a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/aad1837a Branch: refs/heads/master Commit: aad1837a719bfa1b61ffc3af3283dc5d08589efe Parents: 4b45630 Author: Babak Vahdat bvah...@apache.org Authored: Wed Dec 3 01:25:10 2014 +0100 Committer: Babak Vahdat bvah...@apache.org Committed: Wed Dec 3 01:25:10 2014 +0100 -- parent/pom.xml | 11 +- tests/camel-itest-karaf/pom.xml | 5 + tests/camel-itest-osgi/pom.xml | 648 ++- 3 files changed, 335 insertions(+), 329 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/aad1837a/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 8d68457..d4c7dae 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -141,8 +141,7 @@ ezmorph-bundle-version1.0.6_1/ezmorph-bundle-version facebook4j-core-version1.1.12/facebook4j-core-version fastinfoset-version1.2.13_1/fastinfoset-version -felix-configadmin-version1.4.0/felix-configadmin-version -felix-fileinstall-version3.2.6/felix-fileinstall-version +felix-configadmin-version1.8.0/felix-configadmin-version !-- need to keep using the older 3.2.8 that do not cause NPE issues when using pojosr - see pojosr bug #13 -- felix-fileinstall-pojosr-version3.2.8/felix-fileinstall-pojosr-version felix-framework-version3.2.2/felix-framework-version @@ -356,11 +355,9 @@ oscache-bundle-version2.4_5/oscache-bundle-version osgi-version4.3.1/osgi-version paranamer-bundle-version2.4_1/paranamer-bundle-version -pax-exam-version3.4.0/pax-exam-version -paxexam-karaf-container-version3.4.0/paxexam-karaf-container-version -pax-runner-version1.7.6/pax-runner-version +pax-exam-version4.3.0/pax-exam-version pax-tiny-bundle-version1.3.1/pax-tiny-bundle-version -pax-logging-version1.7.1/pax-logging-version +pax-logging-version1.8.1/pax-logging-version pdfbox-version1.6.0/pdfbox-version plexus-container-default-version1.0-alpha-48/plexus-container-default-version plexus-utils-version1.5.6/plexus-utils-version @@ -2307,7 +2304,7 @@ artifactIdcommons-httpclient/artifactId version${httpclient-version}/version /dependency -dependency + dependency groupIdxalan/groupId artifactIdxalan/artifactId version${xalan-version}/version http://git-wip-us.apache.org/repos/asf/camel/blob/aad1837a/tests/camel-itest-karaf/pom.xml -- diff --git a/tests/camel-itest-karaf/pom.xml b/tests/camel-itest-karaf/pom.xml index d7921f1..a43d29c 100644 --- a/tests/camel-itest-karaf/pom.xml +++ b/tests/camel-itest-karaf/pom.xml @@ -83,6 +83,11 @@ /dependency dependency groupIdorg.apache.servicemix.bundles/groupId +artifactIdorg.apache.servicemix.bundles.javax-inject/artifactId +version${javax-inject-bundle-version}/version +/dependency +dependency +groupIdorg.apache.servicemix.bundles/groupId artifactIdorg.apache.servicemix.bundles.junit/artifactId version${junit-bundle-version}/version /dependency http://git-wip-us.apache.org/repos/asf/camel/blob/aad1837a/tests/camel-itest-osgi/pom.xml -- diff --git a/tests/camel-itest-osgi/pom.xml b/tests/camel-itest-osgi/pom.xml index 8a00c0c..66fa057 100644 --- a/tests/camel-itest-osgi/pom.xml +++ b/tests/camel-itest-osgi/pom.xml @@ -29,124 +29,87 @@ nameCamel :: Integration Tests :: OSGi/name descriptionPerforms OSGi compliance integration tests/description + !-- let's list the dependencies in a sorted order -- dependencies + +!-- activemq -- dependency - groupIdorg.osgi/groupId - artifactIdorg.osgi.compendium/artifactId - scopecompile/scope - optionaltrue/optional -/dependency -dependency - groupIdorg.osgi/groupId - artifactIdorg.osgi.core/artifactId + groupIdorg.apache.activemq/groupId + artifactIdactivemq-all/artifactId + version${activemq-version}/version scopetest/scope /dependency + +!-- blueprint -- dependency - groupIdorg.ops4j.pax.exam/groupId - artifactIdpax-exam-junit4/artifactId + groupIdorg.apache.aries.blueprint/groupId + artifactIdorg.apache.aries.blueprint/artifactId scopetest/scope /dependency + +!--
camel git commit: Upgrade to Lucene 4.10.2
Repository: camel Updated Branches: refs/heads/master aad1837a7 - 596b11dc8 Upgrade to Lucene 4.10.2 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/596b11dc Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/596b11dc Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/596b11dc Branch: refs/heads/master Commit: 596b11dc85abd77e529080b111ce4b65c9e82529 Parents: aad1837 Author: Babak Vahdat bvah...@apache.org Authored: Wed Dec 3 01:54:42 2014 +0100 Committer: Babak Vahdat bvah...@apache.org Committed: Wed Dec 3 01:54:42 2014 +0100 -- .../apache/camel/component/lucene/LuceneConfiguration.java| 4 ++-- .../java/org/apache/camel/component/lucene/LuceneIndexer.java | 2 +- .../org/apache/camel/component/lucene/LuceneSearcher.java | 4 ++-- .../component/lucene/LuceneIndexAndQueryProducerTest.java | 7 +++ .../camel/processor/lucene/LuceneQueryProcessorTest.java | 5 ++--- parent/pom.xml| 6 +++--- 6 files changed, 13 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/596b11dc/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneConfiguration.java -- diff --git a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneConfiguration.java b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneConfiguration.java index d76a6ee..fc19119 100644 --- a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneConfiguration.java +++ b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneConfiguration.java @@ -35,7 +35,7 @@ public class LuceneConfiguration { private File indexDirectory; private Analyzer analyzer; private int maxHits; -private Version luceneVersion = Version.LUCENE_46; +private Version luceneVersion = Version.LUCENE_4_10_2; public LuceneConfiguration() { } @@ -65,7 +65,7 @@ public class LuceneConfiguration { indexDirectory = component.resolveAndRemoveReferenceParameter( parameters, indexDir, File.class, new File(file:///./indexDirectory)); analyzer = component.resolveAndRemoveReferenceParameter( -parameters, analyzer, Analyzer.class, new StandardAnalyzer(luceneVersion)); +parameters, analyzer, Analyzer.class, new StandardAnalyzer()); setMaxHits(component.getAndRemoveParameter(parameters, maxHits, Integer.class, 10)); } http://git-wip-us.apache.org/repos/asf/camel/blob/596b11dc/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java -- diff --git a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java index 561758d..a335398 100644 --- a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java +++ b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java @@ -144,7 +144,7 @@ public class LuceneIndexer { private void openIndexWriter() throws IOException { IndexWriterConfig indexWriterConfig; // use create or append so we can reuse existing index if already exists -indexWriterConfig = new IndexWriterConfig(Version.LUCENE_46, getAnalyzer()).setOpenMode(OpenMode.CREATE_OR_APPEND); +indexWriterConfig = new IndexWriterConfig(Version.LUCENE_4_10_2, getAnalyzer()).setOpenMode(OpenMode.CREATE_OR_APPEND); indexWriter = new IndexWriter(niofsDirectory, indexWriterConfig); } http://git-wip-us.apache.org/repos/asf/camel/blob/596b11dc/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java -- diff --git a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java index b9aac5d..0d249be 100644 --- a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java +++ b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java @@ -59,7 +59,7 @@ public class LuceneSearcher { } public Hits search(String searchPhrase, int maxNumberOfHits) throws Exception { -return search(searchPhrase, maxNumberOfHits, Version.LUCENE_4_9); +return search(searchPhrase, maxNumberOfHits, Version.LUCENE_4_10_2); } public
[3/3] camel git commit: CAMEL-8099 Fixed the CS error
CAMEL-8099 Fixed the CS error Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4e636bdd Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4e636bdd Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4e636bdd Branch: refs/heads/master Commit: 4e636bdd89981f67ac3da47b24e0546f632b Parents: 0a8dbaa Author: Willem Jiang willem.ji...@gmail.com Authored: Wed Dec 3 10:14:03 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Wed Dec 3 10:14:03 2014 +0800 -- .../camel/component/properties/DefaultPropertiesParser.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/4e636bdd/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 6a5b80f..0f52985 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 @@ -31,9 +31,8 @@ import org.slf4j.LoggerFactory; * A parser to parse a string which contains property placeholders */ public class DefaultPropertiesParser implements AugmentedPropertyNameAwarePropertiesParser { -protected final Logger log = LoggerFactory.getLogger(getClass()); - private static final String GET_OR_ELSE_TOKEN = :; +protected final Logger log = LoggerFactory.getLogger(getClass()); @Override public String parseUri(String text, Properties properties, String prefixToken, String suffixToken) throws IllegalArgumentException {
[2/3] camel git commit: CAMEL-8101 CAMEL-8100 Fixed the CS error
CAMEL-8101 CAMEL-8100 Fixed the CS error Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0a8dbaa3 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0a8dbaa3 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0a8dbaa3 Branch: refs/heads/master Commit: 0a8dbaa3f6c701fbcbd6aada87e3508e659dee46 Parents: 37eb0b1 Author: Willem Jiang willem.ji...@gmail.com Authored: Wed Dec 3 10:13:22 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Wed Dec 3 10:13:22 2014 +0800 -- .../java/org/apache/camel/component/mongodb/MongoDbEndpoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/0a8dbaa3/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java -- diff --git a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java index b5572da..39bd403 100644 --- a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java +++ b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java @@ -170,7 +170,7 @@ public class MongoDbEndpoint extends DefaultEndpoint { if (db == null) { throw new CamelMongoDbException(Could not initialise MongoDbComponent. Database + database + does not exist.); } -if(collection != null) { +if (collection != null) { if (!createCollection !db.collectionExists(collection)) { throw new CamelMongoDbException(Could not initialise MongoDbComponent. Collection + collection + and createCollection is false.); }
[1/3] camel git commit: Fixed the unit test errors of camel-xmlsecurity
Repository: camel Updated Branches: refs/heads/master 596b11dc8 - 4e636bdd8 Fixed the unit test errors of camel-xmlsecurity Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/37eb0b12 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/37eb0b12 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/37eb0b12 Branch: refs/heads/master Commit: 37eb0b12ea0a01fc4ddb9acd8b229ce84685a2d8 Parents: 596b11d Author: Willem Jiang willem.ji...@gmail.com Authored: Wed Dec 3 10:12:36 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Wed Dec 3 10:12:36 2014 +0800 -- .../camel/model/dataformat/XMLSecurityDataFormat.java | 10 ++ .../dataformat/xmlsecurity/XMLSecurityDataFormat.java | 2 +- .../dataformat/xmlsecurity/XMLSecurityDataFormatTest.java | 6 -- 3 files changed, 11 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/37eb0b12/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java -- diff --git a/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java b/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java index b5e02f6..c2170df 100644 --- a/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java +++ b/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java @@ -61,7 +61,7 @@ public class XMLSecurityDataFormat extends DataFormatDefinition implements Names @XmlAttribute private String mgfAlgorithm; @XmlAttribute -private boolean addKeyValueForEncryptedKey = true; +private Boolean addKeyValueForEncryptedKey; @XmlTransient private KeyStoreParameters keyOrTrustStoreParameters; @@ -276,8 +276,9 @@ public class XMLSecurityDataFormat extends DataFormatDefinition implements Names if (mgfAlgorithm != null) { setProperty(camelContext, dataFormat, mgfAlgorithm, this.getMgfAlgorithm()); } - -setProperty(camelContext, dataFormat, addKeyValueForEncryptedKey, isAddKeyValueForEncryptedKey()); +if (addKeyValueForEncryptedKey != null) { +setProperty(camelContext, dataFormat, addKeyValueForEncryptedKey, isAddKeyValueForEncryptedKey()); +} } public String getXmlCipherAlgorithm() { @@ -369,7 +370,8 @@ public class XMLSecurityDataFormat extends DataFormatDefinition implements Names } public boolean isAddKeyValueForEncryptedKey() { -return addKeyValueForEncryptedKey; +// The default value is true +return addKeyValueForEncryptedKey != null ? addKeyValueForEncryptedKey : true; } public void setAddKeyValueForEncryptedKey(boolean addKeyValueForEncryptedKey) { http://git-wip-us.apache.org/repos/asf/camel/blob/37eb0b12/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java -- diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java index ada0ce8..dc0713f 100755 --- a/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java +++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java @@ -730,7 +730,7 @@ public class XMLSecurityDataFormat implements DataFormat, CamelContextAware { EncryptedKey encryptedKey = keyCipher.encryptKey(document, dataEncryptionkey, mgfAlgorithm, null); if (addKeyValueForEncryptedKey keyEncryptionKey instanceof PublicKey) { KeyInfo keyInfo = new KeyInfo(document); -keyInfo.add(((PublicKey)keyEncryptionKey)); +keyInfo.add((PublicKey)keyEncryptionKey); encryptedKey.setKeyInfo(keyInfo); } http://git-wip-us.apache.org/repos/asf/camel/blob/37eb0b12/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java -- diff --git a/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java b/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java index 19fab79..a9045db 100755 --- a/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java +++
camel git commit: Fixed the unit test errors of camel-xmlsecurity
Repository: camel Updated Branches: refs/heads/camel-2.14.x 9334a870c - 279b7f3d0 Fixed the unit test errors of camel-xmlsecurity Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/279b7f3d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/279b7f3d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/279b7f3d Branch: refs/heads/camel-2.14.x Commit: 279b7f3d0fe12abbc516aecc64979c6c9fb1c754 Parents: 9334a87 Author: Willem Jiang willem.ji...@gmail.com Authored: Wed Dec 3 10:12:36 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Wed Dec 3 10:30:31 2014 +0800 -- .../camel/model/dataformat/XMLSecurityDataFormat.java | 10 ++ .../dataformat/xmlsecurity/XMLSecurityDataFormat.java | 2 +- .../dataformat/xmlsecurity/XMLSecurityDataFormatTest.java | 6 -- 3 files changed, 11 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/279b7f3d/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java -- diff --git a/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java b/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java index b5e02f6..c2170df 100644 --- a/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java +++ b/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java @@ -61,7 +61,7 @@ public class XMLSecurityDataFormat extends DataFormatDefinition implements Names @XmlAttribute private String mgfAlgorithm; @XmlAttribute -private boolean addKeyValueForEncryptedKey = true; +private Boolean addKeyValueForEncryptedKey; @XmlTransient private KeyStoreParameters keyOrTrustStoreParameters; @@ -276,8 +276,9 @@ public class XMLSecurityDataFormat extends DataFormatDefinition implements Names if (mgfAlgorithm != null) { setProperty(camelContext, dataFormat, mgfAlgorithm, this.getMgfAlgorithm()); } - -setProperty(camelContext, dataFormat, addKeyValueForEncryptedKey, isAddKeyValueForEncryptedKey()); +if (addKeyValueForEncryptedKey != null) { +setProperty(camelContext, dataFormat, addKeyValueForEncryptedKey, isAddKeyValueForEncryptedKey()); +} } public String getXmlCipherAlgorithm() { @@ -369,7 +370,8 @@ public class XMLSecurityDataFormat extends DataFormatDefinition implements Names } public boolean isAddKeyValueForEncryptedKey() { -return addKeyValueForEncryptedKey; +// The default value is true +return addKeyValueForEncryptedKey != null ? addKeyValueForEncryptedKey : true; } public void setAddKeyValueForEncryptedKey(boolean addKeyValueForEncryptedKey) { http://git-wip-us.apache.org/repos/asf/camel/blob/279b7f3d/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java -- diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java index b31deae..51e3a96 100755 --- a/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java +++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java @@ -715,7 +715,7 @@ public class XMLSecurityDataFormat implements DataFormat, CamelContextAware { EncryptedKey encryptedKey = keyCipher.encryptKey(document, dataEncryptionkey, mgfAlgorithm, null); if (addKeyValueForEncryptedKey keyEncryptionKey instanceof PublicKey) { KeyInfo keyInfo = new KeyInfo(document); -keyInfo.add(((PublicKey)keyEncryptionKey)); +keyInfo.add((PublicKey)keyEncryptionKey); encryptedKey.setKeyInfo(keyInfo); } http://git-wip-us.apache.org/repos/asf/camel/blob/279b7f3d/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java -- diff --git a/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java b/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java index f29fb6c..458af06 100755 --- a/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java +++