You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2013/06/20 12:19:29 UTC

svn commit: r866585 - in /websites/production/camel/content: cache/main.pageCache camel-2120-release.html mustache.html

Author: buildbot
Date: Thu Jun 20 10:19:29 2013
New Revision: 866585

Log:
Production update by buildbot for camel

Added:
    websites/production/camel/content/mustache.html
Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/camel-2120-release.html

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/camel-2120-release.html
==============================================================================
--- websites/production/camel/content/camel-2120-release.html (original)
+++ websites/production/camel/content/camel-2120-release.html Thu Jun 20 10:19:29 2013
@@ -96,7 +96,7 @@
 
 <h3><a shape="rect" name="Camel2.12.0Release-NewComponents"></a>New <a shape="rect" href="components.html" title="Components">Components</a></h3>
 
-<ul><li><a shape="rect" href="geocoder.html" title="Geocoder"><tt>camel-geocoder</tt></a> - For looking up geocodes (latitude, longitude) for a given address, or reverse lookup with <a shape="rect" class="external-link" href="https://code.google.com/p/geocoder-java/" rel="nofollow">Java API for Google Geocoder</a></li><li><a shape="rect" href="mvel-component.html" title="MVEL Component"><tt>camel-mvel</tt></a> - For templating using <a shape="rect" class="external-link" href="http://mvel.codehaus.org/" rel="nofollow">MVEL</a></li><li><a shape="rect" href="netty-http.html" title="Netty HTTP"><tt>camel-netty-http</tt></a> - HTTP component using <a shape="rect" href="netty.html" title="Netty">Netty</a> as transport</li><li><a shape="rect" href="sap-netweaver.html" title="SAP NetWeaver"><tt>camel-sap-netwever</tt></a> - For integration with <a shape="rect" class="external-link" href="http://scn.sap.com/community/developer-center/netweaver-gateway" rel="nofollow">SAP NetWeaver Ga
 teway</a></li><li><a shape="rect" href="weather.html" title="Weather"><tt>camel-weather</tt></a> - For polling weather information from <a shape="rect" class="external-link" href="http://openweathermap.org" rel="nofollow">Open Weather Map</a></li></ul>
+<ul><li><a shape="rect" href="geocoder.html" title="Geocoder"><tt>camel-geocoder</tt></a> - For looking up geocodes (latitude, longitude) for a given address, or reverse lookup with <a shape="rect" class="external-link" href="https://code.google.com/p/geocoder-java/" rel="nofollow">Java API for Google Geocoder</a></li><li><a shape="rect" href="mustache.html" title="Mustache"><tt>camel-mustache</tt></a> - For templating using <a shape="rect" class="external-link" href="http://mustache.github.io/" rel="nofollow">Mustache</a></li><li><a shape="rect" href="mvel-component.html" title="MVEL Component"><tt>camel-mvel</tt></a> - For templating using <a shape="rect" class="external-link" href="http://mvel.codehaus.org/" rel="nofollow">MVEL</a></li><li><a shape="rect" href="netty-http.html" title="Netty HTTP"><tt>camel-netty-http</tt></a> - HTTP component using <a shape="rect" href="netty.html" title="Netty">Netty</a> as transport</li><li><a shape="rect" href="sap-netweaver.html" titl
 e="SAP NetWeaver"><tt>camel-sap-netwever</tt></a> - For integration with <a shape="rect" class="external-link" href="http://scn.sap.com/community/developer-center/netweaver-gateway" rel="nofollow">SAP NetWeaver Gateway</a></li><li><a shape="rect" href="weather.html" title="Weather"><tt>camel-weather</tt></a> - For polling weather information from <a shape="rect" class="external-link" href="http://openweathermap.org" rel="nofollow">Open Weather Map</a></li></ul>
 
 
 <h3><a shape="rect" name="Camel2.12.0Release-NewDSL"></a>New DSL</h3>

