[MAGNOLIA-7071] Outline config-by-code discovery tooling Created: 14/Jun/17  Updated: 03/Jul/17  Resolved: 03/Jul/17

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

Type: New Feature Priority: Neutral
Reporter: Aleksandr Pchelintcev Assignee: Aleksandr Pchelintcev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Epic Link: Config by code
Sprint: Basel 102
Story Points: 8

 Description   

Create a simple config source implementation which would scan the module classes and look for the methods supplied with a config-related annotation (e.g. @Dialog, @App etc).

For the starters such configuration source could merely detect such methods, execute them, fetch the result (a definition) and craft a definition provider out of it, rendering it static. Some further steps could include:

  • "always-invoke" version, which would always trigger the method call, allowing the dynamically populated definitions (this has to used with caution performance-wise);
  • combine the file-based approach and the code-based approach: allow to register groovy scripts (that use the same APIs) which unlike the described module methods could be moved and edited deliberately.


 Comments   
Comment by Aleksandr Pchelintcev [ 03/Jul/17 ]

So far the attached pull request contains the solution outline (builder API generator included).

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