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 2016/11/21 15:15:46 UTC

svn commit: r1001428 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/models.html

Author: buildbot
Date: Mon Nov 21 15:15:45 2016
New Revision: 1001428

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 Nov 21 15:15:45 2016
@@ -1 +1 @@
-1770653
+1770697

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 Nov 21 15:15:45 2016
@@ -144,9 +144,9 @@ h2:hover > .headerlink, h3:hover > .head
 <li><a href="#custom-annotations">Custom Annotations</a></li>
 </ul>
 </li>
-<li><a href="#specifying-an-alternate-adapter-class-since-sling-models-110">Specifying an Alternate Adapter Class (Since Sling Models 1.1.0)</a></li>
-<li><a href="#associating-a-model-class-with-a-resource-type-since-sling-models-130">Associating a Model Class with a Resource Type (Since Sling Models 1.3.0)</a></li>
-<li><a href="#exporter-framework-since-sling-models-130">Exporter Framework (Since Sling Models 1.3.0)</a></li>
+<li><a href="#specifying-an-alternate-adapter-class-since-110">Specifying an Alternate Adapter Class (since 1.1.0)</a></li>
+<li><a href="#associating-a-model-class-with-a-resource-type-since-130">Associating a Model Class with a Resource Type (since 1.3.0)</a></li>
+<li><a href="#exporter-framework-since-130">Exporter Framework (since 1.3.0)</a></li>
 </ul>
 </div>
 <p>Many Sling projects want to be able to create model objects - POJOs which are automatically mapped from Sling objects, typically resources, but also request objects. Sometimes these POJOs need OSGi services as well.</p>
@@ -194,7 +194,7 @@ h2:hover > .headerlink, h3:hover > .head
 </pre></div>
 
 
-<p>Because the name of a contructor argument parameter cannot be detected via the Java Reflection API a <code>@Named</code> annotation is mandatory for injectors that require a name for resolving the injection.</p>
+<p>Because the name of a constructor argument parameter cannot be detected via the Java Reflection API a <code>@Named</code> annotation is mandatory for injectors that require a name for resolving the injection.</p>
 <p>In order for these classes to be picked up, there is a header which must be added to the bundle's manifest:</p>
 <div class="codehilite"><pre><span class="nt">&lt;Sling-Model-Packages&gt;</span>
   org.apache.sling.models.it.models
@@ -687,7 +687,7 @@ Instead of using the deprecated annotati
 <p>To create a custom annotation, implement the <code>org.apache.sling.models.spi.injectorspecific.StaticInjectAnnotationProcessorFactory</code> interface.
 This interface may be implemented by the same class as implements an injector, but this is not strictly necessary. Please refer to the
 injectors in <a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/injectors/">Subversion</a> for examples.</p>
-<h1 id="specifying-an-alternate-adapter-class-since-sling-models-110">Specifying an Alternate Adapter Class (Since Sling Models 1.1.0)<a class="headerlink" href="#specifying-an-alternate-adapter-class-since-sling-models-110" title="Permanent link">&para;</a></h1>
+<h1 id="specifying-an-alternate-adapter-class-since-110">Specifying an Alternate Adapter Class (since 1.1.0)<a class="headerlink" href="#specifying-an-alternate-adapter-class-since-110" title="Permanent link">&para;</a></h1>
 <p>By default, each model class is registered using its own implementation class as adapter. If the class has additional interfaces this is not relevant.</p>
 <p>The <code>@Model</code> annotations provides an optional <code>adapters</code> attribute which allows specifying under which type(s) the model
 implementation should be registered in the Models Adapter Factory. With this property it is possible to register the model
@@ -708,14 +708,14 @@ ordered alphabetically by the class name
 SPI interface which could use context to determine which implementation can be chosen, e.g. depending an a tenant or
 content path context. If multiple implementations of the <code>ImplementationPicker</code> interface are present, they are queried
 one after another in order of their service ranking property, the first one that picks an implementation wins.</p>
-<h1 id="associating-a-model-class-with-a-resource-type-since-sling-models-130">Associating a Model Class with a Resource Type (Since Sling Models 1.3.0)<a class="headerlink" href="#associating-a-model-class-with-a-resource-type-since-sling-models-130" title="Permanent link">&para;</a></h1>
+<h1 id="associating-a-model-class-with-a-resource-type-since-130">Associating a Model Class with a Resource Type (since 1.3.0)<a class="headerlink" href="#associating-a-model-class-with-a-resource-type-since-130" title="Permanent link">&para;</a></h1>
 <p>The <code>@Model</code> annotation provides an optional <code>resourceType</code> attribute which allows for model classes to be associated with one or
 more resource types. This is used in three different ways.</p>
 <p>In the case of multiple model classes implementing the same interface, the class with the "closest" resource type will be used when
 adapting to the interface.</p>
 <p>The <code>ModelFactory</code> service interface has methods <code>Object getModelFromResource(Resource)</code> and <code>Object getModelFromRequest(SlingHttpServletRequest)</code> which will dynamically determine the adapter class based on the <code>Resource</code> using its type. In the case of the <code>SlingHttpServletRequest</code> method, it uses the request's <code>Resource</code> object (i.e. by calling <code>request.getResource()</code>)</p>
 <p>The resource type is also used as part of the Exporter framework (see next section).</p>
-<h1 id="exporter-framework-since-sling-models-130">Exporter Framework (Since Sling Models 1.3.0)<a class="headerlink" href="#exporter-framework-since-sling-models-130" title="Permanent link">&para;</a></h1>
+<h1 id="exporter-framework-since-130">Exporter Framework (since 1.3.0)<a class="headerlink" href="#exporter-framework-since-130" title="Permanent link">&para;</a></h1>
 <p>Sling Models objects can be exported to arbitrary Java objects through the Sling Models Exporter framework. Model objects can be
 programatically exported by calling the <code>ModelFactory</code> method <code>exportModel()</code>. This method takes as its arguments:</p>
 <ul>
@@ -736,7 +736,7 @@ currently includes a single exporter, us
 through the <code>@Exporter</code> annotation's <code>selector</code> attribute). When this servlet is invoked, the <code>Resource</code> will be adapted to the 
 model, exported as a <code>java.lang.String</code> (via the named Exporter) and then returned to the client.</p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1767819 by justin on Thu, 3 Nov 2016 04:44:12 +0000
+        Rev. 1770697 by sseifert on Mon, 21 Nov 2016 15:15:30 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project