Skip to content

Configuration Provider

Sothea edited this page Oct 11, 2017 · 2 revisions

The configuration provider is a service that provides the property values from the configuration nodes / JSON objects.

Context processors provide Content Model properties to the presentation layer scripts, this means that some logic or data processing occurs previous to provide to the content model the required data. Some context processors needs parameters in order to perform specific data processing, this parameters are set inside nodes for Adobe Experience Manager or JSON objects in the case of Jahia CMS. Because of the location of the parameters, that contexts processors needs to perform their tasks, there is the need to have a service from which the context processors can access that configuration properties. This service is the Configuration Manager, which enables multiple way to retrieve the configuration properties.

INHERIT

All Properties on all members of the configuration hierarchy will be present, and their value will be set to the same as the Property on the closest configuration member. This means that if a Property exists on more than one member of the hierarchy, the final value returned will be the form found on the closest member and could be either the single value or a Collection if a Property has multiple values.

MERGE

All Properties on all members of the configuration hierarchy will be present, and each will be set as a Collection of values that correspond to the Property of the same name found on any of configuration members. Regardless of whether a Property exists on more than one member of the hierarchy, or contains only one value, the final value set on the config Property will be a Collection having values in ascending order with the closest member first.

Note that a Property’s collection of values will not contain duplicates.

COMBINE

All Properties on all members of the configuration hierarchy will be present, and each will be set as a Collection of values that correspond to the Property of the same name found on any of configuration members. Regardless of whether a Property exists on more than one member of the hierarchy, or contains only one value, the final value set on the config Property will be a Collection having values in ascending order with the closest member first.

Note that a Property’s collection of values may contain duplicates.

SHALLOW

Only Properties on the closest member of the configuration hierarchy will be present, and its values will be set to the same as the Property on that member. It can be either the single value or a Collection if the Property has multiple values.

Properties and their Values on parent members of the hierarchy will be ignored, and will not be provided in the returned config.

Go back to home

Clone this wiki locally