-
Story
-
Resolution: Done
-
Major
-
2.0.0.Alpha1
-
None
Problem with WindupConfigModel is that currently it needs context
initialized, since it is initialized like this:
WindupConfigurationModel config =
GraphService.getConfigurationModel(context);
And at the same time this config "DTO" needs to be passed into the
top-level API (currently WindupProcessor).
I can see 2 solutions:
A) Continue using WCM, implement WINDUP-147 GraphService.merge()
to store classes implementing the model interface
so that supports adjacent models (needed for the scan packages)
B) Have WindupConfig, and copy stuff to WCM (which is the same as A,
only done manually)
C) What I am currently doing, an ugly hack - passing final variables
into GraphLifecycleListener
// Fill the graph with test data. GraphLifecycleListener initializer = new GraphLifecycleListener() { public void postOpen( GraphContext context ){ // This line causes graph to be initialized lazily. final WindupConfigurationModel config = GraphService.getConfigurationModel(context); // ...