<p dir="ltr">RuleProviderRegistry seems fine. I&#39;ll change it to that.</p>
<p dir="ltr">---<br>
Lincoln Baxter, III<br>
<a href="http://ocpsoft.org">http://ocpsoft.org</a><br>
&quot;Simpler is better.&quot;</p>
<div class="gmail_quote">On Mar 5, 2015 2:39 PM, &quot;Jess Sightler&quot; &lt;<a href="mailto:jsightle@redhat.com">jsightle@redhat.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On 03/05/2015 02:10 AM, Ondrej Zizka wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; 1) WindupRuleMetadata should IMO be named RuleProvidersRegistry.<br>
&gt;<br>
&gt; 2) WindupRuleMetadata has:<br>
&gt;<br>
&gt;       private final List&lt;WindupRuleProvider&gt; providers = new ArrayList&lt;&gt;();<br>
&gt;       private final IdentityHashMap&lt;WindupRuleProvider, List&lt;Rule&gt;&gt;<br>
&gt; providersToRules = new IdentityHashMap&lt;&gt;();<br>
&gt;       private Configuration configuration;<br>
&gt;<br>
&gt; Isn&#39;t the first redundant? It can be acquired simply by<br>
&gt; providersToRules.getKeys().<br>
&gt;<br>
&gt; And WRT configuration - that one only has<br>
&gt;<br>
&gt;          public List&lt;Rule&gt; getRules();<br>
&gt;<br>
&gt; Is that another redundancy, since rules are in the map? It could be<br>
&gt; retrieved as merge of getValues().<br>
<br>
<br>
The current metadata PR renames it to &quot;LoadedRules&quot;. I think that I like<br>
the name RuleProviderRegistry better than that, though.<br>
<br>
The reason for multiple stores is the ordering. The Map is not an<br>
ordered map (though it could probably be replaced with one that is). I&#39;m<br>
not really sure what would be gained by getting rid of the Configuration<br>
object itself. That is ultimately what WindupProcessorImpl uses to<br>
execute the rules. I guess that it could call getRules() directly and<br>
create that later, but I&#39;m not sure if that is really an improvement.<br>
_______________________________________________<br>
windup-dev mailing list<br>
<a href="mailto:windup-dev@lists.jboss.org">windup-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/windup-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/windup-dev</a><br>
</blockquote></div>