You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Nicolas Peltier <np...@apache.org> on 2020/02/25 09:32:04 UTC

[proposal] fallback valuemap

Hi,

i'd like to propose a contribution of a fallback valuemap which is a very
simple implementation of the ValueMap interface based on an ordered list of
resources, getting value of first one, if no value, second, etc...

We use that internally for now for simplifying code like that one [0] for
the "end" developer to have a single entry point à la context aware
configuration manager (actually Ca config resource is one of above
resources).

if no veto for this, where could i put it?

Cheers,
Nicolas

[0]
https://github.com/adobe/aem-core-wcm-components/blob/master/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/models/v2/ImageImpl.java#L65

Re: [proposal] fallback valuemap

Posted by Nicolas Peltier <pe...@gmail.com>.
discussion is going on there in the PR
https://github.com/apache/sling-org-apache-sling-api/pull/19

Le mar. 25 févr. 2020 à 11:06, Nicolas Peltier <pe...@gmail.com>
a écrit :

> contribution is tracked here
> https://issues.apache.org/jira/browse/SLING-9140
>
> Le mar. 25 févr. 2020 à 10:57, Nicolas Peltier <pe...@gmail.com>
> a écrit :
>
>> sure thing, will JIRA that out, and PR after then
>>
>> Le mar. 25 févr. 2020 à 10:53, Stefan Seifert <ss...@pro-vision.de> a
>> écrit :
>>
>>> sounds good to me, maybe an addition to the Sling API? there are already
>>> "helper" implementations like SyntheticResource.
>>> would be good to review the API of the new feature in a PR first.
>>>
>>> stefan
>>>
>>> >-----Original Message-----
>>> >From: Nicolas Peltier <np...@apache.org>
>>> >Sent: Tuesday, February 25, 2020 10:32 AM
>>> >To: Sling Developers List <de...@sling.apache.org>
>>> >Subject: [proposal] fallback valuemap
>>> >
>>> >Hi,
>>> >
>>> >i'd like to propose a contribution of a fallback valuemap which is a
>>> very
>>> >simple implementation of the ValueMap interface based on an ordered
>>> list of
>>> >resources, getting value of first one, if no value, second, etc...
>>> >
>>> >We use that internally for now for simplifying code like that one [0]
>>> for
>>> >the "end" developer to have a single entry point à la context aware
>>> >configuration manager (actually Ca config resource is one of above
>>> >resources).
>>> >
>>> >if no veto for this, where could i put it?
>>> >
>>> >Cheers,
>>> >Nicolas
>>> >
>>> >[0]
>>> >https://github.com/adobe/aem-core-wcm-
>>>
>>> >components/blob/master/bundles/core/src/main/java/com/adobe/cq/wcm/core/com
>>> >ponents/internal/models/v2/ImageImpl.java#L65
>>>
>>

Re: [proposal] fallback valuemap

Posted by Nicolas Peltier <pe...@gmail.com>.
contribution is tracked here
https://issues.apache.org/jira/browse/SLING-9140

Le mar. 25 févr. 2020 à 10:57, Nicolas Peltier <pe...@gmail.com>
a écrit :

> sure thing, will JIRA that out, and PR after then
>
> Le mar. 25 févr. 2020 à 10:53, Stefan Seifert <ss...@pro-vision.de> a
> écrit :
>
>> sounds good to me, maybe an addition to the Sling API? there are already
>> "helper" implementations like SyntheticResource.
>> would be good to review the API of the new feature in a PR first.
>>
>> stefan
>>
>> >-----Original Message-----
>> >From: Nicolas Peltier <np...@apache.org>
>> >Sent: Tuesday, February 25, 2020 10:32 AM
>> >To: Sling Developers List <de...@sling.apache.org>
>> >Subject: [proposal] fallback valuemap
>> >
>> >Hi,
>> >
>> >i'd like to propose a contribution of a fallback valuemap which is a very
>> >simple implementation of the ValueMap interface based on an ordered list
>> of
>> >resources, getting value of first one, if no value, second, etc...
>> >
>> >We use that internally for now for simplifying code like that one [0] for
>> >the "end" developer to have a single entry point à la context aware
>> >configuration manager (actually Ca config resource is one of above
>> >resources).
>> >
>> >if no veto for this, where could i put it?
>> >
>> >Cheers,
>> >Nicolas
>> >
>> >[0]
>> >https://github.com/adobe/aem-core-wcm-
>>
>> >components/blob/master/bundles/core/src/main/java/com/adobe/cq/wcm/core/com
>> >ponents/internal/models/v2/ImageImpl.java#L65
>>
>

Re: [proposal] fallback valuemap

Posted by Nicolas Peltier <pe...@gmail.com>.
sure thing, will JIRA that out, and PR after then

Le mar. 25 févr. 2020 à 10:53, Stefan Seifert <ss...@pro-vision.de> a
écrit :

> sounds good to me, maybe an addition to the Sling API? there are already
> "helper" implementations like SyntheticResource.
> would be good to review the API of the new feature in a PR first.
>
> stefan
>
> >-----Original Message-----
> >From: Nicolas Peltier <np...@apache.org>
> >Sent: Tuesday, February 25, 2020 10:32 AM
> >To: Sling Developers List <de...@sling.apache.org>
> >Subject: [proposal] fallback valuemap
> >
> >Hi,
> >
> >i'd like to propose a contribution of a fallback valuemap which is a very
> >simple implementation of the ValueMap interface based on an ordered list
> of
> >resources, getting value of first one, if no value, second, etc...
> >
> >We use that internally for now for simplifying code like that one [0] for
> >the "end" developer to have a single entry point à la context aware
> >configuration manager (actually Ca config resource is one of above
> >resources).
> >
> >if no veto for this, where could i put it?
> >
> >Cheers,
> >Nicolas
> >
> >[0]
> >https://github.com/adobe/aem-core-wcm-
>
> >components/blob/master/bundles/core/src/main/java/com/adobe/cq/wcm/core/com
> >ponents/internal/models/v2/ImageImpl.java#L65
>

RE: [proposal] fallback valuemap

Posted by Stefan Seifert <ss...@pro-vision.de>.
sounds good to me, maybe an addition to the Sling API? there are already "helper" implementations like SyntheticResource.
would be good to review the API of the new feature in a PR first.

stefan

>-----Original Message-----
>From: Nicolas Peltier <np...@apache.org>
>Sent: Tuesday, February 25, 2020 10:32 AM
>To: Sling Developers List <de...@sling.apache.org>
>Subject: [proposal] fallback valuemap
>
>Hi,
>
>i'd like to propose a contribution of a fallback valuemap which is a very
>simple implementation of the ValueMap interface based on an ordered list of
>resources, getting value of first one, if no value, second, etc...
>
>We use that internally for now for simplifying code like that one [0] for
>the "end" developer to have a single entry point à la context aware
>configuration manager (actually Ca config resource is one of above
>resources).
>
>if no veto for this, where could i put it?
>
>Cheers,
>Nicolas
>
>[0]
>https://github.com/adobe/aem-core-wcm-
>components/blob/master/bundles/core/src/main/java/com/adobe/cq/wcm/core/com
>ponents/internal/models/v2/ImageImpl.java#L65