Added: websites/production/camel/content/mustache.html
==============================================================================
--- websites/production/camel/content/mustache.html (added)
+++ websites/production/camel/content/mustache.html Thu Jun 20 10:19:29 2013
@@ -0,0 +1,272 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    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.
+-->
+<html>
+<head>
+    <link href="http://camel.apache.org/styles/site.css" rel="stylesheet" type="text/css">
+    <link href="http://camel.apache.org/styles/type-settings.css" rel="stylesheet" type="text/css">
+    <script src="http://camel.apache.org/styles/prototype.js" type="text/javascript"></script>
+    <script src="http://camel.apache.org/styles/rico.js" type="text/javascript"></script>    
+    <script src="http://camel.apache.org/styles/site.js" type="text/javascript"></script>
+
+    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
+
+    <style type="text/css">
+      .maincontent { overflow:hidden; }
+    </style>
+    <!--[if IE]>
+    <style type="text/css">
+      .maincontent { width:100%; }
+    </style>
+    <![endif]-->
+
+    <title>
+    Apache Camel: Mustache
+    </title>
+</head>
+<body>
+<div class="white_box">
+<div class="header">
+  <div class="header_l">
+    <div class="header_r">
+    </div>
+  </div>
+</div>
+<div class="content">
+  <div class="content_l">
+    <div class="content_r">
+      <div>
+          <!-- Banner -->
+<div id="banner-content">
+	<div id="asf_logo">
+	<div id="activemq_logo" style="height:108px; background:transparent url(banner.data/apache-camel-7.png) no-repeat scroll left top;">
+            <a shape="rect" style="float:left; width:310px;display:block;text-indent:-5000px;text-decoration:none;line-height:140px; margin-top:20px; margin-left:18px;" href="http://camel.apache.org/">Camel</a>
+            <a shape="rect" style="float:right; width:180px;display:block;text-indent:-5000px;text-decoration:none;line-height:80px; margin-top:45px; margin-right:10px;" href="http://www.apache.org">Apache</a>
+	</div>
+        </div>
+</div>
+          <!-- Banner -->
+        <div class="top_red_bar">
+          <div id="site-breadcrumbs">
+                <!-- Breadcrumbs -->
+<a href="index.html">Apache Camel</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="components.html">Components</a>&nbsp;&gt;&nbsp;<a href="mustache.html">Mustache</a>
+          </div>
+          <!-- Quicklinks -->
+<div id="site-quicklinks"><p><a shape="rect" href="download.html" title="Download">Download</a> | <a shape="rect" href="javadoc.html" title="JavaDoc">JavaDoc</a> | <a shape="rect" href="source.html" title="Source">Source</a> | <a shape="rect" href="discussion-forums.html" title="Discussion Forums">Forums</a> | <a shape="rect" href="support.html" title="Support">Support</a></p></div>
+          <!-- Quicklinks -->
+        </div>
+
+	<table border="0">
+	<tbody>
+        <tr>
+        <td valign="top" width="100%">
+<div class="wiki-content maincontent"><h2><a shape="rect" name="Mustache-Mustache"></a>Mustache</h2>
+<p><b>Available as of Camel 2.12</b></p>
+
+<p>The <b>mustache:</b> component allows for processing a message using a <a shape="rect" class="external-link" href="http://mustache.github.io/" rel="nofollow">Mustache</a> template. This can be ideal when using <a shape="rect" href="templating.html" title="Templating">Templating</a> to generate responses for requests.</p>
+
+<p>Maven users will need to add the following dependency to their <tt>pom.xml</tt> for this component:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+<span class="code-tag">&lt;dependency&gt;</span>
+<span class="code-tag">&lt;groupId&gt;</span>org.apache.camel<span class="code-tag">&lt;/groupId&gt;</span>
+<span class="code-tag">&lt;artifactId&gt;</span>camel-mustache<span class="code-tag">&lt;/artifactId&gt;</span>
+<span class="code-tag">&lt;version&gt;</span>x.x.x<span class="code-tag">&lt;/version&gt;</span> <span class="code-tag"><span class="code-comment">&lt;!-- use the same version as your Camel core version --&gt;</span></span>
+<span class="code-tag">&lt;/dependency&gt;</span>
+</pre>
+</div></div>
+
+<h3><a shape="rect" name="Mustache-URIformat"></a>URI format</h3>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+mustache:templateName[?options]
+</pre>
+</div></div>
+
+<p>Where <b>templateName</b> is the classpath-local URI of the template to invoke; or the complete URL of the remote template (eg: <a shape="rect" class="external-link" href="file://folder/myfile.mustache" rel="nofollow">file://folder/myfile.mustache</a>).</p>
+
+<p>You can append query options to the URI in the following format, <tt>?option=value&amp;option=value&amp;...</tt></p>
+
+<h3><a shape="rect" name="Mustache-Options"></a>Options</h3>
+<div class="confluenceTableSmall"><div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Option </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>encoding</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Character encoding of the resource content. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>startDelimiter</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> {{ </td><td colspan="1" rowspan="1" class="confluenceTd"> Characters used to mark template code beginning. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endDelimiter</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> }} </td><td colspan="1" rowspan="1" class="confluenceTd"> Characters used to mark template code end. </td></tr></tbody>
 </table>
+</div>
+</div>
+
+<h3><a shape="rect" name="Mustache-MustacheContext"></a>Mustache Context</h3>
+<p>Camel will provide exchange information in the Mustache context (just a <tt>Map</tt>). The <tt>Exchange</tt> is transferred as:</p>
+<div class="confluenceTableSmall"><div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> key </th><th colspan="1" rowspan="1" class="confluenceTh"> value </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>exchange</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The <tt>Exchange</tt> itself. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>exchange.properties</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The <tt>Exchange</tt> properties. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>headers</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The headers of the In message. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>camelContext</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The Camel Context. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>request</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The In message. </td
 ></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>body</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The In message body. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>response</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The Out message (only for InOut message exchange pattern). </td></tr></tbody></table>
+</div>
+</div>
+
+<h3><a shape="rect" name="Mustache-Dynamictemplates"></a>Dynamic templates</h3>
+
+<p>Camel provides two headers by which you can define a different resource location for a template or the template content itself. If any of these headers is set then Camel uses this over the endpoint configured resource. This allows you to provide a dynamic template at runtime.</p>
+<div class="confluenceTableSmall"><div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Header </th><th colspan="1" rowspan="1" class="confluenceTh"> Type </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th><th colspan="1" rowspan="1" class="confluenceTh"> Support Version </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> MustacheConstants.MUSTACHE_RESOURCE_URI </td><td colspan="1" rowspan="1" class="confluenceTd"> String </td><td colspan="1" rowspan="1" class="confluenceTd"> A URI for the template resource to use instead of the endpoint configured. </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> MustacheConstants.MUSTACHE_TEMPLATE </td><td colspan="1" rowspan="1" class="confluenceTd"> String </td><td colspan="1" rowspan="1" class="confluenceTd"> The template to use instead of the endpoint configured. </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</t
 d></tr></tbody></table>
+</div>
+</div>
+
+<h3><a shape="rect" name="Mustache-Samples"></a>Samples</h3>
+
+<p>For example you could use something like:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+from(<span class="code-quote">"activemq:My.Queue"</span>).
+to(<span class="code-quote">"mustache:com/acme/MyResponse.mustache"</span>);
+</pre>
+</div></div>
+
+<p>To use a Mustache template to formulate a response for a message for InOut message exchanges (where there is a <tt>JMSReplyTo</tt> header).</p>
+
+<p>If you want to use InOnly and consume the message and send it to another destination you could use:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+from(<span class="code-quote">"activemq:My.Queue"</span>).
+to(<span class="code-quote">"mustache:com/acme/MyResponse.mustache"</span>).
+to(<span class="code-quote">"activemq:Another.Queue"</span>);
+</pre>
+</div></div>
+
+<p>It's possible to specify what template the component should use dynamically via a header, so for example:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+from(<span class="code-quote">"direct:in"</span>).
+setHeader(MustacheConstants.MUSTACHE_RESOURCE_URI).constant(<span class="code-quote">"path/to/my/template.mustache"</span>).
+to(<span class="code-quote">"mustache:dummy"</span>);
+</pre>
+</div></div>
+
+<h3><a shape="rect" name="Mustache-TheEmailSample"></a>The Email Sample</h3>
+<p>In this sample we want to use Mustache templating for an order confirmation email. The email template is laid out in Mustache as:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+Dear {{headers.lastName}}}, {{headers.firstName}}
+
+Thanks <span class="code-keyword">for</span> the order of {{headers.item}}.
+
+Regards Camel Riders Bookstore
+{{body}}
+</pre>
+</div></div>
+
+<h3><a shape="rect" name="Mustache-SeeAlso"></a>See Also</h3>
+<ul><li><a shape="rect" href="configuring-camel.html" title="Configuring Camel">Configuring Camel</a></li><li><a shape="rect" href="component.html" title="Component">Component</a></li><li><a shape="rect" href="endpoint.html" title="Endpoint">Endpoint</a></li><li><a shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li></ul>
+ </div>
+        </td>
+        <td valign="top">
+          <div class="navigation">
+            <div class="navigation_top">
+                <!-- NavigationBar -->
+<div class="navigation_bottom" id="navigation_bottom"><h3><a shape="rect" name="Navigation-Overview"></a><a shape="rect" href="overview.html" title="Overview">Overview</a></h3>
+
+<ul class="alternate" type="square"><li><a shape="rect" href="index.html" title="Index">Home</a></li><li><a shape="rect" href="download.html" title="Download">Download</a></li><li><a shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li><li><a shape="rect" href="faq.html" title="FAQ">FAQ</a></li></ul>
+
+
+<h3><a shape="rect" name="Navigation-Documentation"></a><a shape="rect" href="documentation.html" title="Documentation">Documentation</a></h3>
+
+<ul class="alternate" type="square"><li><a shape="rect" href="user-guide.html" title="User Guide">User Guide</a></li><li><a shape="rect" href="manual.html" title="Manual">Manual</a></li><li><a shape="rect" href="books.html" title="Books">Books</a></li><li><a shape="rect" href="tutorials.html" title="Tutorials">Tutorials</a></li><li><a shape="rect" href="examples.html" title="Examples">Examples</a></li><li><a shape="rect" href="cookbook.html" title="Cookbook">Cookbook</a></li><li><a shape="rect" href="architecture.html" title="Architecture">Architecture</a></li><li><a shape="rect" href="enterprise-integration-patterns.html" title="Enterprise Integration Patterns">Enterprise Integration Patterns</a></li><li><a shape="rect" href="dsl.html" title="DSL">DSL</a></li><li><a shape="rect" href="components.html" title="Components">Components</a></li><li><a shape="rect" href="data-format.html" title="Data Format">Data Format</a></li><li><a shape="rect" href="languages.html" title="Lang
 uages">Languages</a></li><li><a shape="rect" href="security.html" title="Security">Security</a></li></ul>
