Components: introduce dependency injection
(MAGNOLIA-2569)
|
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | content2bean, core |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Sub-task | Priority: | Neutral |
| Reporter: | Tobias Mattsson | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||||||||||
| Description |
|
Ideally, we should go for a much simpler interface: public interface Content2Bean { Object toBean(Content node) throws Content2BeanException; } 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 Additional ideas:
|