You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bu...@apache.org on 2017/09/18 14:15:12 UTC
svn commit: r1018323 - in /websites/staging/sling/trunk/content: ./
documentation/bundles/models.html
Author: buildbot
Date: Mon Sep 18 14:15:11 2017
New Revision: 1018323
Log:
Staging update by buildbot for sling
Modified:
websites/staging/sling/trunk/content/ (props changed)
websites/staging/sling/trunk/content/documentation/bundles/models.html
Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Sep 18 14:15:11 2017
@@ -1 +1 @@
-1808719
+1808721
Modified: websites/staging/sling/trunk/content/documentation/bundles/models.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/bundles/models.html (original)
+++ websites/staging/sling/trunk/content/documentation/bundles/models.html Mon Sep 18 14:15:11 2017
@@ -420,7 +420,7 @@ using the <code>@Via</code> annotation.
</pre></div>
-<p>See the <a href="#via-types">Via Types</a> section below for details on the included types for <code>@Via</code>.</p>
+<p>See the <a href="#via-types-since-api-134implementation-140">Via Types</a> section below for details on the included types for <code>@Via</code>.</p>
<h2 id="source">Source<a class="headerlink" href="#source" title="Permanent link">¶</a></h2>
<p>If there is ambiguity where a given injection could be handled by more than one injector, the <code>@Source</code> annotation can be used to define which injector is responsible:</p>
<div class="codehilite"><pre><span class="nd">@Model</span><span class="o">(</span><span class="n">adaptables</span><span class="o">=</span><span class="n">SlingHttpServletRequest</span><span class="o">.</span><span class="na">class</span><span class="o">)</span>
@@ -844,8 +844,7 @@ model, exported as a <code>java.lang.Str
</table>
<h2 id="custom-via-type">Custom Via Type<a class="headerlink" href="#custom-via-type" title="Permanent link">¶</a></h2>
<p>Defining your own type for the <code>@Via</code> annotation is a two step process. The first step is to create a marker class implementing the <code>@ViaProviderType</code> annotation. This class can be entirely empty, e.g.</p>
-<div class="codehilite"><pre><span class="p">:</span><span class="n">java</span>
-<span class="n">public</span> <span class="n">class</span> <span class="n">MyCustomProviderType</span> <span class="n">implements</span> <span class="n">ViaProviderType</span> <span class="p">{}</span>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyCustomProviderType</span> <span class="kd">implements</span> <span class="n">ViaProviderType</span> <span class="o">{}</span>
</pre></div>
@@ -855,7 +854,7 @@ model, exported as a <code>java.lang.Str
<li><code>getAdaptable()</code> should return the new adaptable or <code>ViaProvider.ORIGINAL</code> to indicate that the original adaptable should be used.</li>
</ul>
<div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
- Rev. 1808719 by justin on Mon, 18 Sep 2017 14:08:16 +0000
+ Rev. 1808721 by justin on Mon, 18 Sep 2017 14:15:00 +0000
</div>
<div class="trademarkFooter">
Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project