On Fri, Aug 31, 2012 at 7:11 PM, Stéphane Laurière <[email protected]> wrote:
> [...]
>
>
>>>> Another option I guess would be to lookup dedicated components for
>>>> performing the queries and storage directly without going through an
>>>> XWikiContext instance, but then what would be the proper way to
>>>> discover all the components that are available from the
>>>> ComponentManager (esp. query / storage) ?
>>>
>>>
>>>
>>> By digging into the xwiki-platform code, I found that a QueryManager can
>>> be accessed as follows, but I was wondering if there's a more easy way
>>> to know about the components exposed by the ComponentManager at hand ?
>>>
>>> componentManager.getInstance(QueryManager.class)
>>
>>
>> You mean knowing what's available without actually initializing it and
>> getting an instance ?
>
>
> Actually yes, that's what I have in mind. Is there such a thing ? Or is
> it not meaningful ?

If you know the role you can use
ComponentManager#getComponentDescriptorList(Type role).

>
> Thank you!
>
>
> Stéphane
>
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs



-- 
Thomas Mortagne
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to