On Friday 11 November 2005 18:46, Andreas Hartmann wrote: > Damjan S. Vujnovic wrote: > > Well, we pinned down the problem - the > > selector.select(publication.getSiteManagerHint()) actually returns > > java.lang.reflect.Proxy (dynamic proxy), so it can safely be casted to > > org.apache.lenya.cms.site.tree.SiteManager any of the INTERFACES that > > org.apache.lenya.cms.site.tree.TreeSiteManager implements > > (java.util.Comparator, org.apache.avalon.framework.logger.LogEnabled, > > org.apache.avalon.framework.service.Serviceable). Of course casting to > > SiteManager doesn't help because getTree() method is not a method of the > > SiteManager interface (but of a TreeSiteManager) - so a solution is to > > make the TreeSiteManagerClass class implement TreeSiteManagerInterface > > interface. > > > > I noticed (working on the custom lenya AC implementation) that the > > "programming against interfaces" is not applied consistently. > > That's true, mainly due to legacy code from Lenya 1.2. > The API is currently being re-designed, feel free to observe and > comment the development.
It would be great if you could suggest a way out of this one. For now the only obvious/easy fix for me would be adding getTree() to SiteManager and dummy implementations of the methods where applicable, probably throwing NonImplementedException or something. Alternative suggestions would be much appreciated. Manos --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]