tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r959689 [3/4] - in /websites/production/tapestry/content: ./ cache/
Date Sun, 26 Jul 2015 22:19:48 GMT
Modified: websites/production/tapestry/content/service-implementation-reloading.html
==============================================================================
--- websites/production/tapestry/content/service-implementation-reloading.html (original)
+++ websites/production/tapestry/content/service-implementation-reloading.html Sun Jul 26 22:19:48 2015
@@ -62,56 +62,77 @@
 <div class="clearer"></div>
 
   <div id="breadcrumbs">
-        <a href="index.html">Apache Tapestry</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="user-guide.html">User Guide</a>&nbsp;&gt;&nbsp;<a href="ioc.html">IoC</a>&nbsp;&gt;&nbsp;<a href="service-implementation-reloading.html">Service Implementation Reloading</a>
+        <a href="index.html">Apache Tapestry</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="user-guide.html">User Guide</a>&nbsp;&gt;&nbsp;<a href="ioc.html">IOC</a>&nbsp;&gt;&nbsp;<a href="service-implementation-reloading.html">Service Implementation Reloading</a>
     <a class="edit" title="Edit this page (requires approval -- just ask on the mailing list)" href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=23339481">edit</a>
   </div>
 
 <div id="content">
-<div id="ConfluenceContent">
+<div id="ConfluenceContent"><p>
 
-<h1 id="ServiceImplementationReloading-ServiceImplementationReloading">Service Implementation Reloading</h1>
+</p><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Added in 5.2</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
+</div></div>
+<div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;">
+<p>&#160;</p></div><strong>Service implementation reloading</strong> is the live reloading of Tapestry-IOC service implementation classes without having to stop &amp; restart the servlet container. Available for Tapestry 5.2 and later, it extends the developer productivity gains of Tapestry's <a shape="rect" href="class-reloading.html">Live Class Reloading</a> to your Tapestry-IOC service modules.<div class="aui-label" style="float:right" title="Related Articles">
 
 
 
-<div class="confluence-information-macro confluence-information-macro-information"><p class="title">Added in 5.2</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
-</div></div>
-<div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;">
-</div>
 
-<div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
-<div class="error"><span class="error">Error formatting macro: contentbylabel: com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql : null</span> </div></div>
 
-<p>Tapestry's ability to live reload page and component classes is a huge boon to development productivity, but what about reloading services?</p>
 
-<p>On the one hand, a good application design keeps the page and component classes "thin" and moves logic into the services layer, for easier reuse across pages.  On the other hand, moving logic into services is less agile if those services don't auto-reload the way pages do.</p>
 
-<p>Starting in release 5.2, service implementations are live-reloaded, too.  There are several restrictions on this, and a couple of <a shape="rect" class="external-link" href="http://en.wikipedia.org/wiki/Leaky_abstraction" >leaky abstractions</a>, but on the whole it's quite serviceable.</p>
 
-<p>As of release 5.2, you can change your service implementation, and Tapestry picks up the change immediately. A service can even change its dependencies when being reloaded ... but it can't change its interface.</p>
+<h3>Related Articles</h3>
 
-<h2 id="ServiceImplementationReloading-Limitations">Limitations</h2>
+<ul class="content-by-label"><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
 
-<ul><li>Reloading only works for services, and only for services with the default service scope (i.e., global singletons).  Live reloading does not apply to <strong>modules</strong>, <strong>service interfaces</strong>, contributions, or anything but just the service implementation.</li><li>Reloading is limited to services that can be proxied: services with an interface and an implementation of that interface.</li><li>Reloading requires that the underlying class files be simple, local, filesystem files (not, for example, files inside a JAR).</li><li>If a service has internal state of any kind, that state is lost when the class is reloaded and the service re-instantiated. However, if a service has a configuration, the configuration will be <strong>reconstructed</strong> and injected into the service.</li><li>Services are decorated only once, so any decorations or advice applies to the initially loaded version of the class, and will not be recalculated when the class changes.</li></ul
 >
+        <div class="details">
+                        <a shape="rect" href="service-implementation-reloading.html">Service Implementation Reloading</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
 
+        <div class="details">
+                        <a shape="rect" href="class-reloading.html">Class Reloading</a>
+                
+                        
+                    </div>
+    </li></ul>
+</div><p>Why is this important?</p><p>On the one hand, a good application design keeps the page and component classes "thin" and moves logic into the services layer, for easier reuse across pages. On the other hand, moving logic into services would be less agile if those services didn't auto-reload the way Tapestry pages do.</p><p>There are several restrictions on this, and a couple of <a shape="rect" class="external-link" href="http://en.wikipedia.org/wiki/Leaky_abstraction" >leaky abstractions</a>, but on the whole it's quite serviceable.</p><p>As of release 5.2, you can change your service implementation, and Tapestry picks up the change immediately. A service can even change its dependencies when being reloaded ... but it can't change its interface.</p><h2 id="ServiceImplementationReloading-Limitations">Limitations</h2><ul><li>Reloading only works for services, and only for services with the default service scope (i.e., global singletons). Live reloading does not apply to <stron
 g>modules</strong>, <strong>service interfaces</strong>, contributions, or anything but just the service implementation.</li><li>Reloading is limited to services that can be proxied: services with an interface and an implementation of that interface.</li><li>Reloading requires that the underlying class files be simple, local, filesystem files (not, for example, files inside a JAR).</li><li>If a service has internal state of any kind, that state is lost when the class is reloaded and the service re-instantiated. However, if a service has a configuration, the configuration will be <strong>reconstructed</strong> and injected into the service.</li><li>Services are decorated only once, so any decorations or advice applies to the initially loaded version of the class, and will not be recalculated when the class changes.</li></ul><h2 id="ServiceImplementationReloading-ClassLoaderIssues">Class Loader Issues</h2><p>Tapestry creates a new class loader for <em>each service implementation</em>.
  When the underlying .class file changes, the class loader is discarded along with the instance, and a new class loader is created.</p><p>The class loader only loads the service implementation class, and any inner classes for the service implementation. All other classes are loaded by the standard class loader for the application.</p><p>Because of how class loaders work, the class will no longer be able to access package private classes and members of other classes in the same package. You may see some odd IllegalAccessErrors and need to change the visibility of package-private classes to be public.</p><p>The JVM should be able to eventually garbage collect the class loader. However, if the class publishes itself to some other service (for example, adding itself as a listener to an event published by some other service), then the instance and the garbage collector will be leaked.</p><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui
 -icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Be careful about publishing any instances of a reloadable class.</p></div></div><h2 id="ServiceImplementationReloading-UpdateChecks">Update Checks</h2><p>Update checks are normally driven by tapestry-core, which periodically checks for changed templates, message catalogs, and component classes. Checks for changed service implementation classes occur at the same time.</p><p>In an application that is not driven by the web tier, you will need to periodically invoke the <code>fireCheckForUpdates()</code> method of the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/UpdateListenerHub.html">UpdateListenerHub</a> service (which was moved from tapestry-core to tapestry-ioc for this purpose).</p><div class="aui-label" style="float:right" title="Related Articles">
 
