Author: ningjiang
Date: Mon Aug 27 07:30:18 2012
New Revision: 1377593
URL: http://svn.apache.org/viewvc?rev=1377593&view=rev
Log:
CAMEL-5503 renamed the annotation attribute header to headerName
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/XPathAnnotationExpressionFactory.java
camel/trunk/camel-core/src/main/java/org/apache/camel/language/XPath.java
camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithXPathInjectionUsingHeaderValueTest.java
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/XPathAnnotationExpressionFactory.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/XPathAnnotationExpressionFactory.java?rev=1377593&r1=1377592&r2=1377593&view=diff
==============================================================================
---
camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/XPathAnnotationExpressionFactory.java
(original)
+++
camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/XPathAnnotationExpressionFactory.java
Mon Aug 27 07:30:18 2012
@@ -78,7 +78,7 @@ public class XPathAnnotationExpressionFa
protected String getHeaderName(Annotation annotation) {
String headerValue = null;
try {
- headerValue = (String)getAnnotationObjectValue(annotation,
"header");
+ headerValue = (String)getAnnotationObjectValue(annotation,
"headerName");
} catch (Exception e) {
// Do Nothing
}
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/language/XPath.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/language/XPath.java?rev=1377593&r1=1377592&r2=1377593&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/language/XPath.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/language/XPath.java
Mon Aug 27 07:30:18 2012
@@ -38,7 +38,7 @@ public @interface XPath {
/**
* @return The XPath which will be applied
*/
- String value();
+ String value();
NamespacePrefix[] namespaces() default {
@NamespacePrefix(prefix = "soap", uri =
"http://www.w3.org/2003/05/soap-envelope"),
@@ -48,7 +48,7 @@ public @interface XPath {
/**
* @return The name of the header we want to apply the XPath expression to.
- * If this is empty then the XPath expression will
be applied to the body instead.
+ * If this is empty then the XPath expression will be applied to the body
instead.
*/
- String header() default "";
+ String headerName() default "";
}
\ No newline at end of file
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithXPathInjectionUsingHeaderValueTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithXPathInjectionUsingHeaderValueTest.java?rev=1377593&r1=1377592&r2=1377593&view=diff
==============================================================================
---
camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithXPathInjectionUsingHeaderValueTest.java
(original)
+++
camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithXPathInjectionUsingHeaderValueTest.java
Mon Aug 27 07:30:18 2012
@@ -54,8 +54,8 @@ public class BeanWithXPathInjectionUsing
@Handler
public void handler(@XPath("//response/text()") String response,
- @XPath(header = "invoiceDetails", value =
"//invoice/person/name/text()") String userName,
- @XPath(header = "invoiceDetails", value =
"//invoice/person/date", resultType = String.class) String date) {
+ @XPath(headerName = "invoiceDetails", value =
"//invoice/person/name/text()") String userName,
+ @XPath(headerName = "invoiceDetails", value =
"//invoice/person/date", resultType = String.class) String date) {
this.response = response;
this.userName = userName;
this.date = date;