Author: jstrachan
Date: Tue May  1 06:11:21 2007
New Revision: 534054

URL: http://svn.apache.org/viewvc?view=rev&rev=534054
Log:
Added an XSLT processor and refactored the XPath and XSLT code into an xml 
package

Added:
    
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ExpectedBodyTypeException.java
   (with props)
    
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/RuntimeTransformException.java
   (with props)
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/
    
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java
   (contents, props changed)
      - copied, changed from r533971, 
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xpath/XPathTest.java
Removed:
    
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xpath/
    
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xpath/
Modified:
    
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/RuntimeExpressionException.java

Added: 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ExpectedBodyTypeException.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ExpectedBodyTypeException.java?view=auto&rev=534054
==============================================================================
--- 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ExpectedBodyTypeException.java
 (added)
+++ 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ExpectedBodyTypeException.java
 Tue May  1 06:11:21 2007
@@ -0,0 +1,42 @@
+/**
+ *
+ * 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;
+
+/**
+ * Thrown if the body could not be converted to the required type
+ *
+ * @version $Revision: 1.1 $
+ */
+public class ExpectedBodyTypeException extends RuntimeCamelException {
+    private final Exchange exchange;
+    private final Class expectedBodyType;
+
+    public ExpectedBodyTypeException(Exchange exchange, Class 
expectedBodyType) {
+        super("Could not extract IN message body as type: " + expectedBodyType 
+ " body is: " + exchange.getIn().getBody());
+        this.exchange = exchange;
+        this.expectedBodyType = expectedBodyType;
+    }
+
+    public Exchange getExchange() {
+        return exchange;
+    }
+
+    public Class getExpectedBodyType() {
+        return expectedBodyType;
+    }
+}

Propchange: 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ExpectedBodyTypeException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/RuntimeExpressionException.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/RuntimeExpressionException.java?view=diff&rev=534054&r1=534053&r2=534054
==============================================================================
--- 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/RuntimeExpressionException.java
 (original)
+++ 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/RuntimeExpressionException.java
 Tue May  1 06:11:21 2007
@@ -18,6 +18,8 @@
 package org.apache.camel;
 
 /**
+ * Thrown if an expression evaluation fails
+ * 
  * @version $Revision$
  */
 public class RuntimeExpressionException extends RuntimeCamelException {

Added: 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/RuntimeTransformException.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/RuntimeTransformException.java?view=auto&rev=534054
==============================================================================
--- 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/RuntimeTransformException.java
 (added)
+++ 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/RuntimeTransformException.java
 Tue May  1 06:11:21 2007
@@ -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;
+
+/**
+ * Thrown if a message transformation fails
+ * 
+ * @version $Revision: 521156 $
+ */
+public class RuntimeTransformException extends RuntimeCamelException {
+
+       private static final long serialVersionUID = -8417806626073055262L;
+
+    public RuntimeTransformException(String message) {
+        super(message);
+    }
+
+    public RuntimeTransformException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public RuntimeTransformException(Throwable cause) {
+        super(cause);
+    }
+}

Propchange: 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/RuntimeTransformException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: 
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java
 (from r533971, 
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xpath/XPathTest.java)
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java?view=diff&rev=534054&p1=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xpath/XPathTest.java&r1=533971&p2=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java&r2=534054
==============================================================================
--- 
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xpath/XPathTest.java
 (original)
+++ 
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java
 Tue May  1 06:11:21 2007
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.builder.xpath;
+package org.apache.camel.builder.xml;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
@@ -23,7 +23,8 @@
 import org.apache.camel.Message;
 import org.apache.camel.Predicate;
 import org.apache.camel.TestSupport;
-import static org.apache.camel.builder.xpath.XPathBuilder.*;
+import static org.apache.camel.builder.xml.XPathBuilder.*;
+import org.apache.camel.builder.xml.XPathBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.impl.DefaultExchange;
 

Propchange: 
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: 
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain


Reply via email to