You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2019/10/17 17:28:22 UTC

[sling-org-apache-sling-feature] branch master updated: Update documentation

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 80632ec  Update documentation
80632ec is described below

commit 80632ec44f4f9d807f94c65761c5617467527691
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Oct 17 19:28:11 2019 +0200

    Update documentation
---
 apicontroller.md |  6 +++---
 prototype.md     |  2 ++
 readme.md        | 25 ++++++++++++++++---------
 3 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/apicontroller.md b/apicontroller.md
index a4dba94..ef571b4 100644
--- a/apicontroller.md
+++ b/apicontroller.md
@@ -19,7 +19,7 @@ A feature can have an additional extension JSON named api-regions. The following
 
 Note that the `global` region is a predefined region that exports the listed packages to everyone. Other region names can be chosen freely. Packages listed in these other regions are only exposed to bundles in features that are in the same region.
 
-    "api-regions:JSON|false" : [
+    "api-regions:JSON|optinal" : [
         {
             "name": "global",
             "exports": [
@@ -45,7 +45,7 @@ By exporting packages to a given region, a feature automatically also sees all p
 
 A feature can also just consume packages from a region, without having to export any packages to it. This can be done by exporting an empty list of packages. For example:
 
-    "api-regions:JSON|false" : [ 
+    "api-regions:JSON|optional" : [ 
         {
             "name": "platform",
             "exports": []
@@ -56,7 +56,7 @@ If the api-regions extension is missing or the api-regions information is missin
 
 If a feature exports no packages and only wants to have visibility of packages from the global region, this can be specified as follows:
     
-    "api-regions:JSON|false" : [ 
+    "api-regions:JSON|optional" : [ 
         {
             "name": "global",
             "exports": []
diff --git a/prototype.md b/prototype.md
index 57d90eb..9d58dd0 100644
--- a/prototype.md
+++ b/prototype.md
@@ -1,5 +1,7 @@
 # Prototype
 
+Note: This document describes the initial prototype - it is outdated and replaced by the [actual feature model](readme.md)
+
 The prototype uses JSON as a well defined and understood format. This fits nicely with the new OSGi R7 JSON format for configurations.
 
 A model file describes a feature. A feature consists of:
diff --git a/readme.md b/readme.md
index e93cc97..c716d14 100644
--- a/readme.md
+++ b/readme.md
@@ -8,13 +8,14 @@ OSGi is a platform capable of running large applications for a variety of purpos
 server-side systems and cloud and container based architectures. 
 
 As these applications are generally based on many bundles, describing each bundle individually in the application 
-definition becomes unwieldy once the number of bundles reaches a certain level. 
+definition becomes unwieldy once the number of bundles reaches a certain level. Additionally, OSGi has no mechanism to describe other elements of the application definition, such as configuration or custom artifacts. 
 
-Additionally, OSGi has no mechanism to describe other elements of the application definition, such as configuration or custom artifacts.
+While bundles already provide a good way to define rather small, coherent modules, there is often a need to distribute or provision a set of such bundles together with some configuration. Or if you want to build a set of applications (for example microservices) which share certain parts
+(like a foundation) the need for a higher level building block arises.
 
-The Sling OSGi Feature Model introduces a higher level to describe OSGi applications that encapsulates the details of the various 
-components that the application is built up from. It allows the description of an entire OSGi-based application based on reusable 
-components and includes everything related to this application, including bundles, configuration, framework properties, capabilities, 
+The Sling OSGi Feature Model introduces such a higher level building block to describe OSGi applications or parts of it that encapsulates 
+the details of the various components that the feature is built up from. It allows the description of an entire OSGi-based application based 
+on reusable components and includes everything related to this application, including bundles, configuration, framework properties, capabilities, 
 requirements and custom artifacts.
 
 # Features
@@ -170,7 +171,7 @@ merge operations on all the feature models these are provided with.
 Extensions are declared in the JSON Feature file using the following syntax:
 
 ```
-"extention-name:<type>|mandatory{true|false}": [ json array ]
+"extention-name:<type>|{optional|required|transient]": [ json array ]
 ```
 
 For example, the following declaration defines an extension with name `api-regions`
@@ -179,7 +180,7 @@ present that knows about this extension it should be ignored and execution
 should continue.
 
 ```
-"api-regions:JSON|false" : [
+"api-regions:JSON|optional" : [
    {"name": "global"}
 ]
 ```
@@ -202,12 +203,19 @@ Initialization statements which will be executed on the repository at startup.
 Example:
 
 ```
-"repoinit:TEXT|true":[
+"repoinit:TEXT|required":[
   "create path /content/example.com(mixin mix:referenceable)",
   "create path (nt:unstructured) /var"
 ]
 ```
 
+As initializing the repository is usually important for Sling based applications
+the extension should be marked as required as in the example above.
+
+## Further extensions
+
+* [API Controller and API Regions](apicontroller.md)
+
 # Launching
 
 A launcher for feature models is available in this project: https://github.com/apache/sling-org-apache-sling-feature-launcher
@@ -226,4 +234,3 @@ The links below provide additional information regarding the Feature Model.
 * [File format](https://github.com/apache/sling-org-apache-sling-feature-io/blob/master/design/feature-model.json)
 
 * [Prototype](prototype.md)
-* [API Controller and API Regions](apicontroller.md)