Repository: camel
Updated Branches:
  refs/heads/master 32fa4eabf -> b4511c596


camel-jing component uses jing as component names.


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

Branch: refs/heads/master
Commit: b4511c5964494d5786f9ea21ccbfd98d9c3dc6be
Parents: 32fa4ea
Author: Claus Ibsen <davscl...@apache.org>
Authored: Wed May 6 15:49:12 2015 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Wed May 6 15:49:12 2015 +0200

----------------------------------------------------------------------
 .../component/validator/jing/JingEndpoint.java  | 15 +++++---
 .../jing/RelaxNGCompactSyntaxComponent.java     | 38 --------------------
 .../services/org/apache/camel/component/jing    | 18 ++++++++++
 .../services/org/apache/camel/component/rnc     | 18 ----------
 .../services/org/apache/camel/component/rng     | 18 ----------
 .../services/org/apache/camel/component/jing    | 18 ----------
 .../services/org/apache/camel/component/rnc     | 18 ----------
 .../component/validator/jing/rnc-context.xml    |  3 +-
 .../component/validator/jing/rng-context.xml    |  3 +-
 .../camel/component/jira/JIRAEndpoint.java      | 28 ++++++++++++---
 10 files changed, 54 insertions(+), 123 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b4511c59/components/camel-jing/src/main/java/org/apache/camel/component/validator/jing/JingEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-jing/src/main/java/org/apache/camel/component/validator/jing/JingEndpoint.java
 
b/components/camel-jing/src/main/java/org/apache/camel/component/validator/jing/JingEndpoint.java
index daeee19..ba71265 100644
--- 
a/components/camel-jing/src/main/java/org/apache/camel/component/validator/jing/JingEndpoint.java
+++ 
b/components/camel-jing/src/main/java/org/apache/camel/component/validator/jing/JingEndpoint.java
@@ -18,12 +18,9 @@ package org.apache.camel.component.validator.jing;
 
 import java.io.InputStream;
 
-import org.xml.sax.InputSource;
-
 import com.thaiopensource.relaxng.SchemaFactory;
 import com.thaiopensource.validate.Schema;
 import com.thaiopensource.xml.sax.Jaxp11XMLReaderCreator;
