This is an automated email from the ASF dual-hosted git repository.

sseifert pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/sling-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 8c92fab  SLING-7194 Document that AdapterManager sorts AdapterFactory 
implementations lowest ranking first
8c92fab is described below

commit 8c92fab1c1dfaf3f04d48498b6b3aaf5f1525c1e
Author: sseifert <[email protected]>
AuthorDate: Tue Dec 12 11:43:42 2017 +0100

    SLING-7194 Document that AdapterManager sorts AdapterFactory 
implementations lowest ranking first
---
 documentation/development/sling-testing-tools.html | 9 ++++++---
 documentation/the-sling-engine/adapters.html       | 3 ++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/documentation/development/sling-testing-tools.html 
b/documentation/development/sling-testing-tools.html
index 753819b..66d25d9 100644
--- a/documentation/development/sling-testing-tools.html
+++ b/documentation/development/sling-testing-tools.html
@@ -155,9 +155,12 @@ TEST_PASSED
 </code></pre>
 <p>Test failures would be included in this JSON representation - you can test 
that by modifying the script to fail and making the same request again. </p>
 <h1><a href="#integration-tests-example" 
name="integration-tests-example">Integration tests example</a></h1>
-<p>The <a 
href="http://svn.apache.org/repos/asf/sling/trunk/testing/samples/integration-tests";>testing/samples/integration-tests</a>
 module runs some simple integration tests against a Sling Launchpad instance 
that's setup from scratch before running the tests.</p>
-<p>This module's pom and Java code can be used as examples to setup your own 
integration testing modules for Sling-based apps - or for any other runnable 
jar that provides an http service.</p>
+<p>The <a 
href="https://github.com/apache/sling-samples/tree/master/testing";>IT 
Samples</a> modules run some simple integration tests against a Sling Launchpad 
instance that's setup from scratch before running the tests.</p>
+<p>Either of those modules can be used as examples to setup your own 
integration testing modules for Sling-based apps - or for any other runnable 
jar that provides an http service.</p>
 <p>Besides serving as examples, some of the tests in this module are used to 
validate the testing tools. They run as part of the full Sling <a 
href="/project-information.html">continuous integration</a> build, so they're 
guaranteed to be correct examples if that build is successful.</p>
+<div class="warning">
+The information below is outdated and needs an update, please rather directly 
check the source files linked above.
+</div>
 <p>The sample uses the <a 
href="http://svn.apache.org/repos/asf/sling/trunk/testing/tools";>testing/tools</a>
 to make the test code simpler. See the 
[OsgiConsoleTest|https://svn.apache.org/repos/asf/sling/trunk/testing/samples/integration-tests/src/test/java/org/apache/sling/testing/samples/integrationtests/http/OsgiConsoleTest.java]
 class for an example of a test that's very readable and requires no test setup 
or boilerplate code.</p>
 <p>The following steps are executed in the <code>integration-test</code> phase 
of this module's Maven build:</p>
 <ol>
@@ -190,7 +193,7 @@ TEST_PASSED
 </code></pre>
 <p>the server start is interrupted until a debugger is connected on port 
8000.</p></section></div></div>            
             <div class="footer">
-<div class="revisionInfo">Last modified by <span class="author">Robert 
Munteanu</span> on <span class="comment">Wed Nov 22 22:30:38 2017 
+0200</span></div>                <p>
+<div class="revisionInfo">Last modified by <span class="author">Konrad 
Windszus</span> on <span class="comment">Sat Dec 9 11:10:04 2017 
+0100</span></div>                <p>
                     Apache Sling, Sling, Apache, the Apache feather logo, and 
the Apache Sling project logo are trademarks of The Apache Software Foundation. 
All other marks mentioned may be trademarks or registered trademarks of their 
respective owners.
                 </p><p>
                     Copyright © 2011-2017 The Apache Software Foundation.
diff --git a/documentation/the-sling-engine/adapters.html 
b/documentation/the-sling-engine/adapters.html
index 5ceb46b..b514bd3 100644
--- a/documentation/the-sling-engine/adapters.html
+++ b/documentation/the-sling-engine/adapters.html
@@ -167,6 +167,7 @@
 </code></pre>
 <p>Implementations of this interface are registered as OSGi services providing 
two lists: The list of classes which may be adapted (property named 
<code>adaptables</code>) and the list of classes to which the adapted class may 
be adapted (property named <code>adapters</code>). A good example of an Class 
implementing <code>AdapterFactory</code> is the 
<code>SlingScriptAdapterFactory</code>. In addition a property named 
<code>adapter.condition</code> can be provided which is supposed to co [...]
 <p><code>AdapterFactory</code> services are gathered by a 
<code>AdapterManager</code> implementation for use by consumers. Consumers 
should not care for <code>AdapterFactory</code> services.</p>
+<p>If multiple implementations for the same combination of adapter and 
adaptable are registered, the implementation with the lowest service ranking 
wins (or with the highest service id, if the ranking is the same).</p>
 <h2><a href="#adaptermanager" name="adaptermanager">AdapterManager</a></h2>
 <p>The <code>AdapterManager</code> is defines the service interface for the 
generalized and extensible use of <code>AdapterFactory</code> services. Thus 
the adapter manager may be retrieved from the service registry to try to adapt 
whatever object that needs to be adapted - provided appropriate adapters 
exist.</p>
 <p>The <code>AdapterManager</code> interface is defined as follows:</p>
@@ -193,7 +194,7 @@
 <p>The <code>SlingAdaptable</code> class is an implementation of the 
<code>Adaptable</code> interface which provides built-in support to call the 
<code>AdapterManager</code> to provide an adapter from the 
<code>Adaptable</code> object to the requested class.</p>
 <p>An example of extending the <code>SlingAdaptable</code> class will be the 
Sling JCR based <code>Resource</code> implementation. This way, such a resource 
may be adapted to a <code>SlingScript</code> by means of an appropriately 
programmed <code>AdapterFactory</code> (see below).</p></section></div></div>   
         
             <div class="footer">
-<div class="revisionInfo">Last modified by <span class="author">Bertrand 
Delacretaz</span> on <span class="comment">Fri Sep 29 15:36:08 2017 
+0200</span></div>                <p>
+<div class="revisionInfo">Last modified by <span 
class="author">sseifert</span> on <span class="comment">Tue Dec 12 11:41:16 
2017 +0100</span></div>                <p>
                     Apache Sling, Sling, Apache, the Apache feather logo, and 
the Apache Sling project logo are trademarks of The Apache Software Foundation. 
All other marks mentioned may be trademarks or registered trademarks of their 
respective owners.
                 </p><p>
                     Copyright © 2011-2017 The Apache Software Foundation.

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to