sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-org-apache-sling-resource-presence] 07/08: SLING-6677 - tweak README
Date Wed, 18 Oct 2017 23:20:43 GMT
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resource-presence.git

commit 1a0605d9d1162ff80aa2fbcc7495a2505ae3982a
Author: Bertrand Delacretaz <bdelacretaz@apache.org>
AuthorDate: Tue Mar 21 13:30:19 2017 +0000

    SLING-6677 - tweak README
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1787967 13f79535-47bb-0310-9956-ffa450edef68
---
 README.md | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 0bcee03..bf49095 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,17 @@
 Apache Sling Resource Presence
 ==============================
 
-This module allows presentation of `Resource`s as OSGi services and comes with a simple presenter
and presence.
+This module creates proxy OSGi services that are registered only if specific resources are
present.
+
+Like for example:
+
+	@Reference(target="(path=/content/foo/bar)")
+	private ResourcePresence barIsPresent;
+	
+The `barIsPresent` service is registered only if the `/content/foo/bar` resource is present,
allowing OSGi
+components to be dependent on the presence of specific Resources.
+
+This is mostly meant for testing, to wait for test content before running specific tests.
 
 Getting Started
 ---------------
@@ -9,8 +19,8 @@ Getting Started
 1. Configure a service user mapping for `org.apache.sling.resource.presence` to allow reading
resources, using e.g. service user `sling-readall`.
 2. Configure a presenter to observe a resource by path, e.g. `path=/apps`
    
-   Whenever resource `/apps` is available the presenter will register an OSGi service for
it and unregisters the service whenever `/apps` gets removed.
-3. You can depend on that service now, e.g. using a `@Reference` annotation on your component:
+   Whenever resource `/apps` is available the presenter will register an OSGi service for
it and unregister it whenever `/apps` gets removed.
+3. You can depend on that service now, e.g. using a `@Reference` annotation with a `target`
on your component:
 
    ```
        @Reference(

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <commits@sling.apache.org>.

Mime
View raw message