You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/07/05 18:28:03 UTC
camel git commit: CAMEL-11514: Add documentation about xslt resource
can also be using bean/ref etc.
Repository: camel
Updated Branches:
refs/heads/master aa50215bb -> abea861b4
CAMEL-11514: Add documentation about xslt resource can also be using bean/ref etc.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/abea861b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/abea861b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/abea861b
Branch: refs/heads/master
Commit: abea861b4333eb10fc86bf56c450103cc24dcb3b
Parents: aa50215
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Jul 5 20:27:28 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Jul 5 20:27:28 2017 +0200
----------------------------------------------------------------------
camel-core/src/main/docs/xslt-component.adoc | 2 +-
.../org/apache/camel/builder/xml/XsltUriResolver.java | 12 ++++++------
.../org/apache/camel/component/xslt/XsltEndpoint.java | 13 +++++++++++--
3 files changed, 18 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/abea861b/camel-core/src/main/docs/xslt-component.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/xslt-component.adoc b/camel-core/src/main/docs/xslt-component.adoc
index 67ab2ff..59dec74 100644
--- a/camel-core/src/main/docs/xslt-component.adoc
+++ b/camel-core/src/main/docs/xslt-component.adoc
@@ -99,7 +99,7 @@ with the following path and query parameters:
[width="100%",cols="2,5,^1,2",options="header"]
|=======================================================================
| Name | Description | Default | Type
-| **resourceUri** | *Required* The name of the template to load from classpath or file system | | String
+| **resourceUri** | *Required* Path to the template. The following is supported by the default URIResolver. You can prefix with: classpath file http ref or bean. classpath file and http loads the resource using these protocols (classpath is default). ref will lookup the resource in the registry. bean will call a method on a bean to be used as the resource. For bean you can specify the method name after dot eg bean:myBean.myMethod | | String
|=======================================================================
#### Query Parameters (17 parameters):
http://git-wip-us.apache.org/repos/asf/camel/blob/abea861b/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java b/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java
index 638af2d..c7d528c 100644
--- a/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java
+++ b/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java
@@ -32,13 +32,13 @@ import org.slf4j.LoggerFactory;
/**
* Camel specific {@link javax.xml.transform.URIResolver} which is capable of loading files
- * from the classpath and file system.
+ * from classpath, file system and more.
* <p/>
- * Use prefix <tt>classpath:</tt> or <tt>file:</tt> to denote either classpath or file system.
- * If no prefix is provided then the prefix from the <tt>location</tt> parameter is used.
- * If it neither has a prefix then <tt>classpath:</tt> is used.
- * <p/>
- * This implementation <b>cannot</b> load files over http.
+ * You can prefix with: classpath, file, http, ref, or bean.
+ * classpath, file and http loads the resource using these protocols (classpath is default).
+ * ref will lookup the resource in the registry.
+ * bean will call a method on a bean to be used as the resource.
+ * For bean you can specify the method name after dot, eg bean:myBean.myMethod
*
* @version
*/
http://git-wip-us.apache.org/repos/asf/camel/blob/abea861b/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
index d861d1c..e92e91c 100644
--- a/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
@@ -154,13 +154,22 @@ public class XsltEndpoint extends ProcessorEndpoint {
this.xslt = xslt;
}
- @ManagedAttribute(description = "The name of the template to load from classpath or file system")
+ @ManagedAttribute(description = "Path to the template")
public String getResourceUri() {
return resourceUri;
}
/**
- * The name of the template to load from classpath or file system
+ * Path to the template.
+ * <p/>
+ * The following is supported by the default URIResolver.
+ * You can prefix with: classpath, file, http, ref, or bean.
+ * classpath, file and http loads the resource using these protocols (classpath is default).
+ * ref will lookup the resource in the registry.
+ * bean will call a method on a bean to be used as the resource.
+ * For bean you can specify the method name after dot, eg bean:myBean.myMethod
+ *
+ * @param resourceUri the resource path
*/
public void setResourceUri(String resourceUri) {
this.resourceUri = resourceUri;