commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yogesh Rao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SANDBOX-472) Transformer Registry
Date Mon, 25 Aug 2014 07:14:58 GMT

    [ https://issues.apache.org/jira/browse/SANDBOX-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14108837#comment-14108837
] 

Yogesh Rao commented on SANDBOX-472:
------------------------------------

Hi Benedikt,

Thank you for reviewing the patch ! 

Apologies, I should have cleared the thought in ML before i submitted the patch. The idea
was to create a container which held all the transformers i.e. TransformerRegistry in code.
Holding the transformers would be the only responsibility of the class for now. To use the
Registry and perform all operations around it the TransformerUtilsBean was created.So this
has methods for converting and populating the registry with help of an external loader. The
reason the loading of transformers was externalized because it gave the extensibility to the
design of allowing the user to push in custom transformers if needed.

Keeping in mind our previous discussion on creating a context built around the builder pattern,
if the user needed customized transformers the loader is something that would be passed (using
fluent api) instead of a Single Transformer or a Collection of it. (This loader would be extension
of our loader or  a scratch implementation) This loader would be later on passed while creating
the TransformerUtilsBean during the context creation thus helping us load the registry and
make it available. My thought was to hide all of this inside the framework which ends up calling
the TransformerUtilsBean only when it needs to convert.

WDYT ?

I can provide a patch with just the Registry and the test cases surrounding it.

Regards,
-Yogesh

> Transformer Registry
> --------------------
>
>                 Key: SANDBOX-472
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-472
>             Project: Commons Sandbox
>          Issue Type: Task
>          Components: BeanUtils2
>    Affects Versions: Nightly Builds
>            Reporter: Yogesh Rao
>            Assignee: Benedikt Ritter
>             Fix For: Nightly Builds
>
>         Attachments: TestStringFloatTransformerImpl.java.txt, TestStringIntegerTransformerImpl.java.txt,
TransformerRegistry.java.txt, TransformerRegistryTestCase.java.txt, sandbox-472.patch
>
>
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing out on basics.
Beanutils1 has a functionality wherein all the converters are registered and are called when
conversion in value is required. This functionality is missing for BU2 project. I also saw
that BeanUtils1 uses WeakFastHashMap for this, which seems like is having issues across architectures
and did see few JIRA's on this. Wanted inputs if having a synchronized instance of WeakHashMap
wrapped in the TransformerRegsitry class and providing methods to register, deregister, restoreDefault,
lookup be desired?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message