[MAGNOLIA-5330] Node2Bean should support setContent(Node) Created: 23/Sep/13 Updated: 19/Feb/16 Resolved: 17/Feb/16 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | None |
| Fix Version/s: | 5.4.5 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Tobias Mattsson | Assignee: | Tobias Mattsson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | next | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 0.25d | ||
| 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: | |
| Epic Link: | Support |
| Sprint: | Kromeriz 31 |
| Story Points: | 2 |
| Description |
|
Node2Bean supports setting the content/node where the bean was read from using a setter called setContent. However it only works with the Content object, not a plain JCR Node object. In Node2BeanTransformerImpl#setProperty we should check the type of the setter and be able to set it using both types. The way the feature is implemented we support these variations:
We should not break any of these, so something like: if (propertyName.equals("content") && value == null && descriptor.getType().getType().isAssignableFrom(SystemContentWrapper.class)) { ... } |