Hi Jonathan,

You can use a list instead of a map, but you need to specify the
cardinality (as seen in the second example). If I remember correctly the
bind/unbind methods will be generated if you dont explicitly declare them.
Hope this helps, you are right that the documentation is a bit vague about
this.

Cheers,
Sander

2016-01-07 11:10 GMT+01:00 Jonathan Vila Lopez <[email protected]>:

> Hi all.
>
> I would like to find the documentation about Felix SCR annotation
> Reference that explains the injection for a list of services.
>
> @Reference
> List<ArticleFilter> list;
>
> ​Is that correct ?
>
> I've found in other places something like :
>
> @Reference(referenceInterface = AspectRatioCalculator.class, cardinality = 
> ReferenceCardinality.OPTIONAL_MULTIPLE, policy = ReferencePolicy.DYNAMIC)
> private final Map<String, AspectRatioCalculator> aspectRatioCalculators = new 
> ConcurrentHashMap<String, AspectRatioCalculator>();
>
> protected void bindAspectRatioCalculators(final AspectRatioCalculator arc) {
>     this.aspectRatioCalculators.put(arc.getResourceType(), arc);
> }
>
> protected void unbindAspectRatioCalculators(final AspectRatioCalculator arc) {
>     this.aspectRatioCalculators.remove(arc.getResourceType());
> }
>
>
> ​And in this last case I don't know if the bind/unbind methods are a must,
> if not I can use a list of services injections using a Map ? if so, what is
> the first type String for ?....
>
> ​So, is there all this information written in any place in the
> documentation ?
>
> Thank you.​
>
>
>
> [image: Inline image 2]
>
> * Jonathan Vila    ** <https://www.twitter.com/jonathan_vila>
> <http://www.linkedin.com/in/jonathanvila>*
>
> * [email protected] <[email protected]>*
>
>
>
>


-- 
Met vriendelijke groet,
*Tricode Professional Services BV*

*Sander van Beek*
*Teamlead AEM / Teamlead Servicedesk*
*E* [email protected]  |  *T* +31 318 559210 <+31%20318%20559210>  |  *M* +31
6 2724 9560 <+31628395109> (gewijzigd!) |  *W* www.tricode.nl
*S* linkedin <http://www.linkedin.com/company/tricode> | slideshare
<http://www.slideshare.net/Tricode> | twitter <https://twitter.com/Tricode>
| google+ <https://plus.google.com/+tricode> | facebook
<https://www.facebook.com/Tricode> Tricode Professional Services BV;  De
Schutterij 12; 3905 PL Veenendaal, Netherlands
<http://www.tricode.nl/aem> <http://www.tricode.nl/magnolia>
<http://www.tricode.nl/ishop>

-- 
De inhoud van dit emailbericht is strikt vertrouwelijk en uitsluitend 
bestemd om gelezen te worden door de geadresseerde. Wij verzoeken u 
derhalve dit bericht direct aan de geadresseerde te overhandigen. Indien 
deze email per vergissing door u is ontvangen verzoeken wij u contact met 
ons op te nemen. Iedere openbaarmaking, verspreiding of vermenigvuldiging 
van dit emailbericht is strikt verboden. Iedere aansprakelijkheid is 
beperkt tot het bedrag dat in het desbetreffende geval onder onze 
beroepsaansprakelijkheidsverzekering wordt uitbetaald. 

The contents of this email is strictly personal and confidential and is 
only intended for the use by the adressee named above. We request you tot 
deliver this email immediately to the adressee. If you have received this 
email in error, please notify us. Publication, circulation, or 
multiplication of this email is strictly prohibited. Any liability shall be 
limited to the amount which is paid under the Firm's professional Liability 
Policy in the matter concerned.

Reply via email to