[
http://jira.magnolia-cms.com/browse/MAGNOLIA-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Grégory Joseph updated MAGNOLIA-3525:
-------------------------------------
Description:
While working on MAGNOLIA-2569, I had to change the Content2Bean interfaces,
notably starting to pass the {{TypeMapping}} instance around.
There are probably better ways - since {{TypeMapping}} is some sort of global
"cache", it shouldn't be necessary to pass it around. There was some (cyclic-)
dependency issue, because Transformers needed an instance of {{TypeMapping}}.
Ideally, we should go for a much simpler interface:
{code}
public interface Content2Bean {
Object toBean(Content node) throws Content2BeanException;
}
{code}
Sprinkle some generics magic on top of that, and nobody should (hopefully) have
to specify the transformer they need anymore. There's probably going to be some
sort of transformer registry somewhere, where transformers are able to tell
what type(s) they're transforming.
Some (if not all) transformers will need to be explicitly registered (either
just as "components" or explicitly as "transformers" - see MAGNOLIA-3517)
Subclasses of CollectionPropertyHidingTransformer for instance, will probably
need that.
was:
While working on MAGNOLIA-2569, I had to change the Content2Bean interfaces,
notably starting to pass the {{TypeMapping}} instance around.
There are probably better ways - since {{TypeMapping}} is some sort of global
"cache", it shouldn't be necessary to pass it around. There was some (cyclic-)
dependency issue, because Transformers needed an instance of {{TypeMapping}}.
Ideally, we should go for a much simpler interface:
{code}
public interface Content2Bean {
Object toBean(Content node) throws Content2BeanException;
}
{code}
Sprinkle some generics magic on top of that, and nobody should (hopefully) have
to specify the transformer they need anymore. There's probably going to be some
sort of transformer registry somewhere, where transformers are able to tell
what type(s) they're transforming.
> Revise content2bean
> -------------------
>
> Key: MAGNOLIA-3525
> URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-3525
> Project: Magnolia
> Issue Type: Sub-task
> Components: content2bean, core
> Reporter: Grégory Joseph
> Assignee: Boris Kraft
> Fix For: 5.0
>
>
> While working on MAGNOLIA-2569, I had to change the Content2Bean interfaces,
> notably starting to pass the {{TypeMapping}} instance around.
> There are probably better ways - since {{TypeMapping}} is some sort of global
> "cache", it shouldn't be necessary to pass it around. There was some
> (cyclic-) dependency issue, because Transformers needed an instance of
> {{TypeMapping}}.
> Ideally, we should go for a much simpler interface:
> {code}
> public interface Content2Bean {
> Object toBean(Content node) throws Content2BeanException;
> }
> {code}
> Sprinkle some generics magic on top of that, and nobody should (hopefully)
> have to specify the transformer they need anymore. There's probably going to
> be some sort of transformer registry somewhere, where transformers are able
> to tell what type(s) they're transforming.
> Some (if not all) transformers will need to be explicitly registered (either
> just as "components" or explicitly as "transformers" - see MAGNOLIA-3517)
> Subclasses of CollectionPropertyHidingTransformer for instance, will probably
> need that.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------