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 83b54cf  Add proposal for application configuration
83b54cf is described below

commit 83b54cfcd62265e7536b563ef6b710ef204939cb
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Wed Jul 25 14:23:20 2018 +0200

    Add proposal for application configuration
---
 appconf.md   | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 prototype.md | 31 +-------------------------
 readme.md    |  1 +
 3 files changed, 74 insertions(+), 30 deletions(-)

diff --git a/appconf.md b/appconf.md
new file mode 100644
index 0000000..d1ad3ea
--- /dev/null
+++ b/appconf.md
@@ -0,0 +1,72 @@
+# Provisioning Applications Proposal
+
+There are use case where you want to describe a whole application based on 
features. In addition some parts might to be optional.
+
+A application configuration for such use cases could look like this:
+
+    {
+        "application" : [
+            "org.apache.sling:org.apache.sling.launchpad:10"
+        ],
+        "repository" : [
+            "org.apache.sling:org.apache.sling.portal:1.0."
+        ],
+        "options" : {
+           "jsp" : {
+               "features" : [
+                   "org.apache.sling:org.apache.sling.scripting.jsp:1.0.0"     
              
+               ]
+           },
+           "author" : {
+               "features" : [
+                   "org.apache.sling:org.apache.sling.cms:1.0.0"               
                     
+               ],
+               "variables" : {
+                   "service_id" : "author"
+               },
+               "activation" : {
+                   "publish" : false,
+                   "jsp" : true
+               }
+           },
+           "publish" : {
+               "features" : [
+                   "org.apache.sling:org.apache.sling.cache:1.3.6"             
                       
+               ],
+               "variables" : {
+                   "service_id" : "publish"
+               },
+               "activation" : {
+                   "author" : false                
+               }
+           },
+           "samples" : {
+               "options" : {
+                    "author" : {
+                        "features" : [
+                            
"org.apache.sling:org.apache.sling.samples.author:1.0.0"
+                        ]
+                    },
+                    "publish" : {
+                        "features" : [
+                            
"org.apache.sling:org.apache.sling.samples.publish:1.0.0"
+                        ]
+                    }
+                }
+            }
+        },
+        "defaults" : {
+            "options": ["author"]
+        },
+        "framework" : {
+            "id" : "org.apache.felix:org.apache.felix.framework:6.0.0"
+        }
+    }
+
+The *application* section list all features that are always used for the 
application. The features listed in the repository section are only pulled in 
if another included feature has a requirement for them.
+
+The options section contains labeled options. An option has a list of features 
and optionally an activation section which either enables or disables other 
options. Options can be nested, allowing for sub options.
+
+An option can also set additional variables - which in turn can be used within 
the included features.
+
+The defaults section specifies the options activated by default and the 
framework section defines the framework to be used.
diff --git a/prototype.md b/prototype.md
index 76f13fd..57d90eb 100644
--- a/prototype.md
+++ b/prototype.md
@@ -218,36 +218,7 @@ To avoid this, a feature might contain an additional 
section, named "reqscaps" (
         }
 
 
-# Appendix A : Provisioning Applications
-
-An application jar can contain a set of features (including the listed 
artifacts).
-
-An optional application configuration further defines the possibilites:
-
-    {
-         "features" : [
-             "org.apache.sling:org.apache.sling.launchpad:10"
-         ],
-         "options" : [
-             "org.apache.sling:org.apache.sling.scripting.jsp:1.0.0",
-             {
-                 "id" : 
"org.apache.sling:org.apache.sling.scripting.htl:1.0.0",
-                 "tag": "htl"
-             }
-         ],
-         "defaults" : {
-             "auto-add-options": true,
-             "tags" : ["htl"]
-         },
-         "framework" : {
-             "id" : "org.apache.felix:org.apache.felix.framework:5.6.4"
-         }
-    }
-
-Such a configuration is required for an application, at least one feature 
needs to be listed in either the features or the options section.
-All features listed in the features section will be added to the application, 
the ones listed in options are optional and depending on the settings and user 
input will either be added or left out. In addition all available features of 
an application will be used to make the application runnable (resolvable).
-
-# Appendix B : Apache Sling's Provisioning Model
+# Appendix A : Apache Sling's Provisioning Model
 
 The documentation for Apache Sling's provisioning model can be found here: 
https://sling.apache.org/documentation/development/slingstart.html
 
diff --git a/readme.md b/readme.md
index 9a0e63f..5fa6dfc 100644
--- a/readme.md
+++ b/readme.md
@@ -11,3 +11,4 @@ This project aims to define a common OSGi feature model to 
build an OSGi applica
 
 * [Prototype](prototype.md)
 * [API Controller Proposal](apicontroller.md)
+* [Application Configuration Proposal](appconf.md)

Reply via email to