[MAGNOLIA-5726] Use IoC to set a custom ClassFactory Created: 25/Mar/14 Updated: 04/Mar/19 |
|
| Status: | Open |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | 5.2.3 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Neutral |
| Reporter: | Federico Grilli | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Template: |
|
||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||
| Task DoR: |
Empty
|
||||||||||||||||
| Description |
|
Before IoC was introduced in Magnolia, the way to replace the DefaultClassFactory with a custom one was by means of a Magnolia SystemProperty which info.magnolia.objectfactory.Classes would check via its getCurrentlyConfiguredClassName() method. Such property could be set by modules in the module descriptor e.g.
<properties>
<property>
<name>info.magnolia.objectfactory.ClassFactory</name>
<value>my.module.MyClassFactory</value>
</property>
</properties>
Now, since we have IoC support in Magnolia, this way of configuring components has become legacy (see http://wiki.magnolia-cms.com/display/DEV/Components+in+Magnolia#ComponentsinMagnolia-Legacy), yet Classes keeps on using it to instantiate the desired ClassFactory implementation. Besides that, info.magnolia.cms.core.SystemProperty has been deprecated too in the meantime. |