cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: ServiceSelector: it's possible to get an Enumeration?
Date Mon, 21 May 2007 22:12:17 GMT
On 17.05.2007 17:47, trampus@units.it wrote:

> selector is really an instance of WrapperServiceSelector. Inside the 
> object there is an ExtendedComponentSelector where a HashTable has an 
> entry for each datasource deined in cocoon.xconf.
> 
> But I do not find any way to get the keys out.

Neither ServiceSelector [1] nor the older ComponentSelector [2] (the 
actual interfaces) support this feature. You probably need to extend the 
classes in use yourself or try to work with introspection. If you have a 
look at the super class of ExtendedComponentSelector, the 
ExcaliburComponentSelector [3, 4], you can see a protected method 
getComponentHandlers(). The keys in this map are the actual hints used 
for ComponentSelector.select(hint).

Hope this helps,

Joerg

[1] 
http://excalibur.apache.org/apidocs/org/apache/avalon/framework/service/ServiceSelector.html
[2] 
http://excalibur.apache.org/apidocs/org/apache/avalon/framework/component/ComponentSelector.html
[3] 
http://excalibur.apache.org/apidocs/org/apache/avalon/excalibur/component/ExcaliburComponentSelector.html
[4] 
http://svn.apache.org/viewvc/excalibur/trunk/deprecated/component/src/java/org/apache/avalon/excalibur/component/ExcaliburComponentSelector.java?revision=506259&view=markup

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message