-<h2 id="ServiceImplementationReloading-ClassLoaderIssues">Class Loader Issues</h2>
 
-<p>Tapestry creates a new class loader for <em>each service implementation</em>. When the underlying .class file changes, the class loader is discarded along with the instance, and a new class loader is created.</p>
 
-<p>The class loader only loads the service implementation class, and any inner classes for the service implementation. All other classes are loaded by the standard class loader for the application.</p>
 
-<p>Because of how class loaders work, the class will no longer be able to access package private classes and members of other classes in the same package. You may see some odd IllegalAccessErrors and need to change the visibility of package-private classes to be public.</p>
 
-<p>The JVM should be able to eventually garbage collect the class loader.  However, if the class publishes itself to some other service (for example, adding itself as a listener to an event published by some other service), then the instance and the garbage collector will be leaked.  </p>
 
-<div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Be careful about publishing any instances of a reloadable class.</p></div></div>
 
-<h2 id="ServiceImplementationReloading-UpdateChecks">Update Checks</h2>
 
-<p>Update checks are normally driven by tapestry-core, which periodically checks for changed templates, message catalogs, and component classes. Checks for changed service implementation classes occur at the same time.  </p>
+<h3>Related Articles</h3>
 
-<p>In an application that is not driven by the web tier, you will need to periodically invoke the <code>fireCheckForUpdates()</code> method of the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/UpdateListenerHub.html">UpdateListenerHub</a> service (which was moved from tapestry-core to tapestry-ioc for this purpose).</p>
-</div>
+<ul class="content-by-label"><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="service-implementation-reloading.html">Service Implementation Reloading</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="class-reloading.html">Class Reloading</a>
+                
+                        
+                    </div>
+    </li></ul>
+</div></div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/service-serialization.html
==============================================================================
--- websites/production/tapestry/content/service-serialization.html (original)
+++ websites/production/tapestry/content/service-serialization.html Sun Jul 26 22:19:48 2015
@@ -62,47 +62,16 @@
 <div class="clearer"></div>
 
   <div id="breadcrumbs">
-        <a href="index.html">Apache Tapestry</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="user-guide.html">User Guide</a>&nbsp;&gt;&nbsp;<a href="ioc.html">IoC</a>&nbsp;&gt;&nbsp;<a href="service-serialization.html">Service Serialization</a>
+        <a href="index.html">Apache Tapestry</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="user-guide.html">User Guide</a>&nbsp;&gt;&nbsp;<a href="ioc.html">IOC</a>&nbsp;&gt;&nbsp;<a href="service-serialization.html">Service Serialization</a>
     <a class="edit" title="Edit this page (requires approval -- just ask on the mailing list)" href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=23338491">edit</a>
   </div>
 
 <div id="content">
-<div id="ConfluenceContent">
-
-<h1 id="ServiceSerialization-ServiceSerialization">Service Serialization</h1>
-
-<p>Every once in a while you may need to serialize a service. For example, you may store an object into the HttpSession that holds a reference to a service. In a clustered environment, that object will be serialized and broadcast to other servers in the cluster.</p>
-
-<p>Services in Tapestry are serializable. Specifically, service <em>proxies</em> are serializable.</p>
-
-<p>Your service implementations <em>do not</em> have to be serializable.</p>
-
-<p>Serialization works as follows:</p>
-
-<ul><li>When a proxy is serialized, it instead serializes a <em>token</em> object.</li><li>The token object is what's stored in the output stream.</li><li>When the token is de-serialized, it locates the service proxy in the current Registry and returns that.</li></ul>
-
-
-<p>The end result is very efficient: just the tiny tokens are serialized, not the services with their proxies, configurations, implementations, dependencies, internal state and so forth.</p>
-
-<p>Again, note that the actual service implementation is not serialized. Due to Tapestry's lazy creation policy, the service implementation may not even exist. Since outside code only sees the proxy, there's no difference.</p>
-
-<h1 id="ServiceSerialization-RegistryResolution">Registry Resolution</h1>
-
-<p>The one trick here is locating the service proxy. Tapestry uses a <em>weak reference</em> to the Registry to do this. When a Registry starts up, it is stored in the reference, so that de-serialization can work.</p>
-
-<p>The reference is cleared when you shut down the Registry. If you stop using the Registry, but fail to shut it down, the weak reference ensures that it will be released to the garbage collector anyway. Still, you should shutdown a Registry when done with it.</p>
-
-<p>This all makes one BIG assumption: that there's just one Registry. That's normal for a web application, especially when the tapestry-ioc JAR is included as part of the web application's WAR.</p>
-
-<p>If you are running multiple Registries you will likely see errors in your console:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-[ERROR] SerializationSupport Setting a new service proxy provider when there's already
+<div id="ConfluenceContent"><p><strong>Service serialization</strong> is the serialization of a Tapestry IOC service.</p><p>Every once in a while you may need to serialize a service. For example, you may store an object into the HttpSession that holds a reference to a service. In a clustered environment, that object will be serialized and broadcast to other servers in the cluster.</p><p>Services in Tapestry are serializable. Specifically, service <em>proxies</em> are serializable. However, your service implementations <em>do not</em> have to be serializable.</p><p>Serialization works as follows:</p><ul><li>When a proxy is serialized, it instead serializes a <em>token</em> object.</li><li>The token object is what's stored in the output stream.</li><li>When the token is de-serialized, it locates the service proxy in the current Registry and returns that.</li></ul><p>The end result is very efficient: just the tiny tokens are serialized, not the services with their proxies, configuratio
 ns, implementations, dependencies, internal state and so forth.</p><p>Again, note that the actual service implementation is not serialized. Due to Tapestry's lazy creation policy, the service implementation may not even exist. Since outside code only sees the proxy, there's no difference.</p><h1 id="ServiceSerialization-RegistryResolution">Registry Resolution</h1><p>The one trick here is locating the service proxy. Tapestry uses a <em>weak reference</em> to the Registry to do this. When a Registry starts up, it is stored in the reference, so that de-serialization can work.</p><p>The reference is cleared when you shut down the Registry. If you stop using the Registry, but fail to shut it down, the weak reference ensures that it will be released to the garbage collector anyway. Still, you should shutdown a Registry when done with it.</p><p>This all makes one BIG assumption: that there's just one Registry. That's normal for a web application, especially when the tapestry-ioc JAR is inc
 luded as part of the web application's WAR.</p><p>If you are running multiple Registries you will likely see errors in your console:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">[ERROR] SerializationSupport Setting a new service proxy provider when there's already
 an existing provider. This may indicate that you have multiple IoC Registries.
 </pre>
