servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r654787 - in /servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression: JAXPBooleanXPathExpression.java JAXPNodeSetXPathExpression.java JAXPStringXPathExpression.java
Date Fri, 09 May 2008 12:46:56 GMT
Author: gnodet
Date: Fri May  9 05:46:55 2008
New Revision: 654787

URL: http://svn.apache.org/viewvc?rev=654787&view=rev
Log:
SM-1307: fix jaxp expressions

Modified:
    servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JAXPBooleanXPathExpression.java
    servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JAXPNodeSetXPathExpression.java
    servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JAXPStringXPathExpression.java

Modified: servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JAXPBooleanXPathExpression.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JAXPBooleanXPathExpression.java?rev=654787&r1=654786&r2=654787&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JAXPBooleanXPathExpression.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JAXPBooleanXPathExpression.java
Fri May  9 05:46:55 2008
@@ -20,6 +20,7 @@
 import javax.jbi.messaging.MessagingException;
 import javax.jbi.messaging.NormalizedMessage;
 import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
 
 /**
  * Evaluates an XPath expression and coerces the result into a String.
@@ -37,6 +38,10 @@
         super(xpath);
     }
 
+    public Object evaluateXPath(Object object) throws XPathExpressionException {
+        return getXPathExpression().evaluate(object, XPathConstants.BOOLEAN);
+    }
+
     public Object evaluate(MessageExchange exchange, NormalizedMessage message) throws MessagingException
{
         return evaluate(exchange, message, XPathConstants.BOOLEAN);
     }

Modified: servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JAXPNodeSetXPathExpression.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JAXPNodeSetXPathExpression.java?rev=654787&r1=654786&r2=654787&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JAXPNodeSetXPathExpression.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JAXPNodeSetXPathExpression.java
Fri May  9 05:46:55 2008
@@ -20,6 +20,7 @@
 import javax.jbi.messaging.MessagingException;
 import javax.jbi.messaging.NormalizedMessage;
 import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
 
 /**
  * Evaluates an XPath expression and coerces the result into a String.
@@ -35,6 +36,10 @@
         super(xpath);
     }
 
+    public Object evaluateXPath(Object object) throws XPathExpressionException {
+        return getXPathExpression().evaluate(object, XPathConstants.NODESET);
+    }
+
     public Object evaluate(MessageExchange exchange, NormalizedMessage message) throws MessagingException
{
         return evaluate(exchange, message, XPathConstants.NODESET);
     }

Modified: servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JAXPStringXPathExpression.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JAXPStringXPathExpression.java?rev=654787&r1=654786&r2=654787&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JAXPStringXPathExpression.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JAXPStringXPathExpression.java
Fri May  9 05:46:55 2008
@@ -20,6 +20,7 @@
 import javax.jbi.messaging.MessagingException;
 import javax.jbi.messaging.NormalizedMessage;
 import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
 
 /**
  * Evaluates an XPath expression and coerces the result into a String.
@@ -37,6 +38,10 @@
         super(xpath);
     }
 
+    public Object evaluateXPath(Object object) throws XPathExpressionException {
+        return getXPathExpression().evaluate(object, XPathConstants.STRING);
+    }
+
     public Object evaluate(MessageExchange exchange, NormalizedMessage message) throws MessagingException
{
         return evaluate(exchange, message, XPathConstants.STRING);
     }



Mime
View raw message