You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2016/10/14 13:37:54 UTC
svn commit: r1764894 - in
/sling/site/trunk/content/documentation/bundles/context-aware-configuration:
context-aware-configuration-default-implementation.mdtext
context-aware-configuration-spi.mdtext context-aware-configuration.mdtext
Author: sseifert
Date: Fri Oct 14 13:37:54 2016
New Revision: 1764894
URL: http://svn.apache.org/viewvc?rev=1764894&view=rev
Log:
SLING-6154 Context-Aware Config: Use camel case for property names
Modified:
sling/site/trunk/content/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.mdtext
sling/site/trunk/content/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.mdtext
sling/site/trunk/content/documentation/bundles/context-aware-configuration/context-aware-configuration.mdtext
Modified: sling/site/trunk/content/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.mdtext?rev=1764894&r1=1764893&r2=1764894&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.mdtext (original)
+++ sling/site/trunk/content/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.mdtext Fri Oct 14 13:37:54 2016
@@ -18,7 +18,7 @@ The paths are configurable in the servic
# Context paths
-The content resource hierarchy is defined by setting `sling:config-ref` properties. Each resource that has a `sling:config-ref` property set defines the root resource of a context, the whole subtree is the context. Within the subtree further nested contexts can be defined.
+The content resource hierarchy is defined by setting `sling:configRef` properties. Each resource that has a `sling:configRef` property set defines the root resource of a context, the whole subtree is the context. Within the subtree further nested contexts can be defined.
# Configuration resource resolving
@@ -38,7 +38,7 @@ If you get the context-aware configurati
7. `/libs/conf` - because it is configured as fallback path
So the basic rules are:
-* Go up in the content resource tree until a resource with `sling:config-ref` is found. This is the 'inner-most' context. Check if a configuration resource exists at the path the property points to.
+* Go up in the content resource tree until a resource with `sling:configRef` is found. This is the 'inner-most' context. Check if a configuration resource exists at the path the property points to.
* Check for parent resources of the references configuration resource (below `/conf`)
* Go further up in the content resource tree for parent contexts, and check their configuration resources as well (they may reference completely different location below `/conf`)
* Check the fallback paths
@@ -76,21 +76,21 @@ For singleton resources, there is not re
For collection resources there is no resource inheritance enabled by default. The children of the first resource that is found in the configuration resource resolving lookup order are returned.
-By defining a property `sling:config-collection-inherit` on the configuration resource, the children of the next resource that is found in the configuration resource resolving lookup order are combined with the children of the current configuration resource, returned a merged list. If both configuration resources contain child resources with the same name, duplicates are eliminated and only the children of the first resource are included.
+By defining a property `sling:configCollectionInherit` on the configuration resource, the children of the next resource that is found in the configuration resource resolving lookup order are combined with the children of the current configuration resource, returned a merged list. If both configuration resources contain child resources with the same name, duplicates are eliminated and only the children of the first resource are included.
-By setting the property `sling:config-collection-inherit` on multiple configuration resources that are part of the lookup order it is possible to form deeper inheritance chains following the same rules.
+By setting the property `sling:configCollectionInherit` on multiple configuration resources that are part of the lookup order it is possible to form deeper inheritance chains following the same rules.
Example for resource inheritance:

-The result of this example is: **C, A, B**. It would by just **C** if the `sling:config-collection-inherit` is not set.
+The result of this example is: **C, A, B**. It would by just **C** if the `sling:configCollectionInherit` is not set.
# Property inheritance
By default, no property inheritance takes place. That means only the properties that are stored in the configuration resource are mapped to the annotation class or returned as value map, regardless wither singleton or collection resources are returned, or if resource collection inheritance is enabled or not.
-By defining a property `sling:config-property-inherit` on the configuration resource, property merging is enabled between the current configuration resource and the next resource with the same name (singleton or resource collection item) in the configuration resource lookup order. That means that all properties that are not defined on the current configuration resource are inherited from the next resources and a merged value map is used for the configuration mapping.
+By defining a property `sling:configPropertyInherit` on the configuration resource, property merging is enabled between the current configuration resource and the next resource with the same name (singleton or resource collection item) in the configuration resource lookup order. That means that all properties that are not defined on the current configuration resource are inherited from the next resources and a merged value map is used for the configuration mapping.
-By setting the property `sling:config-property-inherit` on multiple configuration resources that are part of the lookup order it is possible to form deeper inheritance chains following the same rules.
+By setting the property `sling:configPropertyInherit` on multiple configuration resources that are part of the lookup order it is possible to form deeper inheritance chains following the same rules.
Modified: sling/site/trunk/content/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.mdtext?rev=1764894&r1=1764893&r2=1764894&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.mdtext (original)
+++ sling/site/trunk/content/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.mdtext Fri Oct 14 13:37:54 2016
@@ -24,7 +24,7 @@ All existing implementations are iterate
# Context Path Strategy
-By providing an implementation of `org.apache.sling.contextaware.config.resource.spi.ContextPathStrategy` you can provide additional ways how context paths are detected in your content resource hierarchy.
+By providing an implementation of `org.apache.sling.contextaware.config.resource.spi.ContextPathStrategy` you can provide additional ways how context paths and their configuration references are detected in your content resource hierarchy.
E.g. you could implement detecting context paths by project-specific conventions.
Modified: sling/site/trunk/content/documentation/bundles/context-aware-configuration/context-aware-configuration.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/context-aware-configuration/context-aware-configuration.mdtext?rev=1764894&r1=1764893&r2=1764894&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/bundles/context-aware-configuration/context-aware-configuration.mdtext (original)
+++ sling/site/trunk/content/documentation/bundles/context-aware-configuration/context-aware-configuration.mdtext Fri Oct 14 13:37:54 2016
@@ -82,7 +82,7 @@ Internally the ConfigurationResolver use
# Contexts and configuration references
-When you use the [Default Implementation](http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.html) contexts in the content resource hierarchy is defined by setting `sling:config-ref` properties. Each resource that has a `sling:config-ref` property set defines the root resource of a context, the whole subtree is the context. Within the subtree further nested contexts can be defined. The property contains a resource path pointing to a resource below `/conf`. This is the configuration reference.
+When you use the [Default Implementation](http://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.html) contexts in the content resource hierarchy is defined by setting `sling:configRef` properties. Each resource that has a `sling:configRef` property set defines the root resource of a context, the whole subtree is the context. Within the subtree further nested contexts can be defined. The property contains a resource path pointing to a resource below `/conf`. This is the configuration reference.
Example: