[MAGNOLIA-1453] beanification: reading configuration structures, allow class definition per node, support maps Created: 06/Apr/07 Updated: 23/Jan/13 Resolved: 27/Apr/07 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | None |
| Fix Version/s: | 3.1 M1 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Philipp Bärfuss | Assignee: | Philipp Bärfuss |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Date of First Response: |
| Description |
|
I started to improved the ContentUtil.setProperties() method and wrote a general configuration reader. I will put this into another util class or package. How ever Gregory is working on a similar system based on xsteram and jcr and as we know we use openwfe's encoder/decoder. What I have written is not meant to be a persistance mechanism but a tool to read configuration the way magnolia configuration is defined in general. It is very likely that this code will be replaced by Gregories work once we have internal jcr nodes and his work is finished. For now I would like to motivate everyone to use the toBean(node) methods where every they transform configuration to beans. This will improve the flexibility of magnolia a lot:
Example (orginal reason |
| Comments |
| Comment by Philipp Bracher [ 13/Apr/07 ] |
|
I checked in my code. Here is what it is about:
In the most cases a call to ConfigUtil.toBean(Content node, boolean recursive) will be enough. If you need more customization you will use Content2BeanProcessor.getInstance(). In most of the other cases the Content2BeanUtil will be enough. The implementation of serializing beans to a configuration is not yet implemented, but can follow in case we need it. I will extract the Content2BeanProcessor interface for simplify tests. |
| Comment by Philipp Bracher [ 13/Apr/07 ] |
|
Interfaces are extracted, comments added and minor cleanup done |
| Comment by Philipp Bracher [ 15/Apr/07 ] |
|
The transformer and the current transformation state are the same. This is wrong and need to be changed. |
| Comment by Philipp Bracher [ 18/Apr/07 ] |
|
state, transformer and mappings separated now we can think about bean to content transformation (should be trivial since the base is already there) |
| Comment by Philipp Bracher [ 27/Apr/07 ] |
|
content 2 bean transformation is working fine. I will define new more precise jira entries |