-</div></div>
-</div>
+</div></div><p></p></div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/shadowbuilder-service.html
==============================================================================
--- websites/production/tapestry/content/shadowbuilder-service.html (original)
+++ websites/production/tapestry/content/shadowbuilder-service.html Sun Jul 26 22:19:48 2015
@@ -62,66 +62,77 @@
 <div class="clearer"></div>
 
   <div id="breadcrumbs">
-        <a href="index.html">Apache Tapestry</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="user-guide.html">User Guide</a>&nbsp;&gt;&nbsp;<a href="ioc.html">IoC</a>&nbsp;&gt;&nbsp;<a href="shadowbuilder-service.html">ShadowBuilder Service</a>
+        <a href="index.html">Apache Tapestry</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="user-guide.html">User Guide</a>&nbsp;&gt;&nbsp;<a href="ioc.html">IOC</a>&nbsp;&gt;&nbsp;<a href="shadowbuilder-service.html">ShadowBuilder Service</a>
     <a class="edit" title="Edit this page (requires approval -- just ask on the mailing list)" href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=23338493">edit</a>
   </div>
 
 <div id="content">
-<div id="ConfluenceContent">
+<div id="ConfluenceContent"><p>The ShadowBuilder service (see the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/PropertyShadowBuilder.html">PropertyShadowBuilder</a> API) is used to build a special, delegating kind of service implementation that, essentially, allows a property of another service to be exposed as its own service.</p><div class="aui-label" style="float:right" title="Related Articles">
 
-<h1 id="ShadowBuilderService-ShadowServices">Shadow Services</h1>
 
-<div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
-<div class="error"><span class="error">Error formatting macro: contentbylabel: com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql : null</span> </div></div>
 
-<p>The <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/PropertyShadowBuilder.html">PropertyShadowBuilder</a> service is used to build a special, delegating kind of service implementation.</p>
 
-<p>Effectively, it is used to allow a property of another service to be exposed as its own service.</p>
 
-<p>For example, the tapestry-core module provides a Request property as a shadow of the RequestGlobals service's request property:</p>
 
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-public Request build()
-{
-  return shadowBuilder.build(requestGlobals, "request", Request.class);
-}</pre>
-</div></div>
-
-<p>(shadowBuilder and requestGlobals are injected into the module class instance)</p>
 
-<p>This can be thought of as similar to:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-public Request build()
-{
-  return requestGlobals.getRequest();
-}</pre>
-</div></div>
 
-<p>However there is a <em>critical</em> difference between the two: a shadow property is <em>re-evaluated on each method invocation</em>. In the former case, the Request service will always obtain the current value of the request property from the per-thread RequestGlobals service. The second example is more than likely broken, since it will expose whatever value is in the request property of the RequestGlobals <em>at the time the Request service implementation is realized</em>.</p>
+<h3>Related Articles</h3>
 
-<p>Notice that in this example, the Request service is a normal singleton. This service can be freely injected into any service throughout the framework or application. Invoking methods on this service will always delegate to the current thread's request. Callers don't have to be aware of this internal delegation; it just happens.</p>
+<ul class="content-by-label"><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
 
-<h1 id="ShadowBuilderService-Non-Reflective">Non-Reflective</h1>
+        <div class="details">
+                        <a shape="rect" href="shadowbuilder-service.html">ShadowBuilder Service</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
 
-<p>When the shadow is created, reflection is used to translate the property name to a method name. This information is used to build a new class (at runtime) that is instantiated as the service implementation.</p>
+        <div class="details">
+                        <a shape="rect" href="strategybuilder-service.html">StrategyBuilder Service</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
 
-<p>A typical method is implemented as (approximately):</p>
+        <div class="details">
+                        <a shape="rect" href="pipelinebuilder-service.html">PipelineBuilder Service</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
 
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-private final RequestGlobals source;
+        <div class="details">
+                        <a shape="rect" href="chainbuilder-service.html">ChainBuilder Service</a>
+                
+                        
+                    </div>
+    </li></ul>
+</div><p>For example, the tapestry-core module provides a Request property as a shadow of the RequestGlobals service's request property:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public Request build()
+{
+  return shadowBuilder.build(requestGlobals, "request", Request.class);
+}</pre>
+</div></div><p>(shadowBuilder and requestGlobals are injected into the module class instance)</p><p>This can be thought of as similar to:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public Request build()
+{
+  return requestGlobals.getRequest();
+}</pre>
+</div></div><p>However there is a <em>critical</em> difference between the two: a shadow property is <em>re-evaluated on each method invocation</em>. In the former case, the Request service will always obtain the current value of the request property from the per-thread RequestGlobals service. The second example is more than likely broken, since it will expose whatever value is in the request property of the RequestGlobals <em>at the time the Request service implementation is realized</em>.</p><p>Notice that in this example, the Request service is a normal singleton. This service can be freely injected into any service throughout the framework or application. Invoking methods on this service will always delegate to the current thread's request. Callers don't have to be aware of this internal delegation; it just happens.</p><h1 id="ShadowBuilderService-Non-Reflective">Non-Reflective</h1><p>When the shadow is created, reflection is used to translate the property name to a method name.
  This information is used to build a new class (at runtime) that is instantiated as the service implementation.</p><p>A typical method is implemented as (approximately):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">private final RequestGlobals source;
 
 public String getParameter(String name)
 {
   return source.getRequest().getParameter(name);
 }</pre>
-</div></div>
-
-<p>That is, the shadow implementation holds onto the target object (in the above example, the RequestGlobals service) and invokes a method on it directly, not using reflection, no differently than you would if you wrote the code yourself.</p>
-</div>
+</div></div><p>That is, the shadow implementation holds onto the target object (in the above example, the RequestGlobals service) and invokes a method on it directly, not using reflection, no differently than you would if you wrote the code yourself.</p></div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/starting-the-ioc-registry.html
==============================================================================
--- websites/production/tapestry/content/starting-the-ioc-registry.html (original)
+++ websites/production/tapestry/content/starting-the-ioc-registry.html Sun Jul 26 22:19:48 2015
@@ -62,12 +62,12 @@
 <div class="clearer"></div>
 
   <div id="breadcrumbs">
-        <a href="index.html">Apache Tapestry</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="user-guide.html">User Guide</a>&nbsp;&gt;&nbsp;<a href="ioc.html">IoC</a>&nbsp;&gt;&nbsp;<a href="starting-the-ioc-registry.html">Starting the IoC Registry</a>
+        <a href="index.html">Apache Tapestry</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="user-guide.html">User Guide</a>&nbsp;&gt;&nbsp;<a href="ioc.html">IOC</a>&nbsp;&gt;&nbsp;<a href="starting-the-ioc-registry.html">Starting the IoC Registry</a>
     <a class="edit" title="Edit this page (requires approval -- just ask on the mailing list)" href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=23338490">edit</a>
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><h1 id="StartingtheIoCRegistry-StartingtheTapestryIoCRegistry">Starting the Tapestry IoC Registry</h1><p>Primarily, you will use the IoC Registry as part of a Tapestry application. In those situations, the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/TapestryFilter.html">TapestryFilter</a> will be responsible for starting and stopping the registry.</p><p>However, you may want to do some integration testing using the Registry from within a test case, or you may even use Tapestry IoC separately from Tapestry.</p><h1 id="StartingtheIoCRegistry-BuildingtheRegistry">Building the Registry</h1><p>The class <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/RegistryBuilder.html">RegistryBuilder</a> is used to create a Registry.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div id="ConfluenceContent"><p>Primarily, you will use the IoC Registry as part of a Tapestry application. In those situations, the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/TapestryFilter.html">TapestryFilter</a> will be responsible for starting and stopping the registry.</p><p>However, you may want to do some integration testing using the Registry from within a test case, or you may even use Tapestry IoC separately from Tapestry.</p><h1 id="StartingtheIoCRegistry-BuildingtheRegistry">Building the Registry</h1><p>The class <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/RegistryBuilder.html">RegistryBuilder</a> is used to create a Registry.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">RegistryBuilder builder = new RegistryBuilder();
 
 builder.add(AppModule.class, UtilModule.class);

Modified: websites/production/tapestry/content/strategybuilder-service.html
==============================================================================
--- websites/production/tapestry/content/strategybuilder-service.html (original)
+++ websites/production/tapestry/content/strategybuilder-service.html Sun Jul 26 22:19:48 2015
@@ -62,55 +62,66 @@
 <div class="clearer"></div>
 
   <div id="breadcrumbs">
-        <a href="index.html">Apache Tapestry</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="user-guide.html">User Guide</a>&nbsp;&gt;&nbsp;<a href="ioc.html">IoC</a>&nbsp;&gt;&nbsp;<a href="strategybuilder-service.html">StrategyBuilder Service</a>
+        <a href="index.html">Apache Tapestry</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="user-guide.html">User Guide</a>&nbsp;&gt;&nbsp;<a href="ioc.html">IOC</a>&nbsp;&gt;&nbsp;<a href="strategybuilder-service.html">StrategyBuilder Service</a>
     <a class="edit" title="Edit this page (requires approval -- just ask on the mailing list)" href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=23338495">edit</a>
   </div>
 
 <div id="content">
-<div id="ConfluenceContent">
+<div id="ConfluenceContent"><p>The <strong>StrategyBuilder Service</strong> provides a convenient way to create an implementation of the <a shape="rect" class="external-link" href="https://en.wikipedia.org/wiki/Strategy_pattern" >Strategy</a> design pattern.</p><div class="aui-label" style="float:right" title="Related Articles">
 
-<h1 id="StrategyBuilderService-StrategyPattern">Strategy Pattern</h1>
 
-<div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
-<div class="error"><span class="error">Error formatting macro: contentbylabel: com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql : null</span> </div></div> 
 
-<p>Another of the Gang Of Four patterns, the strategy pattern as implemented in Tapestry IoC is a kind of late binding.</p>
 
-<p>The idea is that <em>adapters</em> for objects are accessed based on the <em>actual type</em> of an object. These adapters supply additional functionality. The adapters are located using a StrategyRegistry (<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/util/StrategyRegistry.html">API</a>).</p>
 
-<p>The lookup of adapters is based on an inheritance search; thus providing an adapter for type java.util.Map will match any object that implements the Map interface. The inheritance search works its way up the class hierarchy looking for a matching registration. If nothing is found, then all the interfaces directly or indirectly implemented by the selector class are checked. java.lang.Object is always the final match.</p>
 
-<p>A runtime exception is thrown if no match can be found.</p>
 
-<p>As a special case, the value null is searched for as if it were an instance of the class void.</p>
 
-<p>The StrategyBuilder service (<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/StrategyBuilder.html">API</a>) creates a service implementation around a strategy registry.</p>
+<h3>Related Articles</h3>
 
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-public interface StrategyBuilder
-{
-    &lt;S&gt; S build(StrategyRegistry&lt;S&gt; registry);
-}</pre>
-</div></div>
-
-<p>For a given interface (and matching StrategyRegistry), a service implementation is created. The service interface is determined from the strategy registry.</p>
-
-<p>The first parameter of each method is the <em>selector</em>. Its type is used to locate an adapter.</p>
-
-<p>The corresponding method of the adapter is then invoked, passing all parameters.</p>
+<ul class="content-by-label"><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
 
-<p>Every method of the service interface should take at least one parameter. Generally, such interfaces have only one or two methods.</p>
+        <div class="details">
+                        <a shape="rect" href="shadowbuilder-service.html">ShadowBuilder Service</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
 
-<h1 id="StrategyBuilderService-Example">Example</h1>
+        <div class="details">
+                        <a shape="rect" href="strategybuilder-service.html">StrategyBuilder Service</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
 
-<p>You will usually have a service configuration for defining the adapter registry.</p>
+        <div class="details">
+                        <a shape="rect" href="pipelinebuilder-service.html">PipelineBuilder Service</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
 
-<p>You convert the configuration into a StrategyRegistry, and use that to build the final service:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-  public static MyStrategyService build(Map&lt;Class, MyStrategyService&gt; configuration,
+        <div class="details">
+                        <a shape="rect" href="chainbuilder-service.html">ChainBuilder Service</a>
+                
+                        
+                    </div>
+    </li></ul>
+</div><p>Another of the Gang Of Four patterns, the strategy pattern as implemented in Tapestry IoC is a kind of late binding.</p><p>The idea is that <em>adapters</em> for objects are accessed based on the <em>actual type</em> of an object. These adapters supply additional functionality. The adapters are located using a StrategyRegistry (<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/util/StrategyRegistry.html">API</a>).</p><p>The lookup of adapters is based on an inheritance search; thus providing an adapter for type java.util.Map will match any object that implements the Map interface. The inheritance search works its way up the class hierarchy looking for a matching registration. If nothing is found, then all the interfaces directly or indirectly implemented by the selector class are checked. java.lang.Object is always the final match.</p><p>A runtime exception is thrown if no match can be found.</p><p>As a special c
 ase, the value null is searched for as if it were an instance of the class void.</p><p>The StrategyBuilder service (<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/StrategyBuilder.html">API</a>) creates a service implementation around a strategy registry.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public interface StrategyBuilder
+{
+    &lt;S&gt; S build(StrategyRegistry&lt;S&gt; registry);
+}</pre>
+</div></div><p>For a given interface (and matching StrategyRegistry), a service implementation is created. The service interface is determined from the strategy registry.</p><p>The first parameter of each method is the <em>selector</em>. Its type is used to locate an adapter.</p><p>The corresponding method of the adapter is then invoked, passing all parameters.</p><p>Every method of the service interface should take at least one parameter. Generally, such interfaces have only one or two methods.</p><h1 id="StrategyBuilderService-Example">Example</h1><p>You will usually have a service configuration for defining the adapter registry.</p><p>You convert the configuration into a StrategyRegistry, and use that to build the final service:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  public static MyStrategyService build(Map&lt;Class, MyStrategyService&gt; configuration,
     @InjectService("StrategyBuilder")
     StrategyBuilder builder)
   {
@@ -118,8 +129,7 @@ public interface StrategyBuilder
   
      return builder.build(registry);
   }</pre>
-</div></div>
-</div>
+</div></div><p></p></div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/symbols.html
==============================================================================
--- websites/production/tapestry/content/symbols.html (original)
+++ websites/production/tapestry/content/symbols.html Sun Jul 26 22:19:48 2015
@@ -62,154 +62,121 @@
 <div class="clearer"></div>
 
   <div id="breadcrumbs">
-        <a href="index.html">Apache Tapestry</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="user-guide.html">User Guide</a>&nbsp;&gt;&nbsp;<a href="ioc.html">IoC</a>&nbsp;&gt;&nbsp;<a href="symbols.html">Symbols</a>
+        <a href="index.html">Apache Tapestry</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="user-guide.html">User Guide</a>&nbsp;&gt;&nbsp;<a href="ioc.html">IOC</a>&nbsp;&gt;&nbsp;<a href="symbols.html">Symbols</a>
     <a class="edit" title="Edit this page (requires approval -- just ask on the mailing list)" href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=23338496">edit</a>
   </div>
 
 <div id="content">
-<div id="ConfluenceContent">
+<div id="ConfluenceContent"><p><strong>Symbols</strong> are named configuration settings for Tapestry IOC-based services. Tapestry provides mechanisms for easy access to symbols from within such services.</p><div class="aui-label" style="float:right" title="Related Articles">
 
-<div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
-<div class="error"><span class="error">Error formatting macro: contentbylabel: com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql : null</span> </div></div>
 
-<h1 id="Symbols-Symbols">Symbols</h1>
 
-<p><strong>Symbols</strong> are named configuration settings for Tapestry IOC-based services.  Tapestry provides mechanisms for easy access to symbols from within such services.</p>
 
-<h2 id="Symbols-Syntax">Syntax</h2>
 
-<p>The syntax of symbols is based on Ant expressions. That is, the name is surrounded by ${ and } characters:</p>
 
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-${some.symbol.name}
-</pre>
-</div></div>
-
-<p>The value on the inside is the <em>symbol name</em>. By convention, the symbol name is segmented with periods (for example, "tapestry.production-mode").</p>
-
-<h2 id="Symbols-Built-inSymbols">Built-in Symbols</h2>
-
-<p>The <a shape="rect" href="configuration.html">Configuration</a> page lists the symbol names used by Tapestry's built-in services.</p>
-
-<h2 id="Symbols-UsingSymbolsinyourServices">Using Symbols in your Services</h2>
 
-<p>Symbols are used inside the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Value.html">Value</a> and @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/InjectService.html">InjectService</a> annotations.</p>
 
-<p>For example:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-  public static MyService build(
+<h3>Related Articles</h3>
+
+<ul class="content-by-label"><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="application-module-class-cheat-sheet.html">Application Module Class Cheat Sheet</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="ioc-cookbook-service-configurations.html">IoC cookbook - Service Configurations</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="symbols.html">Symbols</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="tapestry-ioc-configuration.html">Tapestry IoC Configuration</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="response-compression.html">Response Compression</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="configuration.html">Configuration</a>
+                
+                        
+                    </div>
+    </li></ul>
+</div><h2 id="Symbols-Syntax">Syntax</h2><p>The syntax of symbols is based on Ant expressions. That is, the name is surrounded by ${ and } characters:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">${some.symbol.name}
+</pre>
+</div></div><p>The value on the inside is the <em>symbol name</em>. By convention, the symbol name is segmented with periods (for example, "tapestry.production-mode").</p><h2 id="Symbols-Built-inSymbols">Built-in Symbols</h2><p>The <a shape="rect" href="configuration.html">Configuration</a> page lists the symbol names used by Tapestry's built-in services.</p><h2 id="Symbols-UsingSymbolsinyourServices">Using Symbols in your Services</h2><p>Symbols are used inside the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Value.html">Value</a> and @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/InjectService.html">InjectService</a> annotations.</p><p>For example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  public static MyService build(
       @InjectService("${some-service-id}") Collaborator collab)
   {
     return . . . ;
   }</pre>
-</div></div>
-
-<p>Here, the symbol name, <code>some-service-id</code> is a service id, such as <code>WackyCollaborator</code>.</p>
-
-<p>Although not shown here, it is possible to use multiple symbols inside the string, or mix literal text with symbols.</p>
-
-<h2 id="Symbols-InjectingValuesfromSymbols">Injecting Values from Symbols</h2>
-
-<p>You may also inject symbol values. For example, if you are interested in whether the application is in production mode or developer mode:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-public class MyService implements MyServiceInterface
+</div></div><p>Here, the symbol name, <code>some-service-id</code> is a service id, such as <code>WackyCollaborator</code>.</p><p>Although not shown here, it is possible to use multiple symbols inside the string, or mix literal text with symbols.</p><h2 id="Symbols-InjectingValuesfromSymbols">Injecting Values from Symbols</h2><p>You may also inject symbol values. For example, if you are interested in whether the application is in production mode or developer mode:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public class MyService implements MyServiceInterface
 {
   public MyService(@Value("${tapestry.production-mode}") boolean productionMode, ...)
   {
     if (productionMode) {
       . . .
 </pre>
-</div></div>
-
-<p>Here Tapestry has <a shape="rect" href="type-coercion.html">coerced</a> the "tapestry.production-mode" symbol to a boolean to be injected.</p>
-
-<p>As an alternative, the @Symbol annotation, may be used:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-public class MyService implements MyServiceInterface
+</div></div><p>Here Tapestry has <a shape="rect" href="type-coercion.html">coerced</a> the "tapestry.production-mode" symbol to a boolean to be injected.</p><p>As an alternative, the @Symbol annotation, may be used:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public class MyService implements MyServiceInterface
 {
   public MyService(@Symbol(SymbolConstants.PRODUCTION_MODE) boolean productionMode, ...)
   {
     if (productionMode) {
       . . .
 </pre>
-</div></div>
-
-<p>This is very useful when a constant value is defined for the symbol; it means that the compiler can catch a typo, rather than detecting it a runtime.</p>
-
-<p><strong>Note:</strong> When injecting a symbol as a <em>string</em> into a service, you must use the @Inject annotation as well as @Value or @Symbol; otherwise Tapestry will inject the service's service id.</p>
-
-<h2 id="Symbols-SymbolResolution">Symbol Resolution</h2>
-
-<p>Symbols are resolved by the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/SymbolSource.html">SymbolSource</a> service. The SymbolSource service checks against an ordered list of <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/SymbolProvider.html">SymbolProvider</a> objects.</p>
-
-<p>You may employ additional symbol providers by contributing to the SymbolSource service configuration, which is an ordered list of SymbolProviders.</p>
-
-<p>By default, there are three providers:</p>
-
-<h3 id="Symbols-SystemPropertiesProvider">SystemProperties Provider</h3>
-
-<p>The first provider allows JVM System Properties to provide symbol values. This allows the use of the <strong>java</strong> command's <strong>-D</strong> option to provide runtime overrides. This is most often used when testing code, rather than in production. SystemProperties is always checked first.</p>
-
-<h3 id="Symbols-ApplicationDefaultsProvider">ApplicationDefaults Provider</h3>
-
-<p>Values not found as System Properties are searched for in the ApplicationDefaults. This service, ApplicationDefaults, may be configured using a mapped configuration to provide values.</p>
-
-<p>From the previous example:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-  public void contributeApplicationDefaults(MappedConfiguration&lt;String, String&gt; configuration)
+</div></div><p>This is very useful when a constant value is defined for the symbol; it means that the compiler can catch a typo, rather than detecting it a runtime.</p><p><strong>Note:</strong> When injecting a symbol as a <em>string</em> into a service, you must use the @Inject annotation as well as @Value or @Symbol; otherwise Tapestry will inject the service's service id.</p><h2 id="Symbols-SymbolResolution">Symbol Resolution</h2><p>Symbols are resolved by the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/SymbolSource.html">SymbolSource</a> service. The SymbolSource service checks against an ordered list of <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/SymbolProvider.html">SymbolProvider</a> objects.</p><p>You may employ additional symbol providers by contributing to the SymbolSource service configuration, which is an ordered list o
 f SymbolProviders.</p><p>By default, there are three providers:</p><h3 id="Symbols-SystemPropertiesProvider">SystemProperties Provider</h3><p>The first provider allows JVM System Properties to provide symbol values. This allows the use of the <strong>java</strong> command's <strong>-D</strong> option to provide runtime overrides. This is most often used when testing code, rather than in production. SystemProperties is always checked first.</p><h3 id="Symbols-ApplicationDefaultsProvider">ApplicationDefaults Provider</h3><p>Values not found as System Properties are searched for in the ApplicationDefaults. This service, ApplicationDefaults, may be configured using a mapped configuration to provide values.</p><p>From the previous example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  public void contributeApplicationDefaults(MappedConfiguration&lt;String, String&gt; configuration)
   {
     configuration.add("some-service-id", "WackyCollaborator");
   }</pre>
-</div></div>
-
-<h3 id="Symbols-FactoryDefaultsProvider">FactoryDefaults Provider</h3>
-
-<p>This is the same as ApplicationDefaults, but checked only if a value is not satisfied by SystemProperties or ApplicationDefaults.</p>
-
-<p>Libraries will typically set reasonable defaults as contributions to the FactoryDefaults service configuration. Individual applications may hard code overrides of those defaults using ApplicationDefaults. Individual developers may override even those defaults by setting JVM System Properties.</p>
-
-<p>FactoryDefaults is always checked last when resolving symbol names to symbol values.</p>
-
-<h2 id="Symbols-RecursiveSymbols">Recursive Symbols</h2>
-
-<p>It is possible and valid to define one symbol in terms of one or more other symbols.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-  public void contributeFactoryDefaults(MappedConfiguration&lt;String, String&gt; configuration)
+</div></div><h3 id="Symbols-FactoryDefaultsProvider">FactoryDefaults Provider</h3><p>This is the same as ApplicationDefaults, but checked only if a value is not satisfied by SystemProperties or ApplicationDefaults.</p><p>Libraries will typically set reasonable defaults as contributions to the FactoryDefaults service configuration. Individual applications may hard code overrides of those defaults using ApplicationDefaults. Individual developers may override even those defaults by setting JVM System Properties.</p><p>FactoryDefaults is always checked last when resolving symbol names to symbol values.</p><h2 id="Symbols-RecursiveSymbols">Recursive Symbols</h2><p>It is possible and valid to define one symbol in terms of one or more other symbols.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  public void contributeFactoryDefaults(MappedConfiguration&lt;String, String&gt; configuration)
   {
       configuration.add("report.url", "http://${report.host}:${report.port}/${report.path}");
       configuration.add("report.host", "www.myreportsite.com");
       configuration.add("report.port", "80");
       configuration.add("report.path", "/report.cgi");
   }</pre>
-</div></div>
-
-<p>The ordinary default for <code>report.url</code> will be <code><a shape="rect" class="external-link" href="http://www.myreportsite.com:80/report.cgi" >http://www.myreportsite.com:80/report.cgi</a></code>.</p>
-
-<p>However, this can be changed by making an overriding contribution to the ApplicationDefaults service configuration.</p>
-
-<p>Tapestry checks that no symbol is directly or indirectly dependent on itself. For example, the following contribution is illegal:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-  public void contributeApplicationDefaults(MappedConfiguration&lt;String, String&gt; configuration)
+</div></div><p>The ordinary default for <code>report.url</code> will be <code><a shape="rect" class="external-link" href="http://www.myreportsite.com:80/report.cgi" >http://www.myreportsite.com:80/report.cgi</a></code>.</p><p>However, this can be changed by making an overriding contribution to the ApplicationDefaults service configuration.</p><p>Tapestry checks that no symbol is directly or indirectly dependent on itself. For example, the following contribution is illegal:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  public void contributeApplicationDefaults(MappedConfiguration&lt;String, String&gt; configuration)
   {
       configuration.add("report.path", "${report.url}/report.cgi");
   }</pre>
-</div></div>
-
-<p>When the <code>report.url</code> is referenced, an exception will be thrown with the message: <em>Symbol 'report.path' is defined in terms of itself (report.path --&gt; report.url --&gt; report.path)</em>.</p>
-</div>
+</div></div><p>When the <code>report.url</code> is referenced, an exception will be thrown with the message: <em>Symbol 'report.path' is defined in terms of itself (report.path --&gt; report.url --&gt; report.path)</em>.</p></div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/type-coercion.html
==============================================================================
--- websites/production/tapestry/content/type-coercion.html (original)
+++ websites/production/tapestry/content/type-coercion.html Sun Jul 26 22:19:48 2015
@@ -62,14 +62,42 @@
 <div class="clearer"></div>
 
   <div id="breadcrumbs">
-        <a href="index.html">Apache Tapestry</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="user-guide.html">User Guide</a>&nbsp;&gt;&nbsp;<a href="ioc.html">IoC</a>&nbsp;&gt;&nbsp;<a href="type-coercion.html">Type Coercion</a>
+        <a href="index.html">Apache Tapestry</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="user-guide.html">User Guide</a>&nbsp;&gt;&nbsp;<a href="ioc.html">IOC</a>&nbsp;&gt;&nbsp;<a href="type-coercion.html">Type Coercion</a>
     <a class="edit" title="Edit this page (requires approval -- just ask on the mailing list)" href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=23338478">edit</a>
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><div class="navmenu" style="float:right; background:white; margin:3px; padding:3px">
-<div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px"></div> 
-<div class="error"><span class="error">Error formatting macro: contentbylabel: com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql : null</span> </div></div><p><strong>Type Coercion</strong> is the conversion of one type of object to a new object of a different type with similar content. Tapestry frequently must coerce objects from one type to another. A common example is the coercion of a string into an integer or a double.</p><p>Although type coercions happen more inside tapestry-core (including <a shape="rect" href="parameter-type-coercion.html">coercions of <span class="confluence-link">component parameters</span></a><span class="confluence-link">&#160;</span>), they may also happen inside tapestry-ioc, such as when injecting a value, rather than a service, into a builder method.</p><p>Like everything else in Tapestry, type coercions are extensible. At the root is the <a shape="rect" class="external-link" href="http://tapestry.apache.org/curr
 ent/apidocs/org/apache/tapestry5/ioc/services/TypeCoercer.html">TypeCoercer</a> service. Its configuration consists of a number of <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/CoercionTuple.html">CoercionTuples</a>. Each tuple defines how to coerce from one type to another. The initial set of coercions is focused primarily on coercions between different numeric types:</p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="type-coercion.data/type-coercer.png"></span></p><h2 id="TypeCoercion-DefaultTypeCoercions">Default Type Coercions</h2><p>There are a few special coercions related to <code>null</code> there; <code>Object</code> --&gt; <code>List</code> wraps a lone object as a singleton list, we then need <code>null</code> --&gt; <code>List</code> to ensure that <code>null</code> stays <code>null</code> (rather than a singleton list whose lone element is a <code>nul
 l</code>).</p><p>Tapestry can <em>interpolate</em> necessary coercions. For example, say it is necessary to coerce a <code>StringBuffer</code> to an <code>Integer</code>; the TypeCoercer service will chain together a series of coercions:</p><ul><li><code>Object</code> --&gt; <code>String</code></li><li><code>String</code> --&gt; <code>Long</code></li><li><code>Long</code> --&gt; <code>Integer</code></li></ul><h2 id="TypeCoercion-Coercingfromnull">Coercing from null</h2><p>Coercing from <code>null</code> is special; it is not a spanning search as with the other types. Either there is a specific coercion from <code>null</code> to the desired type, or no coercion takes places (and the coerced value is <code>null</code>).</p><p>The only built-in <code>null</code> coercion is from <code>null</code> to <code>boolean</code> (which is always false).</p><h2 id="TypeCoercion-ListofCoercions">List of Coercions</h2><p>As of Tapestry versions 5.1 and 5.2, the following coercions are available:</
 p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div id="ConfluenceContent"><p><strong>Type Coercion</strong> is the conversion of one type of object to a new object of a different type with similar content. Tapestry frequently must coerce objects from one type to another. A common example is the coercion of string "5" into an integer 5 or a double 5.0.</p><div class="aui-label" style="float:right" title="Related Articles">
+
+
+
+
+
+
+
+
+<h3>Related Articles</h3>
+
+<ul class="content-by-label"><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="type-coercion.html">Type Coercion</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="parameter-type-coercion.html">Parameter Type Coercion</a>
+                
+                        
+                    </div>
+    </li></ul>
+</div><p>Although type coercions happen more inside tapestry-core (including <a shape="rect" href="parameter-type-coercion.html">coercions of <span class="confluence-link">component parameters</span></a><span class="confluence-link">&#160;</span>), they may also happen inside tapestry-ioc, such as when injecting a value, rather than a service, into a builder method.</p><p>Like everything else in Tapestry, type coercions are extensible. At the root is the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/TypeCoercer.html">TypeCoercer</a> service. Its configuration consists of a number of <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/CoercionTuple.html">CoercionTuples</a>. Each tuple defines how to coerce from one type to another. The initial set of coercions is focused primarily on coercions between different numeric types:</p><p><span clas
 s="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="type-coercion.data/type-coercer.png"></span></p><h2 id="TypeCoercion-DefaultTypeCoercions">Default Type Coercions</h2><p>There are a few special coercions related to <code>null</code> there; <code>Object</code> --&gt; <code>List</code> wraps a lone object as a singleton list, we then need <code>null</code> --&gt; <code>List</code> to ensure that <code>null</code> stays <code>null</code> (rather than a singleton list whose lone element is a <code>null</code>).</p><p>Tapestry can <em>interpolate</em> necessary coercions. For example, say it is necessary to coerce a <code>StringBuffer</code> to an <code>Integer</code>; the TypeCoercer service will chain together a series of coercions:</p><ul><li><code>Object</code> --&gt; <code>String</code></li><li><code>String</code> --&gt; <code>Long</code></li><li><code>Long</code> --&gt; <code>Integer</code></li></ul><h2 id="TypeCoercion-Coercingfromnull">Coercing fro
 m null</h2><p>Coercing from <code>null</code> is special; it is not a spanning search as with the other types. Either there is a specific coercion from <code>null</code> to the desired type, or no coercion takes places (and the coerced value is <code>null</code>).</p><p>The only built-in <code>null</code> coercion is from <code>null</code> to <code>boolean</code> (which is always false).</p><h2 id="TypeCoercion-ListofCoercions">List of Coercions</h2><p>As of Tapestry versions 5.1 and 5.2, the following coercions are available:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">Double --&gt; Float
 Float --&gt; Double
 Long --&gt; Boolean
@@ -147,7 +175,7 @@ short[] --&gt; java.util.List
         }
     }));
 </pre>
-</div></div></div>
+</div></div><p></p></div>
 </div>
 
 <div class="clearer"></div>



Mime
View raw message