camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/3] git commit: CAMEL-6238: camel-jsonpath component.
Date Sun, 06 Oct 2013 10:42:40 GMT
CAMEL-6238: camel-jsonpath component.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/969d8814
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/969d8814
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/969d8814

Branch: refs/heads/master
Commit: 969d88146d282c1ddaa6c7f8c9fb2ecc79379850
Parents: 794ee2c
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Oct 6 12:41:10 2013 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Oct 6 12:42:30 2013 +0200

----------------------------------------------------------------------
 apache-camel/pom.xml                            |  4 ++
 .../src/main/descriptors/common-bin.xml         |  1 +
 .../org/apache/camel/jsonpath/JSonPath.java     | 40 ++++++++++++++++++++
 parent/pom.xml                                  |  6 +++
 .../features/src/main/resources/features.xml    |  5 +++
 5 files changed, 56 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/969d8814/apache-camel/pom.xml
----------------------------------------------------------------------
diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml
index f7c05c0..18c4d4a 100644
--- a/apache-camel/pom.xml
+++ b/apache-camel/pom.xml
@@ -313,6 +313,10 @@
     </dependency>
     <dependency>
       <groupId>org.apache.camel</groupId>
+      <artifactId>camel-jsonpath</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
       <artifactId>camel-juel</artifactId>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/camel/blob/969d8814/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 db1a9c6..8083d23 100644
--- a/apache-camel/src/main/descriptors/common-bin.xml
+++ b/apache-camel/src/main/descriptors/common-bin.xml
@@ -91,6 +91,7 @@
         <include>org.apache.camel:camel-josql</include>
         <include>org.apache.camel:camel-jpa</include>
         <include>org.apache.camel:camel-jsch</include>
+        <include>org.apache.camel:camel-jsonpath</include>
         <include>org.apache.camel:camel-jt400</include>
         <include>org.apache.camel:camel-juel</include>
         <include>org.apache.camel:camel-jxpath</include>

http://git-wip-us.apache.org/repos/asf/camel/blob/969d8814/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JSonPath.java
----------------------------------------------------------------------
diff --git a/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JSonPath.java
b/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JSonPath.java
new file mode 100644
index 0000000..601d64c
--- /dev/null
+++ b/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JSonPath.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.jsonpath;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.camel.language.LanguageAnnotation;
+
+/**
+ * An annotation used to inject a <a href="http://commons.apache.org/jsonpath/">JSon
Path</a>
+ * expression into a method parameter when using
+ * <a href="http://camel.apache.org/bean-integration.html">Bean Integration</a>
+ *
+ * @version
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER })
+@LanguageAnnotation(language = "jsonpath")
+public @interface JSonPath {
+    String value();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/969d8814/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 5f5c049..8c7ddb0 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -236,6 +236,7 @@
     <jsonlib-bundle-version>2.4_1</jsonlib-bundle-version>
     <jsonlib-version>2.4</jsonlib-version>
     <json-path-version>0.9.0</json-path-version>
+    <json-smart-version>1.2</json-smart-version>
     <jsp-api-2.1-version>1.0.1</jsp-api-2.1-version>
     <jsmpp-bundle-version>2.1.0_4</jsmpp-bundle-version>
     <jt400-version>6.7</jt400-version>
@@ -838,6 +839,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
+        <artifactId>camel-jsonpath</artifactId>
+        <version>${project.version}</version>
+      </dependency>      
+      <dependency>
+        <groupId>org.apache.camel</groupId>
         <artifactId>camel-jt400</artifactId>
         <version>${project.version}</version>
       </dependency>

http://git-wip-us.apache.org/repos/asf/camel/blob/969d8814/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 e7f59ed..c88f011 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -607,6 +607,11 @@
     <feature version='${project.version}'>camel-ftp</feature>
     <bundle>mvn:org.apache.camel/camel-jsch/${project.version}</bundle>
   </feature>
+  <feature name='camel-jsonpath' version='${project.version}' resolver='(obr)' start-level='50'>
+    <bundle>mvn:com.jayway.jsonpath/json-path/${json-path-version}</bundle>
+    <bundle>mvn:net.minidev/json-smart/${json-smart-version}</bundle>
+    <bundle>mvn:org.apache.camel/camel-jsonpath/${project.version}</bundle>
+  </feature>
   <feature name='camel-jt400' version='${project.version}' resolver='(obr)' start-level='50'>
     <bundle dependency='true'>mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/${geronimo-servlet-25-spec-version}</bundle>
     <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jt400/${jt400-bundle-version}</bundle>


Mime
View raw message