[MAGNOLIA-4838] Allow Freemarker model factories to take precedence over builtin wrapping Created: 14/Feb/13 Updated: 18/Feb/13 Resolved: 14/Feb/13 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.0 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Tobias Mattsson | Assignee: | Tobias Mattsson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| 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)
|
||||||||
| Description |
|
In MagnoliaObjectWrapper we have a mechanism for configuring model factories, they're part of FreemarkerConfig. There's also two fixed cases for classes whose model factories are used for bypassing the default wrapping. We should allow all our model factories to override the builtins. |
| Comments |
| Comment by Tobias Mattsson [ 14/Feb/13 ] |
|
We add an interface PrioritizedMagnoliaModelFactory and have ContentMapModel$Factory and ContextmodelFactory implement it. We remove the fixed checks by checking for this interface in MagnoliaObjectWrapper. |
| Comment by Tobias Mattsson [ 15/Feb/13 ] |
|
Update after review, we will make all factories have precedence. No special interface is needed. |