You can extend the Smart Translator to do what you want. Here is an example of a "Class" Smart Translator
http://wiki.apache.org/jakarta-hivemind/ExtendingSmartTranslator -kurt h -----Original Message----- From: Steve Gibson [mailto:[EMAIL PROTECTED] Sent: Friday, October 29, 2004 11:43 AM To: [email protected] Subject: Smart Translator limitiation - can't translate to a class I have written a service that takes, as a property, a class. My hivemodule.xml looks like: <service-point id="ActivityFactory" interface="org.apache.hivemind.lib.BeanFactory"> <invoke-factory service-id="hivemind.BuilderFactory"> <construct class="com.cowww.commons.hivemind.ServiceBeanFactory" messages-property="messages" log-property="log"> <set property="vendClass" value="com.cowww.legacy.workflow.Activity"/> </construct> </invoke-factory> </service-point> Unfortunaley, SmartTranslator does not know how to generate a Class from a String. Considering the fact that HiveMind has a Class Translator, wouldn't it be a good thing for SmartTranslator to try and utilize that as well as those types that a PropertyEditor exists for? Alternatively, maybe we need to write one for Class and add it. The reason I think it is important is consistency. You can enter a string into one part of the configuration and get a class from it, but that will not work in other parts. I may try to write the PropertyEditor or change to SmartTranslator myself (or even BuilderFactory - add a translator attribute), but I was just wondering what the best approach would be (and for validation ;-) ) Steve Gibson --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