-
 import org.apache.camel.Component;
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
@@ -35,8 +32,7 @@ import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.ResourceHelper;
-
-
+import org.xml.sax.InputSource;
 
 @UriEndpoint(scheme = "jing", title = "Jing", syntax = "jing:resourceUri", 
producerOnly = true, label = "validation")
 public class JingEndpoint extends DefaultEndpoint {
@@ -75,6 +71,9 @@ public class JingEndpoint extends DefaultEndpoint {
         return resourceUri;
     }
 
+    /**
+     * URL to a local resource on the classpath or a full URL to a remote 
resource or resource on the file system which contains the schema to validate 
against.
+     */
     public void setResourceUri(String resourceUri) {
         this.resourceUri = resourceUri;
     }
@@ -83,6 +82,12 @@ public class JingEndpoint extends DefaultEndpoint {
         return compactSyntax;
     }
 
+    /**
+     * Whether to validate using RelaxNG compact syntax or not.
+     * <p/>
+     * By default this is <tt>false</tt> for using RelaxNG XML Syntax (rng)
+     * And <tt>true</tt> is for using  RelaxNG Compact Syntax (rnc)
+     */
     public void setCompactSyntax(boolean compactSyntax) {
         this.compactSyntax = compactSyntax;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/b4511c59/components/camel-jing/src/main/java/org/apache/camel/component/validator/jing/RelaxNGCompactSyntaxComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-jing/src/main/java/org/apache/camel/component/validator/jing/RelaxNGCompactSyntaxComponent.java
 
b/components/camel-jing/src/main/java/org/apache/camel/component/validator/jing/RelaxNGCompactSyntaxComponent.java
deleted file mode 100644
index 6771888..0000000
--- 
a/components/camel-jing/src/main/java/org/apache/camel/component/validator/jing/RelaxNGCompactSyntaxComponent.java
+++ /dev/null
@@ -1,38 +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.validator.jing;
-
-import java.util.Map;
-
-import org.apache.camel.Endpoint;
-
-/**
- * A component for validating the XML payload using
- * <a 
href="http://www.oasis-open.org/committees/relax-ng/compact-20021121.html";>RelaxNG
 Compact Syntax</a> using the
- * <a href="http://www.thaiopensource.com/relaxng/jing.html";>Jing library</a>
- *
- * @version 
- */
-public class RelaxNGCompactSyntaxComponent extends JingComponent {
-
-    @Override
-    protected Endpoint createEndpoint(String uri, String remaining, 
Map<String, Object> parameters) throws Exception {
-        JingEndpoint endpoint = (JingEndpoint) super.createEndpoint(uri, 
remaining, parameters);
-        endpoint.setCompactSyntax(true);
-        return endpoint;
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/b4511c59/components/camel-jing/src/main/resources/META-INF/services/org/apache/camel/component/jing
----------------------------------------------------------------------
diff --git 
a/components/camel-jing/src/main/resources/META-INF/services/org/apache/camel/component/jing
 
b/components/camel-jing/src/main/resources/META-INF/services/org/apache/camel/component/jing
new file mode 100644
index 0000000..74c8810
--- /dev/null
+++ 
b/components/camel-jing/src/main/resources/META-INF/services/org/apache/camel/component/jing
@@ -0,0 +1,18 @@
+#
+# 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.
+#
+
+class=org.apache.camel.component.validator.jing.JingComponent
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/b4511c59/components/camel-jing/src/main/resources/META-INF/services/org/apache/camel/component/rnc
----------------------------------------------------------------------
diff --git 
a/components/camel-jing/src/main/resources/META-INF/services/org/apache/camel/component/rnc
 
b/components/camel-jing/src/main/resources/META-INF/services/org/apache/camel/component/rnc
deleted file mode 100644
index 6b87d26..0000000
--- 
a/components/camel-jing/src/main/resources/META-INF/services/org/apache/camel/component/rnc
+++ /dev/null
@@ -1,18 +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.
-#
-
-class=org.apache.camel.component.validator.jing.RelaxNGCompactSyntaxComponent
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/b4511c59/components/camel-jing/src/main/resources/META-INF/services/org/apache/camel/component/rng
----------------------------------------------------------------------
diff --git 
a/components/camel-jing/src/main/resources/META-INF/services/org/apache/camel/component/rng
 
b/components/camel-jing/src/main/resources/META-INF/services/org/apache/camel/component/rng
deleted file mode 100644
index 74c8810..0000000
--- 
a/components/camel-jing/src/main/resources/META-INF/services/org/apache/camel/component/rng
+++ /dev/null
@@ -1,18 +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.
-#
-
-class=org.apache.camel.component.validator.jing.JingComponent
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/b4511c59/components/camel-jing/src/test/resources/META-INF/services/org/apache/camel/component/jing
----------------------------------------------------------------------
diff --git 
a/components/camel-jing/src/test/resources/META-INF/services/org/apache/camel/component/jing
 
b/components/camel-jing/src/test/resources/META-INF/services/org/apache/camel/component/jing
deleted file mode 100644
index 74c8810..0000000
--- 
a/components/camel-jing/src/test/resources/META-INF/services/org/apache/camel/component/jing
+++ /dev/null
@@ -1,18 +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.
-#
-
-class=org.apache.camel.component.validator.jing.JingComponent
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/b4511c59/components/camel-jing/src/test/resources/META-INF/services/org/apache/camel/component/rnc
----------------------------------------------------------------------
diff --git 
a/components/camel-jing/src/test/resources/META-INF/services/org/apache/camel/component/rnc
 
b/components/camel-jing/src/test/resources/META-INF/services/org/apache/camel/component/rnc
deleted file mode 100644
index 6b87d26..0000000
--- 
a/components/camel-jing/src/test/resources/META-INF/services/org/apache/camel/component/rnc
+++ /dev/null
@@ -1,18 +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.
-#
-
-class=org.apache.camel.component.validator.jing.RelaxNGCompactSyntaxComponent
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/b4511c59/components/camel-jing/src/test/resources/org/apache/camel/component/validator/jing/rnc-context.xml
----------------------------------------------------------------------
diff --git 
a/components/camel-jing/src/test/resources/org/apache/camel/component/validator/jing/rnc-context.xml
 
b/components/camel-jing/src/test/resources/org/apache/camel/component/validator/jing/rnc-context.xml
index 224711f..e22525e 100644
--- 
a/components/camel-jing/src/test/resources/org/apache/camel/component/validator/jing/rnc-context.xml
+++ 
b/components/camel-jing/src/test/resources/org/apache/camel/component/validator/jing/rnc-context.xml
@@ -27,9 +27,8 @@
         <route>
             <from uri="direct:start"/>
             <doTry>
-                <to 
uri="rnc:org/apache/camel/component/validator/jing/schema.rnc"/>
+                <to 
uri="jing:org/apache/camel/component/validator/jing/schema.rnc?compactSyntax=true"/>
                 <to uri="mock:valid"/>
-
                 <doCatch>
                     <exception>org.apache.camel.ValidationException</exception>
                     <to uri="mock:invalid"/>

http://git-wip-us.apache.org/repos/asf/camel/blob/b4511c59/components/camel-jing/src/test/resources/org/apache/camel/component/validator/jing/rng-context.xml
----------------------------------------------------------------------
diff --git 
a/components/camel-jing/src/test/resources/org/apache/camel/component/validator/jing/rng-context.xml
 
b/components/camel-jing/src/test/resources/org/apache/camel/component/validator/jing/rng-context.xml
index 9343404..e0d34a3 100644
--- 
a/components/camel-jing/src/test/resources/org/apache/camel/component/validator/jing/rng-context.xml
+++ 
b/components/camel-jing/src/test/resources/org/apache/camel/component/validator/jing/rng-context.xml
@@ -26,9 +26,8 @@
         <route>
             <from uri="direct:start"/>
             <doTry>
-                <to 
uri="rng:org/apache/camel/component/validator/jing/schema.rng"/>
+                <to 
uri="jing:org/apache/camel/component/validator/jing/schema.rng"/>
                 <to uri="mock:valid"/>
-
                 <doCatch>
                     <exception>org.apache.camel.ValidationException</exception>
                     <to uri="mock:invalid"/>

http://git-wip-us.apache.org/repos/asf/camel/blob/b4511c59/components/camel-jira/src/main/java/org/apache/camel/component/jira/JIRAEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-jira/src/main/java/org/apache/camel/component/jira/JIRAEndpoint.java
 
b/components/camel-jira/src/main/java/org/apache/camel/component/jira/JIRAEndpoint.java
index 008f7ff..faa23c7 100644
--- 
a/components/camel-jira/src/main/java/org/apache/camel/component/jira/JIRAEndpoint.java
+++ 
b/components/camel-jira/src/main/java/org/apache/camel/component/jira/JIRAEndpoint.java
@@ -48,15 +48,15 @@ public class JIRAEndpoint extends DefaultEndpoint {
 
     @UriPath @Metadata(required = "true")
     private JIRAType type;
-    @UriParam
+    @UriParam @Metadata(required = "true")
     private String serverUrl;
     @UriParam
     private String username;
     @UriParam
     private String password;
-    @UriParam
+    @UriParam(label = "consumer")
     private String jql;
-    @UriParam(defaultValue = "6000")
+    @UriParam(label = "consumer", defaultValue = "6000")
     private int delay = 6000;
 
     public JIRAEndpoint(String uri, JIRAComponent component) {
@@ -87,6 +87,9 @@ public class JIRAEndpoint extends DefaultEndpoint {
         return type;
     }
 
+    /**
+     * Operation to perform such as create a new issue or a new comment
+     */
     public void setType(JIRAType type) {
         this.type = type;
     }
@@ -95,6 +98,9 @@ public class JIRAEndpoint extends DefaultEndpoint {
         return serverUrl;
     }
 
+    /**
+     * URL to the JIRA server
+     */
     public void setServerUrl(String serverUrl) {
         this.serverUrl = serverUrl;
     }
@@ -103,6 +109,9 @@ public class JIRAEndpoint extends DefaultEndpoint {
         return username;
     }
 
+    /**
+     * Username for login
+     */
     public void setUsername(String username) {
         this.username = username;
     }
@@ -111,6 +120,9 @@ public class JIRAEndpoint extends DefaultEndpoint {
         return password;
     }
 
+    /**
+     * Password for login
+     */
     public void setPassword(String password) {
         this.password = password;
     }
@@ -119,6 +131,11 @@ public class JIRAEndpoint extends DefaultEndpoint {
         return jql;
     }
 
+    /**
+     * JQL is the query language from JIRA which allows you to retrieve the 
data you want.
+     * For example <tt>jql=project=MyProject</tt>
+     * Where MyProject is the product key in Jira.
+     */
     public void setJql(String jql) {
         this.jql = jql;
     }
@@ -126,7 +143,10 @@ public class JIRAEndpoint extends DefaultEndpoint {
     public int getDelay() {
         return delay;
     }
-     
+
+    /**
+     * Delay in seconds when querying JIRA using the consumer.
+     */
     public void setDelay(int delay) {
         this.delay = delay;
     }

Reply via email to