You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Eric Yung <er...@jspectrum.com> on 2003/10/14 10:56:32 UTC

[HiveMind] User defined Translator

Hi,

How can I add a new Translator implementation using in the 
<read-attribute> rule? I know the translators are instantiated in the 
DescriptorParser, can I add a new one?

The new Translator in my mind works like the ServiceTranslator / 
ConfigurationTranslator - it takes the ExtensionPoint ID (either 
ConfigurationPoint ID or ServiceExtensionPoint ID) and returns a fully 
qualified id. This translator could be the parent of the 
ServiceTranslator / ConfigurationTranslator. What do you think?
Do you think this one should be included into the CVS? I can provide the 
code.

Anyway, I will implement this translator and modify DescriptorParser to 
include it in the standard translator set.


Regards,
Eric




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


Re: [HiveMind] User defined Translator

Posted by Eric Yung <er...@jspectrum.com>.

Howard M. Lewis Ship wrote:
> The documentation omits to say that you specify a class name for a translator in addition to the
> predefine values such as "int" or "service".

Thanks for information. I can find the documentation now.

> 
> What is the need for your proposed translator?  When do you need an qualified id but don't know
> whether it is a service or a configuration?

The translator will be used in a configuration point where a service 
will get the service ids instead of service objects. I will use those 
service ids for recording. Since the service reading the qualified id 
knows what it is getting, there will be NO confusion about whether the 
id is a service or a configuration.


Regards,
Eric


> 
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components
> http://jakarta.apache.org/tapestry
> http://jakarta.apache.org/commons/sandbox/hivemind/
> http://javatapestry.blogspot.com
> 
> 
>>-----Original Message-----
>>From: news [mailto:news@sea.gmane.org] On Behalf Of Eric Yung
>>Sent: Tuesday, October 14, 2003 4:57 AM
>>To: commons-dev@jakarta.apache.org
>>Subject: [HiveMind] User defined Translator
>>
>>
>>Hi,
>>
>>How can I add a new Translator implementation using in the 
>><read-attribute> rule? I know the translators are instantiated in the 
>>DescriptorParser, can I add a new one?
>>
>>The new Translator in my mind works like the ServiceTranslator / 
>>ConfigurationTranslator - it takes the ExtensionPoint ID (either 
>>ConfigurationPoint ID or ServiceExtensionPoint ID) and 
>>returns a fully 
>>qualified id. This translator could be the parent of the 
>>ServiceTranslator / ConfigurationTranslator. What do you 
>>think? Do you think this one should be included into the CVS? 
>>I can provide the 
>>code.
>>
>>Anyway, I will implement this translator and modify 
>>DescriptorParser to 
>>include it in the standard translator set.
>>
>>
>>Regards,
>>Eric
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>



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


RE: [HiveMind] User defined Translator

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
Actually, the doc *does* mention this explicitly.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
http://jakarta.apache.org/commons/sandbox/hivemind/
http://javatapestry.blogspot.com

> -----Original Message-----
> From: Howard M. Lewis Ship [mailto:hlship@comcast.net] 
> Sent: Tuesday, October 14, 2003 9:57 AM
> To: 'Jakarta Commons Developers List'
> Subject: RE: [HiveMind] User defined Translator
> 
> 
> The documentation omits to say that you specify a class name 
> for a translator in addition to the predefine values such as 
> "int" or "service".
> 
> What is the need for your proposed translator?  When do you 
> need an qualified id but don't know whether it is a service 
> or a configuration?
> 
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components 
> http://jakarta.apache.org/tapestry
> http://jakarta.apache.org/commons/sandbox/hivemind/
> http://javatapestry.blogspot.com
> 
> > -----Original Message-----
> > From: news [mailto:news@sea.gmane.org] On Behalf Of Eric Yung
> > Sent: Tuesday, October 14, 2003 4:57 AM
> > To: commons-dev@jakarta.apache.org
> > Subject: [HiveMind] User defined Translator
> > 
> > 
> > Hi,
> > 
> > How can I add a new Translator implementation using in the
> > <read-attribute> rule? I know the translators are 
> instantiated in the 
> > DescriptorParser, can I add a new one?
> > 
> > The new Translator in my mind works like the ServiceTranslator /
> > ConfigurationTranslator - it takes the ExtensionPoint ID (either 
> > ConfigurationPoint ID or ServiceExtensionPoint ID) and 
> > returns a fully 
> > qualified id. This translator could be the parent of the 
> > ServiceTranslator / ConfigurationTranslator. What do you 
> > think? Do you think this one should be included into the CVS? 
> > I can provide the 
> > code.
> > 
> > Anyway, I will implement this translator and modify
> > DescriptorParser to 
> > include it in the standard translator set.
> > 
> > 
> > Regards,
> > Eric
> > 
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 


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


RE: [HiveMind] User defined Translator

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
The documentation omits to say that you specify a class name for a translator in addition to the
predefine values such as "int" or "service".

What is the need for your proposed translator?  When do you need an qualified id but don't know
whether it is a service or a configuration?

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
http://jakarta.apache.org/commons/sandbox/hivemind/
http://javatapestry.blogspot.com

> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Eric Yung
> Sent: Tuesday, October 14, 2003 4:57 AM
> To: commons-dev@jakarta.apache.org
> Subject: [HiveMind] User defined Translator
> 
> 
> Hi,
> 
> How can I add a new Translator implementation using in the 
> <read-attribute> rule? I know the translators are instantiated in the 
> DescriptorParser, can I add a new one?
> 
> The new Translator in my mind works like the ServiceTranslator / 
> ConfigurationTranslator - it takes the ExtensionPoint ID (either 
> ConfigurationPoint ID or ServiceExtensionPoint ID) and 
> returns a fully 
> qualified id. This translator could be the parent of the 
> ServiceTranslator / ConfigurationTranslator. What do you 
> think? Do you think this one should be included into the CVS? 
> I can provide the 
> code.
> 
> Anyway, I will implement this translator and modify 
> DescriptorParser to 
> include it in the standard translator set.
> 
> 
> Regards,
> Eric
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 


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