You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/04/09 07:47:40 UTC
[1/4] camel git commit: CAMEL-9600 update fop to 2.1 in karaf features
Repository: camel
Updated Branches:
refs/heads/master 18f3e27d8 -> f1aee991d
CAMEL-9600 update fop to 2.1 in karaf features
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9e18a1d1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9e18a1d1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9e18a1d1
Branch: refs/heads/master
Commit: 9e18a1d157d453c9b24b6a88424802222a2b639b
Parents: 69aea91
Author: syakimovich <s0...@gmail.com>
Authored: Fri Apr 8 14:47:02 2016 +0300
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Apr 9 07:43:40 2016 +0200
----------------------------------------------------------------------
parent/pom.xml | 7 ++++---
platforms/karaf/features/src/main/resources/features.xml | 1 +
2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/9e18a1d1/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 72ff50f..a1b3b3e 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -173,7 +173,7 @@
<felix-scr-annotations-version>1.9.12</felix-scr-annotations-version>
<findbugs-maven-plugin-version>2.5.2</findbugs-maven-plugin-version>
<flatpack-version>3.4.3</flatpack-version>
- <fop-bundle-version>1.1_1</fop-bundle-version>
+ <fop-bundle-version>2.1_1</fop-bundle-version>
<fop-version>2.1</fop-version>
<ftpserver-version>1.0.6</ftpserver-version>
<freemarker-bundle-version>2.3.23_1</freemarker-bundle-version>
@@ -585,12 +585,13 @@
<xerces-version>2.11.0</xerces-version>
<!-- needed to manage the xml-apis version in camel-xmljson -->
<xml-apis-version>1.4.01</xml-apis-version>
+ <xml-apis-ext-version>1.3.04</xml-apis-ext-version>
<xml-resolver-version>1.2</xml-resolver-version>
<xmlbeans-bundle-version>2.6.0_2</xmlbeans-bundle-version>
<xmlbeans-maven-plugin-version>2.3.3</xmlbeans-maven-plugin-version>
<xmlbeans-version>2.6.0</xmlbeans-version>
- <xmlgraphics-commons-bundle-version>1.5_1</xmlgraphics-commons-bundle-version>
- <xmlgraphics-batik-version>1.7</xmlgraphics-batik-version>
+ <xmlgraphics-commons-bundle-version>2.1_1</xmlgraphics-commons-bundle-version>
+ <xmlgraphics-batik-version>1.8</xmlgraphics-batik-version>
<xmlresolver-bundle-version>1.2_5</xmlresolver-bundle-version>
<xmlrpc-version>3.1.3</xmlrpc-version>
<xmlrpc-client-bundle-version>3.1.3_1</xmlrpc-client-bundle-version>
http://git-wip-us.apache.org/repos/asf/camel/blob/9e18a1d1/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 e26b738..a102264 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -487,6 +487,7 @@
<bundle dependency="true">wrap:mvn:org.apache.xmlgraphics/batik-svggen/${xmlgraphics-batik-version}$Bundle-SymbolicName=org.apache.xmlgraphics.batik-svggen&Bundle-Version=${xmlgraphics-batik-version}</bundle>
<bundle dependency="true">wrap:mvn:org.apache.xmlgraphics/batik-extension/${xmlgraphics-batik-version}$Bundle-SymbolicName=org.apache.xmlgraphics.batik-extension&Bundle-Version=${xmlgraphics-batik-version}</bundle>
<bundle dependency="true">wrap:mvn:org.apache.xmlgraphics/batik-ext/${xmlgraphics-batik-version}$Bundle-SymbolicName=org.apache.xmlgraphics.batik-ext&Bundle-Version=${xmlgraphics-batik-version}</bundle>
+ <bundle dependency="true">wrap:mvn:xml-apis/xml-apis-ext/${xml-apis-ext-version}$Bundle-SymbolicName=xml-apis-ext&Bundle-Version=${xml-apis-ext-version}</bundle>
<bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.bcel/${bcel-bundle-version}</bundle>
<bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.fop/${fop-bundle-version}</bundle>
<bundle>mvn:org.apache.camel/camel-fop/${project.version}</bundle>
[2/4] camel git commit: CAMEL-9600 update fop from 1.1 to 2.1
Posted by da...@apache.org.
CAMEL-9600 update fop from 1.1 to 2.1
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/69aea912
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/69aea912
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/69aea912
Branch: refs/heads/master
Commit: 69aea912f411c6609a7512da2de14e47d1796886
Parents: 8537bdd
Author: syakimovich <s0...@gmail.com>
Authored: Thu Apr 7 23:10:12 2016 +0300
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Apr 9 07:43:40 2016 +0200
----------------------------------------------------------------------
.../camel/component/fop/FopConfigException.java | 34 ++++++++++++++++++++
.../apache/camel/component/fop/FopEndpoint.java | 19 +++++------
parent/pom.xml | 2 +-
3 files changed, 43 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/69aea912/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopConfigException.java
----------------------------------------------------------------------
diff --git a/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopConfigException.java b/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopConfigException.java
new file mode 100644
index 0000000..dc5343a
--- /dev/null
+++ b/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopConfigException.java
@@ -0,0 +1,34 @@
+/**
+ * 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.fop;
+
+import org.apache.camel.RuntimeCamelException;
+
+/**
+ * Fop configuration exception.
+ */
+public class FopConfigException extends RuntimeCamelException {
+ private static final long serialVersionUID = 1L;
+
+ public FopConfigException(Throwable e) {
+ super(e);
+ }
+
+ public FopConfigException(String message) {
+ super(message);
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/69aea912/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopEndpoint.java b/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopEndpoint.java
index 42df6ef..5ba7fcc 100644
--- a/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopEndpoint.java
+++ b/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopEndpoint.java
@@ -17,6 +17,7 @@
package org.apache.camel.component.fop;
import java.io.InputStream;
+import java.net.URI;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
@@ -94,23 +95,19 @@ public class FopEndpoint extends DefaultEndpoint {
this.fopFactory = fopFactory;
}
- private static void updateConfigurations(InputStream is, FopFactory fopFactory) throws Exception {
- DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
- Configuration cfg = cfgBuilder.build(is);
- fopFactory.setUserConfig(cfg);
- }
@Override
protected void doStart() throws Exception {
super.doStart();
- if (fopFactory == null) {
- fopFactory = FopFactory.newInstance();
- }
-
- if (userConfigURL != null) {
+ if (fopFactory == null && userConfigURL == null) {
+ fopFactory = FopFactory.newInstance(new URI("./"));
+ } else if (fopFactory != null && userConfigURL != null) {
+ throw new FopConfigException("More than one configuration. " +
+ "You can configure fop either by config file or by supplying FopFactory but not both.");
+ } else if (fopFactory == null && userConfigURL != null) {
InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(), userConfigURL);
- updateConfigurations(is, fopFactory);
+ fopFactory = FopFactory.newInstance(new URI(userConfigURL), is);
}
}
}
http://git-wip-us.apache.org/repos/asf/camel/blob/69aea912/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 4dbd4ab..72ff50f 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -174,7 +174,7 @@
<findbugs-maven-plugin-version>2.5.2</findbugs-maven-plugin-version>
<flatpack-version>3.4.3</flatpack-version>
<fop-bundle-version>1.1_1</fop-bundle-version>
- <fop-version>1.1</fop-version>
+ <fop-version>2.1</fop-version>
<ftpserver-version>1.0.6</ftpserver-version>
<freemarker-bundle-version>2.3.23_1</freemarker-bundle-version>
<freemarker-version>2.3.23</freemarker-version>
[4/4] camel git commit: Fixed CS. This closes #936. This closes #937.
Posted by da...@apache.org.
Fixed CS. This closes #936. This closes #937.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f1aee991
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f1aee991
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f1aee991
Branch: refs/heads/master
Commit: f1aee991d0f77272baf2ea66ef820a25e35bab70
Parents: 9e18a1d
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Apr 9 07:47:30 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Apr 9 07:47:30 2016 +0200
----------------------------------------------------------------------
.../main/java/org/apache/camel/component/fop/FopEndpoint.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/f1aee991/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopEndpoint.java b/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopEndpoint.java
index 5ba7fcc..7967d44 100644
--- a/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopEndpoint.java
+++ b/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopEndpoint.java
@@ -103,8 +103,8 @@ public class FopEndpoint extends DefaultEndpoint {
if (fopFactory == null && userConfigURL == null) {
fopFactory = FopFactory.newInstance(new URI("./"));
} else if (fopFactory != null && userConfigURL != null) {
- throw new FopConfigException("More than one configuration. " +
- "You can configure fop either by config file or by supplying FopFactory but not both.");
+ throw new FopConfigException("More than one configuration. "
+ + "You can configure fop either by config file or by supplying FopFactory but not both.");
} else if (fopFactory == null && userConfigURL != null) {
InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(), userConfigURL);
fopFactory = FopFactory.newInstance(new URI(userConfigURL), is);
[3/4] camel git commit: [CAMEL-9842] Expose additional endpoint
configuration options to UndertowHost handler methods
Posted by da...@apache.org.
[CAMEL-9842] Expose additional endpoint configuration options to UndertowHost handler methods
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8537bdd9
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8537bdd9
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8537bdd9
Branch: refs/heads/master
Commit: 8537bdd99bdfe623083002bf011f9c326451cb55
Parents: 18f3e27
Author: James Netherton <ja...@gmail.com>
Authored: Fri Apr 8 16:33:52 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Apr 9 07:43:40 2016 +0200
----------------------------------------------------------------------
.../undertow/HttpHandlerRegistrationInfo.java | 50 ++++++++++++++++++++
.../component/undertow/UndertowConsumer.java | 29 ++++++++----
.../camel/component/undertow/UndertowHost.java | 10 ++--
3 files changed, 76 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/8537bdd9/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/HttpHandlerRegistrationInfo.java
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/HttpHandlerRegistrationInfo.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/HttpHandlerRegistrationInfo.java
new file mode 100644
index 0000000..85a1874
--- /dev/null
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/HttpHandlerRegistrationInfo.java
@@ -0,0 +1,50 @@
+/**
+ * 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.undertow;
+
+import java.net.URI;
+
+public class HttpHandlerRegistrationInfo {
+
+ private Boolean matchOnUriPrefix;
+ private String methodRestrict;
+ private URI uri;
+
+ public String getMethodRestrict() {
+ return methodRestrict;
+ }
+
+ public void setMethodRestrict(String methodRestrict) {
+ this.methodRestrict = methodRestrict;
+ }
+
+ public URI getUri() {
+ return uri;
+ }
+
+ public void setUri(URI uri) {
+ this.uri = uri;
+ }
+
+ public Boolean isMatchOnUriPrefix() {
+ return matchOnUriPrefix;
+ }
+
+ public void setMatchOnUriPrefix(Boolean matchOnUriPrefix) {
+ this.matchOnUriPrefix = matchOnUriPrefix;
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/8537bdd9/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowConsumer.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowConsumer.java
index f7d9ace..49efe0a 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowConsumer.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowConsumer.java
@@ -34,6 +34,7 @@ public class UndertowConsumer extends DefaultConsumer {
private static final Logger LOG = LoggerFactory.getLogger(UndertowConsumer.class);
private UndertowHost undertowHost;
+ private HttpHandlerRegistrationInfo registrationInfo;
public UndertowConsumer(UndertowEndpoint endpoint, Processor processor) {
super(endpoint, processor);
@@ -61,28 +62,40 @@ public class UndertowConsumer extends DefaultConsumer {
LOG.debug("Undertow consumer is starting");
getEndpoint().getComponent().registerConsumer(this);
- URI httpUri = getEndpoint().getHttpURI();
UndertowHost host = getUndertowHost();
HttpCamelHandler httpCamelHandler = new HttpCamelHandler();
httpCamelHandler.connectConsumer(this);
- host.validateEndpointURI(httpUri);
- host.registerHandler(httpUri.getPath(), httpCamelHandler);
+ HttpHandlerRegistrationInfo registrationInfo = getHttpHandlerRegistrationInfo();
+
+ host.validateEndpointURI(registrationInfo.getUri());
+ host.registerHandler(registrationInfo, httpCamelHandler);
}
@Override
protected void doStop() {
LOG.debug("Undertow consumer is stopping");
- URI httpUri = getEndpoint().getHttpURI();
+ HttpHandlerRegistrationInfo registrationInfo = getHttpHandlerRegistrationInfo();
UndertowHost host = getUndertowHost();
-
- host.unregisterHandler(httpUri.getPath());
+ host.unregisterHandler(registrationInfo);
getEndpoint().getComponent().unregisterConsumer(this);
}
+ private HttpHandlerRegistrationInfo getHttpHandlerRegistrationInfo() {
+ if (registrationInfo == null) {
+ UndertowEndpoint endpoint = getEndpoint();
+
+ registrationInfo = new HttpHandlerRegistrationInfo();
+ registrationInfo.setUri(endpoint.getHttpURI());
+ registrationInfo.setMethodRestrict(endpoint.getHttpMethodRestrict());
+ registrationInfo.setMatchOnUriPrefix(endpoint.getMatchOnUriPrefix());
+ }
+ return registrationInfo;
+ }
+
class DefaultUndertowHost implements UndertowHost {
@Override
@@ -91,12 +104,12 @@ public class UndertowConsumer extends DefaultConsumer {
}
@Override
- public void registerHandler(String path, HttpHandler handler) {
+ public void registerHandler(HttpHandlerRegistrationInfo registrationInfo, HttpHandler handler) {
getEndpoint().getComponent().startServer(UndertowConsumer.this);
}
@Override
- public void unregisterHandler(String path) {
+ public void unregisterHandler(HttpHandlerRegistrationInfo registrationInfo) {
// do nothing
}
}
http://git-wip-us.apache.org/repos/asf/camel/blob/8537bdd9/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowHost.java
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowHost.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowHost.java
index bd79986..1609ab6 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowHost.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowHost.java
@@ -32,12 +32,12 @@ public interface UndertowHost {
void validateEndpointURI(URI httpURI);
/**
- * Register a handler on the given path
+ * Register a handler with the given {@link HttpHandlerRegistrationInfo}
*/
- void registerHandler(String path, HttpHandler handler);
+ void registerHandler(HttpHandlerRegistrationInfo registrationInfo, HttpHandler handler);
/**
- * Unregister a handler on the given path
+ * Unregister a handler with the given {@link HttpHandlerRegistrationInfo}
*/
- void unregisterHandler(String path);
-}
\ No newline at end of file
+ void unregisterHandler(HttpHandlerRegistrationInfo registrationInfo);
+}