+
+
+<h3><a shape="rect" name="Navigation-Search"></a>Search</h3>
+
+
+<form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="http://www.google.com/cse">
+  <div>
+    <input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
+    <input type="hidden" name="ie" value="UTF-8">
+    <input type="text" name="q" size="21">
+    <input type="submit" name="sa" value="Search">
+  </div>
+</form>
+<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
+
+
+<h3><a shape="rect" name="Navigation-Community"></a><a shape="rect" href="community.html" title="Community">Community</a></h3>
+
+<ul class="alternate" type="square"><li><a shape="rect" href="support.html" title="Support">Support</a></li><li><a shape="rect" href="contributing.html" title="Contributing">Contributing</a></li><li><a shape="rect" href="discussion-forums.html" title="Discussion Forums">Discussion Forums</a></li><li><a shape="rect" href="mailing-lists.html" title="Mailing Lists">Mailing Lists</a></li><li><a shape="rect" href="user-stories.html" title="User Stories">User Stories</a></li><li><a shape="rect" href="news.html" title="News">News</a></li><li><a shape="rect" href="articles.html" title="Articles">Articles</a></li><li><a shape="rect" href="site.html" title="Site">Site</a></li><li><a shape="rect" href="team.html" title="Team">Team</a></li><li><a shape="rect" class="external-link" href="http://camel-extra.googlecode.com/" rel="nofollow">Camel Extra</a></li></ul>
+
+
+<h3><a shape="rect" name="Navigation-Developers"></a><a shape="rect" href="developers.html" title="Developers">Developers</a></h3>
+
+<ul class="alternate" type="square"><li><a shape="rect" href="developers.html" title="Developers">Developer Guide</a></li><li><a shape="rect" href="source.html" title="Source">Source</a></li><li><a shape="rect" href="building.html" title="Building">Building</a></li><li><a shape="rect" href="javadoc.html" title="JavaDoc">JavaDoc</a></li><li><a shape="rect" href="irc-room.html" title="IRC Room">IRC Room</a></li></ul>
+
+
+<h3><a shape="rect" name="Navigation-ApacheSoftwareFoundation"></a>Apache Software Foundation</h3>
+
+<ul class="alternate" type="square"><li><a shape="rect" class="external-link" href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/security/">Security</a></li></ul>
+</div>
+                <!-- NavigationBar -->
+            </div>
+          </div>
+        </td>
+        </tr>
+	</tbody>
+        </table>
+
+
+        <div class="bottom_red_bar"></div>
+      </div>
+    </div>
+  </div>
+</div>
+<div class="black_box">
+<div class="footer">
+  <div class="footer_l">
+    <div class="footer_r">
+      <div>
+        <a href="$base/privacy-policy.html">Privacy Policy</a> -
+        (<a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=31825488">edit page</a>)
+   	 (<a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=31825488&amp;showComments=true&amp;showCommentArea=true#addcomment">add comment</a>)
+      </div>
+    </div>
+  </div>
+</div>
+</div>
+</div>
+<div class="design_attribution">
+&copy; 2004-2011 The Apache Software Foundation.
+<br>          
+Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation.  All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+<br>
+<a href="http://hiramchirino.com">Graphic Design By Hiram</a>
+</div>
+
+<!-- Camel committers that would like access to the Analytics, send a note to private@camel.apache.org -->
+<script type="text/javascript">
+
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-25976253-1']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+
+</script>
+
+</body>
+</html>
+
+