Uploaded image for project: 'WINDUP - Red Hat Application Migration Toolkit'
  1. WINDUP - Red Hat Application Migration Toolkit
  2. WINDUP-274

WindupConfiguration[Model] construction without need for GraphContext.

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Major Major
    • 2.0.0.Beta3
    • 2.0.0.Alpha1
    • MTA CLI
    • 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);
                      // ...
      

            ozizka_jira Ondrej Zizka (Inactive)
            ozizka_jira Ondrej Zizka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: