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/02/24 08:01:57 UTC

svn commit: r1007234 - in /websites/staging/sling/trunk/content: ./ documentation/the-sling-engine/resources.html

Author: buildbot
Date: Fri Feb 24 08:01:57 2017
New Revision: 1007234

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    websites/staging/sling/trunk/content/documentation/the-sling-engine/resources.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Feb 24 08:01:57 2017
@@ -1 +1 @@
-1784233
+1784234

Modified: websites/staging/sling/trunk/content/documentation/the-sling-engine/resources.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/the-sling-engine/resources.html (original)
+++ websites/staging/sling/trunk/content/documentation/the-sling-engine/resources.html Fri Feb 24 08:01:57 2017
@@ -180,11 +180,11 @@ h2:hover > .headerlink, h3:hover > .head
 </tr>
 <tr>
 <td>Metadata</td>
-<td>Resources in general support <a href="http://sling.apache.org/apidocs/sling6/org/apache/sling/api/resource/ResourceMetadata.html" title="ResourceMetadata">link text</a> providing access to values such as the length of a binary resource (which can be streamed) or the Resource's content type.</td>
+<td>Resources in general support <a href="http://sling.apache.org/apidocs/sling8/org/apache/sling/api/resource/ResourceMetadata.html" title="ResourceMetadata">link text</a> providing access to values such as the length of a binary resource (which can be streamed) or the Resource's content type.</td>
 </tr>
 </tbody>
 </table>
-<p>For a complete description of the <code>Resource</code> interface, please refer to the <a href="http://sling.apache.org/apidocs/sling6/org/apache/sling/api/resource/Resource.html" title="Resource">link text</a> JavaDoc.</p>
+<p>For a complete description of the <code>Resource</code> interface, please refer to the <a href="http://sling.apache.org/apidocs/sling8/org/apache/sling/api/resource/Resource.html" title="Resource">link text</a> JavaDoc.</p>
 <h3 id="resource-types">Resource Types<a class="headerlink" href="#resource-types" title="Permanent link">&para;</a></h3>
 <p>The exact method of setting the resource type for a Resource depends on the actual Resource Provider. For the four main Resource Provider
 implementations provided by Sling, the assignments are as follows:</p>
@@ -222,7 +222,7 @@ implementations provided by Sling, the a
 <p>Resource Types form a type hierarchy much like Java classes form a type hierarchy. Each resource type has a resource super type, either explicitly defined as for example for JCR or Servlet Resources or implicitly. The implicit Resource Super Type is at the same time the root Resource Type much like the <code>java.lang.Object</code> class is called <code>sling/servlet/default</code> (for historical reasons). The <code>sling/servlet/default</code> Resource Type is the only type without a super type.</p>
 <h3 id="adapters">Adapters<a class="headerlink" href="#adapters" title="Permanent link">&para;</a></h3>
 <p>The object types to which Resources may be adapted depend mostly depends on the Resource Provider providing the resource. For example all JCR node based resources always adapt to <code>javax.jcr.Node</code> objects.</p>
-<p>If the actual Resource object class implementation extends from the <code>SlingAdaptable</code> class, then in addition all <code>AdapterFactory</code> services adapting <code>Resource</code> objects are considered when trying to adapt the Resource. In general Resource Providers are recommended to have their Resource implementation extend from <a href="http://sling.apache.org/apidocs/sling6/org/apache/sling/api/resource/AbstractResource.html" title="AbstractResource">link text</a> which guarantees the Resource implementation to extend from <code>SlingAdaptable</code> and thus supporting Adapter Factories.</p>
+<p>If the actual Resource object class implementation extends from the <code>SlingAdaptable</code> class, then in addition all <code>AdapterFactory</code> services adapting <code>Resource</code> objects are considered when trying to adapt the Resource. In general Resource Providers are recommended to have their Resource implementation extend from <a href="http://sling.apache.org/apidocs/sling8/org/apache/sling/api/resource/AbstractResource.html" title="AbstractResource">link text</a> which guarantees the Resource implementation to extend from <code>SlingAdaptable</code> and thus supporting Adapter Factories.</p>
 <h2 id="how-to-get-a-resource">How to get a Resource<a class="headerlink" href="#how-to-get-a-resource" title="Permanent link">&para;</a></h2>
 <p>To get at Resources, you need a <code>ResourceResolver</code>. This interface defines four kinds of methods to access resources:</p>
 <ul>
