Anatole Tresch created TAMAYA-182:
-------------------------------------

             Summary: Provide a unified builder API
                 Key: TAMAYA-182
                 URL: https://issues.apache.org/jira/browse/TAMAYA-182
             Project: Tamaya
          Issue Type: Improvement
          Components: API, Core, Modules
    Affects Versions: 0.2-incubating
            Reporter: Anatole Tresch
            Assignee: Anatole Tresch
             Fix For: 0.3-incubating


Provide a unified builder API, hereby removing the existing builder module. The 
"new" builder should provide the following functionality:
* Managing propery sources (existing)
* Managing property filters (existing)
* Managing property converters (existing)
* Managing the combination policy (existing)

The differentceis that the builder should not implicitly define any ordering of 
the property sources added. Basically the priorities of property sources is 
similar to the order in which they are added. This makes defining your own 
property source hierarchies simpley and transparent.
To ensure a defined order, if wanted, corresponding {{sort}XXX(Comparator(X);}} 
methods should be available, which allow to define the sort order via the 
{{Comparator}} passed.

Similary constructing a {{Configuration}} based on a {{ConfigurationContext}} 
should also not implicitly change the ordering as defined by the context.

Finally adding or removing artifacts mentioned sometimes take an ellipse 
operator {{T...}, sometimes a {{Collection<T>}}. Ensure with this change that 
in all cases both variants are present symmetrically.

Summary:
* {{ConfigurationContextBuilder}}:
  ** Add methods _sortPropertySources(Comparator<PropertySource>), 
sortPropertyFilters(Comparator<PropertyFilter>)_
  ** Remove implicit sorting of property sources done as of now
  ** Expose the current existing SPI factory method 
_ConfigurationProviderSPI.create(Configuration);_ as a static method on 
{{ConfigurationProvider}}.
  ** Add missing {{ add/removeXXX(Collection<XXX>), add/removeXXX(XXX...) }}, 
where missing.

_NOTE:_ This change is not 100% behavior compatible. But since {{ 
ConfigurationProvider.create(Configuration); }} is not exposed with the current 
release, we do not expect client code is affected.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to