You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "Steve Gibson (JIRA)" <hi...@jakarta.apache.org> on 2004/10/29 19:59:32 UTC

[jira] Created: (HIVEMIND-74) Allow SmartTranslator to translate to a Class

Allow SmartTranslator to translate to a Class
---------------------------------------------

         Key: HIVEMIND-74
         URL: http://issues.apache.org/jira/browse/HIVEMIND-74
     Project: HiveMind
        Type: Improvement
  Components: framework  
    Versions: 1.0    
    Reporter: Steve Gibson


Not sure if I could classify this as a bug, but it affects consistency when configuring HiveMind.

I have a configuration:
   <service-point id="CommandFactory" 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.blah.Command"/>
         </construct>
      </invoke-factory>
   </service-point>

When HiveMind parses this, the value of the property "vendClass" has SmartTranslator applied. Unfortunately, SmartTranslator does not support "Class" translation.

This is inconsistent as there exists a ClassTranslator that can be used in processing configuration points.

My suggestion is to add a PropertyEditor for Class, which would also deprecate the ClassTranslator I believe.

I can supply an implementation of ClassPropertyEditor, but it really is trivial to implement.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Updated: (HIVEMIND-74) Allow SmartTranslator to translate to a Class

Posted by "Steve Gibson (JIRA)" <hi...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/HIVEMIND-74?page=history ]

Steve Gibson updated HIVEMIND-74:
---------------------------------

    Attachment: ClassPropertyEditor.java

Here is a rough class. It works, but the exception message may need work.
It includes a static block to register the PropertyEditor - work probably better done elsewhere.


> Allow SmartTranslator to translate to a Class
> ---------------------------------------------
>
>          Key: HIVEMIND-74
>          URL: http://issues.apache.org/jira/browse/HIVEMIND-74
>      Project: HiveMind
>         Type: Improvement
>   Components: framework
>     Versions: 1.0
>     Reporter: Steve Gibson
>  Attachments: ClassPropertyEditor.java
>
> Not sure if I could classify this as a bug, but it affects consistency when configuring HiveMind.
> I have a configuration:
>    <service-point id="CommandFactory" 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.blah.Command"/>
>          </construct>
>       </invoke-factory>
>    </service-point>
> When HiveMind parses this, the value of the property "vendClass" has SmartTranslator applied. Unfortunately, SmartTranslator does not support "Class" translation.
> This is inconsistent as there exists a ClassTranslator that can be used in processing configuration points.
> My suggestion is to add a PropertyEditor for Class, which would also deprecate the ClassTranslator I believe.
> I can supply an implementation of ClassPropertyEditor, but it really is trivial to implement.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Resolved: (HIVEMIND-74) Allow SmartTranslator to translate to a Class

Posted by "Knut Wannheden (JIRA)" <hi...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/HIVEMIND-74?page=history ]
     
Knut Wannheden resolved HIVEMIND-74:
------------------------------------

    Resolution: Fixed

I think the new "class" object provider should do it:

 <set-object property="vendClass" value="class:com.cowww.blah.Command"/>


> Allow SmartTranslator to translate to a Class
> ---------------------------------------------
>
>          Key: HIVEMIND-74
>          URL: http://issues.apache.org/jira/browse/HIVEMIND-74
>      Project: HiveMind
>         Type: Improvement
>   Components: framework
>     Versions: 1.0
>     Reporter: Steve Gibson
>  Attachments: ClassPropertyEditor.java
>
> Not sure if I could classify this as a bug, but it affects consistency when configuring HiveMind.
> I have a configuration:
>    <service-point id="CommandFactory" 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.blah.Command"/>
>          </construct>
>       </invoke-factory>
>    </service-point>
> When HiveMind parses this, the value of the property "vendClass" has SmartTranslator applied. Unfortunately, SmartTranslator does not support "Class" translation.
> This is inconsistent as there exists a ClassTranslator that can be used in processing configuration points.
> My suggestion is to add a PropertyEditor for Class, which would also deprecate the ClassTranslator I believe.
> I can supply an implementation of ClassPropertyEditor, but it really is trivial to implement.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org