Author: buildbot
Date: Tue Dec 2 21:20:53 2014
New Revision: 931423
Log:
Production update by buildbot for camel
Modified:
websites/production/camel/content/book-component-appendix.html
websites/production/camel/content/book-in-one-page.html
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/properties.html
websites/production/camel/content/using-propertyplaceholder.html
Modified: websites/production/camel/content/book-component-appendix.html
==============================================================================
--- websites/production/camel/content/book-component-appendix.html (original)
+++ websites/production/camel/content/book-component-appendix.html Tue Dec 2
21:20:53 2014
@@ -1529,11 +1529,11 @@ template.send("direct:alias-verify&
</div>
</div>
<p>The <strong>cxf:</strong> component provides integration with <a
shape="rect" href="http://cxf.apache.org">Apache CXF</a> for connecting to
JAX-WS services hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1417537054744 {padding: 0px;}
-div.rbtoc1417537054744 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1417537054744 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1417555091218 {padding: 0px;}
+div.rbtoc1417555091218 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1417555091218 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1417537054744">
+/*]]>*/</style></p><div class="toc-macro rbtoc1417555091218">
<ul class="toc-indentation"><li><a shape="rect" href="#CXF-CXFComponent">CXF
Component</a>
<ul class="toc-indentation"><li><a shape="rect" href="#CXF-URIformat">URI
format</a></li><li><a shape="rect" href="#CXF-Options">Options</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#CXF-Thedescriptionsofthedataformats">The descriptions of the
dataformats</a>
@@ -9817,7 +9817,7 @@ properties:key[?options]
<p>From Camel 2.10 onwards, you can bridge the
Spring property placeholder with Camel, see further below for more details.</p>
</div>
</div>
-<p>The property placeholder is generally in use when doing:</p><ul
class="alternate"><li>lookup or creating endpoints</li><li>lookup of beans in
the <a shape="rect" href="registry.html">Registry</a></li><li>additional
supported in Spring XML (see below in examples)</li><li>using Blueprint
PropertyPlaceholder with Camel <a shape="rect"
href="properties.html">Properties</a> component</li><li>using
<code>@PropertyInject</code> to inject a property in a
POJO</li><li><strong>Camel 2.14.1</strong> Using default value if a property
does not exists</li></ul><h3
id="BookComponentAppendix-Syntax">Syntax</h3><p>The syntax to use Camel's
property placeholder is to use {{<code>key</code>}} for example
{{<code>file.uri</code>}} where <code>file.uri</code> is the property key.<br
clear="none"> You can use property placeholders in parts of the endpoint URI's
which for example you can use placeholders for parameters in the
URIs.</p><p>From <strong>Camel 2.14.1</strong> onwards you can specify a
default value to use if a property with the key does not exists,
eg <code>file.url:/some/path</code> where the default value is the text
after the colon (eg /some/path).</p> <div class="aui-message hint shadowed
information-macro">
+<p>The property placeholder is generally in use when doing:</p><ul
class="alternate"><li>lookup or creating endpoints</li><li>lookup of beans in
the <a shape="rect" href="registry.html">Registry</a></li><li>additional
supported in Spring XML (see below in examples)</li><li>using Blueprint
PropertyPlaceholder with Camel <a shape="rect"
href="properties.html">Properties</a> component</li><li>using
<code>@PropertyInject</code> to inject a property in a
POJO</li><li><strong>Camel 2.14.1</strong> Using default value if a property
does not exists</li><li><strong>Camel 2.14.1</strong> Using custom functions,
which can be plugged into the property component.</li></ul><h3
id="BookComponentAppendix-Syntax">Syntax</h3><p>The syntax to use Camel's
property placeholder is to use {{<code>key</code>}} for example
{{<code>file.uri</code>}} where <code>file.uri</code> is the property key.<br
clear="none"> You can use property placeholders in parts of the endpoint URI's
which for example you can use
placeholders for parameters in the URIs.</p><p>From <strong>Camel
2.14.1</strong> onwards you can specify a default value to use if a property
with the key does not exists, eg <code>file.url:/some/path</code> where
the default value is the text after the colon (eg /some/path).</p> <div
class="aui-message hint shadowed information-macro">
<span class="aui-icon icon-hint">Icon</span>
<div class="message-content">
<p>Do not use colon in the property key. The colon
is used as a separator token when you are providing a default value, which is
supported from <strong>Camel 2.14.1</strong> onwards.</p>
@@ -10343,7 +10343,41 @@ protected Properties useOverrideProperti
<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ @PropertyInject(value =
"myTimeout", defaultValue = "5000")
private int timeout;
]]></script>
-</div></div><h2 id="BookComponentAppendix-SeeAlso.49">See Also</h2><ul
class="alternate"><li><a shape="rect" href="properties.html">Properties</a>
component</li></ul>
+</div></div><h3 id="BookComponentAppendix-Usingcustomfunctions">Using custom
functions</h3><p><strong>Available as of Camel 2.14.1</strong></p><p>The <a
shape="rect" href="properties.html">Properties</a> component allow to plugin
3rd party functions which can be used during parsing of the property
placeholders. These functions are then able to do custom logic to resolve the
placeholders, such as looking up in databases, do custom computations, or
whatnot. The name of the function becomes the prefix used in the placeholder.
This is best illustrated in the example code below</p><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ <bean id="beerFunction"
class="MyBeerFunction"/>
+
+ <camelContext
xmlns="http://camel.apache.org/schema/blueprint">
+ <propertyPlaceholder id="properties"
location="none" ignoreMissingLocation="true">
+ <propertiesFunction ref="beerFunction"/>
+ </propertyPlaceholder>
+
+ <route>
+ <from uri="direct:start"/>
+ <to uri="{{beer:FOO}}"/>
+ <to uri="{{beer:BAR}}"/>
+ </route>
+ </camelContext>]]></script>
+</div></div><p>Here we have a Camel XML route where we have defined the
<propertyPlaceholder> to use a custom function, which we refer to be the
bean id - eg the beerFunction. As the beer function uses "beer" as its name,
then the placeholder syntax can trigger the beer function by starting with
beer:value.</p><p>The implementation of the function is only two methods as
shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ public static final class MyBeerFunction
implements PropertiesFunction {
+
+ @Override
+ public String getName() {
+ return "beer";
+ }
+
+ @Override
+ public String apply(String remainder) {
+ return "mock:" + remainder.toLowerCase();
+ }
+ }
+
+]]></script>
+</div></div><p>The function must implement
the <code>org.apache.camel.component.properties.PropertiesFunction</code>
interface. The method <code>getName</code> is  the name of the
function, eg beer. And the <code>apply</code> method is where we implement
the custom logic to do. As the sample code is from an unit test, it just
returns a value to refer to a mock endpoint.</p><p>To register a custom
function from Java code is as shown below:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ PropertiesComponent pc =
context.getComponent("properties", PropertiesComponent.class);
+ pc.addFunction(new MyBeerFunction());
+
+]]></script>
+</div></div><p> </p><h2 id="BookComponentAppendix-SeeAlso.49">See
Also</h2><ul class="alternate"><li><a shape="rect"
href="properties.html">Properties</a> component</li></ul>
<h3 id="BookComponentAppendix-SeeAlso.50">See Also</h3>
<ul><li><a shape="rect" href="configuring-camel.html">Configuring
Camel</a></li><li><a shape="rect"
href="component.html">Component</a></li><li><a shape="rect"
href="endpoint.html">Endpoint</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li></ul>
Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Tue Dec 2 21:20:53
2014
@@ -4120,11 +4120,11 @@ While not actual tutorials you might fin
</div>
</div>
<h2 id="BookInOnePage-Preface">Preface</h2><p>This tutorial aims to guide the
reader through the stages of creating a project which uses Camel to facilitate
the routing of messages from a JMS queue to a <a shape="rect"
class="external-link" href="http://www.springramework.org"
rel="nofollow">Spring</a> service. The route works in a synchronous fashion
returning a response to the client.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1417540666765 {padding: 0px;}
-div.rbtoc1417540666765 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1417540666765 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1417555134488 {padding: 0px;}
+div.rbtoc1417555134488 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1417555134488 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1417540666765">
+/*]]>*/</style></p><div class="toc-macro rbtoc1417555134488">
<ul class="toc-indentation"><li><a shape="rect"
href="#Tutorial-JmsRemoting-TutorialonSpringRemotingwithJMS">Tutorial on Spring
Remoting with JMS</a></li><li><a shape="rect"
href="#Tutorial-JmsRemoting-Preface">Preface</a></li><li><a shape="rect"
href="#Tutorial-JmsRemoting-Prerequisites">Prerequisites</a></li><li><a
shape="rect"
href="#Tutorial-JmsRemoting-Distribution">Distribution</a></li><li><a
shape="rect" href="#Tutorial-JmsRemoting-About">About</a></li><li><a
shape="rect" href="#Tutorial-JmsRemoting-CreatetheCamelProject">Create the
Camel Project</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#Tutorial-JmsRemoting-UpdatethePOMwithDependencies">Update the POM with
Dependencies</a></li></ul>
</li><li><a shape="rect" href="#Tutorial-JmsRemoting-WritingtheServer">Writing
the Server</a>
@@ -6310,11 +6310,11 @@ So we completed the last piece in the pi
<style type="text/css">/*<![CDATA[*/
-div.rbtoc1417540669329 {padding: 0px;}
-div.rbtoc1417540669329 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1417540669329 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1417555136730 {padding: 0px;}
+div.rbtoc1417555136730 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1417555136730 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style><div class="toc-macro rbtoc1417540669329">
+/*]]>*/</style><div class="toc-macro rbtoc1417555136730">
<ul class="toc-indentation"><li><a shape="rect"
href="#Tutorial-AXIS-Camel-TutorialusingAxis1.4withApacheCamel">Tutorial using
Axis 1.4 with Apache Camel</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#Tutorial-AXIS-Camel-Prerequisites">Prerequisites</a></li><li><a
shape="rect"
href="#Tutorial-AXIS-Camel-Distribution">Distribution</a></li><li><a
shape="rect"
href="#Tutorial-AXIS-Camel-Introduction">Introduction</a></li><li><a
shape="rect" href="#Tutorial-AXIS-Camel-SettinguptheprojecttorunAxis">Setting
up the project to run Axis</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#Tutorial-AXIS-Camel-Maven2">Maven 2</a></li><li><a shape="rect"
href="#Tutorial-AXIS-Camel-wsdl">wsdl</a></li><li><a shape="rect"
href="#Tutorial-AXIS-Camel-ConfiguringAxis">Configuring Axis</a></li><li><a
shape="rect" href="#Tutorial-AXIS-Camel-RunningtheExample">Running the
Example</a></li></ul>
@@ -19350,11 +19350,11 @@ template.send("direct:alias-verify&
</div>
</div>
<p>The <strong>cxf:</strong> component provides integration with <a
shape="rect" href="http://cxf.apache.org">Apache CXF</a> for connecting to
JAX-WS services hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1417540696641 {padding: 0px;}
-div.rbtoc1417540696641 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1417540696641 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1417555165996 {padding: 0px;}
+div.rbtoc1417555165996 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1417555165996 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1417540696641">
+/*]]>*/</style></p><div class="toc-macro rbtoc1417555165996">
<ul class="toc-indentation"><li><a shape="rect" href="#CXF-CXFComponent">CXF
Component</a>
<ul class="toc-indentation"><li><a shape="rect" href="#CXF-URIformat">URI
format</a></li><li><a shape="rect" href="#CXF-Options">Options</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#CXF-Thedescriptionsofthedataformats">The descriptions of the
dataformats</a>
@@ -27638,7 +27638,7 @@ properties:key[?options]
<p>From Camel 2.10 onwards, you can bridge the
Spring property placeholder with Camel, see further below for more details.</p>
</div>
</div>
-<p>The property placeholder is generally in use when doing:</p><ul
class="alternate"><li>lookup or creating endpoints</li><li>lookup of beans in
the <a shape="rect" href="registry.html">Registry</a></li><li>additional
supported in Spring XML (see below in examples)</li><li>using Blueprint
PropertyPlaceholder with Camel <a shape="rect"
href="properties.html">Properties</a> component</li><li>using
<code>@PropertyInject</code> to inject a property in a
POJO</li><li><strong>Camel 2.14.1</strong> Using default value if a property
does not exists</li></ul><h3 id="BookInOnePage-Syntax.1">Syntax</h3><p>The
syntax to use Camel's property placeholder is to use {{<code>key</code>}} for
example {{<code>file.uri</code>}} where <code>file.uri</code> is the property
key.<br clear="none"> You can use property placeholders in parts of the
endpoint URI's which for example you can use placeholders for parameters in the
URIs.</p><p>From <strong>Camel 2.14.1</strong> onwards you can specify a
defau
lt value to use if a property with the key does not exists,
eg <code>file.url:/some/path</code> where the default value is the text
after the colon (eg /some/path).</p> <div class="aui-message hint shadowed
information-macro">
+<p>The property placeholder is generally in use when doing:</p><ul
class="alternate"><li>lookup or creating endpoints</li><li>lookup of beans in
the <a shape="rect" href="registry.html">Registry</a></li><li>additional
supported in Spring XML (see below in examples)</li><li>using Blueprint
PropertyPlaceholder with Camel <a shape="rect"
href="properties.html">Properties</a> component</li><li>using
<code>@PropertyInject</code> to inject a property in a
POJO</li><li><strong>Camel 2.14.1</strong> Using default value if a property
does not exists</li><li><strong>Camel 2.14.1</strong> Using custom functions,
which can be plugged into the property component.</li></ul><h3
id="BookInOnePage-Syntax.1">Syntax</h3><p>The syntax to use Camel's property
placeholder is to use {{<code>key</code>}} for example
{{<code>file.uri</code>}} where <code>file.uri</code> is the property key.<br
clear="none"> You can use property placeholders in parts of the endpoint URI's
which for example you can use placeh
olders for parameters in the URIs.</p><p>From <strong>Camel
2.14.1</strong> onwards you can specify a default value to use if a property
with the key does not exists, eg <code>file.url:/some/path</code> where
the default value is the text after the colon (eg /some/path).</p> <div
class="aui-message hint shadowed information-macro">
<span class="aui-icon icon-hint">Icon</span>
<div class="message-content">
<p>Do not use colon in the property key. The colon
is used as a separator token when you are providing a default value, which is
supported from <strong>Camel 2.14.1</strong> onwards.</p>
@@ -28164,7 +28164,41 @@ protected Properties useOverrideProperti
<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ @PropertyInject(value =
"myTimeout", defaultValue = "5000")
private int timeout;
]]></script>
-</div></div><h2 id="BookInOnePage-SeeAlso.69">See Also</h2><ul
class="alternate"><li><a shape="rect" href="properties.html">Properties</a>
component</li></ul>
+</div></div><h3 id="BookInOnePage-Usingcustomfunctions">Using custom
functions</h3><p><strong>Available as of Camel 2.14.1</strong></p><p>The <a
shape="rect" href="properties.html">Properties</a> component allow to plugin
3rd party functions which can be used during parsing of the property
placeholders. These functions are then able to do custom logic to resolve the
placeholders, such as looking up in databases, do custom computations, or
whatnot. The name of the function becomes the prefix used in the placeholder.
This is best illustrated in the example code below</p><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ <bean id="beerFunction"
class="MyBeerFunction"/>
+
+ <camelContext
xmlns="http://camel.apache.org/schema/blueprint">
+ <propertyPlaceholder id="properties"
location="none" ignoreMissingLocation="true">
+ <propertiesFunction ref="beerFunction"/>
+ </propertyPlaceholder>
+
+ <route>
+ <from uri="direct:start"/>
+ <to uri="{{beer:FOO}}"/>
+ <to uri="{{beer:BAR}}"/>
+ </route>
+ </camelContext>]]></script>
+</div></div><p>Here we have a Camel XML route where we have defined the
<propertyPlaceholder> to use a custom function, which we refer to be the
bean id - eg the beerFunction. As the beer function uses "beer" as its name,
then the placeholder syntax can trigger the beer function by starting with
beer:value.</p><p>The implementation of the function is only two methods as
shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ public static final class MyBeerFunction
implements PropertiesFunction {
+
+ @Override
+ public String getName() {
+ return "beer";
+ }
+
+ @Override
+ public String apply(String remainder) {
+ return "mock:" + remainder.toLowerCase();
+ }
+ }
+
+]]></script>
+</div></div><p>The function must implement
the <code>org.apache.camel.component.properties.PropertiesFunction</code>
interface. The method <code>getName</code> is  the name of the
function, eg beer. And the <code>apply</code> method is where we implement
the custom logic to do. As the sample code is from an unit test, it just
returns a value to refer to a mock endpoint.</p><p>To register a custom
function from Java code is as shown below:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ PropertiesComponent pc =
context.getComponent("properties", PropertiesComponent.class);
+ pc.addFunction(new MyBeerFunction());
+
+]]></script>
+</div></div><p> </p><h2 id="BookInOnePage-SeeAlso.69">See Also</h2><ul
class="alternate"><li><a shape="rect" href="properties.html">Properties</a>
component</li></ul>
<h3 id="BookInOnePage-SeeAlso.70">See Also</h3>
<ul><li><a shape="rect" href="configuring-camel.html">Configuring
Camel</a></li><li><a shape="rect"
href="component.html">Component</a></li><li><a shape="rect"
href="endpoint.html">Endpoint</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li></ul>
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/camel/content/properties.html
==============================================================================
--- websites/production/camel/content/properties.html (original)
+++ websites/production/camel/content/properties.html Tue Dec 2 21:20:53 2014
@@ -121,7 +121,7 @@ properties:key[?options]
<p>From Camel 2.10 onwards, you can bridge the
Spring property placeholder with Camel, see further below for more details.</p>
</div>
</div>
-<p>The property placeholder is generally in use when doing:</p><ul
class="alternate"><li>lookup or creating endpoints</li><li>lookup of beans in
the <a shape="rect" href="registry.html">Registry</a></li><li>additional
supported in Spring XML (see below in examples)</li><li>using Blueprint
PropertyPlaceholder with Camel <a shape="rect"
href="properties.html">Properties</a> component</li><li>using
<code>@PropertyInject</code> to inject a property in a
POJO</li><li><strong>Camel 2.14.1</strong> Using default value if a property
does not exists</li></ul><h3 id="Properties-Syntax">Syntax</h3><p>The syntax to
use Camel's property placeholder is to use {{<code>key</code>}} for example
{{<code>file.uri</code>}} where <code>file.uri</code> is the property key.<br
clear="none"> You can use property placeholders in parts of the endpoint URI's
which for example you can use placeholders for parameters in the
URIs.</p><p>From <strong>Camel 2.14.1</strong> onwards you can specify a
default va
lue to use if a property with the key does not exists,
eg <code>file.url:/some/path</code> where the default value is the text
after the colon (eg /some/path).</p> <div class="aui-message hint shadowed
information-macro">
+<p>The property placeholder is generally in use when doing:</p><ul
class="alternate"><li>lookup or creating endpoints</li><li>lookup of beans in
the <a shape="rect" href="registry.html">Registry</a></li><li>additional
supported in Spring XML (see below in examples)</li><li>using Blueprint
PropertyPlaceholder with Camel <a shape="rect"
href="properties.html">Properties</a> component</li><li>using
<code>@PropertyInject</code> to inject a property in a
POJO</li><li><strong>Camel 2.14.1</strong> Using default value if a property
does not exists</li><li><strong>Camel 2.14.1</strong> Using custom functions,
which can be plugged into the property component.</li></ul><h3
id="Properties-Syntax">Syntax</h3><p>The syntax to use Camel's property
placeholder is to use {{<code>key</code>}} for example
{{<code>file.uri</code>}} where <code>file.uri</code> is the property key.<br
clear="none"> You can use property placeholders in parts of the endpoint URI's
which for example you can use placeholder
s for parameters in the URIs.</p><p>From <strong>Camel 2.14.1</strong>
onwards you can specify a default value to use if a property with the key does
not exists, eg <code>file.url:/some/path</code> where the default value is
the text after the colon (eg /some/path).</p> <div class="aui-message hint
shadowed information-macro">
<span class="aui-icon icon-hint">Icon</span>
<div class="message-content">
<p>Do not use colon in the property key. The colon
is used as a separator token when you are providing a default value, which is
supported from <strong>Camel 2.14.1</strong> onwards.</p>
@@ -647,7 +647,41 @@ protected Properties useOverrideProperti
<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ @PropertyInject(value =
"myTimeout", defaultValue = "5000")
private int timeout;
]]></script>
-</div></div><h2 id="Properties-SeeAlso">See Also</h2><ul
class="alternate"><li><a shape="rect" href="properties.html">Properties</a>
component</li></ul>
+</div></div><h3 id="Properties-Usingcustomfunctions">Using custom
functions</h3><p><strong>Available as of Camel 2.14.1</strong></p><p>The <a
shape="rect" href="properties.html">Properties</a> component allow to plugin
3rd party functions which can be used during parsing of the property
placeholders. These functions are then able to do custom logic to resolve the
placeholders, such as looking up in databases, do custom computations, or
whatnot. The name of the function becomes the prefix used in the placeholder.
This is best illustrated in the example code below</p><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ <bean id="beerFunction"
class="MyBeerFunction"/>
+
+ <camelContext
xmlns="http://camel.apache.org/schema/blueprint">
+ <propertyPlaceholder id="properties"
location="none" ignoreMissingLocation="true">
+ <propertiesFunction ref="beerFunction"/>
+ </propertyPlaceholder>
+
+ <route>
+ <from uri="direct:start"/>
+ <to uri="{{beer:FOO}}"/>
+ <to uri="{{beer:BAR}}"/>
+ </route>
+ </camelContext>]]></script>
+</div></div><p>Here we have a Camel XML route where we have defined the
<propertyPlaceholder> to use a custom function, which we refer to be the
bean id - eg the beerFunction. As the beer function uses "beer" as its name,
then the placeholder syntax can trigger the beer function by starting with
beer:value.</p><p>The implementation of the function is only two methods as
shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ public static final class MyBeerFunction
implements PropertiesFunction {
+
+ @Override
+ public String getName() {
+ return "beer";
+ }
+
+ @Override
+ public String apply(String remainder) {
+ return "mock:" + remainder.toLowerCase();
+ }
+ }
+
+]]></script>
+</div></div><p>The function must implement
the <code>org.apache.camel.component.properties.PropertiesFunction</code>
interface. The method <code>getName</code> is  the name of the
function, eg beer. And the <code>apply</code> method is where we implement
the custom logic to do. As the sample code is from an unit test, it just
returns a value to refer to a mock endpoint.</p><p>To register a custom
function from Java code is as shown below:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ PropertiesComponent pc =
context.getComponent("properties", PropertiesComponent.class);
+ pc.addFunction(new MyBeerFunction());
+
+]]></script>
+</div></div><p> </p><h2 id="Properties-SeeAlso">See Also</h2><ul
class="alternate"><li><a shape="rect" href="properties.html">Properties</a>
component</li></ul>
<h3 id="Properties-SeeAlso.1">See Also</h3>
<ul><li><a shape="rect" href="configuring-camel.html">Configuring
Camel</a></li><li><a shape="rect"
href="component.html">Component</a></li><li><a shape="rect"
href="endpoint.html">Endpoint</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li></ul>
Modified: websites/production/camel/content/using-propertyplaceholder.html
==============================================================================
--- websites/production/camel/content/using-propertyplaceholder.html (original)
+++ websites/production/camel/content/using-propertyplaceholder.html Tue Dec 2
21:20:53 2014
@@ -93,7 +93,7 @@
<p>From Camel 2.10 onwards, you can bridge the
Spring property placeholder with Camel, see further below for more details.</p>
</div>
</div>
-<p>The property placeholder is generally in use when doing:</p><ul
class="alternate"><li>lookup or creating endpoints</li><li>lookup of beans in
the <a shape="rect" href="registry.html">Registry</a></li><li>additional
supported in Spring XML (see below in examples)</li><li>using Blueprint
PropertyPlaceholder with Camel <a shape="rect"
href="properties.html">Properties</a> component</li><li>using
<code>@PropertyInject</code> to inject a property in a
POJO</li><li><strong>Camel 2.14.1</strong> Using default value if a property
does not exists</li></ul><h3
id="UsingPropertyPlaceholder-Syntax">Syntax</h3><p>The syntax to use Camel's
property placeholder is to use {{<code>key</code>}} for example
{{<code>file.uri</code>}} where <code>file.uri</code> is the property key.<br
clear="none"> You can use property placeholders in parts of the endpoint URI's
which for example you can use placeholders for parameters in the
URIs.</p><p>From <strong>Camel 2.14.1</strong> onwards you can specif
y a default value to use if a property with the key does not exists,
eg <code>file.url:/some/path</code> where the default value is the text
after the colon (eg /some/path).</p> <div class="aui-message hint shadowed
information-macro">
+<p>The property placeholder is generally in use when doing:</p><ul
class="alternate"><li>lookup or creating endpoints</li><li>lookup of beans in
the <a shape="rect" href="registry.html">Registry</a></li><li>additional
supported in Spring XML (see below in examples)</li><li>using Blueprint
PropertyPlaceholder with Camel <a shape="rect"
href="properties.html">Properties</a> component</li><li>using
<code>@PropertyInject</code> to inject a property in a
POJO</li><li><strong>Camel 2.14.1</strong> Using default value if a property
does not exists</li><li><strong>Camel 2.14.1</strong> Using custom functions,
which can be plugged into the property component.</li></ul><h3
id="UsingPropertyPlaceholder-Syntax">Syntax</h3><p>The syntax to use Camel's
property placeholder is to use {{<code>key</code>}} for example
{{<code>file.uri</code>}} where <code>file.uri</code> is the property key.<br
clear="none"> You can use property placeholders in parts of the endpoint URI's
which for example you can u
se placeholders for parameters in the URIs.</p><p>From <strong>Camel
2.14.1</strong> onwards you can specify a default value to use if a property
with the key does not exists, eg <code>file.url:/some/path</code> where
the default value is the text after the colon (eg /some/path).</p> <div
class="aui-message hint shadowed information-macro">
<span class="aui-icon icon-hint">Icon</span>
<div class="message-content">
<p>Do not use colon in the property key. The colon
is used as a separator token when you are providing a default value, which is
supported from <strong>Camel 2.14.1</strong> onwards.</p>
@@ -619,7 +619,41 @@ protected Properties useOverrideProperti
<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ @PropertyInject(value =
"myTimeout", defaultValue = "5000")
private int timeout;
]]></script>
-</div></div><h2 id="UsingPropertyPlaceholder-SeeAlso">See Also</h2><ul
class="alternate"><li><a shape="rect" href="properties.html">Properties</a>
component</li></ul></div>
+</div></div><h3 id="UsingPropertyPlaceholder-Usingcustomfunctions">Using
custom functions</h3><p><strong>Available as of Camel 2.14.1</strong></p><p>The
<a shape="rect" href="properties.html">Properties</a> component allow to plugin
3rd party functions which can be used during parsing of the property
placeholders. These functions are then able to do custom logic to resolve the
placeholders, such as looking up in databases, do custom computations, or
whatnot. The name of the function becomes the prefix used in the placeholder.
This is best illustrated in the example code below</p><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ <bean id="beerFunction"
class="MyBeerFunction"/>
+
+ <camelContext
xmlns="http://camel.apache.org/schema/blueprint">
+ <propertyPlaceholder id="properties"
location="none" ignoreMissingLocation="true">
+ <propertiesFunction ref="beerFunction"/>
+ </propertyPlaceholder>
+
+ <route>
+ <from uri="direct:start"/>
+ <to uri="{{beer:FOO}}"/>
+ <to uri="{{beer:BAR}}"/>
+ </route>
+ </camelContext>]]></script>
+</div></div><p>Here we have a Camel XML route where we have defined the
<propertyPlaceholder> to use a custom function, which we refer to be the
bean id - eg the beerFunction. As the beer function uses "beer" as its name,
then the placeholder syntax can trigger the beer function by starting with
beer:value.</p><p>The implementation of the function is only two methods as
shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ public static final class MyBeerFunction
implements PropertiesFunction {
+
+ @Override
+ public String getName() {
+ return "beer";
+ }
+
+ @Override
+ public String apply(String remainder) {
+ return "mock:" + remainder.toLowerCase();
+ }
+ }
+
+]]></script>
+</div></div><p>The function must implement
the <code>org.apache.camel.component.properties.PropertiesFunction</code>
interface. The method <code>getName</code> is  the name of the
function, eg beer. And the <code>apply</code> method is where we implement
the custom logic to do. As the sample code is from an unit test, it just
returns a value to refer to a mock endpoint.</p><p>To register a custom
function from Java code is as shown below:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ PropertiesComponent pc =
context.getComponent("properties", PropertiesComponent.class);
+ pc.addFunction(new MyBeerFunction());
+
+]]></script>
+</div></div><p> </p><h2 id="UsingPropertyPlaceholder-SeeAlso">See
Also</h2><ul class="alternate"><li><a shape="rect"
href="properties.html">Properties</a> component</li></ul></div>
</td>
<td valign="top">
<div class="navigation">