[MAGNOLIA-1527] content2bean: use it to build the system core objects Created: 11/May/07  Updated: 23/Jan/13  Resolved: 06/Nov/07

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: 3.5 RC1

Type: New Feature 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
Date of First Response:

 Description   

After using content2bean in some places the idea of using it as a general mechanism came up. Instead of introducing spring to wire up the objects we could do the following:

Main idea:

  • in addition of defining the implementation class as a property (as we do today) we allow defining a path to the configuration in the config repository
  • The FacotryUtil uses content2bean to create the objects
  • FactoryUtil starts an observation for the singletons (no extra-coding for reloading, synchronization properly handled, ...)

Add ons:

  • To allow complex transformations a class/type based transformer registration is supported
  • For objects which are created before the repository is present (module regisration, content repository, ...) we could use the same mechanism by using a properties file based (mock) hierarchy manager.

This would make the system highly flexible without changing much. ALL static methods except those to get the instances will be deprecated.



 Comments   
Comment by Philipp Bracher [ 16/May/07 ]

The first step is done. Pathes are supported. You define a property like:

info.magnolia.cms.i18n.I18NSupport=/server/i18n/content

The call to FactoryUtil.getSingleton(I18NSupport.class) will return an observed object built using content2bean.

Note that repository prefixes followed by a column are supported (config:/mypath).

Comment by Philipp Bracher [ 16/May/07 ]

The property can also define a class of type FactoryUtil.InstanceFacotry in case you have to use constructors.

Comment by Philipp Bracher [ 06/Nov/07 ]

Is done. Many of the objects are build by using the new mechanism.

Others will follow later on.

Generated at Mon Feb 12 03:27:46 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.