You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by si...@apache.org on 2019/06/18 22:14:41 UTC

[sling-whiteboard] branch master updated: [r2f] added readme

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 9f00fba  [r2f] added readme
9f00fba is described below

commit 9f00fba4ea1db14161c9b4ca700c5f9e1eea9610
Author: Simo Tripodi <st...@adobe.com>
AuthorDate: Wed Jun 19 00:14:32 2019 +0200

    [r2f] added readme
---
 runtime2feature/README.md | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/runtime2feature/README.md b/runtime2feature/README.md
index 48b4d0f..3c972d4 100644
--- a/runtime2feature/README.md
+++ b/runtime2feature/README.md
@@ -1,3 +1,27 @@
 [<img src="http://sling.apache.org/res/logos/sling.png"/>](http://sling.apache.org)
 
-# Apache Sling runtime to Feature Model generator
+# Apache Sling OSGi runtime environment to Feature Model generator
+
+This is a simple OSGi service which is able to convert, given a `BundleContext` instance, a currently running OSGi container to an Apache Sling Feature Model definition.
+
+APIs are really simple: it is necessary first to obtain the `RuntimeEnvironment2FeatureModel` instance from the OSGi Service Registry, then 
+
+```
+import org.apache.sling.feature.r2f.*;
+
+@Activate
+BundleContext bundleContext;
+
+@Reference
+RuntimeEnvironment2FeatureModel generator;
+
+...
+ConversionRequest conversionRequest = new DefaultConversionRequest()
+                                      .setResultId("org.apache.sling:org.apache.sling.r2e:jar:RUNTIME:1.0.0")
+                                      .setBundleContext(bundleContext);
+Feature runtimeFeature = generator.scanAndAssemble(conversionRequest)
+```
+
+## Please Note
+
+Currently version will include in the generated Feature Model `bundles` and `configurations` only, which are the only informations that can be extracted from a `BundleContext` instance.