Details
-
Story
-
Resolution: Won't Do
-
Undefined
-
None
-
2.4.0.Final
-
None
-
None
Description
For effective use of the current .when() .perform() paradigm, it would be nice to have a possibility to iterate over multiple variables.
Example:
return ConfigurationBuilder.begin() .addRule() .when( Query.fromType(WindupConfigurationModel.class).as("wc"), Query.fromType(ProjectModel.class).as("projects"), Query.from("projects").piped(new InCriterion(FileModel.FILE_TO_PROJECT_MODEL)).withProperty(PROPERTY_UNPARSABLE) .as("files") )
I need to be able to reach both projects and files in the same operation. I don't see a way in the API to get to the current item of the outer iteration.
So I suggest something along the lines of
Iteration.over("wc","projects","files").perform(new AbstractMultiIterationOperation("x","y","z"))
which would need to change the internals so they would shuffle around a Map<<String>, Iterable<...>> instead of just Iterable<...> .
Up to our consideration if it would make so much good it's worth implementing it.
We might need it for XML rules sooner or later, too.
I found config/tests/src/test/java/org/jboss/windup/config/iteration/payload/IterationPayLoadPassTest.java
(20:20:20) ozizka-FN: But I don't see there how to get to the inner variable