@@ -248,7 +248,7 @@ and <code>getResource(Resource base, Str
 <p>More details on mappings can be found at <a href="/documentation/the-sling-engine/mappings-for-resource-resolution.html">Mappings for Resource Resolution</a>.</p>
 <h3 id="relative-path-resolution">Relative Path Resolution<a class="headerlink" href="#relative-path-resolution" title="Permanent link">&para;</a></h3>
 <p>Sometimes it is required to resolve relative paths to Resources. An example of such a use case is Script and Servlet resolution which starts with a relative path consisting of the Resource type, optional selectors and the request extension or method name. By scanning a search path for these relative paths a system provided Resource may be overwritten with some user defined implementation.</p>
-<p>Consider for example, the system would provide a Servlet to render Resources of type <code>nt:file</code>. This Servlet would be registered under the path <code>/libs/nt/file/html</code>. For a certain web application, this default HTML rendering might not be appropriate, so a Script is created as <code>/apps/nt/file/html.jsp</code> with a customized HTML rendering. By defining the search path to be <em>[</em> <code>*/apps{*}{</code>}<em>,</em> <code>*/libs{*</code>} <em>]()</em> the Servlet resolver would call the <code>ResourceResolver.getResource(String)</code> method with the relative path <code>nt/file/html</code> and be provided with the first matching resource - <code>/apps/nt/file/html.jsp</code> in this example.</p>
+<p>Consider for example, the system would provide a Servlet to render Resources of type <code>nt:file</code>. This Servlet would be registered under the path <code>/libs/nt/file/html</code>. For a certain web application, this default HTML rendering might not be appropriate, so a Script is created as <code>/apps/nt/file/html.jsp</code> with a customized HTML rendering. By defining the search path to be <code>[/apps,/libs]</code> the Servlet resolver would call the <code>ResourceResolver.getResource(String)</code> method with the relative path <code>nt/file/html</code> and be provided with the first matching resource - <code>/apps/nt/file/html.jsp</code> in this example.</p>
 <p>Of course the search path is not used for absolute path arguments.</p>
 <h3 id="querying-resources">Querying Resources<a class="headerlink" href="#querying-resources" title="Permanent link">&para;</a></h3>
 <p>For convenience the <code>ResourceResolver</code> provides two Resource querying methods <code>findResources</code> and <code>queryResources</code> both methods take as arguments a JCR query string and a query language name. These parameters match the parameter definition of the <code>QueryManager.createQuery(String statement, String language)</code> method of the JCR API.</p>
@@ -285,7 +285,7 @@ and <code>getResource(Resource base, Str
 <p>For details see <a href="/documentation/bundles/resource-merger.html">Resource Merger</a>.</p>
 <h3 id="custom-resource-providers">Custom Resource providers<a class="headerlink" href="#custom-resource-providers" title="Permanent link">&para;</a></h3>
 <p>Custom ResourceProvider services can be used to integrate your own custom resources in the Sling resource tree.</p>
-<p>For a simple example of that, see the <a href="http://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/resourceprovider/">PlanetResourceProvider</a> used in our integration tests.</p>
+<p>For a simple example of that, see the <a href="https://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/resourceprovider/">PlanetResourceProvider</a> used in our integration tests.</p>
 <h2 id="writeable-resources">Writeable Resources<a class="headerlink" href="#writeable-resources" title="Permanent link">&para;</a></h2>
 <p>Sling now supports full CRUD functionality on Resources, without necessarily having to go through the JCR API.</p>
 <p>The advantage is that this works for any ResourceProvider that supports the required operations.</p>
@@ -294,15 +294,14 @@ More details can be found at <a href="/d
 <h2 id="resource-observation">Resource Observation<a class="headerlink" href="#resource-observation" title="Permanent link">&para;</a></h2>
 <p>To be notified whenever certain resources or their properties have been modified/added/removed there are different possibilities</p>
 <h3 id="resource-observation-api-resourcechangelistener">Resource Observation API (ResourceChangeListener)<a class="headerlink" href="#resource-observation-api-resourcechangelistener" title="Permanent link">&para;</a></h3>
-<p><em>This API is only available since Sling API 2.11.0 (<a href="https://issues.apache.org/jira/browse/SLING-4751">SLING-4751</a>).</em>
-Register an OSGi service for <a href="https://svn.apache.org/repos/asf/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeListener.java"><code>org.apache.sling.api.resource.observation.ResourceChangeListener</code></a> or <code>org.apache.sling.api.resource.observation.ExternalResourceChangeListener</code> to be notified about changes. Certain properties can be used to 
-restrict subscription to only a subset of events.</p>
+<p><em>This API is only available since Sling API 2.11.0 (<a href="https://issues.apache.org/jira/browse/SLING-4751">SLING-4751</a>).</em></p>
+<p>Register an OSGi service for <a href="https://svn.apache.org/repos/asf/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeListener.java"><code>org.apache.sling.api.resource.observation.ResourceChangeListener</code></a> or <a href="https://svn.apache.org/repos/asf/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ExternalResourceChangeListener.java"><code>org.apache.sling.api.resource.observation.ExternalResourceChangeListener</code></a> to be notified about changes. Certain properties can be used to restrict subscription to only a subset of events.</p>
 <h3 id="osgi-event-admin">OSGi Event Admin<a class="headerlink" href="#osgi-event-admin" title="Permanent link">&para;</a></h3>
-<p>Event are send out via the OSGi Event Admin. You can subscribe to those event by registering an OSGi service for <a href="https://osgi.org/javadoc/r6/cmpn/org/osgi/service/event/EventHandler.html"><code>org.osgi.service.event.EventHandler</code></a>). Several properties should be used to restrict the subscription to only the relevant event. The event topics which are used for resources are listed as constants in <a href="http://sling.apache.org/apidocs/sling8/org/apache/sling/api/SlingConstants.html"><code>org.apache.sling.api.SlingConstants</code></a> starting with the prefix <code>TOPIC_</code>.</p>
+<p>Resource events are sent out via the OSGi Event Admin. You can subscribe to those event by registering an OSGi service for <a href="https://osgi.org/javadoc/r6/cmpn/org/osgi/service/event/EventHandler.html"><code>org.osgi.service.event.EventHandler</code></a>. Several properties should be used to restrict the subscription to only the relevant event. The event topics which are used for resources are listed as constants in <a href="http://sling.apache.org/apidocs/sling8/org/apache/sling/api/SlingConstants.html"><code>org.apache.sling.api.SlingConstants</code></a> starting with the prefix <code>TOPIC_</code>.</p>
 <h2 id="wrapdecorate-resources">Wrap/Decorate Resources<a class="headerlink" href="#wrapdecorate-resources" title="Permanent link">&para;</a></h2>
 <p>The Sling API provides an easy way to wrap or decorate a resource before returning. Details see <a href="/documentation/the-sling-engine/wrap-or-decorate-resources.html">Wrap or Decorate Resources</a>.</p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1784233 by kwin on Fri, 24 Feb 2017 07:46:03 +0000
+        Rev. 1784234 by kwin on Fri, 24 Feb 2017 08:00:34 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project